diff options
| author | perry <perry@NetBSD.org> | 2005-12-24 20:06:46 +0000 |
|---|---|---|
| committer | perry <perry@NetBSD.org> | 2005-12-24 20:06:46 +0000 |
| commit | 5f1c88d70d1b3cd73104f217a48141b4e0e3434d (patch) | |
| tree | bf1e973008b2f1d218b908dd66ddd91e3fb6cf29 | |
| parent | a2cd732268201e59a69ccf2bfd390176b5c270a6 (diff) | |
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
544 files changed, 4158 insertions, 4158 deletions
diff --git a/sys/altq/altq_classq.h b/sys/altq/altq_classq.h index e44a82db1c7..99df3685802 100644 --- a/sys/altq/altq_classq.h +++ b/sys/altq/altq_classq.h @@ -1,4 +1,4 @@ -/* $NetBSD: altq_classq.h,v 1.5 2005/12/11 12:16:03 christos Exp $ */ +/* $NetBSD: altq_classq.h,v 1.6 2005/12/24 20:10:16 perry Exp $ */ /* $KAME: altq_classq.h,v 1.3 2000/07/25 10:12:29 kjc Exp $ */ /* @@ -89,7 +89,7 @@ extern void _flushq(class_queue_t *); /* * inlined versions */ -static __inline void +static inline void _addq(class_queue_t *q, struct mbuf *m) { struct mbuf *m0; @@ -103,7 +103,7 @@ _addq(class_queue_t *q, struct mbuf *m) qlen(q)++; } -static __inline struct mbuf * +static inline struct mbuf * _getq(class_queue_t *q) { struct mbuf *m, *m0; @@ -120,7 +120,7 @@ _getq(class_queue_t *q) } /* drop a packet at the tail of the queue */ -static __inline struct mbuf * +static inline struct mbuf * _getq_tail(class_queue_t *q) { struct mbuf *m, *m0, *prev; @@ -142,7 +142,7 @@ _getq_tail(class_queue_t *q) } /* randomly select a packet in the queue */ -static __inline struct mbuf * +static inline struct mbuf * _getq_random(class_queue_t *q) { struct mbuf *m; @@ -169,7 +169,7 @@ _getq_random(class_queue_t *q) return (m); } -static __inline void +static inline void _removeq(class_queue_t *q, struct mbuf *m) { struct mbuf *m0, *prev; @@ -187,7 +187,7 @@ _removeq(class_queue_t *q, struct mbuf *m) qlen(q)--; } -static __inline void +static inline void _flushq(class_queue_t *q) { struct mbuf *m; diff --git a/sys/altq/altq_hfsc.c b/sys/altq/altq_hfsc.c index 9bd894cb7a6..c48e6035e66 100644 --- a/sys/altq/altq_hfsc.c +++ b/sys/altq/altq_hfsc.c @@ -1,4 +1,4 @@ -/* $NetBSD: altq_hfsc.c,v 1.11 2005/12/11 12:16:03 christos Exp $ */ +/* $NetBSD: altq_hfsc.c,v 1.12 2005/12/24 20:10:16 perry Exp $ */ /* $KAME: altq_hfsc.c,v 1.9 2001/10/26 04:56:11 kjc Exp $ */ /* @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: altq_hfsc.c,v 1.11 2005/12/11 12:16:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: altq_hfsc.c,v 1.12 2005/12/24 20:10:16 perry Exp $"); #if defined(__FreeBSD__) || defined(__NetBSD__) #include "opt_altq.h" @@ -117,11 +117,11 @@ static void actlist_insert __P((struct hfsc_class *)); static void actlist_remove __P((struct hfsc_class *)); static void actlist_update __P((struct hfsc_class *)); -static __inline u_int64_t seg_x2y __P((u_int64_t, u_int64_t)); -static __inline u_int64_t seg_y2x __P((u_int64_t, u_int64_t)); -static __inline u_int64_t m2sm __P((u_int)); -static __inline u_int64_t m2ism __P((u_int)); -static __inline u_int64_t d2dx __P((u_int)); +static inline u_int64_t seg_x2y __P((u_int64_t, u_int64_t)); +static inline u_int64_t seg_y2x __P((u_int64_t, u_int64_t)); +static inline u_int64_t m2sm __P((u_int)); +static inline u_int64_t m2ism __P((u_int)); +static inline u_int64_t d2dx __P((u_int)); static u_int sm2m __P((u_int64_t)); static u_int dx2d __P((u_int64_t)); @@ -1165,7 +1165,7 @@ actlist_update(cl) #define SC_LARGEVAL (1LL << 32) #define SC_INFINITY 0xffffffffffffffffLL -static __inline u_int64_t +static inline u_int64_t seg_x2y(x, sm) u_int64_t x; u_int64_t sm; @@ -1179,7 +1179,7 @@ seg_x2y(x, sm) return (y); } -static __inline u_int64_t +static inline u_int64_t seg_y2x(y, ism) u_int64_t y; u_int64_t ism; @@ -1197,7 +1197,7 @@ seg_y2x(y, ism) return (x); } -static __inline u_int64_t +static inline u_int64_t m2sm(m) u_int m; { @@ -1207,7 +1207,7 @@ m2sm(m) return (sm); } -static __inline u_int64_t +static inline u_int64_t m2ism(m) u_int m; { @@ -1220,7 +1220,7 @@ m2ism(m) return (ism); } -static __inline u_int64_t +static inline u_int64_t d2dx(d) u_int d; { diff --git a/sys/altq/altq_red.c b/sys/altq/altq_red.c index a51716c9f1b..3027e7d74ba 100644 --- a/sys/altq/altq_red.c +++ b/sys/altq/altq_red.c @@ -1,4 +1,4 @@ -/* $NetBSD: altq_red.c,v 1.12 2005/12/11 12:16:03 christos Exp $ */ +/* $NetBSD: altq_red.c,v 1.13 2005/12/24 20:10:16 perry Exp $ */ /* $KAME: altq_red.c,v 1.9 2002/01/07 11:25:40 kjc Exp $ */ /* @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: altq_red.c,v 1.12 2005/12/11 12:16:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: altq_red.c,v 1.13 2005/12/24 20:10:16 perry Exp $"); #if defined(__FreeBSD__) || defined(__NetBSD__) #include "opt_altq.h" @@ -200,13 +200,13 @@ static int red_request __P((struct ifaltq *, int, void *)); static void red_purgeq __P((red_queue_t *)); static int red_detach __P((red_queue_t *)); #ifdef ALTQ_FLOWVALVE -static __inline struct fve *flowlist_lookup __P((struct flowvalve *, +static inline struct fve *flowlist_lookup __P((struct flowvalve *, struct altq_pktattr *, struct timeval *)); -static __inline struct fve *flowlist_reclaim __P((struct flowvalve *, +static inline struct fve *flowlist_reclaim __P((struct flowvalve *, struct altq_pktattr *)); -static __inline void flowlist_move_to_head __P((struct flowvalve *, +static inline void flowlist_move_to_head __P((struct flowvalve *, struct fve *)); -static __inline int fv_p2f __P((struct flowvalve *, int)); +static inline int fv_p2f __P((struct flowvalve *, int)); static struct flowvalve *fv_alloc __P((struct red *)); static void fv_destroy __P((struct flowvalve *)); static int fv_checkflow __P((struct flowvalve *, struct altq_pktattr *, @@ -1129,7 +1129,7 @@ const int brtt_tab[BRTT_SIZE] = { 4611, 4504, 4400, 4299, 4201, 4106, 4014, 3924 }; -static __inline struct fve * +static inline struct fve * flowlist_lookup(fv, pktattr, now) struct flowvalve *fv; struct altq_pktattr *pktattr; @@ -1199,7 +1199,7 @@ flowlist_lookup(fv, pktattr, now) return (NULL); } -static __inline struct fve * +static inline struct fve * flowlist_reclaim(fv, pktattr) struct flowvalve *fv; struct altq_pktattr *pktattr; @@ -1245,7 +1245,7 @@ flowlist_reclaim(fv, pktattr) return (fve); } -static __inline void +static inline void flowlist_move_to_head(fv, fve) struct flowvalve *fv; struct fve *fve; @@ -1323,7 +1323,7 @@ static void fv_destroy(fv) FREE(fv, M_DEVBUF); } -static __inline int +static inline int fv_p2f(fv, p) struct flowvalve *fv; int p; diff --git a/sys/altq/altq_var.h b/sys/altq/altq_var.h index 6feef8d65ee..aeb959ac80d 100644 --- a/sys/altq/altq_var.h +++ b/sys/altq/altq_var.h @@ -1,4 +1,4 @@ -/* $NetBSD: altq_var.h,v 1.6 2005/12/11 12:16:03 christos Exp $ */ +/* $NetBSD: altq_var.h,v 1.7 2005/12/24 20:10:16 perry Exp $ */ /* $KAME: altq_var.h,v 1.7 2000/12/14 08:12:46 thorpej Exp $ */ /* @@ -116,11 +116,11 @@ extern void init_machclk(void); #define read_machclk() rdtsc() #ifdef __OpenBSD__ -static __inline u_int64_t +static inline u_int64_t rdtsc(void) { u_int64_t rv; - __asm __volatile(".byte 0x0f, 0x31" : "=A" (rv)); + __asm volatile(".byte 0x0f, 0x31" : "=A" (rv)); return (rv); } #endif /* __OpenBSD__ */ @@ -132,7 +132,7 @@ extern u_int64_t read_machclk(void); #else /* !i386 && !alpha */ /* emulate 256MHz using microtime() */ #define MACHCLK_SHIFT 8 -static __inline u_int64_t +static inline u_int64_t read_machclk(void) { struct timeval tv; diff --git a/sys/altq/altq_wfq.c b/sys/altq/altq_wfq.c index 812b2c5a85b..1fe8e163a71 100644 --- a/sys/altq/altq_wfq.c +++ b/sys/altq/altq_wfq.c @@ -1,4 +1,4 @@ -/* $NetBSD: altq_wfq.c,v 1.8 2005/12/11 12:16:03 christos Exp $ */ +/* $NetBSD: altq_wfq.c,v 1.9 2005/12/24 20:10:16 perry Exp $ */ /* $KAME: altq_wfq.c,v 1.7 2000/12/14 08:12:46 thorpej Exp $ */ /* @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: altq_wfq.c,v 1.8 2005/12/11 12:16:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: altq_wfq.c,v 1.9 2005/12/24 20:10:16 perry Exp $"); #if defined(__FreeBSD__) || defined(__NetBSD__) #include "opt_altq.h" @@ -74,8 +74,8 @@ static int wfq_ifdetach(struct wfq_interface *); static int wfq_ifenqueue(struct ifaltq *, struct mbuf *, struct altq_pktattr *); static u_long wfq_hash(struct flowinfo *, int); -static __inline u_long wfq_hashbydstaddr(struct flowinfo *, int); -static __inline u_long wfq_hashbysrcport(struct flowinfo *, int); +static inline u_long wfq_hashbydstaddr(struct flowinfo *, int); +static inline u_long wfq_hashbysrcport(struct flowinfo *, int); static wfq *wfq_maxqueue(wfq_state_t *); static struct mbuf *wfq_ifdequeue(struct ifaltq *, int); static int wfq_getqid(struct wfq_getqid *); @@ -361,7 +361,7 @@ static u_long wfq_hash(flow, n) } -static __inline u_long wfq_hashbydstaddr(flow, n) +static inline u_long wfq_hashbydstaddr(flow, n) struct flowinfo *flow; int n; { @@ -386,7 +386,7 @@ static __inline u_long wfq_hashbydstaddr(flow, n) return (val % n); } -static __inline u_long wfq_hashbysrcport(flow, n) +static inline u_long wfq_hashbysrcport(flow, n) struct flowinfo *flow; int n; { diff --git a/sys/arch/acorn26/acorn26/cpu.c b/sys/arch/acorn26/acorn26/cpu.c index 06acaf20437..710716646d7 100644 --- a/sys/arch/acorn26/acorn26/cpu.c +++ b/sys/arch/acorn26/acorn26/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.18 2005/12/11 12:16:03 christos Exp $ */ +/* $NetBSD: cpu.c,v 1.19 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2000, 2001 Ben Harris @@ -32,7 +32,7 @@ #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.18 2005/12/11 12:16:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.19 2005/12/24 20:06:46 perry Exp $"); #include <sys/device.h> #include <sys/proc.h> @@ -161,10 +161,10 @@ cpu_identify() if (setjmp(&undef_jmp) == 0) { id = CPU_ID_ARM2; /* ARM250 and ARM3 support SWP. */ - __asm __volatile ("swp r0, r0, [%0]" : : "r" (&dummy) : "r0"); + __asm volatile ("swp r0, r0, [%0]" : : "r" (&dummy) : "r0"); id = CPU_ID_ARM250; /* ARM3 has an internal coprocessor 15 with an ID register. */ - __asm __volatile ("mrc 15, 0, %0, cr0, cr0" : "=r" (id)); + __asm volatile ("mrc 15, 0, %0, cr0, cr0" : "=r" (id)); } remove_coproc_handler(cp_core); remove_coproc_handler(cp15); diff --git a/sys/arch/acorn26/acorn26/cpuvar.h b/sys/arch/acorn26/acorn26/cpuvar.h index 4407155a52f..5d4b54f2012 100644 --- a/sys/arch/acorn26/acorn26/cpuvar.h +++ b/sys/arch/acorn26/acorn26/cpuvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpuvar.h,v 1.3 2003/05/31 00:38:05 kristerw Exp $ */ +/* $NetBSD: cpuvar.h,v 1.4 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2000 Ben Harris * All rights reserved. @@ -34,7 +34,7 @@ extern int cpu_delay_factor; /* Fixed code sequence for reliability */ #define cpu_delayloop(loops) \ - __asm __volatile ("1:subs %0, %0, #1; bne 1b" : : "r" (loops) : "cc") + __asm volatile ("1:subs %0, %0, #1; bne 1b" : : "r" (loops) : "cc") extern void cpu_cache_flush(void); diff --git a/sys/arch/acorn26/acorn26/irq.c b/sys/arch/acorn26/acorn26/irq.c index 73ee9eea341..cb151d14453 100644 --- a/sys/arch/acorn26/acorn26/irq.c +++ b/sys/arch/acorn26/acorn26/irq.c @@ -1,4 +1,4 @@ -/* $NetBSD: irq.c,v 1.6 2005/12/11 12:16:03 christos Exp $ */ +/* $NetBSD: irq.c,v 1.7 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2000, 2001 Ben Harris @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: irq.c,v 1.6 2005/12/11 12:16:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irq.c,v 1.7 2005/12/24 20:06:46 perry Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -107,7 +107,7 @@ struct irq_handler { volatile static int current_spl = IPL_HIGH; -__inline int hardsplx(int); +inline int hardsplx(int); void irq_init(void) @@ -339,7 +339,7 @@ int schedbreak = 0; #include <machine/db_machdep.h> #include <ddb/db_interface.h> -__inline int +inline int hardsplx(int s) { int was; diff --git a/sys/arch/acorn26/acorn26/machdep.c b/sys/arch/acorn26/acorn26/machdep.c index 525e79b07b3..b535a891217 100644 --- a/sys/arch/acorn26/acorn26/machdep.c +++ b/sys/arch/acorn26/acorn26/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.16 2005/12/11 12:16:03 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.17 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1998 Ben Harris @@ -32,7 +32,7 @@ #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2005/12/11 12:16:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.17 2005/12/24 20:06:46 perry Exp $"); #include <sys/buf.h> #include <sys/kernel.h> @@ -133,7 +133,7 @@ haltsys: *(volatile u_int32_t *)0 = *(volatile u_int32_t *)MEMC_ROM_LOW_BASE; /* reboot in SVC mode, IRQs and FIQs disabled */ - __asm __volatile("movs pc, %0" : : + __asm volatile("movs pc, %0" : : "r" (R15_MODE_SVC | R15_FIQ_DISABLE | R15_IRQ_DISABLE)); } panic("cpu_reboot failed"); diff --git a/sys/arch/acorn26/include/pmap.h b/sys/arch/acorn26/include/pmap.h index 18c40a179e2..738f25029cf 100644 --- a/sys/arch/acorn26/include/pmap.h +++ b/sys/arch/acorn26/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.4 2002/09/22 07:53:39 chs Exp $ */ +/* $NetBSD: pmap.h,v 1.5 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1997, 1998 Ben Harris * All rights reserved. @@ -54,7 +54,7 @@ extern boolean_t pmap_fault(pmap_t, vaddr_t, vm_prot_t); extern long _pmap_resident_count(pmap_t); extern long _pmap_wired_count(pmap_t); -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/acorn32/include/lock.h b/sys/arch/acorn32/include/lock.h index 044b98c8830..5c0580a287e 100644 --- a/sys/arch/acorn32/include/lock.h +++ b/sys/arch/acorn32/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.4 2005/12/11 12:16:05 christos Exp $ */ +/* $NetBSD: lock.h,v 1.5 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -47,23 +47,23 @@ #include <arm/cpufunc.h> -static __inline int -__swp(int __val, __volatile int *__ptr) +static inline int +__swp(int __val, volatile int *__ptr) { - __asm __volatile("swp %0, %1, [%2]" + __asm volatile("swp %0, %1, [%2]" : "=r" (__val) : "r" (__val), "r" (__ptr) : "memory"); return __val; } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { *alp = __SIMPLELOCK_UNLOCKED; } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) __cpu_simple_lock(__cpu_simple_lock_t *alp) { @@ -72,7 +72,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) cpu_idcache_wbinv_all(); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { int __result; @@ -83,7 +83,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *alp) return __result; } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) __cpu_simple_unlock(__cpu_simple_lock_t *alp) { diff --git a/sys/arch/acorn32/mainbus/fd.c b/sys/arch/acorn32/mainbus/fd.c index 46fcdeb837d..371b4b92721 100644 --- a/sys/arch/acorn32/mainbus/fd.c +++ b/sys/arch/acorn32/mainbus/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.22 2005/12/11 12:16:05 christos Exp $ */ +/* $NetBSD: fd.c,v 1.23 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -89,7 +89,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.22 2005/12/11 12:16:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.23 2005/12/24 20:06:46 perry Exp $"); #include "opt_ddb.h" @@ -302,7 +302,7 @@ void fdcpseudointr __P((void *arg)); int fdcintr __P((void *)); void fdcretry __P((struct fdc_softc *fdc)); void fdfinish __P((struct fd_softc *fd, struct buf *bp)); -__inline struct fd_type *fd_dev_to_type __P((struct fd_softc *, dev_t)); +inline struct fd_type *fd_dev_to_type __P((struct fd_softc *, dev_t)); int fdformat __P((dev_t, struct ne7_fd_formb *, struct lwp *)); int @@ -555,7 +555,7 @@ fd_nvtotype(fdc, nvraminfo, drive) } } -__inline struct fd_type * +inline struct fd_type * fd_dev_to_type(fd, dev) struct fd_softc *fd; dev_t dev; diff --git a/sys/arch/acorn32/podulebus/ascreg.h b/sys/arch/acorn32/podulebus/ascreg.h index 834370359c2..b573ad04bc4 100644 --- a/sys/arch/acorn32/podulebus/ascreg.h +++ b/sys/arch/acorn32/podulebus/ascreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: ascreg.h,v 1.3 2005/12/11 12:16:05 christos Exp $ */ +/* $NetBSD: ascreg.h,v 1.4 2005/12/24 20:06:46 perry Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -291,7 +291,7 @@ temphi = dmac + 0x0218;/* RO T15 T14 T13 T12 T11 T10 T9 T8 */ ReadSBIC1(sbic_base, a) -static __inline int +static inline int ReadSBIC1(sbic_base, a) u_int sbic_base; int a; diff --git a/sys/arch/acorn32/podulebus/if_ie.c b/sys/arch/acorn32/podulebus/if_ie.c index 72604115c6d..272bbe9e8e2 100644 --- a/sys/arch/acorn32/podulebus/if_ie.c +++ b/sys/arch/acorn32/podulebus/if_ie.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ie.c,v 1.14 2005/12/11 12:16:05 christos Exp $ */ +/* $NetBSD: if_ie.c,v 1.15 2005/12/24 20:06:46 perry Exp $ */ /* * Copyright (c) 1995 Melvin Tang-Richardson. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.14 2005/12/11 12:16:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.15 2005/12/24 20:06:46 perry Exp $"); #define IGNORE_ETHER1_IDROM_CHECKSUM @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.14 2005/12/11 12:16:05 christos Exp $"); #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.14 2005/12/11 12:16:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.15 2005/12/24 20:06:46 perry Exp $"); #include <sys/systm.h> #include <sys/kernel.h> @@ -181,16 +181,16 @@ static int command_and_wait __P(( struct ie_softc *sc, u_short cmd, int ieprobe __P((struct device *, struct cfdata *, void *)); void ieattach __P((struct device *, struct device *, void *)); -static __inline void ie_cli(struct ie_softc *); -static __inline void ieattn(struct ie_softc *); -static __inline void setpage(struct ie_softc *, u_long); +static inline void ie_cli(struct ie_softc *); +static inline void ieattn(struct ie_softc *); +static inline void setpage(struct ie_softc *, u_long); static void ie_ack(struct ie_softc *, u_short); void PWriteShorts(char *, char *, int); void ReadShorts(char *, char *, int); static void run_tdr(struct ie_softc *); u_long setup_rfa(struct ie_softc *, u_long); -static __inline int ie_buflen(struct ie_softc *, int); -static __inline int ie_packet_len(struct ie_softc *); +static inline int ie_buflen(struct ie_softc *, int); +static inline int ie_packet_len(struct ie_softc *); struct mbuf *ieget(struct ie_softc *, int *); void ie_drop_packet_buffer(struct ie_softc *); void ie_read_frame(struct ie_softc *, int num); @@ -212,7 +212,7 @@ CFATTACH_DECL(ie, sizeof(struct ie_softc), * Clear all pending interrupts from the i82586 chip */ -static __inline void +static inline void ie_cli(sc) struct ie_softc *sc; { @@ -223,7 +223,7 @@ ie_cli(sc) * Wake the i82586 chip up and get it to do something */ -static __inline void +static inline void ieattn(sc) struct ie_softc *sc; { @@ -234,7 +234,7 @@ ieattn(sc) * Set the podule page register to bring a given address into view */ -static __inline void +static inline void setpage(sc, off) struct ie_softc *sc; u_long off; @@ -1079,7 +1079,7 @@ command_and_wait(sc, cmd, pscb, pcmd, ocmd, scmd, mask) PWriteShort(sc->sc_ram + IE_COFF2POFF(ptr) + \ (xoffsetof(type, member)), dest ); -static __inline int +static inline int ie_buflen(sc, head) struct ie_softc *sc; int head; @@ -1092,7 +1092,7 @@ ie_buflen(sc, head) return(actual & (IE_RXBUF_SIZE | (IE_RXBUF_SIZE-1))) ; } -static __inline int +static inline int ie_packet_len(sc) struct ie_softc *sc; { diff --git a/sys/arch/algor/algor/algor_p4032_intr.c b/sys/arch/algor/algor/algor_p4032_intr.c index cf07f19c3b5..0a57fb3f215 100644 --- a/sys/arch/algor/algor/algor_p4032_intr.c +++ b/sys/arch/algor/algor/algor_p4032_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: algor_p4032_intr.c,v 1.9 2005/12/11 12:16:08 christos Exp $ */ +/* $NetBSD: algor_p4032_intr.c,v 1.10 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.9 2005/12/11 12:16:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.10 2005/12/24 20:06:46 perry Exp $"); #include "opt_ddb.h" @@ -72,7 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.9 2005/12/11 12:16:08 christo #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> -#define REGVAL(x) *((__volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1((x)))) +#define REGVAL(x) *((volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1((x)))) struct p4032_irqreg { bus_addr_t addr; diff --git a/sys/arch/algor/algor/algor_p5064_intr.c b/sys/arch/algor/algor/algor_p5064_intr.c index 45c22fcca9a..4d10b67071c 100644 --- a/sys/arch/algor/algor/algor_p5064_intr.c +++ b/sys/arch/algor/algor/algor_p5064_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: algor_p5064_intr.c,v 1.12 2005/12/11 12:16:08 christos Exp $ */ +/* $NetBSD: algor_p5064_intr.c,v 1.13 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.12 2005/12/11 12:16:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.13 2005/12/24 20:06:46 perry Exp $"); #include "opt_ddb.h" @@ -76,7 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.12 2005/12/11 12:16:08 christ #include <dev/isa/isavar.h> -#define REGVAL(x) *((__volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1((x)))) +#define REGVAL(x) *((volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1((x)))) struct p5064_irqreg { bus_addr_t addr; diff --git a/sys/arch/algor/algor/machdep.c b/sys/arch/algor/algor/machdep.c index e814e77f461..67cd6a68454 100644 --- a/sys/arch/algor/algor/machdep.c +++ b/sys/arch/algor/algor/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.28 2005/12/11 12:16:08 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.29 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -113,7 +113,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28 2005/12/11 12:16:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2005/12/24 20:06:46 perry Exp $"); #include "opt_algor_p4032.h" #include "opt_algor_p5064.h" @@ -739,7 +739,7 @@ cpu_reboot(int howto, char *bootstr) printf("Returning to the monitor...\n\n"); led_display('r', 'v', 'e', 'c'); /* Jump to the reset vector. */ - __asm __volatile("li %0, 0xbfc00000; jr %0; nop" + __asm volatile("li %0, 0xbfc00000; jr %0; nop" : "=r" (tmp) : /* no inputs */ : "memory"); diff --git a/sys/arch/algor/pci/vtpbc.c b/sys/arch/algor/pci/vtpbc.c index e4955c9f149..b9d4d04c2a8 100644 --- a/sys/arch/algor/pci/vtpbc.c +++ b/sys/arch/algor/pci/vtpbc.c @@ -1,4 +1,4 @@ -/* $NetBSD: vtpbc.c,v 1.5 2005/12/11 12:16:08 christos Exp $ */ +/* $NetBSD: vtpbc.c,v 1.6 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vtpbc.c,v 1.5 2005/12/11 12:16:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vtpbc.c,v 1.6 2005/12/24 20:06:46 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -213,7 +213,7 @@ vtpbc_conf_read(void *v, pcitag_t tag, int offset) wbflush(); /* low 20 bits of address are offset into config space */ - data = *(__volatile u_int32_t *) (vt->vt_cfgbase + (cfgoff & 0xfffff)); + data = *(volatile u_int32_t *) (vt->vt_cfgbase + (cfgoff & 0xfffff)); errbits = V96X_PCI_STAT(vt) & (V96X_PCI_STAT_M_ABORT|V96X_PCI_STAT_T_ABORT); @@ -249,7 +249,7 @@ vtpbc_conf_write(void *v, pcitag_t tag, int offset, pcireg_t data) wbflush(); /* low 20 bits of address are offset into config space */ - *(__volatile u_int32_t *) (vt->vt_cfgbase + (cfgoff & 0xfffff)) = data; + *(volatile u_int32_t *) (vt->vt_cfgbase + (cfgoff & 0xfffff)) = data; /* wait for FIFO to drain */ while (V96X_FIFO_STAT(vt) & V96X_FIFO_STAT_L2P_WR) diff --git a/sys/arch/algor/pci/vtpbcreg.h b/sys/arch/algor/pci/vtpbcreg.h index ad92ff8f585..4e88b2f3eb8 100644 --- a/sys/arch/algor/pci/vtpbcreg.h +++ b/sys/arch/algor/pci/vtpbcreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: vtpbcreg.h,v 1.1 2001/05/28 16:22:21 thorpej Exp $ */ +/* $NetBSD: vtpbcreg.h,v 1.2 2005/12/24 20:06:46 perry Exp $ */ /* * Registers for the V3 Semiconductor V962 and V360EPC i960 @@ -9,13 +9,13 @@ */ #if BYTE_ORDER == LITTLE_ENDIAN -#define V96XW(vt, x) *(__volatile u_int32_t *)((vt)->vt_addr + (x)) -#define V96XH(vt, x) *(__volatile u_int16_t *)((vt)->vt_addr + (x)) -#define V96XB(vt, x) *(__volatile u_int8_t *)((vt)->vt_addr + (x)) +#define V96XW(vt, x) *(volatile u_int32_t *)((vt)->vt_addr + (x)) +#define V96XH(vt, x) *(volatile u_int16_t *)((vt)->vt_addr + (x)) +#define V96XB(vt, x) *(volatile u_int8_t *)((vt)->vt_addr + (x)) #else -#define V96XW(vt, x) *(__volatile u_int32_t *)((vt)->vt_addr + (x)) -#define V96XH(vt, x) *(__volatile u_int16_t *)((vt)->vt_addr + ((x) ^ 2)) -#define V96XB(vt, x) *(__volatile u_int8_t *)((vt)->vt_addr + ((x) ^ 3)) +#define V96XW(vt, x) *(volatile u_int32_t *)((vt)->vt_addr + (x)) +#define V96XH(vt, x) *(volatile u_int16_t *)((vt)->vt_addr + ((x) ^ 2)) +#define V96XB(vt, x) *(volatile u_int8_t *)((vt)->vt_addr + ((x) ^ 3)) #endif #define V96X_PCI_VENDOR(vt) V96XH(vt, 0x00) diff --git a/sys/arch/alpha/a12/if_xb.c b/sys/arch/alpha/a12/if_xb.c index c009e7244fa..3131a6c5c21 100644 --- a/sys/arch/alpha/a12/if_xb.c +++ b/sys/arch/alpha/a12/if_xb.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_xb.c,v 1.13 2005/12/11 12:16:10 christos Exp $ */ +/* $NetBSD: if_xb.c,v 1.14 2005/12/24 20:06:46 perry Exp $ */ /* [Notice revision 2.2] * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc. @@ -74,7 +74,7 @@ #include "opt_avalon_a12.h" /* Config options headers */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.13 2005/12/11 12:16:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.14 2005/12/24 20:06:46 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -192,7 +192,7 @@ static int xb_debug; Static void xb_start __P((struct ifnet *)); Static void xb_mcrp_write __P((long *, int, int)); -static __inline void xb_onefree __P((void)); +static inline void xb_onefree __P((void)); static long set_interrupt_on_fifo_empty(void); static void xb_init(struct ifnet *); static int xb_intr __P((void *)); @@ -232,7 +232,7 @@ xbattach(parent, self, aux) xbfound = 1; ccp = &xb_configuration; xb_init_config(ccp, 1); - printf(": driver %s mtu %d\n", "$Revision: 1.13 $", xbi.if_mtu); + printf(": driver %s mtu %d\n", "$Revision: 1.14 $", xbi.if_mtu); } static void @@ -400,7 +400,7 @@ long t1,t2; /* * Verify during debugging that we have not overflowed the FIFO */ -static __inline void +static inline void xb_onefree() { if (XB_DEBUG && REGVAL(A12_MCSR) & A12_MCSR_OMFF) @@ -467,7 +467,7 @@ xb_ioctl(ifp, cmd, data) * 200 or 300 instructions in the time it takes to do the read part of an * external bus cycle RMW op. (Or 10 - 20 cache cycles.) */ -static __inline long +static inline long xb_fifo_empty(void) { return REGVAL(A12_MCSR) & A12_MCSR_OMFE; diff --git a/sys/arch/alpha/alpha/cpu.c b/sys/arch/alpha/alpha/cpu.c index d26e3a9e692..343b6dd0988 100644 --- a/sys/arch/alpha/alpha/cpu.c +++ b/sys/arch/alpha/alpha/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.72 2005/12/11 12:16:10 christos Exp $ */ +/* $NetBSD: cpu.c,v 1.73 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.72 2005/12/11 12:16:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.73 2005/12/24 20:06:46 perry Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -99,9 +99,9 @@ struct cpu_info *cpu_info_list = &cpu_info_primary; struct cpu_info *cpu_info[ALPHA_MAXPROCS]; /* Bitmask of CPUs booted, currently running, and paused. */ -__volatile u_long cpus_booted; -__volatile u_long cpus_running; -__volatile u_long cpus_paused; +volatile u_long cpus_booted; +volatile u_long cpus_running; +volatile u_long cpus_paused; void cpu_boot_secondary __P((struct cpu_info *)); #endif /* MULTIPROCESSOR */ diff --git a/sys/arch/alpha/alpha/db_interface.c b/sys/arch/alpha/alpha/db_interface.c index e298f9695d9..a94d79bf23e 100644 --- a/sys/arch/alpha/alpha/db_interface.c +++ b/sys/arch/alpha/alpha/db_interface.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.21 2005/12/11 12:16:10 christos Exp $ */ +/* $NetBSD: db_interface.c,v 1.22 2005/12/24 20:06:46 perry Exp $ */ /* * Mach Operating System @@ -52,7 +52,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.21 2005/12/11 12:16:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.22 2005/12/24 20:06:46 perry Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -260,7 +260,7 @@ void cpu_Debugger() { - __asm __volatile("call_pal 0x81"); /* bugchk */ + __asm volatile("call_pal 0x81"); /* bugchk */ } /* diff --git a/sys/arch/alpha/alpha/fp_complete.c b/sys/arch/alpha/alpha/fp_complete.c index f918661a99d..adcf05cd109 100644 --- a/sys/arch/alpha/alpha/fp_complete.c +++ b/sys/arch/alpha/alpha/fp_complete.c @@ -1,4 +1,4 @@ -/* $NetBSD: fp_complete.c,v 1.8 2005/12/11 12:16:10 christos Exp $ */ +/* $NetBSD: fp_complete.c,v 1.9 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -35,7 +35,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: fp_complete.c,v 1.8 2005/12/11 12:16:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fp_complete.c,v 1.9 2005/12/24 20:06:46 perry Exp $"); #include "opt_compat_osf1.h" @@ -169,28 +169,28 @@ this_cannot_happen(int what_cannot_happen, int64_t bits) printf("Please report this to port-alpha-maintainer@NetBSD.org\n"); } -static __inline void +static inline void sts(unsigned int rn, s_float *v, struct lwp *l) { alpha_sts(rn, v); PREFILTER_SUBNORMAL(l, v); } -static __inline void +static inline void stt(unsigned int rn, t_float *v, struct lwp *l) { alpha_stt(rn, v); PREFILTER_SUBNORMAL(l, v); } -static __inline void +static inline void lds(unsigned int rn, s_float *v, struct lwp *l) { POSTFILTER_SUBNORMAL(l, v); alpha_lds(rn, v); } -static __inline void +static inline void ldt(unsigned int rn, t_float *v, struct lwp *l) { POSTFILTER_SUBNORMAL(l, v); diff --git a/sys/arch/alpha/alpha/interrupt.c b/sys/arch/alpha/alpha/interrupt.c index bce8441b39a..5560e489ad4 100644 --- a/sys/arch/alpha/alpha/interrupt.c +++ b/sys/arch/alpha/alpha/interrupt.c @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.68 2005/12/11 12:16:10 christos Exp $ */ +/* $NetBSD: interrupt.c,v 1.69 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.68 2005/12/11 12:16:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.69 2005/12/24 20:06:46 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -502,7 +502,7 @@ netintr() } struct alpha_soft_intr alpha_soft_intrs[SI_NQUEUES]; -__volatile unsigned long ssir; +volatile unsigned long ssir; /* XXX For legacy software interrupts. */ struct alpha_soft_intrhand *softnet_intrhand; diff --git a/sys/arch/alpha/alpha/kgdb_machdep.c b/sys/arch/alpha/alpha/kgdb_machdep.c index b600f3713a5..6c94e17bd11 100644 --- a/sys/arch/alpha/alpha/kgdb_machdep.c +++ b/sys/arch/alpha/alpha/kgdb_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_machdep.c,v 1.3 2003/06/14 17:01:08 thorpej Exp $ */ +/* $NetBSD: kgdb_machdep.c,v 1.4 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.3 2003/06/14 17:01:08 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.4 2005/12/24 20:06:46 perry Exp $"); #include "com.h" @@ -277,7 +277,7 @@ kgdb_connect(int verbose) if (verbose) printf("kgdb waiting..."); - __asm __volatile("call_pal 0x81"); /* bugchk */ + __asm volatile("call_pal 0x81"); /* bugchk */ if (verbose) printf("connected.\n"); diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c index d62a6e1a1d7..cd3737a2ebb 100644 --- a/sys/arch/alpha/alpha/pmap.c +++ b/sys/arch/alpha/alpha/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.212 2005/12/11 12:16:10 christos Exp $ */ +/* $NetBSD: pmap.c,v 1.213 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -145,7 +145,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.212 2005/12/11 12:16:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.213 2005/12/24 20:06:46 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -2370,7 +2370,7 @@ pmap_zero_page(paddr_t phys) * Do only 8 back-to-back stores, and alternate registers. */ do { - __asm __volatile( + __asm volatile( "# BEGIN loop body\n" " addq %2, (8 * 8), %1 \n" " stq $31, (0 * 8)(%0) \n" diff --git a/sys/arch/alpha/include/alpha_cpu.h b/sys/arch/alpha/include/alpha_cpu.h index a98a1d2ec93..1c0c27e255a 100644 --- a/sys/arch/alpha/include/alpha_cpu.h +++ b/sys/arch/alpha/include/alpha_cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: alpha_cpu.h,v 1.46 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: alpha_cpu.h,v 1.47 2005/12/24 20:06:46 perry Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -335,17 +335,17 @@ unsigned long alpha_implver(void); /* XXX Expose the insn wrappers to userspace, for now. */ -static __inline unsigned long +static inline unsigned long alpha_rpcc(void) { unsigned long v0; - __asm __volatile("rpcc %0" : "=r" (v0)); + __asm volatile("rpcc %0" : "=r" (v0)); return (v0); } -#define alpha_mb() __asm __volatile("mb" : : : "memory") -#define alpha_wmb() __asm __volatile("mb" : : : "memory") /* XXX */ +#define alpha_mb() __asm volatile("mb" : : : "memory") +#define alpha_wmb() __asm volatile("mb" : : : "memory") /* XXX */ #if defined(_KERNEL) || defined(_STANDALONE) @@ -360,18 +360,18 @@ unsigned long _alpha_pal_swpipl(unsigned long); /* for profiling */ void alpha_pal_wrent(void *, unsigned long); void alpha_pal_wrvptptr(unsigned long); -#define alpha_pal_draina() __asm __volatile("call_pal %0 # PAL_draina" \ +#define alpha_pal_draina() __asm volatile("call_pal %0 # PAL_draina" \ : : "i" (PAL_draina) : "memory") -#define alpha_pal_imb() __asm __volatile("call_pal %0 # PAL_imb" \ +#define alpha_pal_imb() __asm volatile("call_pal %0 # PAL_imb" \ : : "i" (PAL_imb) : "memory") -static __inline unsigned long +static inline unsigned long alpha_pal_rdmces(void) { register unsigned long v0 __asm("$0"); - __asm __volatile("call_pal %1 # PAL_OSF1_rdmces" + __asm volatile("call_pal %1 # PAL_OSF1_rdmces" : "=r" (v0) : "i" (PAL_OSF1_rdmces) /* clobbers t0, t8..t11 */ @@ -380,12 +380,12 @@ alpha_pal_rdmces(void) return (v0); } -static __inline unsigned long +static inline unsigned long alpha_pal_rdps(void) { register unsigned long v0 __asm("$0"); - __asm __volatile("call_pal %1 # PAL_OSF1_rdps" + __asm volatile("call_pal %1 # PAL_OSF1_rdps" : "=r" (v0) : "i" (PAL_OSF1_rdps) /* clobbers t0, t8..t11 */ @@ -394,24 +394,24 @@ alpha_pal_rdps(void) return (v0); } -static __inline unsigned long +static inline unsigned long alpha_pal_rdunique(void) { register unsigned long v0 __asm("$0"); - __asm __volatile("call_pal %1 # PAL_rdunique" + __asm volatile("call_pal %1 # PAL_rdunique" : "=r" (v0) : "i" (PAL_rdunique)); return (v0); } -static __inline unsigned long +static inline unsigned long alpha_pal_rdusp(void) { register unsigned long v0 __asm("$0"); - __asm __volatile("call_pal %1 # PAL_OSF1_rdusp" + __asm volatile("call_pal %1 # PAL_OSF1_rdusp" : "=r" (v0) : "i" (PAL_OSF1_rdusp) /* clobbers t0, t8..t11 */ @@ -420,12 +420,12 @@ alpha_pal_rdusp(void) return (v0); } -static __inline unsigned long +static inline unsigned long alpha_pal_rdval(void) { register unsigned long v0 __asm("$0"); - __asm __volatile("call_pal %1 # PAL_OSF1_rdval" + __asm volatile("call_pal %1 # PAL_OSF1_rdval" : "=r" (v0) : "i" (PAL_OSF1_rdval) /* clobbers t0, t8..t11 */ @@ -434,13 +434,13 @@ alpha_pal_rdval(void) return (v0); } -static __inline unsigned long +static inline unsigned long alpha_pal_swpctx(unsigned long ctx) { register unsigned long a0 __asm("$16") = ctx; register unsigned long v0 __asm("$0"); - __asm __volatile("call_pal %2 # PAL_OSF1_swpctx" + __asm volatile("call_pal %2 # PAL_OSF1_swpctx" : "=r" (a0), "=r" (v0) : "i" (PAL_OSF1_swpctx), "0" (a0) /* clobbers t0, t8..t11, a0 (above) */ @@ -449,13 +449,13 @@ alpha_pal_swpctx(unsigned long ctx) return (v0); } -static __inline unsigned long +static inline unsigned long alpha_pal_swpipl(unsigned long ipl) { register unsigned long a0 __asm("$16") = ipl; register unsigned long v0 __asm("$0"); - __asm __volatile("call_pal %2 # PAL_OSF1_swpipl" + __asm volatile("call_pal %2 # PAL_OSF1_swpipl" : "=r" (a0), "=r" (v0) : "i" (PAL_OSF1_swpipl), "0" (a0) /* clobbers t0, t8..t11, a0 (above) */ @@ -464,25 +464,25 @@ alpha_pal_swpipl(unsigned long ipl) return (v0); } -static __inline void +static inline void alpha_pal_tbi(unsigned long op, vaddr_t va) { register unsigned long a0 __asm("$16") = op; register unsigned long a1 __asm("$17") = va; - __asm __volatile("call_pal %2 # PAL_OSF1_tbi" + __asm volatile("call_pal %2 # PAL_OSF1_tbi" : "=r" (a0), "=r" (a1) : "i" (PAL_OSF1_tbi), "0" (a0), "1" (a1) /* clobbers t0, t8..t11, a0 (above), a1 (above) */ : "$1", "$22", "$23", "$24", "$25"); } -static __inline unsigned long +static inline unsigned long alpha_pal_whami(void) { register unsigned long v0 __asm("$0"); - __asm __volatile("call_pal %1 # PAL_OSF1_whami" + __asm volatile("call_pal %1 # PAL_OSF1_whami" : "=r" (v0) : "i" (PAL_OSF1_whami) /* clobbers t0, t8..t11 */ @@ -491,70 +491,70 @@ alpha_pal_whami(void) return (v0); } -static __inline void +static inline void alpha_pal_wrfen(unsigned long onoff) { register unsigned long a0 __asm("$16") = onoff; - __asm __volatile("call_pal %1 # PAL_OSF1_wrfen" + __asm volatile("call_pal %1 # PAL_OSF1_wrfen" : "=r" (a0) : "i" (PAL_OSF1_wrfen), "0" (a0) /* clobbers t0, t8..t11, a0 (above) */ : "$1", "$22", "$23", "$24", "$25"); } -static __inline void +static inline void alpha_pal_wripir(unsigned long cpu_id) { register unsigned long a0 __asm("$16") = cpu_id; - __asm __volatile("call_pal %1 # PAL_ipir" + __asm volatile("call_pal %1 # PAL_ipir" : "=r" (a0) : "i" (PAL_ipir), "0" (a0) /* clobbers t0, t8..t11, a0 (above) */ : "$1", "$22", "$23", "$24", "$25"); } -static __inline void +static inline void alpha_pal_wrunique(unsigned long unique) { register unsigned long a0 __asm("$16") = unique; - __asm __volatile("call_pal %1 # PAL_wrunique" + __asm volatile("call_pal %1 # PAL_wrunique" : "=r" (a0) : "i" (PAL_wrunique), "0" (a0)); } -static __inline void +static inline void alpha_pal_wrusp(unsigned long usp) { register unsigned long a0 __asm("$16") = usp; - __asm __volatile("call_pal %1 # PAL_OSF1_wrusp" + __asm volatile("call_pal %1 # PAL_OSF1_wrusp" : "=r" (a0) : "i" (PAL_OSF1_wrusp), "0" (a0) /* clobbers t0, t8..t11, a0 (above) */ : "$1", "$22", "$23", "$24", "$25"); } -static __inline void +static inline void alpha_pal_wrmces(unsigned long mces) { register unsigned long a0 __asm("$16") = mces; - __asm __volatile("call_pal %1 # PAL_OSF1_wrmces" + __asm volatile("call_pal %1 # PAL_OSF1_wrmces" : "=r" (a0) : "i" (PAL_OSF1_wrmces), "0" (a0) /* clobbers t0, t8..t11 */ : "$1", "$22", "$23", "$24", "$25"); } -static __inline void +static inline void alpha_pal_wrval(unsigned long val) { register unsigned long a0 __asm("$16") = val; - __asm __volatile("call_pal %1 # PAL_OSF1_wrval" + __asm volatile("call_pal %1 # PAL_OSF1_wrval" : "=r" (a0) : "i" (PAL_OSF1_wrval), "0" (a0) /* clobbers t0, t8..t11, a0 (above) */ diff --git a/sys/arch/alpha/include/atomic.h b/sys/arch/alpha/include/atomic.h index 75020ac2ebb..798efd657f0 100644 --- a/sys/arch/alpha/include/atomic.h +++ b/sys/arch/alpha/include/atomic.h @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.h,v 1.7 2001/12/17 23:34:57 thorpej Exp $ */ +/* $NetBSD: atomic.h,v 1.8 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -49,12 +49,12 @@ * * Atomically set bits in a `unsigned long'. */ -static __inline void -atomic_setbits_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline void +atomic_setbits_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long t0; - __asm __volatile( + __asm volatile( "# BEGIN atomic_setbits_ulong\n" "1: ldq_l %0, %3 \n" " or %0, %2, %0 \n" @@ -75,12 +75,12 @@ atomic_setbits_ulong(__volatile unsigned long *ulp, unsigned long v) * * Atomically clear bits in a `unsigned long'. */ -static __inline void -atomic_clearbits_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline void +atomic_clearbits_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long t0; - __asm __volatile( + __asm volatile( "# BEGIN atomic_clearbits_ulong\n" "1: ldq_l %0, %3 \n" " and %0, %2, %0 \n" @@ -101,12 +101,12 @@ atomic_clearbits_ulong(__volatile unsigned long *ulp, unsigned long v) * * Atomically add a value to a `unsigned long'. */ -static __inline void -atomic_add_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline void +atomic_add_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long t0; - __asm __volatile( + __asm volatile( "# BEGIN atomic_add_ulong\n" "1: ldq_l %0, %3 \n" " addq %0, %2, %0 \n" @@ -127,12 +127,12 @@ atomic_add_ulong(__volatile unsigned long *ulp, unsigned long v) * * Atomically subtract a value from a `unsigned long'. */ -static __inline void -atomic_sub_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline void +atomic_sub_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long t0; - __asm __volatile( + __asm volatile( "# BEGIN atomic_sub_ulong\n" "1: ldq_l %0, %3 \n" " subq %0, %2, %0 \n" @@ -153,12 +153,12 @@ atomic_sub_ulong(__volatile unsigned long *ulp, unsigned long v) * * Atomically load and latch a `unsigned long' value. */ -static __inline unsigned long -atomic_loadlatch_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline unsigned long +atomic_loadlatch_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long t0, v0; - __asm __volatile( + __asm volatile( "# BEGIN atomic_loadlatch_ulong\n" "1: mov %3, %0 \n" " ldq_l %1, %4 \n" diff --git a/sys/arch/alpha/include/bwx.h b/sys/arch/alpha/include/bwx.h index c24cb1f03fd..485926bd59b 100644 --- a/sys/arch/alpha/include/bwx.h +++ b/sys/arch/alpha/include/bwx.h @@ -1,4 +1,4 @@ -/* $NetBSD: bwx.h,v 1.3 2000/06/08 02:55:37 thorpej Exp $ */ +/* $NetBSD: bwx.h,v 1.4 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -48,66 +48,66 @@ * See "Alpha Architecture Handbook, Version 3", DEC order number EC-QD2KB-TE. */ -static __inline u_int8_t -alpha_ldbu(__volatile u_int8_t *a0) +static inline u_int8_t +alpha_ldbu(volatile u_int8_t *a0) { u_int8_t v0; - __asm __volatile("ldbu %0, %1" + __asm volatile("ldbu %0, %1" : "=r" (v0) : "m" (*a0)); return (v0); } -static __inline u_int16_t -alpha_ldwu(__volatile u_int16_t *a0) +static inline u_int16_t +alpha_ldwu(volatile u_int16_t *a0) { u_int16_t v0; - __asm __volatile("ldwu %0, %1" + __asm volatile("ldwu %0, %1" : "=r" (v0) : "m" (*a0)); return (v0); } -static __inline void -alpha_stb(__volatile u_int8_t *a0, u_int8_t a1) +static inline void +alpha_stb(volatile u_int8_t *a0, u_int8_t a1) { - __asm __volatile("stb %1, %0" + __asm volatile("stb %1, %0" : "=m" (*a0) : "r" (a1)); } -static __inline void -alpha_stw(__volatile u_int16_t *a0, u_int16_t a1) +static inline void +alpha_stw(volatile u_int16_t *a0, u_int16_t a1) { - __asm __volatile("stw %1, %0" + __asm volatile("stw %1, %0" : "=m" (*a0) : "r" (a1)); } -static __inline u_int8_t +static inline u_int8_t alpha_sextb(u_int8_t a0) { u_int8_t v0; - __asm __volatile("sextb %1, %0" + __asm volatile("sextb %1, %0" : "=r" (v0) : "r" (a0)); return (v0); } -static __inline u_int16_t +static inline u_int16_t alpha_sextw(u_int16_t a0) { u_int16_t v0; - __asm __volatile("sextw %1, %0" + __asm volatile("sextw %1, %0" : "=r" (v0) : "r" (a0)); diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h index bd9342f6f92..abfef385f64 100644 --- a/sys/arch/alpha/include/cpu.h +++ b/sys/arch/alpha/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.64 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.65 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -136,8 +136,8 @@ * Machine check information. */ struct mchkinfo { - __volatile int mc_expected; /* machine check is expected */ - __volatile int mc_received; /* machine check was received */ + volatile int mc_expected; /* machine check is expected */ + volatile int mc_received; /* machine check was received */ }; struct cpu_info { @@ -164,8 +164,8 @@ struct cpu_info { struct trapframe *ci_db_regs; /* registers for debuggers */ #if defined(MULTIPROCESSOR) - __volatile u_long ci_flags; /* flags; see below */ - __volatile u_long ci_ipis; /* interprocessor interrupts pending */ + volatile u_long ci_flags; /* flags; see below */ + volatile u_long ci_ipis; /* interprocessor interrupts pending */ #endif }; @@ -183,8 +183,8 @@ extern struct cpu_info *cpu_info_list; ci != NULL; ci = ci->ci_next #if defined(MULTIPROCESSOR) -extern __volatile u_long cpus_running; -extern __volatile u_long cpus_paused; +extern volatile u_long cpus_running; +extern volatile u_long cpus_paused; extern struct cpu_info *cpu_info[]; #define curcpu() ((struct cpu_info *)alpha_pal_rdval()) diff --git a/sys/arch/alpha/include/cpu_counter.h b/sys/arch/alpha/include/cpu_counter.h index bf512ff9002..98bc5dc1692 100644 --- a/sys/arch/alpha/include/cpu_counter.h +++ b/sys/arch/alpha/include/cpu_counter.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 12:16:43 nakayama Exp $ */ +/* $NetBSD: cpu_counter.h,v 1.2 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ #define cpu_hascounter() (1) #define cpu_counter() cpu_counter32() -static __inline uint32_t +static inline uint32_t cpu_counter32(void) { @@ -64,7 +64,7 @@ cpu_counter32(void) return (alpha_rpcc() & 0xffffffffU); } -static __inline uint64_t +static inline uint64_t cpu_frequency(struct cpu_info *ci) { diff --git a/sys/arch/alpha/include/int_mwgwtypes.h b/sys/arch/alpha/include/int_mwgwtypes.h index ce8c7076f1e..72000dfa847 100644 --- a/sys/arch/alpha/include/int_mwgwtypes.h +++ b/sys/arch/alpha/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.3 2001/09/22 18:03:10 simonb Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.4 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; diff --git a/sys/arch/alpha/include/int_types.h b/sys/arch/alpha/include/int_types.h index fe3a38f8553..d15fb337a74 100644 --- a/sys/arch/alpha/include/int_types.h +++ b/sys/arch/alpha/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.8 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.9 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/alpha/include/intr.h b/sys/arch/alpha/include/intr.h index a95af82b0d6..03d8f53d177 100644 --- a/sys/arch/alpha/include/intr.h +++ b/sys/arch/alpha/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.53 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: intr.h,v 1.54 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -155,12 +155,12 @@ struct scbvec { #ifdef _KERNEL /* Simulated software interrupt register. */ -extern __volatile unsigned long ssir; +extern volatile unsigned long ssir; /* IPL-lowering/restoring macros */ void spl0(void); -static __inline void +static inline void splx(int s) { if (s == ALPHA_PSL_IPL_0 && ssir != 0) @@ -171,7 +171,7 @@ splx(int s) #define spllowersoftclock() ((void)alpha_pal_swpipl(ALPHA_PSL_IPL_SOFT)) /* IPL-raising functions/macros */ -static __inline int +static inline int _splraise(int s) { int cur = alpha_pal_rdps() & ALPHA_PSL_IPL_MASK; diff --git a/sys/arch/alpha/include/lock.h b/sys/arch/alpha/include/lock.h index 6a2a3f184e3..2e53dfbe07f 100644 --- a/sys/arch/alpha/include/lock.h +++ b/sys/arch/alpha/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.20 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: lock.h,v 1.21 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -48,11 +48,11 @@ #include "opt_multiprocessor.h" #endif -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { - __asm __volatile( + __asm volatile( "# BEGIN __cpu_simple_lock_init\n" " stl $31, %0 \n" " mb \n" @@ -60,7 +60,7 @@ __cpu_simple_lock_init(__cpu_simple_lock_t *alp) : "=m" (*alp)); } -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *alp) { unsigned long t0; @@ -72,7 +72,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) * some work. */ - __asm __volatile( + __asm volatile( "# BEGIN __cpu_simple_lock\n" "1: ldl_l %0, %3 \n" " bne %0, 2f \n" @@ -92,12 +92,12 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) : "memory"); } -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { unsigned long t0, v0; - __asm __volatile( + __asm volatile( "# BEGIN __cpu_simple_lock_try\n" "1: ldl_l %0, %4 \n" " bne %0, 2f \n" @@ -119,11 +119,11 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *alp) return (v0 != 0); } -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *alp) { - __asm __volatile( + __asm volatile( "# BEGIN __cpu_simple_unlock\n" " mb \n" " stl $31, %0 \n" diff --git a/sys/arch/alpha/include/pcb.h b/sys/arch/alpha/include/pcb.h index 83980a12f85..4159727e282 100644 --- a/sys/arch/alpha/include/pcb.h +++ b/sys/arch/alpha/include/pcb.h @@ -1,4 +1,4 @@ -/* $NetBSD: pcb.h,v 1.14 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: pcb.h,v 1.15 2005/12/24 20:06:46 perry Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -60,7 +60,7 @@ struct pcb { struct fpreg pcb_fp; /* FP registers [SW] */ unsigned long pcb_onfault; /* for copy faults [SW] */ unsigned long pcb_accessaddr; /* for [fs]uswintr [SW] */ - struct cpu_info * __volatile pcb_fpcpu; /* CPU with our FP state[SW] */ + struct cpu_info * volatile pcb_fpcpu; /* CPU with our FP state[SW] */ struct simplelock pcb_fpcpu_slock; /* simple lock on fpcpu [SW] */ }; diff --git a/sys/arch/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h index ea11d83e24e..f9487be8561 100644 --- a/sys/arch/alpha/include/pmap.h +++ b/sys/arch/alpha/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.64 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.65 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -225,7 +225,7 @@ void pmap_do_tlb_shootdown(struct cpu_info *, struct trapframe *); #define pmap_copy(dp, sp, da, l, sa) /* nothing */ #define pmap_update(pmap) /* nothing (yet) */ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ @@ -290,13 +290,13 @@ do { \ #define pmap_pte_prot_chg(pte, np) ((np) ^ pmap_pte_prot(pte)) -static __inline pt_entry_t *pmap_l2pte(pmap_t, vaddr_t, pt_entry_t *); -static __inline pt_entry_t *pmap_l3pte(pmap_t, vaddr_t, pt_entry_t *); +static inline pt_entry_t *pmap_l2pte(pmap_t, vaddr_t, pt_entry_t *); +static inline pt_entry_t *pmap_l3pte(pmap_t, vaddr_t, pt_entry_t *); #define pmap_l1pte(pmap, v) \ (&(pmap)->pm_lev1map[l1pte_index((vaddr_t)(v))]) -static __inline pt_entry_t * +static inline pt_entry_t * pmap_l2pte(pmap, v, l1pte) pmap_t pmap; vaddr_t v; @@ -314,7 +314,7 @@ pmap_l2pte(pmap, v, l1pte) return (&lev2map[l2pte_index(v)]); } -static __inline pt_entry_t * +static inline pt_entry_t * pmap_l3pte(pmap, v, l2pte) pmap_t pmap; vaddr_t v; diff --git a/sys/arch/alpha/include/proc.h b/sys/arch/alpha/include/proc.h index 8c588ea5f81..f1f947a6a1a 100644 --- a/sys/arch/alpha/include/proc.h +++ b/sys/arch/alpha/include/proc.h @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.15 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: proc.h,v 1.16 2005/12/24 20:06:46 perry Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -68,7 +68,7 @@ struct lwp; struct mdproc { /* this process's syscall vector */ void (*md_syscall)(struct lwp *, u_int64_t, struct trapframe *); - __volatile int md_astpending; /* AST pending for this process */ + volatile int md_astpending; /* AST pending for this process */ }; diff --git a/sys/arch/alpha/include/types.h b/sys/arch/alpha/include/types.h index d1247d9f0d6..4a502ae4dd9 100644 --- a/sys/arch/alpha/include/types.h +++ b/sys/arch/alpha/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.33 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: types.h,v 1.34 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -54,7 +54,7 @@ typedef unsigned long vsize_t; typedef long int register_t; -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/alpha/include/userret.h b/sys/arch/alpha/include/userret.h index d8c7817618e..c1cf67dbe85 100644 --- a/sys/arch/alpha/include/userret.h +++ b/sys/arch/alpha/include/userret.h @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.4 2005/12/11 12:16:16 christos Exp $ */ +/* $NetBSD: userret.h,v 1.5 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -103,7 +103,7 @@ * Define the code needed before returning to user mode, for * trap and syscall. */ -static __inline void +static inline void userret(struct lwp *l) { struct proc *p = l->l_proc; diff --git a/sys/arch/alpha/jensenio/jensenio_intr.c b/sys/arch/alpha/jensenio/jensenio_intr.c index d1b7bff8c92..b40fc984ac6 100644 --- a/sys/arch/alpha/jensenio/jensenio_intr.c +++ b/sys/arch/alpha/jensenio/jensenio_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: jensenio_intr.c,v 1.4 2002/09/27 15:35:36 provos Exp $ */ +/* $NetBSD: jensenio_intr.c,v 1.5 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: jensenio_intr.c,v 1.4 2002/09/27 15:35:36 provos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: jensenio_intr.c,v 1.5 2005/12/24 20:06:46 perry Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -99,7 +99,7 @@ const int jensenio_intr_deftype[JENSEN_MAX_IRQ] = { IST_NONE, /* 15: EISA pin D06 */ }; -static __inline void +static inline void jensenio_specific_eoi(int irq) { diff --git a/sys/arch/alpha/jensenio/jensenioreg.h b/sys/arch/alpha/jensenio/jensenioreg.h index 02448447a64..22f939321a5 100644 --- a/sys/arch/alpha/jensenio/jensenioreg.h +++ b/sys/arch/alpha/jensenio/jensenioreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: jensenioreg.h,v 1.1 2000/07/12 20:36:10 thorpej Exp $ */ +/* $NetBSD: jensenioreg.h,v 1.2 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ * System register description for the DECpc AXP 150 ("Jensen"). */ -#define REGVAL(r) (*(__volatile u_int64_t *)ALPHA_PHYS_TO_K0SEG(r)) +#define REGVAL(r) (*(volatile u_int64_t *)ALPHA_PHYS_TO_K0SEG(r)) /* * EISA Interrupt Acknowledge: 1.0000.0000 diff --git a/sys/arch/alpha/pci/irongate_pci.c b/sys/arch/alpha/pci/irongate_pci.c index bc41bba17af..68001b0b53c 100644 --- a/sys/arch/alpha/pci/irongate_pci.c +++ b/sys/arch/alpha/pci/irongate_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: irongate_pci.c,v 1.3 2001/09/15 04:31:40 thorpej Exp $ */ +/* $NetBSD: irongate_pci.c,v 1.4 2005/12/24 20:06:46 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: irongate_pci.c,v 1.3 2001/09/15 04:31:40 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irongate_pci.c,v 1.4 2005/12/24 20:06:46 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -73,7 +73,7 @@ void irongate_conf_write __P((void *, pcitag_t, int, pcireg_t)); #define PCI_CONF_ADDR (IRONGATE_IO_BASE|IRONGATE_CONFADDR) #define PCI_CONF_DATA (IRONGATE_IO_BASE|IRONGATE_CONFDATA) -#define REGVAL(r) (*(__volatile u_int32_t *)ALPHA_PHYS_TO_K0SEG(r)) +#define REGVAL(r) (*(volatile u_int32_t *)ALPHA_PHYS_TO_K0SEG(r)) void irongate_pci_init(pci_chipset_tag_t pc, void *v) diff --git a/sys/arch/alpha/pci/ttwogareg.h b/sys/arch/alpha/pci/ttwogareg.h index db28ff28001..9f1db62ad1c 100644 --- a/sys/arch/alpha/pci/ttwogareg.h +++ b/sys/arch/alpha/pci/ttwogareg.h @@ -1,4 +1,4 @@ -/* $NetBSD: ttwogareg.h,v 1.1 2000/12/21 20:51:55 thorpej Exp $ */ +/* $NetBSD: ttwogareg.h,v 1.2 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ extern bus_addr_t ttwoga_gamma_cbus_bias; -#define REGVAL(r) (*(__volatile u_int64_t *) \ +#define REGVAL(r) (*(volatile u_int64_t *) \ ALPHA_PHYS_TO_K0SEG(ttwoga_gamma_cbus_bias + (r))) /* diff --git a/sys/arch/amd64/amd64/bios32.c b/sys/arch/amd64/amd64/bios32.c index ed721d2fd2d..9ec3b6bf507 100644 --- a/sys/arch/amd64/amd64/bios32.c +++ b/sys/arch/amd64/amd64/bios32.c @@ -1,4 +1,4 @@ -/* $NetBSD: bios32.c,v 1.3 2005/12/11 12:16:21 christos Exp $ */ +/* $NetBSD: bios32.c,v 1.4 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.3 2005/12/11 12:16:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.4 2005/12/24 20:06:47 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -150,7 +150,7 @@ bios32_service(service, e, ei) if (bios32_entry.offset == 0) return (0); /* BIOS32 not present */ - __asm __volatile("lcall *(%%rdi)" + __asm volatile("lcall *(%%rdi)" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "0" (service), "1" (0), "D" (&bios32_entry)); diff --git a/sys/arch/amd64/amd64/gdt.c b/sys/arch/amd64/amd64/gdt.c index 21b2769e9f6..734a05f4058 100644 --- a/sys/arch/amd64/amd64/gdt.c +++ b/sys/arch/amd64/amd64/gdt.c @@ -1,4 +1,4 @@ -/* $NetBSD: gdt.c,v 1.8 2005/12/11 12:16:21 christos Exp $ */ +/* $NetBSD: gdt.c,v 1.9 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.8 2005/12/11 12:16:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.9 2005/12/24 20:06:47 perry Exp $"); #include "opt_multiprocessor.h" @@ -66,8 +66,8 @@ int gdt_free; /* next free slot; terminated with GNULL_SEL */ struct lock gdt_lock_store; -static __inline void gdt_lock __P((void)); -static __inline void gdt_unlock __P((void)); +static inline void gdt_lock __P((void)); +static inline void gdt_unlock __P((void)); void gdt_init __P((void)); void gdt_grow __P((void)); int gdt_get_slot __P((void)); @@ -82,14 +82,14 @@ void gdt_put_slot __P((int)); * some time after the GDT is unlocked, so gdt_compact() could attempt to * reclaim it. */ -static __inline void +static inline void gdt_lock() { (void) lockmgr(&gdt_lock_store, LK_EXCLUSIVE, NULL); } -static __inline void +static inline void gdt_unlock() { diff --git a/sys/arch/amd64/amd64/ipifuncs.c b/sys/arch/amd64/amd64/ipifuncs.c index 93c6d44db75..c5c7c579e5c 100644 --- a/sys/arch/amd64/amd64/ipifuncs.c +++ b/sys/arch/amd64/amd64/ipifuncs.c @@ -1,4 +1,4 @@ -/* $NetBSD: ipifuncs.c,v 1.4 2005/12/11 12:16:21 christos Exp $ */ +/* $NetBSD: ipifuncs.c,v 1.5 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.4 2005/12/11 12:16:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.5 2005/12/24 20:06:47 perry Exp $"); /* * Interprocessor interrupt handlers. @@ -96,7 +96,7 @@ x86_64_ipi_halt(struct cpu_info *ci) printf("%s: shutting down\n", ci->ci_dev->dv_xname); for(;;) { - __asm __volatile("hlt"); + __asm volatile("hlt"); } } diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index df43be4f0a2..2a399ed074d 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.35 2005/12/11 12:16:21 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.36 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.35 2005/12/11 12:16:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.36 2005/12/24 20:06:47 perry Exp $"); #include "opt_user_ldt.h" #include "opt_ddb.h" @@ -1594,7 +1594,7 @@ cpu_reset() VM_PROT_READ|VM_PROT_WRITE); memset((caddr_t)idt, 0, NIDT * sizeof(idt[0])); - __asm __volatile("divl %0,%1" : : "q" (0), "a" (0)); + __asm volatile("divl %0,%1" : : "q" (0), "a" (0)); #if 0 /* diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index ffc6936fd4a..ce92718ef65 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.23 2005/12/11 12:16:21 christos Exp $ */ +/* $NetBSD: pmap.c,v 1.24 2005/12/24 20:06:47 perry Exp $ */ /* * @@ -108,7 +108,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.23 2005/12/11 12:16:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.24 2005/12/24 20:06:47 perry Exp $"); #ifndef __x86_64__ #include "opt_cputype.h" @@ -434,7 +434,7 @@ static int pv_nfpvents; /* # of free pv entries */ #define PVE_HIWAT (PVE_LOWAT + (PVE_PER_PVPAGE * 2)) /* high water mark */ -static __inline int +static inline int pv_compare(struct pv_entry *a, struct pv_entry *b) { if (a->pv_pmap < b->pv_pmap) @@ -579,7 +579,7 @@ static void pmap_alloc_level __P((pd_entry_t **, vaddr_t, int, * of course the kernel is always loaded */ -__inline static boolean_t +inline static boolean_t pmap_is_curpmap(pmap) struct pmap *pmap; { @@ -591,7 +591,7 @@ pmap_is_curpmap(pmap) * pmap_is_active: is this pmap loaded into the specified processor's %cr3? */ -__inline static boolean_t +inline static boolean_t pmap_is_active(pmap, cpu_num) struct pmap *pmap; int cpu_num; @@ -605,7 +605,7 @@ pmap_is_active(pmap, cpu_num) * pmap_tmpmap_pa: map a page in for tmp usage */ -__inline static vaddr_t +inline static vaddr_t pmap_tmpmap_pa(pa) paddr_t pa; { @@ -626,7 +626,7 @@ pmap_tmpmap_pa(pa) * pmap_tmpunmap_pa: unmap a tmp use page (undoes pmap_tmpmap_pa) */ -__inline static void +inline static void pmap_tmpunmap_pa() { #ifdef MULTIPROCESSOR @@ -653,7 +653,7 @@ pmap_tmpunmap_pa() * => do NOT use this on kernel mappings [why? because pv_ptp may be NULL] */ -__inline static pt_entry_t * +inline static pt_entry_t * pmap_tmpmap_pvepte(pve) struct pv_entry *pve; { @@ -674,7 +674,7 @@ pmap_tmpmap_pvepte(pve) * pmap_tmpunmap_pvepte: release a mapping obtained with pmap_tmpmap_pvepte */ -__inline static void +inline static void pmap_tmpunmap_pvepte(pve) struct pv_entry *pve; { @@ -685,7 +685,7 @@ pmap_tmpunmap_pvepte(pve) pmap_tmpunmap_pa(); } -__inline static void +inline static void pmap_apte_flush(struct pmap *pmap) { #if defined(MULTIPROCESSOR) @@ -727,7 +727,7 @@ pmap_apte_flush(struct pmap *pmap) * => must be undone with pmap_unmap_ptes before returning */ -__inline static void +inline static void pmap_map_ptes(pmap, ptepp, pdeppp) struct pmap *pmap; pt_entry_t **ptepp; @@ -775,7 +775,7 @@ pmap_map_ptes(pmap, ptepp, pdeppp) * pmap_unmap_ptes: unlock the PTE mapping of "pmap" */ -__inline static void +inline static void pmap_unmap_ptes(pmap) struct pmap *pmap; { @@ -1350,7 +1350,7 @@ pmap_init() * "try" is for optional functions like pmap_copy(). */ -__inline static struct pv_entry * +inline static struct pv_entry * pmap_alloc_pv(pmap, mode) struct pmap *pmap; int mode; @@ -1489,7 +1489,7 @@ pmap_add_pvpage(pvp, need_entry) * => we must be holding pvalloc_lock */ -__inline static void +inline static void pmap_free_pv_doit(pv) struct pv_entry *pv; { @@ -1524,7 +1524,7 @@ pmap_free_pv_doit(pv) * => we gain the pvalloc_lock */ -__inline static void +inline static void pmap_free_pv(pmap, pv) struct pmap *pmap; struct pv_entry *pv; @@ -1549,7 +1549,7 @@ pmap_free_pv(pmap, pv) * => we gain the pvalloc_lock */ -__inline static void +inline static void pmap_free_pvs(pmap, pvs) struct pmap *pmap; struct pv_entry *pvs; @@ -1617,7 +1617,7 @@ pmap_free_pvpage() * => caller should adjust ptp's wire_count before calling */ -__inline static void +inline static void pmap_enter_pv(pvh, pve, pmap, va, ptp) struct pv_head *pvh; struct pv_entry *pve; /* preallocated pve for us to use */ @@ -1641,7 +1641,7 @@ pmap_enter_pv(pvh, pve, pmap, va, ptp) * => we return the removed pve */ -__inline static struct pv_entry * +inline static struct pv_entry * pmap_remove_pv(pvh, pmap, va) struct pv_head *pvh; struct pmap *pmap; @@ -1662,7 +1662,7 @@ pmap_remove_pv(pvh, pmap, va) * p t p f u n c t i o n s */ -static __inline struct vm_page * +static inline struct vm_page * pmap_find_ptp(struct pmap *pmap, vaddr_t va, paddr_t pa, int level) { int lidx = level - 1; @@ -1682,7 +1682,7 @@ pmap_find_ptp(struct pmap *pmap, vaddr_t va, paddr_t pa, int level) return pg; } -static __inline void +static inline void pmap_freepage(struct pmap *pmap, struct vm_page *ptp, int level) { int lidx; diff --git a/sys/arch/amd64/amd64/process_machdep.c b/sys/arch/amd64/amd64/process_machdep.c index 3aff88a48fc..7a84d630339 100644 --- a/sys/arch/amd64/amd64/process_machdep.c +++ b/sys/arch/amd64/amd64/process_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: process_machdep.c,v 1.7 2005/12/11 12:16:21 christos Exp $ */ +/* $NetBSD: process_machdep.c,v 1.8 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.7 2005/12/11 12:16:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.8 2005/12/24 20:06:47 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -78,14 +78,14 @@ __KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.7 2005/12/11 12:16:21 christos #include <machine/segments.h> #include <machine/fpu.h> -static __inline struct trapframe *process_frame __P((struct lwp *)); -static __inline struct fxsave64 *process_fpframe __P((struct lwp *)); +static inline struct trapframe *process_frame __P((struct lwp *)); +static inline struct fxsave64 *process_fpframe __P((struct lwp *)); #if 0 -static __inline int verr_gdt __P((struct pmap *, int sel)); -static __inline int verr_ldt __P((struct pmap *, int sel)); +static inline int verr_gdt __P((struct pmap *, int sel)); +static inline int verr_ldt __P((struct pmap *, int sel)); #endif -static __inline struct trapframe * +static inline struct trapframe * process_frame(l) struct lwp *l; { @@ -93,7 +93,7 @@ process_frame(l) return (l->l_md.md_regs); } -static __inline struct fxsave64 * +static inline struct fxsave64 * process_fpframe(l) struct lwp *l; { diff --git a/sys/arch/amd64/include/acpi_func.h b/sys/arch/amd64/include/acpi_func.h index abb928caa77..74598f764a4 100644 --- a/sys/arch/amd64/include/acpi_func.h +++ b/sys/arch/amd64/include/acpi_func.h @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_func.h,v 1.1 2003/05/11 21:39:02 fvdl Exp $ */ +/* $NetBSD: acpi_func.h,v 1.2 2005/12/24 20:06:47 perry Exp $ */ #include <machine/cpufunc.h> @@ -10,7 +10,7 @@ #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ do { \ unsigned long dummy; \ - __asm __volatile( \ + __asm volatile( \ "1: movl (%1),%%eax ;" \ " movl %%eax,%%edx ;" \ " andq %2,%%rdx ;" \ @@ -29,7 +29,7 @@ do { \ #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ do { \ unsigned long dummy; \ - __asm __volatile( \ + __asm volatile( \ "1: movl (%1),%%eax ;" \ " andq %2,%%rdx ;" \ " lock ;" \ diff --git a/sys/arch/amd64/include/atomic.h b/sys/arch/amd64/include/atomic.h index a692a148a68..08ecfb3c4ce 100644 --- a/sys/arch/amd64/include/atomic.h +++ b/sys/arch/amd64/include/atomic.h @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.h,v 1.1 2003/04/26 18:39:37 fvdl Exp $ */ +/* $NetBSD: atomic.h,v 1.2 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright 2002 (c) Wasabi Systems, Inc. @@ -40,13 +40,13 @@ #ifndef _LOCORE -static __inline u_int64_t +static inline u_int64_t x86_atomic_testset_u64(volatile u_int64_t *ptr, u_int64_t val) { __asm__ volatile ("xchgq %0,(%2)" :"=r" (val):"0" (val),"r" (ptr)); return val; } -static __inline u_int32_t +static inline u_int32_t x86_atomic_testset_u32(volatile u_int32_t *ptr, u_int32_t val) { __asm__ volatile ("xchgl %0,(%2)" :"=r" (val):"0" (val),"r" (ptr)); return val; @@ -54,7 +54,7 @@ x86_atomic_testset_u32(volatile u_int32_t *ptr, u_int32_t val) { -static __inline int32_t +static inline int32_t x86_atomic_testset_i32(volatile int32_t *ptr, int32_t val) { __asm__ volatile ("xchgl %0,(%2)" :"=r" (val):"0" (val),"r" (ptr)); return val; @@ -62,26 +62,26 @@ x86_atomic_testset_i32(volatile int32_t *ptr, int32_t val) { -static __inline void +static inline void x86_atomic_setbits_u32(volatile u_int32_t *ptr, u_int32_t bits) { - __asm __volatile("lock ; orl %1,%0" : "=m" (*ptr) : "ir" (bits)); + __asm volatile("lock ; orl %1,%0" : "=m" (*ptr) : "ir" (bits)); } -static __inline void +static inline void x86_atomic_clearbits_u32(volatile u_int32_t *ptr, u_int32_t bits) { - __asm __volatile("lock ; andl %1,%0" : "=m" (*ptr) : "ir" (~bits)); + __asm volatile("lock ; andl %1,%0" : "=m" (*ptr) : "ir" (~bits)); } -static __inline void +static inline void x86_atomic_setbits_u64(volatile u_int64_t *ptr, u_int64_t bits) { - __asm __volatile("lock ; orq %1,%0" : "=m" (*ptr) : "ir" (~bits)); + __asm volatile("lock ; orq %1,%0" : "=m" (*ptr) : "ir" (~bits)); } -static __inline void +static inline void x86_atomic_clearbits_u64(volatile u_int64_t *ptr, u_int64_t bits) { - __asm __volatile("lock ; andq %1,%0" : "=m" (*ptr) : "ir" (~bits)); + __asm volatile("lock ; andq %1,%0" : "=m" (*ptr) : "ir" (~bits)); } #define x86_atomic_testset_ul x86_atomic_testset_u32 diff --git a/sys/arch/amd64/include/byte_swap.h b/sys/arch/amd64/include/byte_swap.h index f80e40f3b67..debd4d4c139 100644 --- a/sys/arch/amd64/include/byte_swap.h +++ b/sys/arch/amd64/include/byte_swap.h @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap.h,v 1.1 2003/04/26 18:39:38 fvdl Exp $ */ +/* $NetBSD: byte_swap.h,v 1.2 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -45,20 +45,20 @@ #include <sys/types.h> -static __inline u_int32_t __byte_swap_long_variable(u_int32_t); -static __inline u_int16_t __byte_swap_word_variable(u_int16_t); +static inline u_int32_t __byte_swap_long_variable(u_int32_t); +static inline u_int16_t __byte_swap_word_variable(u_int16_t); -static __inline u_int32_t +static inline u_int32_t __byte_swap_long_variable(u_int32_t x) { - __asm __volatile ( "bswap %1" : "=r" (x) : "0" (x)); + __asm volatile ( "bswap %1" : "=r" (x) : "0" (x)); return (x); } -static __inline u_int16_t +static inline u_int16_t __byte_swap_word_variable(u_int16_t x) { - __asm __volatile ("rorw $8, %w1" : "=r" (x) : "0" (x)); + __asm volatile ("rorw $8, %w1" : "=r" (x) : "0" (x)); return (x); } diff --git a/sys/arch/amd64/include/cpu_counter.h b/sys/arch/amd64/include/cpu_counter.h index 9eb39c29df5..8a8875db498 100644 --- a/sys/arch/amd64/include/cpu_counter.h +++ b/sys/arch/amd64/include/cpu_counter.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_counter.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */ +/* $NetBSD: cpu_counter.h,v 1.2 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -49,21 +49,21 @@ #define cpu_hascounter() (1) -static __inline uint64_t +static inline uint64_t cpu_counter(void) { return (rdtsc()); } -static __inline uint32_t +static inline uint32_t cpu_counter32(void) { return (rdtsc() & 0xffffffffUL); } -static __inline uint64_t +static inline uint64_t cpu_frequency(struct cpu_info *ci) { return (ci->ci_tsc_freq); diff --git a/sys/arch/amd64/include/cpufunc.h b/sys/arch/amd64/include/cpufunc.h index 0d7eb378d81..e7ec4aa4bda 100644 --- a/sys/arch/amd64/include/cpufunc.h +++ b/sys/arch/amd64/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.5 2005/12/11 12:16:25 christos Exp $ */ +/* $NetBSD: cpufunc.h,v 1.6 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -48,13 +48,13 @@ #include <machine/specialreg.h> -static __inline void +static inline void x86_pause(void) { /* nothing */ } -static __inline void +static inline void x86_lfence(void) { @@ -63,116 +63,116 @@ x86_lfence(void) * * memory clobber to avoid compiler reordering. */ - __asm __volatile("lfence" : : : "memory"); + __asm volatile("lfence" : : : "memory"); } #ifdef _KERNEL extern int cpu_feature; -static __inline void +static inline void invlpg(u_int64_t addr) { - __asm __volatile("invlpg (%0)" : : "r" (addr) : "memory"); + __asm volatile("invlpg (%0)" : : "r" (addr) : "memory"); } -static __inline void +static inline void lidt(void *p) { - __asm __volatile("lidt (%0)" : : "r" (p)); + __asm volatile("lidt (%0)" : : "r" (p)); } -static __inline void +static inline void lldt(u_short sel) { - __asm __volatile("lldt %0" : : "r" (sel)); + __asm volatile("lldt %0" : : "r" (sel)); } -static __inline void +static inline void ltr(u_short sel) { - __asm __volatile("ltr %0" : : "r" (sel)); + __asm volatile("ltr %0" : : "r" (sel)); } -static __inline void +static inline void lcr8(u_int val) { u_int64_t val64 = val; - __asm __volatile("movq %0,%%cr8" : : "r" (val64)); + __asm volatile("movq %0,%%cr8" : : "r" (val64)); } /* * Upper 32 bits are reserved anyway, so just keep this 32bits. */ -static __inline void +static inline void lcr0(u_int val) { u_int64_t val64 = val; - __asm __volatile("movq %0,%%cr0" : : "r" (val64)); + __asm volatile("movq %0,%%cr0" : : "r" (val64)); } -static __inline u_int +static inline u_int rcr0(void) { u_int64_t val64; u_int val; - __asm __volatile("movq %%cr0,%0" : "=r" (val64)); + __asm volatile("movq %%cr0,%0" : "=r" (val64)); val = val64; return val; } -static __inline u_int64_t +static inline u_int64_t rcr2(void) { u_int64_t val; - __asm __volatile("movq %%cr2,%0" : "=r" (val)); + __asm volatile("movq %%cr2,%0" : "=r" (val)); return val; } -static __inline void +static inline void lcr3(u_int64_t val) { - __asm __volatile("movq %0,%%cr3" : : "r" (val)); + __asm volatile("movq %0,%%cr3" : : "r" (val)); } -static __inline u_int64_t +static inline u_int64_t rcr3(void) { u_int64_t val; - __asm __volatile("movq %%cr3,%0" : "=r" (val)); + __asm volatile("movq %%cr3,%0" : "=r" (val)); return val; } /* * Same as for cr0. Don't touch upper 32 bits. */ -static __inline void +static inline void lcr4(u_int val) { u_int64_t val64 = val; - __asm __volatile("movq %0,%%cr4" : : "r" (val64)); + __asm volatile("movq %0,%%cr4" : : "r" (val64)); } -static __inline u_int +static inline u_int rcr4(void) { u_int val; u_int64_t val64; - __asm __volatile("movq %%cr4,%0" : "=r" (val64)); + __asm volatile("movq %%cr4,%0" : "=r" (val64)); val = val64; return val; } -static __inline void +static inline void tlbflush(void) { u_int64_t val; - __asm __volatile("movq %%cr3,%0" : "=r" (val)); - __asm __volatile("movq %0,%%cr3" : : "r" (val)); + __asm volatile("movq %%cr3,%0" : "=r" (val)); + __asm volatile("movq %0,%%cr3" : : "r" (val)); } -static __inline void +static inline void tlbflushg(void) { /* @@ -210,77 +210,77 @@ void setidt __P((int idx, /*XXX*/caddr_t func, int typ, int dpl)); /* XXXX ought to be in psl.h with spl() functions */ -static __inline void +static inline void disable_intr(void) { - __asm __volatile("cli"); + __asm volatile("cli"); } -static __inline void +static inline void enable_intr(void) { - __asm __volatile("sti"); + __asm volatile("sti"); } -static __inline u_long +static inline u_long read_rflags(void) { u_long ef; - __asm __volatile("pushfq; popq %0" : "=r" (ef)); + __asm volatile("pushfq; popq %0" : "=r" (ef)); return (ef); } -static __inline void +static inline void write_rflags(u_long ef) { - __asm __volatile("pushq %0; popfq" : : "r" (ef)); + __asm volatile("pushq %0; popfq" : : "r" (ef)); } -static __inline u_int64_t +static inline u_int64_t rdmsr(u_int msr) { uint32_t hi, lo; - __asm __volatile("rdmsr" : "=d" (hi), "=a" (lo) : "c" (msr)); + __asm volatile("rdmsr" : "=d" (hi), "=a" (lo) : "c" (msr)); return (((uint64_t)hi << 32) | (uint64_t) lo); } -static __inline void +static inline void wrmsr(u_int msr, u_int64_t newval) { - __asm __volatile("wrmsr" : + __asm volatile("wrmsr" : : "a" (newval & 0xffffffff), "d" (newval >> 32), "c" (msr)); } -static __inline void +static inline void wbinvd(void) { - __asm __volatile("wbinvd"); + __asm volatile("wbinvd"); } -static __inline u_int64_t +static inline u_int64_t rdtsc(void) { uint32_t hi, lo; - __asm __volatile("rdtsc" : "=d" (hi), "=a" (lo)); + __asm volatile("rdtsc" : "=d" (hi), "=a" (lo)); return (((uint64_t)hi << 32) | (uint64_t) lo); } -static __inline u_int64_t +static inline u_int64_t rdpmc(u_int pmc) { uint32_t hi, lo; - __asm __volatile("rdpmc" : "=d" (hi), "=a" (lo) : "c" (pmc)); + __asm volatile("rdpmc" : "=d" (hi), "=a" (lo) : "c" (pmc)); return (((uint64_t)hi << 32) | (uint64_t) lo); } /* Break into DDB/KGDB. */ -static __inline void +static inline void breakpoint(void) { - __asm __volatile("int $3"); + __asm volatile("int $3"); } #define read_psl() read_rflags() diff --git a/sys/arch/amd64/include/int_mwgwtypes.h b/sys/arch/amd64/include/int_mwgwtypes.h index 111a27c051b..253e11623a9 100644 --- a/sys/arch/amd64/include/int_mwgwtypes.h +++ b/sys/arch/amd64/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.4 2005/12/11 12:16:25 christos Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.5 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; diff --git a/sys/arch/amd64/include/int_types.h b/sys/arch/amd64/include/int_types.h index c7307b3f0a1..e1eb51c2f9a 100644 --- a/sys/arch/amd64/include/int_types.h +++ b/sys/arch/amd64/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.4 2005/12/11 12:16:25 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.5 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h index ca6e6fee478..7b7cc1628ec 100644 --- a/sys/arch/amd64/include/pmap.h +++ b/sys/arch/amd64/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.7 2005/12/11 12:16:25 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.8 2005/12/24 20:06:47 perry Exp $ */ /* * @@ -455,7 +455,7 @@ boolean_t pmap_pageidlezero __P((paddr_t)); * inline functions */ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ @@ -466,7 +466,7 @@ pmap_remove_all(struct pmap *pmap) * if hardware doesn't support one-page flushing) */ -__inline static void +inline static void pmap_update_pg(va) vaddr_t va; { @@ -477,7 +477,7 @@ pmap_update_pg(va) * pmap_update_2pg: flush two pages from the TLB */ -__inline static void +inline static void pmap_update_2pg(va, vb) vaddr_t va, vb; { @@ -494,7 +494,7 @@ pmap_update_2pg(va, vb) * unprotecting a page is done on-demand at fault time. */ -__inline static void +inline static void pmap_page_protect(struct vm_page *pg, vm_prot_t prot) { if ((prot & VM_PROT_WRITE) == 0) { @@ -514,7 +514,7 @@ pmap_page_protect(struct vm_page *pg, vm_prot_t prot) * unprotecting a page is done on-demand at fault time. */ -__inline static void +inline static void pmap_protect(pmap, sva, eva, prot) struct pmap *pmap; vaddr_t sva, eva; @@ -540,7 +540,7 @@ pmap_protect(pmap, sva, eva, prot) #include <lib/libkern/libkern.h> -static __inline pt_entry_t * +static inline pt_entry_t * vtopte(vaddr_t va) { @@ -549,7 +549,7 @@ vtopte(vaddr_t va) return (PTE_BASE + pl1_i(va)); } -static __inline pt_entry_t * +static inline pt_entry_t * kvtopte(vaddr_t va) { diff --git a/sys/arch/amd64/include/proc.h b/sys/arch/amd64/include/proc.h index 5f91690e779..9e4f945e6a9 100644 --- a/sys/arch/amd64/include/proc.h +++ b/sys/arch/amd64/include/proc.h @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.4 2005/12/11 12:16:25 christos Exp $ */ +/* $NetBSD: proc.h,v 1.5 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1991 Regents of the University of California. @@ -49,7 +49,7 @@ struct mdproc { int md_flags; /* Syscall handling function */ void (*md_syscall) __P((struct trapframe *)); - __volatile int md_astpending; + volatile int md_astpending; }; /* md_flags */ diff --git a/sys/arch/amd64/include/types.h b/sys/arch/amd64/include/types.h index 1446d6d275d..9a0b9ecd46b 100644 --- a/sys/arch/amd64/include/types.h +++ b/sys/arch/amd64/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.10 2005/12/11 12:16:25 christos Exp $ */ +/* $NetBSD: types.h,v 1.11 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -55,7 +55,7 @@ typedef unsigned long vsize_t; typedef long int register_t; typedef int register32_t; -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/amd64/include/userret.h b/sys/arch/amd64/include/userret.h index 0f3ac43cd3a..cd52dcdead5 100644 --- a/sys/arch/amd64/include/userret.h +++ b/sys/arch/amd64/include/userret.h @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.4 2005/12/11 12:16:25 christos Exp $ */ +/* $NetBSD: userret.h,v 1.5 2005/12/24 20:06:47 perry Exp $ */ /* * XXXfvdl same as i386 counterpart, but should probably be independent. @@ -75,13 +75,13 @@ #include <sys/userret.h> -static __inline void userret __P((register struct lwp *)); +static inline void userret __P((register struct lwp *)); /* * Define the code needed before returning to user mode, for * trap and syscall. */ -static __inline void +static inline void userret(l) register struct lwp *l; { diff --git a/sys/arch/amd64/isa/clock.c b/sys/arch/amd64/isa/clock.c index 15dd3e4750b..8a2ffc7d714 100644 --- a/sys/arch/amd64/isa/clock.c +++ b/sys/arch/amd64/isa/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.6 2005/12/11 12:16:26 christos Exp $ */ +/* $NetBSD: clock.c,v 1.7 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -121,7 +121,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.6 2005/12/11 12:16:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.7 2005/12/24 20:06:47 perry Exp $"); /* #define CLOCKDEBUG */ /* #define CLOCK_PARANOIA */ @@ -190,10 +190,10 @@ int bintobcd __P((int)); static inline int gettick_broken_latch __P((void)); -__inline u_int mc146818_read __P((void *, u_int)); -__inline void mc146818_write __P((void *, u_int, u_int)); +inline u_int mc146818_read __P((void *, u_int)); +inline void mc146818_write __P((void *, u_int, u_int)); -__inline u_int +inline u_int mc146818_read(sc, reg) void *sc; /* XXX use it? */ u_int reg; @@ -203,7 +203,7 @@ mc146818_read(sc, reg) return (inb(IO_RTC+1)); } -__inline void +inline void mc146818_write(sc, reg, datum) void *sc; /* XXX use it? */ u_int reg, datum; @@ -517,10 +517,10 @@ i8254_delay(n) * quantity to prevent loss of significance. */ int m; - __asm __volatile("mul %3" + __asm volatile("mul %3" : "=a" (n), "=d" (m) : "0" (n), "r" (TIMER_FREQ)); - __asm __volatile("div %4" + __asm volatile("div %4" : "=a" (n), "=d" (m) : "0" (n), "1" (m), "r" (1000000)); #else diff --git a/sys/arch/amiga/dev/grf_cv.c b/sys/arch/amiga/dev/grf_cv.c index e389eb2cf03..a76c8f39200 100644 --- a/sys/arch/amiga/dev/grf_cv.c +++ b/sys/arch/amiga/dev/grf_cv.c @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv.c,v 1.39 2005/12/11 12:16:28 christos Exp $ */ +/* $NetBSD: grf_cv.c,v 1.40 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -33,7 +33,7 @@ #include "opt_amigacons.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grf_cv.c,v 1.39 2005/12/11 12:16:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_cv.c,v 1.40 2005/12/24 20:06:47 perry Exp $"); #include "grfcv.h" #if NGRFCV > 0 @@ -88,9 +88,9 @@ int cv_toggle(struct grf_softc *); int cv_mondefok(struct grfvideo_mode *); int cv_load_mon(struct grf_softc *, struct grfcvtext_mode *); void cv_inittextmode(struct grf_softc *); -static __inline void cv_write_port(unsigned short, volatile caddr_t); -static __inline void cvscreen(int, volatile caddr_t); -static __inline void gfx_on_off(int, volatile caddr_t); +static inline void cv_write_port(unsigned short, volatile caddr_t); +static inline void cvscreen(int, volatile caddr_t); +static inline void gfx_on_off(int, volatile caddr_t); #ifndef CV_NO_HARDWARE_CURSOR int cv_getspritepos(struct grf_softc *, struct grf_position *); @@ -311,7 +311,7 @@ cvintr(void *arg) WCrt(ba, CRT_ID_END_VER_RETR, test); #else vgaw(ba, CRT_ADDRESS, CRT_ID_END_VER_RETR); - __asm __volatile("bclr #4,%0@(0x3d5);nop" : : "a" (ba)); + __asm volatile("bclr #4,%0@(0x3d5);nop" : : "a" (ba)); #endif #ifndef CV_NO_HARDWARE_CURSOR @@ -330,13 +330,13 @@ cvintr(void *arg) WCrt(ba, CRT_ID_END_VER_RETR, test); #else /* I don't trust the optimizer here... */ - __asm __volatile("bset #4,%0@(0x3d5);nop" : : "a" (ba)); + __asm volatile("bset #4,%0@(0x3d5);nop" : : "a" (ba)); #endif cv_setspritepos (gp, NULL); /* Restore the old CR index */ vgaw(ba, CRT_ADDRESS, cridx); - __asm __volatile("nop"); + __asm volatile("nop"); #endif /* !CV_NO_HARDWARE_CURSOR */ return (1); } @@ -358,7 +358,7 @@ cv_has_4mb(volatile caddr_t fb) testfbw = (volatile unsigned long *)fb; testfbr = (volatile unsigned long *)(fb + 0x02000000); *testfbw = 0x87654321; - __asm __volatile("nop"); + __asm volatile("nop"); if (*testfbr != 0x87654321) return (0); @@ -366,15 +366,15 @@ cv_has_4mb(volatile caddr_t fb) testfbw = (volatile unsigned long *)(fb + 0x00200000); testfbr = (volatile unsigned long *)(fb + 0x02200000); *testfbw = 0x87654321; - __asm __volatile("nop"); + __asm volatile("nop"); if (*testfbr != 0x87654321) return (0); *testfbw = 0xAAAAAAAA; - __asm __volatile("nop"); + __asm volatile("nop"); if (*testfbr != 0xAAAAAAAA) return (0); *testfbw = 0x55555555; - __asm __volatile("nop"); + __asm volatile("nop"); if (*testfbr != 0x55555555) return (0); return (1); @@ -1658,7 +1658,7 @@ cv_inittextmode(struct grf_softc *gp) } -static __inline void +static inline void cv_write_port(unsigned short bits, volatile caddr_t BoardAddr) { volatile caddr_t addr; @@ -1683,7 +1683,7 @@ cv_write_port(unsigned short bits, volatile caddr_t BoardAddr) * 1 = Amiga Signal, * ba = boardaddr */ -static __inline void +static inline void cvscreen(int toggle, volatile caddr_t ba) { @@ -1696,7 +1696,7 @@ cvscreen(int toggle, volatile caddr_t ba) /* 0 = on, 1= off */ /* ba= registerbase */ -static __inline void +static inline void gfx_on_off(int toggle, volatile caddr_t ba) { int r; @@ -1779,7 +1779,7 @@ cv_setspritepos(struct grf_softc *gp, struct grf_position *pos) return(0); } -static __inline short +static inline short M2I(short val) { return ( ((val & 0xff00) >> 8) | ((val & 0xff) << 8)); @@ -1848,10 +1848,10 @@ cv_setup_hwc(struct grf_softc *gp) /* reset colour stack */ #if 0 test = RCrt(ba, CRT_ID_HWGC_MODE); - __asm __volatile("nop"); + __asm volatile("nop"); #else /* do it in assembler, the above does't seem to work */ - __asm __volatile ("moveb #0x45, %1@(0x3d4); \ + __asm volatile ("moveb #0x45, %1@(0x3d4); \ moveb %1@(0x3d5),%0" : "=r" (test) : "a" (ba)); #endif @@ -1863,10 +1863,10 @@ cv_setup_hwc(struct grf_softc *gp) #if 0 test = RCrt(ba, CRT_ID_HWGC_MODE); - __asm __volatile("nop"); + __asm volatile("nop"); #else /* do it in assembler, the above does't seem to work */ - __asm __volatile ("moveb #0x45, %1@(0x3d4); \ + __asm volatile ("moveb #0x45, %1@(0x3d4); \ moveb %1@(0x3d5),%0" : "=r" (test) : "a" (ba)); #endif switch (gp->g_display.gd_planes) { @@ -2105,7 +2105,7 @@ cv_setspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *info) /* reset colour stack */ test = RCrt(ba, CRT_ID_HWGC_MODE); - __asm __volatile("nop"); + __asm volatile("nop"); switch (depth) { case 8: case 15: @@ -2124,7 +2124,7 @@ cv_setspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *info) } test = RCrt(ba, CRT_ID_HWGC_MODE); - __asm __volatile("nop"); + __asm volatile("nop"); switch (depth) { case 8: WCrt (ba, CRT_ID_HWGC_BG_STACK, 1); diff --git a/sys/arch/amiga/dev/grf_cv3d.c b/sys/arch/amiga/dev/grf_cv3d.c index 2390e80e485..35b42143fb8 100644 --- a/sys/arch/amiga/dev/grf_cv3d.c +++ b/sys/arch/amiga/dev/grf_cv3d.c @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv3d.c,v 1.17 2005/12/11 12:16:28 christos Exp $ */ +/* $NetBSD: grf_cv3d.c,v 1.18 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -33,7 +33,7 @@ #include "opt_amigacons.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.17 2005/12/11 12:16:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.18 2005/12/24 20:06:47 perry Exp $"); #include "grfcv3d.h" #if NGRFCV3D > 0 @@ -109,8 +109,8 @@ int cv3d_toggle(struct grf_softc *); int cv3d_mondefok(struct grfvideo_mode *); int cv3d_load_mon(struct grf_softc *, struct grfcv3dtext_mode *); void cv3d_inittextmode(struct grf_softc *); -static __inline void cv3dscreen(int, volatile caddr_t); -static __inline void cv3d_gfx_on_off(int, volatile caddr_t); +static inline void cv3dscreen(int, volatile caddr_t); +static inline void cv3d_gfx_on_off(int, volatile caddr_t); #ifdef CV3D_HARDWARE_CURSOR int cv3d_getspritepos(struct grf_softc *, struct grf_position *); @@ -1549,7 +1549,7 @@ cv3d_inittextmode(struct grf_softc *gp) * 1 = Amiga Signal, * ba = boardaddr */ -static __inline void +static inline void cv3dscreen(int toggle, volatile caddr_t ba) { *((short *)(ba)) = (toggle & 1); @@ -1558,7 +1558,7 @@ cv3dscreen(int toggle, volatile caddr_t ba) /* 0 = on, 1= off */ /* ba= registerbase */ -static __inline void +static inline void cv3d_gfx_on_off(int toggle, volatile caddr_t ba) { int r; @@ -1644,7 +1644,7 @@ cv3d_setspritepos(struct grf_softc *gp, struct grf_position *pos) return(0); } -static __inline short +static inline short M2I(short val) { return ( ((val & 0xff00) >> 8) | ((val & 0xff) << 8)); @@ -1713,10 +1713,10 @@ cv3d_setup_hwc(struct grf_softc *gp) /* reset colour stack */ #if 0 test = RCrt(ba, CRT_ID_HWGC_MODE); - __asm __volatile("nop"); + __asm volatile("nop"); #else /* do it in assembler, the above does't seem to work */ - __asm __volatile ("moveb #0x45, %1@(0x3d4); \ + __asm volatile ("moveb #0x45, %1@(0x3d4); \ moveb %1@(0x3d5),%0" : "=r" (test) : "a" (ba)); #endif @@ -1728,10 +1728,10 @@ cv3d_setup_hwc(struct grf_softc *gp) #if 0 test = RCrt(ba, CRT_ID_HWGC_MODE); - __asm __volatile("nop"); + __asm volatile("nop"); #else /* do it in assembler, the above does't seem to work */ - __asm __volatile ("moveb #0x45, %1@(0x3d4); \ + __asm volatile ("moveb #0x45, %1@(0x3d4); \ moveb %1@(0x3d5),%0" : "=r" (test) : "a" (ba)); #endif switch (gp->g_display.gd_planes) { @@ -1959,7 +1959,7 @@ cv3d_setspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *info) /* reset colour stack */ test = RCrt(ba, CRT_ID_HWGC_MODE); - __asm __volatile("nop"); + __asm volatile("nop"); switch (depth) { case 8: case 15: @@ -1978,7 +1978,7 @@ cv3d_setspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *info) } test = RCrt(ba, CRT_ID_HWGC_MODE); - __asm __volatile("nop"); + __asm volatile("nop"); switch (depth) { case 8: WCrt (ba, CRT_ID_HWGC_BG_STACK, 1); diff --git a/sys/arch/amiga/dev/grf_cv3dreg.h b/sys/arch/amiga/dev/grf_cv3dreg.h index 63ac77d320c..d644a510294 100644 --- a/sys/arch/amiga/dev/grf_cv3dreg.h +++ b/sys/arch/amiga/dev/grf_cv3dreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv3dreg.h,v 1.6 2003/05/31 03:05:45 kristerw Exp $ */ +/* $NetBSD: grf_cv3dreg.h,v 1.7 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -77,14 +77,14 @@ struct grfcv3dtext_mode { if (!cv3d_zorroIII) { \ *((volatile caddr_t)(((caddr_t)cv3d_vcode_switch_base) + \ 0x04)) = (0x01 & 0xffff); \ - __asm __volatile ("nop"); \ + __asm volatile ("nop"); \ } \ *((volatile caddr_t)(((caddr_t)cv3d_special_register_base) + \ ( ByteAccessIO(reg) & 0xffff ))) = ((val) & 0xff); \ if (!cv3d_zorroIII) { \ *((volatile caddr_t)(((caddr_t)cv3d_vcode_switch_base) + \ 0x04)) = (0x02 & 0xffff); \ - __asm __volatile ("nop"); \ + __asm volatile ("nop"); \ } \ } while (0) @@ -107,17 +107,17 @@ struct grfcv3dtext_mode { do { \ *((volatile caddr_t)(((caddr_t)cv3d_vcode_switch_base) + \ 0x08)) = ((flag * 0x40) & 0xffff); \ - __asm __volatile ("nop"); \ + __asm volatile ("nop"); \ } while (0) int grfcv3d_cnprobe(void); void grfcv3d_iteinit(struct grf_softc *); -static __inline void GfxBusyWait(volatile caddr_t); -static __inline void GfxFifoWait(volatile caddr_t); -static __inline unsigned char RAttr(volatile caddr_t, short); -static __inline unsigned char RSeq(volatile caddr_t, short); -static __inline unsigned char RCrt(volatile caddr_t, short); -static __inline unsigned char RGfx(volatile caddr_t, short); +static inline void GfxBusyWait(volatile caddr_t); +static inline void GfxFifoWait(volatile caddr_t); +static inline unsigned char RAttr(volatile caddr_t, short); +static inline unsigned char RSeq(volatile caddr_t, short); +static inline unsigned char RCrt(volatile caddr_t, short); +static inline unsigned char RGfx(volatile caddr_t, short); /* @@ -559,7 +559,7 @@ static __inline unsigned char RGfx(volatile caddr_t, short); /* Gfx engine busy wait */ -static __inline void +static inline void GfxBusyWait (ba) volatile caddr_t ba; { @@ -567,12 +567,12 @@ GfxBusyWait (ba) do { test = vgar32(ba, MR_SUBSYSTEM_STATUS_CNTL); - __asm __volatile ("nop"); + __asm volatile ("nop"); } while (!(test & (1 << 13))); } -static __inline void +static inline void GfxFifoWait(ba) volatile caddr_t ba; { @@ -590,10 +590,10 @@ GfxFifoWait(ba) * * The methods have diverged a bit for each board, so * WPass(P) has been converted into a set of specific - * __inline functions. + * inline functions. */ -static __inline unsigned char +static inline unsigned char RAttr(ba, idx) volatile caddr_t ba; short idx; @@ -604,7 +604,7 @@ RAttr(ba, idx) return vgar(ba, ACT_ADDRESS_R); } -static __inline unsigned char +static inline unsigned char RSeq(ba, idx) volatile caddr_t ba; short idx; @@ -613,7 +613,7 @@ RSeq(ba, idx) return vgar(ba, SEQ_ADDRESS_R); } -static __inline unsigned char +static inline unsigned char RCrt(ba, idx) volatile caddr_t ba; short idx; @@ -622,7 +622,7 @@ RCrt(ba, idx) return vgar(ba, CRT_ADDRESS_R); } -static __inline unsigned char +static inline unsigned char RGfx(ba, idx) volatile caddr_t ba; short idx; diff --git a/sys/arch/amiga/dev/grf_cvreg.h b/sys/arch/amiga/dev/grf_cvreg.h index 2785519f7ad..14b8093c625 100644 --- a/sys/arch/amiga/dev/grf_cvreg.h +++ b/sys/arch/amiga/dev/grf_cvreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cvreg.h,v 1.9 2003/05/31 03:05:45 kristerw Exp $ */ +/* $NetBSD: grf_cvreg.h,v 1.10 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -83,12 +83,12 @@ struct grfcvtext_mode { int grfcv_cnprobe(void); void grfcv_iteinit(struct grf_softc *); -static __inline void GfxBusyWait(volatile caddr_t); -static __inline void GfxFifoWait(volatile caddr_t); -static __inline unsigned char RAttr(volatile caddr_t, short); -static __inline unsigned char RSeq(volatile caddr_t, short); -static __inline unsigned char RCrt(volatile caddr_t, short); -static __inline unsigned char RGfx(volatile caddr_t, short); +static inline void GfxBusyWait(volatile caddr_t); +static inline void GfxFifoWait(volatile caddr_t); +static inline unsigned char RAttr(volatile caddr_t, short); +static inline unsigned char RSeq(volatile caddr_t, short); +static inline unsigned char RCrt(volatile caddr_t, short); +static inline unsigned char RGfx(volatile caddr_t, short); /* @@ -362,7 +362,7 @@ static __inline unsigned char RGfx(volatile caddr_t, short); /* Gfx engine busy wait */ -static __inline void +static inline void GfxBusyWait (ba) volatile caddr_t ba; { @@ -370,12 +370,12 @@ GfxBusyWait (ba) do { test = vgar16 (ba, ECR_GP_STAT); - __asm __volatile ("nop"); + __asm volatile ("nop"); } while (test & (1 << 9)); } -static __inline void +static inline void GfxFifoWait(ba) volatile caddr_t ba; { @@ -391,10 +391,10 @@ GfxFifoWait(ba) * * The methods have diverged a bit for each board, so * WPass(P) has been converted into a set of specific - * __inline functions. + * inline functions. */ -static __inline unsigned char +static inline unsigned char RAttr(ba, idx) volatile caddr_t ba; short idx; @@ -405,7 +405,7 @@ RAttr(ba, idx) return vgar(ba, ACT_ADDRESS_R); } -static __inline unsigned char +static inline unsigned char RSeq(ba, idx) volatile caddr_t ba; short idx; @@ -414,7 +414,7 @@ RSeq(ba, idx) return vgar(ba, SEQ_ADDRESS_R); } -static __inline unsigned char +static inline unsigned char RCrt(ba, idx) volatile caddr_t ba; short idx; @@ -423,7 +423,7 @@ RCrt(ba, idx) return vgar(ba, CRT_ADDRESS_R); } -static __inline unsigned char +static inline unsigned char RGfx(ba, idx) volatile caddr_t ba; short idx; diff --git a/sys/arch/amiga/dev/grf_etreg.h b/sys/arch/amiga/dev/grf_etreg.h index 3edafe60568..861d2223331 100644 --- a/sys/arch/amiga/dev/grf_etreg.h +++ b/sys/arch/amiga/dev/grf_etreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: grf_etreg.h,v 1.5 2002/01/26 13:40:54 aymeric Exp $ */ +/* $NetBSD: grf_etreg.h,v 1.6 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1996 Tobias Abt @@ -299,7 +299,7 @@ struct grfettext_mode { * WPass(P) has been converted into a set of specific * inline functions. */ -static __inline void RegWakeup(volatile void *ba) { +static inline void RegWakeup(volatile void *ba) { extern int ettype; switch (ettype) { @@ -316,7 +316,7 @@ static __inline void RegWakeup(volatile void *ba) { } -static __inline void RegOnpass(volatile void *ba) { +static inline void RegOnpass(volatile void *ba) { extern int ettype; extern unsigned char pass_toggle; extern unsigned char Merlin_switch; @@ -338,7 +338,7 @@ static __inline void RegOnpass(volatile void *ba) { } -static __inline void RegOffpass(volatile void *ba) { +static inline void RegOffpass(volatile void *ba) { extern int ettype; extern unsigned char pass_toggle; extern unsigned char Merlin_switch; @@ -359,23 +359,23 @@ static __inline void RegOffpass(volatile void *ba) { delay(200000); } -static __inline unsigned char RAttr(volatile void * ba, short idx) { +static inline unsigned char RAttr(volatile void * ba, short idx) { if(vgar(ba, GREG_STATUS1_R)); vgaw(ba, ACT_ADDRESS_W, idx); return vgar (ba, ACT_ADDRESS_R); } -static __inline unsigned char RSeq(volatile void * ba, short idx) { +static inline unsigned char RSeq(volatile void * ba, short idx) { vgaw (ba, SEQ_ADDRESS, idx); return vgar (ba, SEQ_ADDRESS_R); } -static __inline unsigned char RCrt(volatile void * ba, short idx) { +static inline unsigned char RCrt(volatile void * ba, short idx) { vgaw (ba, CRT_ADDRESS, idx); return vgar (ba, CRT_ADDRESS_R); } -static __inline unsigned char RGfx(volatile void * ba, short idx) { +static inline unsigned char RGfx(volatile void * ba, short idx) { vgaw(ba, GCT_ADDRESS, idx); return vgar (ba, GCT_ADDRESS_R); } diff --git a/sys/arch/amiga/dev/grf_rh.c b/sys/arch/amiga/dev/grf_rh.c index 5604c8824ec..b35ee229c64 100644 --- a/sys/arch/amiga/dev/grf_rh.c +++ b/sys/arch/amiga/dev/grf_rh.c @@ -1,4 +1,4 @@ -/* $NetBSD: grf_rh.c,v 1.44 2005/12/11 12:16:28 christos Exp $ */ +/* $NetBSD: grf_rh.c,v 1.45 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1994 Markus Wild @@ -34,7 +34,7 @@ #include "opt_retina.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grf_rh.c,v 1.44 2005/12/11 12:16:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_rh.c,v 1.45 2005/12/24 20:06:47 perry Exp $"); #include "grfrh.h" #if NGRFRH > 0 @@ -122,12 +122,12 @@ extern unsigned char kernel_font_8x11[]; /* Convert big-endian long into little-endian long. */ #define M2I(val) \ - __asm __volatile (" rorw #8,%0 ; \ + __asm volatile (" rorw #8,%0 ; \ swap %0 ; \ rorw #8,%0 ; " : "=d" (val) : "0" (val)); #define M2INS(val) \ - __asm __volatile (" rorw #8,%0 ; \ + __asm volatile (" rorw #8,%0 ; \ swap %0 ; \ rorw #8,%0 ; \ swap %0 ; " : "=d" (val) : "0" (val)); diff --git a/sys/arch/amiga/dev/grf_rhreg.h b/sys/arch/amiga/dev/grf_rhreg.h index affbb354f49..70ed0e64850 100644 --- a/sys/arch/amiga/dev/grf_rhreg.h +++ b/sys/arch/amiga/dev/grf_rhreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: grf_rhreg.h,v 1.14 2005/12/11 12:16:28 christos Exp $ */ +/* $NetBSD: grf_rhreg.h,v 1.15 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1994 Markus Wild @@ -652,22 +652,22 @@ struct MonDef { vgaw(ba, PLL_ADDRESS_W, (val >> 8)); } while (0) -static __inline unsigned char RAttr(volatile void * ba, short idx) { +static inline unsigned char RAttr(volatile void * ba, short idx) { vgaw (ba, ACT_ADDRESS, idx); return vgar (ba, ACT_ADDRESS_R); } -static __inline unsigned char RSeq(volatile void * ba, short idx) { +static inline unsigned char RSeq(volatile void * ba, short idx) { vgaw (ba, SEQ_ADDRESS, idx); return vgar (ba, SEQ_ADDRESS_R); } -static __inline unsigned char RCrt(volatile void * ba, short idx) { +static inline unsigned char RCrt(volatile void * ba, short idx) { vgaw (ba, CRT_ADDRESS, idx); return vgar (ba, CRT_ADDRESS_R); } -static __inline unsigned char RGfx(volatile void * ba, short idx) { +static inline unsigned char RGfx(volatile void * ba, short idx) { vgaw(ba, GCT_ADDRESS, idx); return vgar (ba, GCT_ADDRESS_R); } diff --git a/sys/arch/amiga/dev/grf_rtreg.h b/sys/arch/amiga/dev/grf_rtreg.h index ffc9b0adb2f..7b47ae9a9ed 100644 --- a/sys/arch/amiga/dev/grf_rtreg.h +++ b/sys/arch/amiga/dev/grf_rtreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: grf_rtreg.h,v 1.13 2005/12/11 12:16:28 christos Exp $ */ +/* $NetBSD: grf_rtreg.h,v 1.14 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1993 Markus Wild @@ -502,22 +502,22 @@ extern unsigned char NCRStdPalette[]; #define Map(m) \ do { WGfx(ba, GCT_ID_READ_MAP_SELECT, m & 3 ); WSeq(ba, SEQ_ID_MAP_MASK, (1 << (m & 3))); } while (0) -static __inline unsigned char RAttr(volatile void * ba, short idx) { +static inline unsigned char RAttr(volatile void * ba, short idx) { vgaw (ba, ACT_ADDRESS, idx); return vgar (ba, ACT_ADDRESS_R); } -static __inline unsigned char RSeq(volatile void * ba, short idx) { +static inline unsigned char RSeq(volatile void * ba, short idx) { vgaw (ba, SEQ_ADDRESS, idx); return vgar (ba, SEQ_ADDRESS_R); } -static __inline unsigned char RCrt(volatile void * ba, short idx) { +static inline unsigned char RCrt(volatile void * ba, short idx) { vgaw (ba, CRT_ADDRESS, idx); return vgar (ba, CRT_ADDRESS_R); } -static __inline unsigned char RGfx(volatile void * ba, short idx) { +static inline unsigned char RGfx(volatile void * ba, short idx) { vgaw(ba, GCT_ADDRESS, idx); return vgar (ba, GCT_ADDRESS_R); } diff --git a/sys/arch/amiga/dev/grf_ul.c b/sys/arch/amiga/dev/grf_ul.c index 86ab6e854a9..7a947ea9aa6 100644 --- a/sys/arch/amiga/dev/grf_ul.c +++ b/sys/arch/amiga/dev/grf_ul.c @@ -1,4 +1,4 @@ -/* $NetBSD: grf_ul.c,v 1.38 2005/12/11 12:16:28 christos Exp $ */ +/* $NetBSD: grf_ul.c,v 1.39 2005/12/24 20:06:47 perry Exp $ */ #define UL_DEBUG /*- @@ -40,7 +40,7 @@ #include "opt_amigacons.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grf_ul.c,v 1.38 2005/12/11 12:16:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_ul.c,v 1.39 2005/12/24 20:06:47 perry Exp $"); #include "grful.h" #if NGRFUL > 0 @@ -79,7 +79,7 @@ static void ul_load_code(struct grf_softc *); static int ul_load_mon(struct grf_softc *, struct grfvideo_mode *); static int ul_getvmode(struct grf_softc *, struct grfvideo_mode *); static int ul_setvmode(struct grf_softc *, unsigned); -static __inline void ul_setfb(struct grf_softc *, u_long); +static inline void ul_setfb(struct grf_softc *, u_long); /* * marked true early so that ulowell_cnprobe() can tell if we are alive. @@ -641,7 +641,7 @@ ul_setvmode (gp, mode) * Always succeeds. */ -static __inline void +static inline void ul_setfb(gp, cmd) struct grf_softc *gp; u_long cmd; diff --git a/sys/arch/amiga/dev/grf_ulreg.h b/sys/arch/amiga/dev/grf_ulreg.h index 6bdfad4cb08..8d3eba31dd6 100644 --- a/sys/arch/amiga/dev/grf_ulreg.h +++ b/sys/arch/amiga/dev/grf_ulreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: grf_ulreg.h,v 1.7 2002/01/26 13:40:55 aymeric Exp $ */ +/* $NetBSD: grf_ulreg.h,v 1.8 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -45,10 +45,10 @@ struct gspregs { * alas, they didn't invert the A1 bit, so we have to write the * address pointer in two parts */ - __volatile u_short hstadrl; - __volatile u_short hstadrh; - __volatile u_short data; - __volatile u_short ctrl; + volatile u_short hstadrl; + volatile u_short hstadrh; + volatile u_short data; + volatile u_short ctrl; }; /* Bits in ctrl */ diff --git a/sys/arch/amiga/dev/if_le.c b/sys/arch/amiga/dev/if_le.c index c58f71613dc..d2307720c3e 100644 --- a/sys/arch/amiga/dev/if_le.c +++ b/sys/arch/amiga/dev/if_le.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le.c,v 1.40 2005/12/11 12:16:28 christos Exp $ */ +/* $NetBSD: if_le.c,v 1.41 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -81,7 +81,7 @@ #include "opt_inet.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.40 2005/12/11 12:16:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.41 2005/12/24 20:06:47 perry Exp $"); #include "bpfilter.h" @@ -129,7 +129,7 @@ CFATTACH_DECL(le_zbus, sizeof(struct le_softc), #define integrate #define hide #else -#define integrate static __inline +#define integrate static inline #define hide static #endif diff --git a/sys/arch/amiga/include/pmap.h b/sys/arch/amiga/include/pmap.h index 7e5b5fbb61d..2fce8d9dbc0 100644 --- a/sys/arch/amiga/include/pmap.h +++ b/sys/arch/amiga/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.40 2005/12/11 12:16:36 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.41 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright (c) 1991 Regents of the University of California. @@ -171,7 +171,7 @@ extern struct pmap kernel_pmap_store; #define pmap_update(pmap) /* nothing (yet) */ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/amigappc/include/intr.h b/sys/arch/amigappc/include/intr.h index 939c343e12e..694c68c430f 100644 --- a/sys/arch/amigappc/include/intr.h +++ b/sys/arch/amigappc/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.15 2005/12/11 12:16:36 christos Exp $ */ +/* $NetBSD: intr.h,v 1.16 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -101,10 +101,10 @@ struct intrhand { void do_pending_int __P((void)); -static __inline int splraise __P((int)); -static __inline int spllower __P((int)); -static __inline void splx __P((int)); -static __inline void softintr __P((int)); +static inline int splraise __P((int)); +static inline int spllower __P((int)); +static inline void splx __P((int)); +static inline void softintr __P((int)); extern volatile int cpl, ipending, astpending, tickspending; extern int imask[]; @@ -114,7 +114,7 @@ extern int imask[]; * achieved with the "eieio" instruction which the assembler * seems to detect and then doesn't move instructions past.... */ -static __inline int +static inline int splraise(ncpl) int ncpl; { @@ -127,7 +127,7 @@ splraise(ncpl) return (ocpl); } -static __inline void +static inline void splx(ncpl) int ncpl; { @@ -138,7 +138,7 @@ splx(ncpl) __asm__ volatile("sync; eieio\n"); /* reorder protect */ } -static __inline int +static inline int spllower(ncpl) int ncpl; { @@ -155,7 +155,7 @@ spllower(ncpl) /* Following code should be implemented with lwarx/stwcx to avoid * the disable/enable. i need to read the manual once more.... */ -static __inline void +static inline void softintr(ipl) int ipl; { diff --git a/sys/arch/arc/dev/opms.c b/sys/arch/arc/dev/opms.c index 5bdaaf19494..46e332f9d01 100644 --- a/sys/arch/arc/dev/opms.c +++ b/sys/arch/arc/dev/opms.c @@ -1,4 +1,4 @@ -/* $NetBSD: opms.c,v 1.13 2005/12/11 12:16:38 christos Exp $ */ +/* $NetBSD: opms.c,v 1.14 2005/12/24 20:06:47 perry Exp $ */ /* $OpenBSD: pccons.c,v 1.22 1999/01/30 22:39:37 imp Exp $ */ /* NetBSD: pms.c,v 1.21 1995/04/18 02:25:18 mycroft Exp */ @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opms.c,v 1.13 2005/12/11 12:16:38 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opms.c,v 1.14 2005/12/24 20:06:47 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -143,11 +143,11 @@ const struct cdevsw opms_cdevsw = { nostop, notty, opmspoll, nommap, opmskqfilter, }; -static __inline void pms_dev_cmd(uint8_t); -static __inline void pms_aux_cmd(uint8_t); -static __inline void pms_pit_cmd(uint8_t); +static inline void pms_dev_cmd(uint8_t); +static inline void pms_aux_cmd(uint8_t); +static inline void pms_pit_cmd(uint8_t); -static __inline void +static inline void pms_dev_cmd(uint8_t value) { @@ -157,7 +157,7 @@ pms_dev_cmd(uint8_t value) kbd_data_write_1(value); } -static __inline void +static inline void pms_aux_cmd(uint8_t value) { @@ -165,7 +165,7 @@ pms_aux_cmd(uint8_t value) kbd_cmd_write_1(value); } -static __inline void +static inline void pms_pit_cmd(uint8_t value) { diff --git a/sys/arch/arc/dev/pccons.c b/sys/arch/arc/dev/pccons.c index 3ab127d2a1e..ac63dfccfe8 100644 --- a/sys/arch/arc/dev/pccons.c +++ b/sys/arch/arc/dev/pccons.c @@ -1,4 +1,4 @@ -/* $NetBSD: pccons.c,v 1.41 2005/12/11 12:16:38 christos Exp $ */ +/* $NetBSD: pccons.c,v 1.42 2005/12/24 20:06:47 perry Exp $ */ /* $OpenBSD: pccons.c,v 1.22 1999/01/30 22:39:37 imp Exp $ */ /* NetBSD: pccons.c,v 1.89 1995/05/04 19:35:20 cgd Exp */ @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.41 2005/12/11 12:16:38 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.42 2005/12/24 20:06:47 perry Exp $"); #include "opt_ddb.h" @@ -161,8 +161,8 @@ void pc_xmode_on(void); void pc_xmode_off(void); static u_char kbc_get8042cmd(void); int kbd_cmd(u_char, u_char); -static __inline int kbd_wait_output(void); -static __inline int kbd_wait_input(void); +static inline int kbd_wait_output(void); +static inline int kbd_wait_input(void); void kbd_flush_input(void); void set_cursor_shape(void); void get_cursor_shape(void); @@ -196,7 +196,7 @@ void sput(u_char *, int); void pcstart(struct tty *); int pcparam(struct tty *, struct termios *); -static __inline void wcopy(void *, void *, u_int); +static inline void wcopy(void *, void *, u_int); void pc_context_init(bus_space_tag_t, bus_space_tag_t, bus_space_tag_t, struct pccons_config *); @@ -269,7 +269,7 @@ pc_context_init(bus_space_tag_t crt_iot, bus_space_tag_t crt_memt, * bcopy variant that only moves word-aligned 16-bit entities, * for stupid VGA cards. cnt is required to be an even vale. */ -static __inline void +static inline void wcopy(void *src, void *tgt, u_int cnt) { uint16_t *from = src; @@ -287,7 +287,7 @@ wcopy(void *src, void *tgt, u_int cnt) } } -static __inline int +static inline int kbd_wait_output(void) { u_int i; @@ -300,7 +300,7 @@ kbd_wait_output(void) return 0; } -static __inline int +static inline int kbd_wait_input(void) { u_int i; diff --git a/sys/arch/arc/include/bus.h b/sys/arch/arc/include/bus.h index 329584e3ac0..b82a62ddbb7 100644 --- a/sys/arch/arc/include/bus.h +++ b/sys/arch/arc/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.19 2005/12/11 12:16:39 christos Exp $ */ +/* $NetBSD: bus.h,v 1.20 2005/12/24 20:06:47 perry Exp $ */ /* NetBSD: bus.h,v 1.27 2000/03/15 16:44:50 drochner Exp */ /* $OpenBSD: bus.h,v 1.15 1999/08/11 23:15:21 niklas Exp $ */ @@ -332,7 +332,7 @@ int arc_bus_space_alloc(bus_space_tag_t, bus_addr_t, bus_addr_t, */ #define bus_space_read(BYTES,BITS) \ -static __inline __CONCAT3(uint,BITS,_t) \ +static inline __CONCAT3(uint,BITS,_t) \ __CONCAT(bus_space_read_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, bus_size_t offset) \ { \ @@ -355,7 +355,7 @@ bus_space_read(8,64) */ #define bus_space_read_multi(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_multi_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, bus_size_t offset, \ __CONCAT3(uint,BITS,_t) *datap, bus_size_t count) \ @@ -384,7 +384,7 @@ bus_space_read_multi(8,64) */ #define bus_space_read_region(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_region_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, bus_size_t offset, \ __CONCAT3(uint,BITS,_t) *datap, bus_size_t count) \ @@ -415,7 +415,7 @@ bus_space_read_region(8,64) */ #define bus_space_write(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, \ bus_size_t offset, __CONCAT3(uint,BITS,_t) data) \ @@ -439,7 +439,7 @@ bus_space_write(8,64) */ #define bus_space_write_multi(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_multi_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, bus_size_t offset, \ const __CONCAT3(uint,BITS,_t) *datap, bus_size_t count) \ @@ -467,7 +467,7 @@ bus_space_write_multi(8,64) */ #define bus_space_write_region(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_region_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, bus_size_t offset, \ const __CONCAT3(uint,BITS,_t) *datap, bus_size_t count) \ @@ -498,7 +498,7 @@ bus_space_write_region(8,64) */ #define bus_space_set_multi(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_multi_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, bus_size_t offset, \ const __CONCAT3(uint,BITS,_t) data, bus_size_t count) \ @@ -526,7 +526,7 @@ bus_space_set_multi(8,64) */ #define bus_space_set_region(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_region_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, bus_size_t offset, \ __CONCAT3(uint,BITS,_t) data, bus_size_t count) \ @@ -558,7 +558,7 @@ bus_space_set_region(8,64) */ #define bus_space_copy_region(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t srcbsh, bus_size_t srcoffset, \ bus_space_handle_t dstbsh, bus_size_t dstoffset, bus_size_t count) \ diff --git a/sys/arch/arc/jazz/fd.c b/sys/arch/arc/jazz/fd.c index 93011203eca..5c22e0993cc 100644 --- a/sys/arch/arc/jazz/fd.c +++ b/sys/arch/arc/jazz/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.23 2005/12/11 12:16:39 christos Exp $ */ +/* $NetBSD: fd.c,v 1.24 2005/12/24 20:06:47 perry Exp $ */ /* $OpenBSD: fd.c,v 1.6 1998/10/03 21:18:57 millert Exp $ */ /* NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp */ @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.23 2005/12/11 12:16:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.24 2005/12/24 20:06:47 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -225,7 +225,7 @@ void fdctimeout(void *); void fdcpseudointr(void *); void fdcretry(struct fdc_softc *); void fdfinish(struct fd_softc *, struct buf *); -__inline const struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t); +inline const struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t); void fd_mountroot_hook(struct device *); /* @@ -404,7 +404,7 @@ fd_nvtotype(char *fdc, int nvraminfo, int drive) } #endif -__inline const struct fd_type * +inline const struct fd_type * fd_dev_to_type(struct fd_softc *fd, dev_t dev) { int type = FDTYPE(dev); diff --git a/sys/arch/arm/arm/cpufunc.c b/sys/arch/arm/arm/cpufunc.c index f0547054f49..caabf0b3d4c 100644 --- a/sys/arch/arm/arm/cpufunc.c +++ b/sys/arch/arm/arm/cpufunc.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.74 2005/12/11 12:16:41 christos Exp $ */ +/* $NetBSD: cpufunc.c,v 1.75 2005/12/24 20:06:47 perry Exp $ */ /* * arm7tdmi support code Copyright (c) 2001 John Fremlin @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.74 2005/12/11 12:16:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.75 2005/12/24 20:06:47 perry Exp $"); #include "opt_compat_netbsd.h" #include "opt_cpuoptions.h" @@ -829,7 +829,7 @@ get_cachetype_cp15() u_int ctype, isize, dsize; u_int multiplier; - __asm __volatile("mrc p15, 0, %0, c0, c0, 1" + __asm volatile("mrc p15, 0, %0, c0, c0, 1" : "=r" (ctype)); /* @@ -1137,7 +1137,7 @@ set_cpufuncs() * - overflow indications cleared * - all counters disabled */ - __asm __volatile("mcr p14, 0, %0, c0, c0, 0" + __asm volatile("mcr p14, 0, %0, c0, c0, 0" : : "r" (PMNC_P|PMNC_C|PMNC_PMN0_IF|PMNC_PMN1_IF| PMNC_CC_IF)); @@ -1146,7 +1146,7 @@ set_cpufuncs() /* * Crank CCLKCFG to maximum legal value. */ - __asm __volatile ("mcr p14, 0, %0, c6, c0, 0" + __asm volatile ("mcr p14, 0, %0, c6, c0, 0" : : "r" (XSCALE_CCLKCFG)); #endif @@ -1156,7 +1156,7 @@ set_cpufuncs() * don't really support it, yet. Clear any pending * error indications. */ - __asm __volatile("mcr p13, 0, %0, c0, c1, 0" + __asm volatile("mcr p13, 0, %0, c0, c1, 0" : : "r" (BCUCTL_E0|BCUCTL_E1|BCUCTL_EV)); @@ -1194,7 +1194,7 @@ set_cpufuncs() * - overflow indications cleared * - all counters disabled */ - __asm __volatile("mcr p14, 0, %0, c0, c0, 0" + __asm volatile("mcr p14, 0, %0, c0, c0, 0" : : "r" (PMNC_P|PMNC_C|PMNC_PMN0_IF|PMNC_PMN1_IF| PMNC_CC_IF)); @@ -2303,14 +2303,14 @@ xscale_setup(args) cpu_control(0xffffffff, cpuctrl); /* Make sure write coalescing is turned on */ - __asm __volatile("mrc p15, 0, %0, c1, c0, 1" + __asm volatile("mrc p15, 0, %0, c1, c0, 1" : "=r" (auxctl)); #ifdef XSCALE_NO_COALESCE_WRITES auxctl |= XSCALE_AUXCTL_K; #else auxctl &= ~XSCALE_AUXCTL_K; #endif - __asm __volatile("mcr p15, 0, %0, c1, c0, 1" + __asm volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); } #endif /* CPU_XSCALE_80200 || CPU_XSCALE_80321 || __CPU_XSCALE_PXA2XX || CPU_XSCALE_IXP425 */ diff --git a/sys/arch/arm/arm32/bus_dma.c b/sys/arch/arm/arm32/bus_dma.c index 13b2dd8b774..9f9feff52d3 100644 --- a/sys/arch/arm/arm32/bus_dma.c +++ b/sys/arch/arm/arm32/bus_dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.46 2005/12/11 12:16:41 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.47 2005/12/24 20:06:47 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #define _ARM32_BUS_DMA_PRIVATE #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.46 2005/12/11 12:16:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.47 2005/12/24 20:06:47 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -70,7 +70,7 @@ struct arm32_dma_range *_bus_dma_inrange(struct arm32_dma_range *, /* * Check to see if the specified page is in an allowed DMA range. */ -__inline struct arm32_dma_range * +inline struct arm32_dma_range * _bus_dma_inrange(struct arm32_dma_range *ranges, int nranges, bus_addr_t curaddr) { @@ -491,7 +491,7 @@ _bus_dmamap_unload(bus_dma_tag_t t, bus_dmamap_t map) map->_dm_proc = NULL; } -static __inline void +static inline void _bus_dmamap_sync_linear(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, bus_size_t len, int ops) { @@ -517,7 +517,7 @@ _bus_dmamap_sync_linear(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, } } -static __inline void +static inline void _bus_dmamap_sync_mbuf(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, bus_size_t len, int ops) { @@ -585,7 +585,7 @@ _bus_dmamap_sync_mbuf(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, } } -static __inline void +static inline void _bus_dmamap_sync_uio(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, bus_size_t len, int ops) { diff --git a/sys/arch/arm/arm32/fault.c b/sys/arch/arm/arm32/fault.c index 4dea0f65385..4caf64684c8 100644 --- a/sys/arch/arm/arm32/fault.c +++ b/sys/arch/arm/arm32/fault.c @@ -1,4 +1,4 @@ -/* $NetBSD: fault.c,v 1.55 2005/12/11 12:16:41 christos Exp $ */ +/* $NetBSD: fault.c,v 1.56 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ #include "opt_kgdb.h" #include <sys/types.h> -__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.55 2005/12/11 12:16:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.56 2005/12/24 20:06:47 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -170,7 +170,7 @@ static const struct data_abort data_aborts[] = { #define TRAPSIGNAL(l,k) trapsignal((l), (k)) #endif -static __inline void +static inline void call_trapsignal(struct lwp *l, ksiginfo_t *ksi) { @@ -179,7 +179,7 @@ call_trapsignal(struct lwp *l, ksiginfo_t *ksi) KERNEL_PROC_UNLOCK(l); } -static __inline int +static inline int data_abort_fixup(trapframe_t *tf, u_int fsr, u_int far, struct lwp *l) { #ifdef CPU_ABORT_FIXUP_REQUIRED @@ -710,7 +710,7 @@ dab_buserr(trapframe_t *tf, u_int fsr, u_int far, struct lwp *l, return (1); } -static __inline int +static inline int prefetch_abort_fixup(trapframe_t *tf) { #ifdef CPU_ABORT_FIXUP_REQUIRED diff --git a/sys/arch/arm/arm32/pmap.c b/sys/arch/arm/arm32/pmap.c index 39487f5c187..068cf9afd48 100644 --- a/sys/arch/arm/arm32/pmap.c +++ b/sys/arch/arm/arm32/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.156 2005/12/10 21:19:57 scw Exp $ */ +/* $NetBSD: pmap.c,v 1.157 2005/12/24 20:06:47 perry Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -212,7 +212,7 @@ #include <machine/param.h> #include <arm/arm32/katelib.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.156 2005/12/10 21:19:57 scw Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.157 2005/12/24 20:06:47 perry Exp $"); #ifdef PMAP_DEBUG @@ -552,7 +552,7 @@ pmap_debug(int level) * on whether the specified pmap actually needs to be flushed at any * given time. */ -static __inline void +static inline void pmap_tlb_flushID_SE(pmap_t pm, vaddr_t va) { @@ -560,7 +560,7 @@ pmap_tlb_flushID_SE(pmap_t pm, vaddr_t va) cpu_tlb_flushID_SE(va); } -static __inline void +static inline void pmap_tlb_flushD_SE(pmap_t pm, vaddr_t va) { @@ -568,7 +568,7 @@ pmap_tlb_flushD_SE(pmap_t pm, vaddr_t va) cpu_tlb_flushD_SE(va); } -static __inline void +static inline void pmap_tlb_flushID(pmap_t pm) { @@ -578,7 +578,7 @@ pmap_tlb_flushID(pmap_t pm) } } -static __inline void +static inline void pmap_tlb_flushD(pmap_t pm) { @@ -588,7 +588,7 @@ pmap_tlb_flushD(pmap_t pm) } } -static __inline void +static inline void pmap_idcache_wbinv_range(pmap_t pm, vaddr_t va, vsize_t len) { @@ -596,7 +596,7 @@ pmap_idcache_wbinv_range(pmap_t pm, vaddr_t va, vsize_t len) cpu_idcache_wbinv_range(va, len); } -static __inline void +static inline void pmap_dcache_wb_range(pmap_t pm, vaddr_t va, vsize_t len, boolean_t do_inv, boolean_t rd_only) { @@ -613,7 +613,7 @@ pmap_dcache_wb_range(pmap_t pm, vaddr_t va, vsize_t len, } } -static __inline void +static inline void pmap_idcache_wbinv_all(pmap_t pm) { @@ -623,7 +623,7 @@ pmap_idcache_wbinv_all(pmap_t pm) } } -static __inline void +static inline void pmap_dcache_wbinv_all(pmap_t pm) { @@ -633,7 +633,7 @@ pmap_dcache_wbinv_all(pmap_t pm) } } -static __inline boolean_t +static inline boolean_t pmap_is_current(pmap_t pm) { @@ -644,7 +644,7 @@ pmap_is_current(pmap_t pm) return (FALSE); } -static __inline boolean_t +static inline boolean_t pmap_is_cached(pmap_t pm) { @@ -731,7 +731,7 @@ pmap_enter_pv(struct vm_page *pg, struct pv_entry *pve, pmap_t pm, * * => caller should hold lock on vm_page */ -static __inline struct pv_entry * +static inline struct pv_entry * pmap_find_pv(struct vm_page *pg, pmap_t pm, vaddr_t va) { struct pv_entry *pv; @@ -951,7 +951,7 @@ pmap_free_l1(pmap_t pm) simple_unlock(&l1_lru_lock); } -static __inline void +static inline void pmap_use_l1(pmap_t pm) { struct l1_ttable *l1; @@ -996,7 +996,7 @@ pmap_use_l1(pmap_t pm) * * Free an L2 descriptor table. */ -static __inline void +static inline void #ifndef PMAP_INCLUDE_PTE_SYNC pmap_free_l2_ptp(pt_entry_t *l2, paddr_t pa) #else @@ -1025,7 +1025,7 @@ pmap_free_l2_ptp(boolean_t need_sync, pt_entry_t *l2, paddr_t pa) * Returns a pointer to the L2 bucket associated with the specified pmap * and VA, or NULL if no L2 bucket exists for the address. */ -static __inline struct l2_bucket * +static inline struct l2_bucket * pmap_get_l2_bucket(pmap_t pm, vaddr_t va) { struct l2_dtable *l2; @@ -1288,7 +1288,7 @@ static const int pmap_vac_flags[4][4] = { {PVF_UNC, PVF_NC, PVF_NC, PVF_NC} }; -static __inline int +static inline int pmap_get_vac_flags(const struct vm_page *pg) { int kidx, uidx; @@ -1308,7 +1308,7 @@ pmap_get_vac_flags(const struct vm_page *pg) return (pmap_vac_flags[uidx][kidx]); } -static __inline void +static inline void pmap_vac_me_harder(struct vm_page *pg, pmap_t pm, vaddr_t va) { int nattr; @@ -3065,8 +3065,8 @@ pmap_activate(struct lwp *l) if (l == curlwp) { u_int cur_dacr, cur_ttb; - __asm __volatile("mrc p15, 0, %0, c2, c0, 0" : "=r"(cur_ttb)); - __asm __volatile("mrc p15, 0, %0, c3, c0, 0" : "=r"(cur_dacr)); + __asm volatile("mrc p15, 0, %0, c2, c0, 0" : "=r"(cur_ttb)); + __asm volatile("mrc p15, 0, %0, c3, c0, 0" : "=r"(cur_dacr)); cur_ttb &= ~(L1_TABLE_SIZE - 1); @@ -3501,7 +3501,7 @@ pmap_virtual_space(vaddr_t *start, vaddr_t *end) /* * Helper function for pmap_grow_l2_bucket() */ -static __inline int +static inline int pmap_grow_map(vaddr_t va, pt_entry_t cache_mode, paddr_t *pap) { struct l2_bucket *l2b; @@ -3537,7 +3537,7 @@ pmap_grow_map(vaddr_t va, pt_entry_t cache_mode, paddr_t *pap) * This is the same as pmap_alloc_l2_bucket(), except that it is only * used by pmap_growkernel(). */ -static __inline struct l2_bucket * +static inline struct l2_bucket * pmap_grow_l2_bucket(pmap_t pm, vaddr_t va) { struct l2_dtable *l2; @@ -4870,9 +4870,9 @@ pmap_pte_init_xscale(void) /* * Disable ECC protection of page table access, for now. */ - __asm __volatile("mrc p15, 0, %0, c1, c0, 1" : "=r" (auxctl)); + __asm volatile("mrc p15, 0, %0, c1, c0, 1" : "=r" (auxctl)); auxctl &= ~XSCALE_AUXCTL_P; - __asm __volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); + __asm volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); } /* @@ -4931,10 +4931,10 @@ xscale_setup_minidata(vaddr_t l1pt, vaddr_t va, paddr_t pa) */ /* Invalidate data and mini-data. */ - __asm __volatile("mcr p15, 0, %0, c7, c6, 0" : : "r" (0)); - __asm __volatile("mrc p15, 0, %0, c1, c0, 1" : "=r" (auxctl)); + __asm volatile("mcr p15, 0, %0, c7, c6, 0" : : "r" (0)); + __asm volatile("mrc p15, 0, %0, c1, c0, 1" : "=r" (auxctl)); auxctl = (auxctl & ~XSCALE_AUXCTL_MD_MASK) | XSCALE_AUXCTL_MD_WB_RWA; - __asm __volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); + __asm volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); } /* diff --git a/sys/arch/arm/ep93xx/ep93xx_intr.c b/sys/arch/arm/ep93xx/ep93xx_intr.c index 59ef759847b..efbd717c525 100644 --- a/sys/arch/arm/ep93xx/ep93xx_intr.c +++ b/sys/arch/arm/ep93xx/ep93xx_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ep93xx_intr.c,v 1.6 2005/11/12 08:17:59 hamajima Exp $ */ +/* $NetBSD: ep93xx_intr.c,v 1.7 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ep93xx_intr.c,v 1.6 2005/11/12 08:17:59 hamajima Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ep93xx_intr.c,v 1.7 2005/12/24 20:06:52 perry Exp $"); /* * Interrupt support for the Cirrus Logic EP93XX @@ -69,15 +69,15 @@ static u_int32_t vic1_imask[NIPL]; static u_int32_t vic2_imask[NIPL]; /* Current interrupt priority level. */ -__volatile int current_spl_level; -__volatile int hardware_spl_level; +volatile int current_spl_level; +volatile int hardware_spl_level; /* Software copy of the IRQs we have enabled. */ -__volatile u_int32_t vic1_intr_enabled; -__volatile u_int32_t vic2_intr_enabled; +volatile u_int32_t vic1_intr_enabled; +volatile u_int32_t vic2_intr_enabled; /* Interrupts pending. */ -static __volatile int ipending; +static volatile int ipending; /* * Map a software interrupt queue index (to the unused bits in the @@ -135,7 +135,7 @@ ep93xx_enable_irq(int irq) } } -static __inline void +static inline void ep93xx_disable_irq(int irq) { if (irq < VIC_NIRQ) { @@ -326,7 +326,7 @@ ep93xx_do_pending(void) restore_interrupts(oldirqstate); } -__inline void +inline void splx(int new) { int old; diff --git a/sys/arch/arm/ep93xx/epe.c b/sys/arch/arm/ep93xx/epe.c index 1aeeed3564f..54ef95c021b 100644 --- a/sys/arch/arm/ep93xx/epe.c +++ b/sys/arch/arm/ep93xx/epe.c @@ -1,4 +1,4 @@ -/* $NetBSD: epe.c,v 1.4 2005/11/12 05:33:23 hamajima Exp $ */ +/* $NetBSD: epe.c,v 1.5 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2004 Jesse Off @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.4 2005/11/12 05:33:23 hamajima Exp $"); +__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.5 2005/12/24 20:06:52 perry Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -107,9 +107,9 @@ __KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.4 2005/11/12 05:33:23 hamajima Exp $"); #define CTRLPAGE_DMASYNC(x, y, z) \ bus_dmamap_sync(sc->sc_dmat, sc->ctrlpage_dmamap, (x), (y), (z)) #else -#define EPE_READ(x) *(__volatile u_int32_t *) \ +#define EPE_READ(x) *(volatile u_int32_t *) \ (EP93XX_AHB_VBASE + EP93XX_AHB_EPE + (EPE_ ## x)) -#define EPE_WRITE(x, y) *(__volatile u_int32_t *) \ +#define EPE_WRITE(x, y) *(volatile u_int32_t *) \ (EP93XX_AHB_VBASE + EP93XX_AHB_EPE + (EPE_ ## x)) = y #define CTRLPAGE_DMASYNC(x, y, z) #endif /* ! EPE_FAST */ diff --git a/sys/arch/arm/footbridge/footbridge_intr.h b/sys/arch/arm/footbridge/footbridge_intr.h index ee20b22706f..d7206240355 100644 --- a/sys/arch/arm/footbridge/footbridge_intr.h +++ b/sys/arch/arm/footbridge/footbridge_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: footbridge_intr.h,v 1.5 2003/06/16 20:00:57 thorpej Exp $ */ +/* $NetBSD: footbridge_intr.h,v 1.6 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -83,23 +83,23 @@ #define ICU_INT_HWMASK (0xffffffff & ~(INT_SWMASK | (1U << IRQ_RESERVED3))) /* only call this with interrupts off */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) footbridge_set_intrmask(void) { - extern __volatile uint32_t intr_enabled; + extern volatile uint32_t intr_enabled; /* fetch once so we write the same number to both registers */ uint32_t tmp = intr_enabled & ICU_INT_HWMASK; - ((__volatile uint32_t*)(DC21285_ARMCSR_VBASE))[IRQ_ENABLE_SET>>2] = tmp; - ((__volatile uint32_t*)(DC21285_ARMCSR_VBASE))[IRQ_ENABLE_CLEAR>>2] = ~tmp; + ((volatile uint32_t*)(DC21285_ARMCSR_VBASE))[IRQ_ENABLE_SET>>2] = tmp; + ((volatile uint32_t*)(DC21285_ARMCSR_VBASE))[IRQ_ENABLE_CLEAR>>2] = ~tmp; } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) footbridge_splx(int newspl) { - extern __volatile uint32_t intr_enabled; - extern __volatile int current_spl_level; - extern __volatile int footbridge_ipending; + extern volatile uint32_t intr_enabled; + extern volatile int current_spl_level; + extern volatile int footbridge_ipending; extern void footbridge_do_pending(void); int oldirqstate, hwpend; @@ -117,10 +117,10 @@ footbridge_splx(int newspl) footbridge_do_pending(); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) footbridge_splraise(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int footbridge_imask[]; int old; @@ -130,10 +130,10 @@ footbridge_splraise(int ipl) return (old); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) footbridge_spllower(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int footbridge_imask[]; int old = current_spl_level; diff --git a/sys/arch/arm/footbridge/footbridge_irqhandler.c b/sys/arch/arm/footbridge/footbridge_irqhandler.c index c633246cbed..a02a625750f 100644 --- a/sys/arch/arm/footbridge/footbridge_irqhandler.c +++ b/sys/arch/arm/footbridge/footbridge_irqhandler.c @@ -1,4 +1,4 @@ -/* $NetBSD: footbridge_irqhandler.c,v 1.13 2005/12/11 12:16:45 christos Exp $ */ +/* $NetBSD: footbridge_irqhandler.c,v 1.14 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ #endif #include <sys/cdefs.h> -__KERNEL_RCSID(0,"$NetBSD: footbridge_irqhandler.c,v 1.13 2005/12/11 12:16:45 christos Exp $"); +__KERNEL_RCSID(0,"$NetBSD: footbridge_irqhandler.c,v 1.14 2005/12/24 20:06:52 perry Exp $"); #include "opt_irqstats.h" @@ -68,13 +68,13 @@ static struct intrq footbridge_intrq[NIRQ]; int footbridge_imask[NIPL]; /* Software copy of the IRQs we have enabled. */ -__volatile uint32_t intr_enabled; +volatile uint32_t intr_enabled; /* Current interrupt priority level */ -__volatile int current_spl_level; +volatile int current_spl_level; /* Interrupts pending */ -__volatile int footbridge_ipending; +volatile int footbridge_ipending; void footbridge_intr_dispatch(struct clockframe *frame); @@ -114,7 +114,7 @@ footbridge_pci_intr_evcnt(pcv, ih) return &footbridge_intrq[ih].iq_ev; } -static __inline void +static inline void footbridge_enable_irq(int irq) { intr_enabled |= (1U << irq); @@ -122,7 +122,7 @@ footbridge_enable_irq(int irq) footbridge_set_intrmask(); } -static __inline void +static inline void footbridge_disable_irq(int irq) { intr_enabled &= ~(1U << irq); @@ -253,7 +253,7 @@ _spllower(int ipl) return (footbridge_spllower(ipl)); } -__inline void +inline void footbridge_do_pending(void) { static __cpu_simple_lock_t processing = __SIMPLELOCK_UNLOCKED; @@ -390,7 +390,7 @@ static uint32_t footbridge_intstatus(void); static inline uint32_t footbridge_intstatus() { - return ((__volatile uint32_t*)(DC21285_ARMCSR_VBASE))[IRQ_STATUS>>2]; + return ((volatile uint32_t*)(DC21285_ARMCSR_VBASE))[IRQ_STATUS>>2]; } /* called with external interrupts disabled */ diff --git a/sys/arch/arm/footbridge/todclock.c b/sys/arch/arm/footbridge/todclock.c index 678f0094c21..c0051cc807d 100644 --- a/sys/arch/arm/footbridge/todclock.c +++ b/sys/arch/arm/footbridge/todclock.c @@ -1,4 +1,4 @@ -/* $NetBSD: todclock.c,v 1.8 2005/12/11 12:16:46 christos Exp $ */ +/* $NetBSD: todclock.c,v 1.9 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: todclock.c,v 1.8 2005/12/11 12:16:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: todclock.c,v 1.9 2005/12/24 20:06:52 perry Exp $"); /* Include header files */ @@ -148,7 +148,7 @@ todclockattach(parent, self, aux) printf("\n"); } -static __inline int +static inline int yeartoday(year) int year; { diff --git a/sys/arch/arm/include/arm32/pmap.h b/sys/arch/arm/include/arm32/pmap.h index 640be44b7c8..fa81bf26f4d 100644 --- a/sys/arch/arm/include/arm32/pmap.h +++ b/sys/arch/arm/include/arm32/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.78 2005/12/10 21:19:57 scw Exp $ */ +/* $NetBSD: pmap.h,v 1.79 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -298,7 +298,7 @@ extern vaddr_t pmap_curmaxkvaddr; */ /* Virtual address to page table entry */ -static __inline pt_entry_t * +static inline pt_entry_t * vtopte(vaddr_t va) { pd_entry_t *pdep; @@ -312,7 +312,7 @@ vtopte(vaddr_t va) /* * Virtual address to physical address */ -static __inline paddr_t +static inline paddr_t vtophys(vaddr_t va) { paddr_t pa; diff --git a/sys/arch/arm/include/atomic.h b/sys/arch/arm/include/atomic.h index 7aaa21efeb8..c3e1d6e7193 100644 --- a/sys/arch/arm/include/atomic.h +++ b/sys/arch/arm/include/atomic.h @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.h,v 1.3 2005/12/11 12:16:46 christos Exp $ */ +/* $NetBSD: atomic.h,v 1.4 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (C) 1994-1997 Mark Brinicombe @@ -60,7 +60,7 @@ void atomic_clear_bit( u_int *, u_int ); do { \ u_int cpsr_save, tmp; \ \ - __asm __volatile( \ + __asm volatile( \ "mrs %0, cpsr;" \ "orr %1, %0, %2;" \ "msr cpsr_all, %1;" \ @@ -68,20 +68,20 @@ void atomic_clear_bit( u_int *, u_int ); : "I" (I32_bit) \ : "cc" ); \ (expr); \ - __asm __volatile( \ + __asm volatile( \ "msr cpsr_all, %0" \ : /* no output */ \ : "r" (cpsr_save) \ : "cc" ); \ } while(0) -static __inline void +static inline void inline_atomic_set_bit( u_int *address, u_int setmask ) { __with_interrupts_disabled( *address |= setmask ); } -static __inline void +static inline void inline_atomic_clear_bit( u_int *address, u_int clearmask ) { __with_interrupts_disabled( *address &= ~clearmask ); diff --git a/sys/arch/arm/include/byte_swap.h b/sys/arch/arm/include/byte_swap.h index f358d78d722..b323f1e2c51 100644 --- a/sys/arch/arm/include/byte_swap.h +++ b/sys/arch/arm/include/byte_swap.h @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap.h,v 1.3 2002/11/08 01:31:23 thorpej Exp $ */ +/* $NetBSD: byte_swap.h,v 1.4 2005/12/24 20:06:52 perry Exp $ */ /*- * Copyright (c) 1997, 1999, 2002 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include <sys/types.h> -static __inline u_int32_t +static inline u_int32_t __byte_swap_32_variable(u_int32_t v) { u_int32_t t1; @@ -54,11 +54,11 @@ __byte_swap_32_variable(u_int32_t v) return (v); } -static __inline u_int16_t +static inline u_int16_t __byte_swap_16_variable(u_int16_t v) { - __asm __volatile( + __asm volatile( "mov %0, %1, ror #8\n" "orr %0, %0, %0, lsr #16\n" "bic %0, %0, %0, lsl #16" diff --git a/sys/arch/arm/include/cpufunc.h b/sys/arch/arm/include/cpufunc.h index e3f36d231bc..c9f96b605b6 100644 --- a/sys/arch/arm/include/cpufunc.h +++ b/sys/arch/arm/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.35 2005/12/11 12:16:46 christos Exp $ */ +/* $NetBSD: cpufunc.h,v 1.36 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe. @@ -448,14 +448,14 @@ void xscale_setup __P((char *)); * Macros for manipulating CPU interrupts */ #ifdef __PROG32 -static __inline u_int32_t __set_cpsr_c(u_int bic, u_int eor) __attribute__((__unused__)); +static inline u_int32_t __set_cpsr_c(u_int bic, u_int eor) __attribute__((__unused__)); -static __inline u_int32_t +static inline u_int32_t __set_cpsr_c(u_int bic, u_int eor) { u_int32_t tmp, ret; - __asm __volatile( + __asm volatile( "mrs %0, cpsr\n" /* Get the CPSR */ "bic %1, %0, %2\n" /* Clear bits */ "eor %1, %1, %3\n" /* XOR bits */ diff --git a/sys/arch/arm/include/int_mwgwtypes.h b/sys/arch/arm/include/int_mwgwtypes.h index efbba734344..b7ebbbaa981 100644 --- a/sys/arch/arm/include/int_mwgwtypes.h +++ b/sys/arch/arm/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.2 2001/04/26 16:25:21 kleink Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.3 2005/12/24 20:06:52 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; diff --git a/sys/arch/arm/include/int_types.h b/sys/arch/arm/include/int_types.h index 52ddaf90ee1..7f55354d00e 100644 --- a/sys/arch/arm/include/int_types.h +++ b/sys/arch/arm/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.7 2005/12/11 12:16:47 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.8 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/arm/include/lock.h b/sys/arch/arm/include/lock.h index 51203feca2b..c56b3f39213 100644 --- a/sys/arch/arm/include/lock.h +++ b/sys/arch/arm/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.5 2005/12/11 12:16:47 christos Exp $ */ +/* $NetBSD: lock.h,v 1.6 2005/12/24 20:06:52 perry Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -48,23 +48,23 @@ #ifndef _ARM_LOCK_H_ #define _ARM_LOCK_H_ -static __inline int -__swp(int __val, __volatile int *__ptr) +static inline int +__swp(int __val, volatile int *__ptr) { - __asm __volatile("swp %0, %1, [%2]" + __asm volatile("swp %0, %1, [%2]" : "=r" (__val) : "r" (__val), "r" (__ptr) : "memory"); return __val; } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { *alp = __SIMPLELOCK_UNLOCKED; } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) __cpu_simple_lock(__cpu_simple_lock_t *alp) { @@ -72,14 +72,14 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) continue; } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { return (__swp(__SIMPLELOCK_LOCKED, alp) == __SIMPLELOCK_UNLOCKED); } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) __cpu_simple_unlock(__cpu_simple_lock_t *alp) { diff --git a/sys/arch/arm/include/types.h b/sys/arch/arm/include/types.h index 49ff3ef07f8..77174d2388e 100644 --- a/sys/arch/arm/include/types.h +++ b/sys/arch/arm/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.12 2005/12/11 12:16:47 christos Exp $ */ +/* $NetBSD: types.h,v 1.13 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -61,7 +61,7 @@ typedef unsigned long pmc_ctr_t; typedef int register_t; -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/arm/iomd/console/vidcrender.c b/sys/arch/arm/iomd/console/vidcrender.c index fe0d5c04b1b..c34ec253c52 100644 --- a/sys/arch/arm/iomd/console/vidcrender.c +++ b/sys/arch/arm/iomd/console/vidcrender.c @@ -1,4 +1,4 @@ -/* $NetBSD: vidcrender.c,v 1.17 2005/12/11 12:16:50 christos Exp $ */ +/* $NetBSD: vidcrender.c,v 1.18 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vidcrender.c,v 1.17 2005/12/11 12:16:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vidcrender.c,v 1.18 2005/12/24 20:06:52 perry Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -220,7 +220,7 @@ static struct fsyn fsyn_pref[] = { /*#define mod(x) (((x) > 0) ? (x) : (-x))*/ -static __inline int +static inline int mod(int n) { if (n < 0) diff --git a/sys/arch/arm/iomd/iomdiic.c b/sys/arch/arm/iomd/iomdiic.c index 8457424ddec..deee184aeb1 100644 --- a/sys/arch/arm/iomd/iomdiic.c +++ b/sys/arch/arm/iomd/iomdiic.c @@ -1,4 +1,4 @@ -/* $NetBSD: iomdiic.c,v 1.3 2005/12/11 12:16:47 christos Exp $ */ +/* $NetBSD: iomdiic.c,v 1.4 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -76,8 +76,8 @@ static int iomdiic_initiate_xfer(void *, i2c_addr_t, int); static int iomdiic_read_byte(void *, uint8_t *, int); static int iomdiic_write_byte(void *, uint8_t, int); -#define IOMDIIC_READ *(__volatile uint8_t *)(IOMD_ADDRESS(IOMD_IOCR)) -#define IOMDIIC_WRITE(x) *(__volatile uint8_t *)(IOMD_ADDRESS(IOMD_IOCR)) = (x) +#define IOMDIIC_READ *(volatile uint8_t *)(IOMD_ADDRESS(IOMD_IOCR)) +#define IOMDIIC_WRITE(x) *(volatile uint8_t *)(IOMD_ADDRESS(IOMD_IOCR)) = (x) #define IOMD_IOCR_SDA 0x01 #define IOMD_IOCR_SCL 0x02 diff --git a/sys/arch/arm/ixp12x0/ixp12x0_intr.c b/sys/arch/arm/ixp12x0/ixp12x0_intr.c index 5470fed7991..385807e3938 100644 --- a/sys/arch/arm/ixp12x0/ixp12x0_intr.c +++ b/sys/arch/arm/ixp12x0/ixp12x0_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixp12x0_intr.c,v 1.13 2005/12/11 12:16:50 christos Exp $ */ +/* $NetBSD: ixp12x0_intr.c,v 1.14 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ixp12x0_intr.c,v 1.13 2005/12/11 12:16:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixp12x0_intr.c,v 1.14 2005/12/24 20:06:52 perry Exp $"); /* * Interrupt support for the Intel ixp12x0 @@ -73,15 +73,15 @@ static u_int32_t imask[NIPL]; static u_int32_t pci_imask[NIPL]; /* Current interrupt priority level. */ -__volatile int current_spl_level; -__volatile int hardware_spl_level; +volatile int current_spl_level; +volatile int hardware_spl_level; /* Software copy of the IRQs we have enabled. */ -__volatile u_int32_t intr_enabled; -__volatile u_int32_t pci_intr_enabled; +volatile u_int32_t intr_enabled; +volatile u_int32_t pci_intr_enabled; /* Interrupts pending. */ -static __volatile int ipending; +static volatile int ipending; /* * Map a software interrupt queue index (to the unused bits in the @@ -115,13 +115,13 @@ void ixp12x0_intr_dispatch(struct irqframe *frame); #define IXPREG(reg) *((volatile u_int32_t*) (reg)) -static __inline u_int32_t +static inline u_int32_t ixp12x0_irq_read(void) { return IXPREG(IXP12X0_IRQ_VBASE) & IXP12X0_INTR_MASK; } -static __inline u_int32_t +static inline u_int32_t ixp12x0_pci_irq_read(void) { return IXPREG(IXPPCI_IRQ_STATUS); @@ -179,7 +179,7 @@ ixp12x0_enable_irq(int irq) } } -static __inline void +static inline void ixp12x0_disable_irq(int irq) { if (irq < SYS_NIRQ) { @@ -382,7 +382,7 @@ ixp12x0_do_pending(void) restore_interrupts(oldirqstate); } -__inline void +inline void splx(int new) { int old; diff --git a/sys/arch/arm/s3c2xx0/s3c2410_extint.c b/sys/arch/arm/s3c2xx0/s3c2410_extint.c index 08e182298de..34f7dbf63da 100644 --- a/sys/arch/arm/s3c2xx0/s3c2410_extint.c +++ b/sys/arch/arm/s3c2xx0/s3c2410_extint.c @@ -1,4 +1,4 @@ -/* $NetBSD: s3c2410_extint.c,v 1.5 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: s3c2410_extint.c,v 1.6 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2003 Genetec corporation. All rights reserved. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: s3c2410_extint.c,v 1.5 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: s3c2410_extint.c,v 1.6 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -101,7 +101,7 @@ static int ssextio_print(void *, const char *); static int ssextio_cascaded_intr(void *); static void ssextio_softintr(void *); -static __inline void +static inline void update_hw_mask(void) { bus_space_write_4(ssextio_softc->sc_iot, ssextio_softc->sc_ioh, diff --git a/sys/arch/arm/s3c2xx0/s3c2410_intr.c b/sys/arch/arm/s3c2xx0/s3c2410_intr.c index 5ebcb07d437..26dcacca04c 100644 --- a/sys/arch/arm/s3c2xx0/s3c2410_intr.c +++ b/sys/arch/arm/s3c2xx0/s3c2410_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: s3c2410_intr.c,v 1.5 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: s3c2410_intr.c,v 1.6 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2003 Genetec corporation. All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: s3c2410_intr.c,v 1.5 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: s3c2410_intr.c,v 1.6 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -54,12 +54,12 @@ __KERNEL_RCSID(0, "$NetBSD: s3c2410_intr.c,v 1.5 2005/12/11 12:16:51 christos Ex struct s3c2xx0_intr_dispatch handler[ICU_LEN]; -__volatile int softint_pending; +volatile int softint_pending; -__volatile int current_spl_level; -__volatile int intr_mask; -__volatile int soft_intr_mask; -__volatile int global_intr_mask = 0; /* mask some interrupts at all spl level */ +volatile int current_spl_level; +volatile int intr_mask; +volatile int soft_intr_mask; +volatile int global_intr_mask = 0; /* mask some interrupts at all spl level */ /* interrupt masks for each level */ int s3c2xx0_imask[NIPL]; diff --git a/sys/arch/arm/s3c2xx0/s3c24x0_clk.c b/sys/arch/arm/s3c2xx0/s3c24x0_clk.c index 664e43573ef..00308a9099d 100644 --- a/sys/arch/arm/s3c2xx0/s3c24x0_clk.c +++ b/sys/arch/arm/s3c2xx0/s3c24x0_clk.c @@ -1,4 +1,4 @@ -/* $NetBSD: s3c24x0_clk.c,v 1.5 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: s3c24x0_clk.c,v 1.6 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2003 Genetec corporation. All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: s3c24x0_clk.c,v 1.5 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: s3c24x0_clk.c,v 1.6 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -168,7 +168,7 @@ microtime(struct timeval *tvp) } -static __inline int +static inline int read_timer(struct s3c24x0_softc *sc) { int count; diff --git a/sys/arch/arm/s3c2xx0/s3c24x0_intr.h b/sys/arch/arm/s3c2xx0/s3c24x0_intr.h index 48fc5c3fd1d..394fc0a5f53 100644 --- a/sys/arch/arm/s3c2xx0/s3c24x0_intr.h +++ b/sys/arch/arm/s3c2xx0/s3c24x0_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: s3c24x0_intr.h,v 1.5 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: s3c24x0_intr.h,v 1.6 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002, 2003 Genetec corporation. All rights reserved. @@ -43,7 +43,7 @@ (*s3c2xx0_intr_mask_reg = ~(intr_mask & global_intr_mask)) /* no room for softinterrupts in intr_mask. */ -extern int __volatile soft_intr_mask; +extern int volatile soft_intr_mask; extern int s3c24x0_soft_imask[]; diff --git a/sys/arch/arm/s3c2xx0/s3c2800_clk.c b/sys/arch/arm/s3c2xx0/s3c2800_clk.c index 34f986fa61f..33e73ddd7eb 100644 --- a/sys/arch/arm/s3c2xx0/s3c2800_clk.c +++ b/sys/arch/arm/s3c2xx0/s3c2800_clk.c @@ -1,4 +1,4 @@ -/* $NetBSD: s3c2800_clk.c,v 1.8 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: s3c2800_clk.c,v 1.9 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 Fujitsu Component Limited @@ -34,7 +34,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: s3c2800_clk.c,v 1.8 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: s3c2800_clk.c,v 1.9 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -176,7 +176,7 @@ microtime(struct timeval *tvp) last = *tvp; } -static __inline int +static inline int read_timer(struct s3c2800_softc *sc) { int count; diff --git a/sys/arch/arm/s3c2xx0/s3c2800_intr.c b/sys/arch/arm/s3c2xx0/s3c2800_intr.c index d13e7002600..c7f17a25cb5 100644 --- a/sys/arch/arm/s3c2xx0/s3c2800_intr.c +++ b/sys/arch/arm/s3c2xx0/s3c2800_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: s3c2800_intr.c,v 1.8 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: s3c2800_intr.c,v 1.9 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 Fujitsu Component Limited @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: s3c2800_intr.c,v 1.8 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: s3c2800_intr.c,v 1.9 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -57,11 +57,11 @@ __KERNEL_RCSID(0, "$NetBSD: s3c2800_intr.c,v 1.8 2005/12/11 12:16:51 christos Ex struct s3c2xx0_intr_dispatch handler[ICU_LEN]; -__volatile int softint_pending; +volatile int softint_pending; -__volatile int current_spl_level; -__volatile int intr_mask; /* XXX: does this need to be volatile? */ -__volatile int global_intr_mask = 0; /* mask some interrupts at all spl level */ +volatile int current_spl_level; +volatile int intr_mask; /* XXX: does this need to be volatile? */ +volatile int global_intr_mask = 0; /* mask some interrupts at all spl level */ /* interrupt masks for each level */ int s3c2xx0_imask[NIPL]; diff --git a/sys/arch/arm/s3c2xx0/s3c2xx0_intr.c b/sys/arch/arm/s3c2xx0/s3c2xx0_intr.c index 064aa329a3f..5e08467a8f0 100644 --- a/sys/arch/arm/s3c2xx0/s3c2xx0_intr.c +++ b/sys/arch/arm/s3c2xx0/s3c2xx0_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: s3c2xx0_intr.c,v 1.9 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: s3c2xx0_intr.c,v 1.10 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002, 2003 Fujitsu Component Limited @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: s3c2xx0_intr.c,v 1.9 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: s3c2xx0_intr.c,v 1.10 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -88,7 +88,7 @@ __KERNEL_RCSID(0, "$NetBSD: s3c2xx0_intr.c,v 1.9 2005/12/11 12:16:51 christos Ex volatile uint32_t *s3c2xx0_intr_mask_reg; -static __inline void +static inline void __raise(int ipl) { if (current_spl_level < ipl) { diff --git a/sys/arch/arm/s3c2xx0/s3c2xx0_intr.h b/sys/arch/arm/s3c2xx0/s3c2xx0_intr.h index 04fb048212b..5a9a1a42e5a 100644 --- a/sys/arch/arm/s3c2xx0/s3c2xx0_intr.h +++ b/sys/arch/arm/s3c2xx0/s3c2xx0_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: s3c2xx0_intr.h,v 1.9 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: s3c2xx0_intr.h,v 1.10 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002, 2003 Fujitsu Component Limited @@ -85,17 +85,17 @@ typedef int (* s3c2xx0_irq_handler_t)(void *); extern volatile uint32_t *s3c2xx0_intr_mask_reg; -extern __volatile int current_spl_level; -extern __volatile int intr_mask; -extern __volatile int global_intr_mask; -extern __volatile int softint_pending; +extern volatile int current_spl_level; +extern volatile int intr_mask; +extern volatile int global_intr_mask; +extern volatile int softint_pending; extern int s3c2xx0_imask[]; extern int s3c2xx0_ilevel[]; void s3c2xx0_do_pending(int); void s3c2xx0_update_intr_masks( int, int ); -static __inline void +static inline void s3c2xx0_mask_interrupts(int mask) { int save = disable_interrupts(I32_bit); @@ -104,7 +104,7 @@ s3c2xx0_mask_interrupts(int mask) restore_interrupts(save); } -static __inline void +static inline void s3c2xx0_unmask_interrupts(int mask) { int save = disable_interrupts(I32_bit); @@ -113,7 +113,7 @@ s3c2xx0_unmask_interrupts(int mask) restore_interrupts(save); } -static __inline void +static inline void s3c2xx0_setipl(int new) { current_spl_level = new; @@ -123,7 +123,7 @@ s3c2xx0_setipl(int new) } -static __inline void +static inline void s3c2xx0_splx(int new) { int psw; @@ -138,7 +138,7 @@ s3c2xx0_splx(int new) } -static __inline int +static inline int s3c2xx0_splraise(int ipl) { int old, psw; @@ -153,7 +153,7 @@ s3c2xx0_splraise(int ipl) return (old); } -static __inline int +static inline int s3c2xx0_spllower(int ipl) { int old = current_spl_level; @@ -163,7 +163,7 @@ s3c2xx0_spllower(int ipl) return(old); } -static __inline void +static inline void s3c2xx0_setsoftintr(int si) { diff --git a/sys/arch/arm/s3c2xx0/sscom.c b/sys/arch/arm/s3c2xx0/sscom.c index b3a08be6053..0b32845e2fe 100644 --- a/sys/arch/arm/s3c2xx0/sscom.c +++ b/sys/arch/arm/s3c2xx0/sscom.c @@ -1,4 +1,4 @@ -/* $NetBSD: sscom.c,v 1.14 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: sscom.c,v 1.15 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002, 2003 Fujitsu Component Limited @@ -105,7 +105,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sscom.c,v 1.14 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sscom.c,v 1.15 2005/12/24 20:06:52 perry Exp $"); #include "opt_sscom.h" #include "opt_ddb.h" @@ -279,7 +279,7 @@ void sscom_kgdb_putc (void *, int); #define UCON_DEBUGPORT (UCON_RXINT_ENABLE|UCON_TXINT_ENABLE) -static __inline void +static inline void __sscom_output_chunk(struct sscom_softc *sc, int ufstat) { int n, space; diff --git a/sys/arch/arm/xscale/becc.c b/sys/arch/arm/xscale/becc.c index 0e7ed4d692d..d2f4a46164a 100644 --- a/sys/arch/arm/xscale/becc.c +++ b/sys/arch/arm/xscale/becc.c @@ -1,4 +1,4 @@ -/* $NetBSD: becc.c,v 1.11 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: becc.c,v 1.12 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: becc.c,v 1.11 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: becc.c,v 1.12 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -102,8 +102,8 @@ becc_attach(struct becc_softc *sc) * This allows the BECC to return the requested 4-byte word * first when filling a cache line. */ - __asm __volatile("mrc p13, 0, %0, c1, c1, 0" : "=r" (reg)); - __asm __volatile("mcr p13, 0, %0, c1, c1, 0" : : "r" (reg | BCUMOD_AF)); + __asm volatile("mrc p13, 0, %0, c1, c1, 0" : "=r" (reg)); + __asm volatile("mcr p13, 0, %0, c1, c1, 0" : : "r" (reg | BCUMOD_AF)); /* * Program the address windows of the PCI core. Note @@ -334,7 +334,7 @@ becc_pcicore_read(struct becc_softc *sc, bus_addr_t reg) { vaddr_t va = sc->sc_pci_cfg_base | (1U << BECC_IDSEL_BIT) | reg; - return (*(__volatile uint32_t *) va); + return (*(volatile uint32_t *) va); } void @@ -342,5 +342,5 @@ becc_pcicore_write(struct becc_softc *sc, bus_addr_t reg, uint32_t val) { vaddr_t va = sc->sc_pci_cfg_base | (1U << BECC_IDSEL_BIT) | reg; - *(__volatile uint32_t *) va = val; + *(volatile uint32_t *) va = val; } diff --git a/sys/arch/arm/xscale/becc_csrvar.h b/sys/arch/arm/xscale/becc_csrvar.h index 0bd04d5d625..bcbb4149de5 100644 --- a/sys/arch/arm/xscale/becc_csrvar.h +++ b/sys/arch/arm/xscale/becc_csrvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: becc_csrvar.h,v 1.1 2003/01/25 01:57:18 thorpej Exp $ */ +/* $NetBSD: becc_csrvar.h,v 1.2 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -47,8 +47,8 @@ extern vaddr_t becc_vaddr; /* * Macros to read/write the BECC registers. */ -#define BECC_CSR_READ(x) *(__volatile uint32_t *)(becc_vaddr + (x)) -#define BECC_CSR_WRITE(x, v) *(__volatile uint32_t *)(becc_vaddr + (x)) = (v) +#define BECC_CSR_READ(x) *(volatile uint32_t *)(becc_vaddr + (x)) +#define BECC_CSR_WRITE(x, v) *(volatile uint32_t *)(becc_vaddr + (x)) = (v) extern const char *becc_irqnames[]; diff --git a/sys/arch/arm/xscale/becc_icu.c b/sys/arch/arm/xscale/becc_icu.c index b566a5fdd0b..51c9afeaf6b 100644 --- a/sys/arch/arm/xscale/becc_icu.c +++ b/sys/arch/arm/xscale/becc_icu.c @@ -1,4 +1,4 @@ -/* $NetBSD: becc_icu.c,v 1.5 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: becc_icu.c,v 1.6 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: becc_icu.c,v 1.5 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: becc_icu.c,v 1.6 2005/12/24 20:06:52 perry Exp $"); #ifndef EVBARM_SPL_NOINLINE #define EVBARM_SPL_NOINLINE @@ -70,14 +70,14 @@ struct intrq intrq[NIRQ]; uint32_t becc_imask[NIPL]; /* Current interrupt priority level. */ -__volatile uint32_t current_spl_level; +volatile uint32_t current_spl_level; /* Interrupts pending. */ -__volatile uint32_t becc_ipending; -__volatile uint32_t becc_sipending; +volatile uint32_t becc_ipending; +volatile uint32_t becc_sipending; /* Software copy of the IRQs we have enabled. */ -__volatile uint32_t intr_enabled; +volatile uint32_t intr_enabled; /* Mask if interrupts steered to FIQs. */ uint32_t intr_steer; @@ -123,7 +123,7 @@ const char *becc_irqnames[] = { void becc_intr_dispatch(struct irqframe *frame); -static __inline uint32_t +static inline uint32_t becc_icsr_read(void) { uint32_t icsr; @@ -138,7 +138,7 @@ becc_icsr_read(void) return (icsr & intr_enabled); } -static __inline void +static inline void becc_set_intrsteer(void) { @@ -146,7 +146,7 @@ becc_set_intrsteer(void) (void) BECC_CSR_READ(BECC_ICSTR); } -static __inline void +static inline void becc_enable_irq(int irq) { @@ -154,7 +154,7 @@ becc_enable_irq(int irq) becc_set_intrmask(); } -static __inline void +static inline void becc_disable_irq(int irq) { diff --git a/sys/arch/arm/xscale/becc_intr.h b/sys/arch/arm/xscale/becc_intr.h index 3b5be3459af..76dab6f2022 100644 --- a/sys/arch/arm/xscale/becc_intr.h +++ b/sys/arch/arm/xscale/becc_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: becc_intr.h,v 1.1 2003/01/25 01:57:18 thorpej Exp $ */ +/* $NetBSD: becc_intr.h,v 1.2 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -44,10 +44,10 @@ #include <arm/xscale/beccreg.h> #include <arm/xscale/becc_csrvar.h> -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) becc_set_intrmask(void) { - extern __volatile uint32_t intr_enabled; + extern volatile uint32_t intr_enabled; /* * The bits in the ICMR indicate which interrupts are masked @@ -58,10 +58,10 @@ becc_set_intrmask(void) (void) BECC_CSR_READ(BECC_ICMR); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) becc_splraise(int ipl) { - extern __volatile uint32_t current_spl_level; + extern volatile uint32_t current_spl_level; extern uint32_t becc_imask[]; uint32_t old; @@ -71,11 +71,11 @@ becc_splraise(int ipl) return (old); } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) becc_splx(int new) { - extern __volatile uint32_t intr_enabled, becc_ipending; - extern __volatile uint32_t current_spl_level; + extern volatile uint32_t intr_enabled, becc_ipending; + extern volatile uint32_t current_spl_level; uint32_t oldirqstate, hwpend; current_spl_level = new; @@ -95,10 +95,10 @@ becc_splx(int new) } } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) becc_spllower(int ipl) { - extern __volatile uint32_t current_spl_level; + extern volatile uint32_t current_spl_level; extern uint32_t becc_imask[]; uint32_t old = current_spl_level; @@ -106,10 +106,10 @@ becc_spllower(int ipl) return (old); } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) becc_setsoftintr(int si) { - extern __volatile uint32_t becc_sipending; + extern volatile uint32_t becc_sipending; becc_sipending |= (1 << si); BECC_CSR_WRITE(BECC_ICSR, (1U << ICU_SOFT)); diff --git a/sys/arch/arm/xscale/becc_pci.c b/sys/arch/arm/xscale/becc_pci.c index a955af942bf..2903de30085 100644 --- a/sys/arch/arm/xscale/becc_pci.c +++ b/sys/arch/arm/xscale/becc_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: becc_pci.c,v 1.7 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: becc_pci.c,v 1.8 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: becc_pci.c,v 1.7 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: becc_pci.c,v 1.8 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -318,7 +318,7 @@ becc_pci_conf_write(void *v, pcitag_t tag, int offset, pcireg_t val) va = sc->sc_pci_cfg_base + ps.ps_offset; - *(__volatile pcireg_t *)va = val; + *(volatile pcireg_t *)va = val; becc_pci_conf_cleanup(sc); diff --git a/sys/arch/arm/xscale/i80200_icu.c b/sys/arch/arm/xscale/i80200_icu.c index cd51f88886f..1c3308a5690 100644 --- a/sys/arch/arm/xscale/i80200_icu.c +++ b/sys/arch/arm/xscale/i80200_icu.c @@ -1,4 +1,4 @@ -/* $NetBSD: i80200_icu.c,v 1.8 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: i80200_icu.c,v 1.9 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i80200_icu.c,v 1.8 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i80200_icu.c,v 1.9 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: i80200_icu.c,v 1.8 2005/12/11 12:16:51 christos Exp #include <arm/xscale/i80200var.h> /* Software shadow copy of INTCTL. */ -static __volatile uint32_t intctl; +static volatile uint32_t intctl; /* Pointer to board-specific external IRQ dispatcher. */ void (*i80200_extirq_dispatch)(struct irqframe *); @@ -74,12 +74,12 @@ i80200_icu_init(void) /* Disable all interrupt sources. */ intctl = 0; - __asm __volatile("mcr p13, 0, %0, c0, c0" + __asm volatile("mcr p13, 0, %0, c0, c0" : : "r" (intctl)); /* Steer PMU and BMU to IRQ. */ - __asm __volatile("mcr p13, 0, %0, c8, c0" + __asm volatile("mcr p13, 0, %0, c8, c0" : : "r" (0)); @@ -99,7 +99,7 @@ i80200_intr_enable(uint32_t intr) oldirqstate = disable_interrupts(I32_bit|F32_bit); intctl |= intr; - __asm __volatile("mcr p13, 0, %0, c0, c0" + __asm volatile("mcr p13, 0, %0, c0, c0" : : "r" (intctl)); @@ -119,7 +119,7 @@ i80200_intr_disable(uint32_t intr) oldirqstate = disable_interrupts(I32_bit|F32_bit); intctl &= ~intr; - __asm __volatile("mcr p13, 0, %0, c0, c0" + __asm volatile("mcr p13, 0, %0, c0, c0" : : "r" (intctl)); diff --git a/sys/arch/arm/xscale/i80321_icu.c b/sys/arch/arm/xscale/i80321_icu.c index f60ce0b4fc3..00e60193323 100644 --- a/sys/arch/arm/xscale/i80321_icu.c +++ b/sys/arch/arm/xscale/i80321_icu.c @@ -1,4 +1,4 @@ -/* $NetBSD: i80321_icu.c,v 1.10 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: i80321_icu.c,v 1.11 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i80321_icu.c,v 1.10 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i80321_icu.c,v 1.11 2005/12/24 20:06:52 perry Exp $"); #ifndef EVBARM_SPL_NOINLINE #define EVBARM_SPL_NOINLINE @@ -67,13 +67,13 @@ struct intrq intrq[NIRQ]; int i80321_imask[NIPL]; /* Current interrupt priority level. */ -__volatile int current_spl_level; +volatile int current_spl_level; /* Interrupts pending. */ -__volatile int i80321_ipending; +volatile int i80321_ipending; /* Software copy of the IRQs we have enabled. */ -__volatile uint32_t intr_enabled; +volatile uint32_t intr_enabled; /* Mask if interrupts steered to FIQs. */ uint32_t intr_steer; @@ -142,12 +142,12 @@ const char *i80321_irqnames[] = { void i80321_intr_dispatch(struct clockframe *frame); -static __inline uint32_t +static inline uint32_t i80321_iintsrc_read(void) { uint32_t iintsrc; - __asm __volatile("mrc p6, 0, %0, c8, c0, 0" + __asm volatile("mrc p6, 0, %0, c8, c0, 0" : "=r" (iintsrc)); /* @@ -158,16 +158,16 @@ i80321_iintsrc_read(void) return (iintsrc & intr_enabled); } -static __inline void +static inline void i80321_set_intrsteer(void) { - __asm __volatile("mcr p6, 0, %0, c4, c0, 0" + __asm volatile("mcr p6, 0, %0, c4, c0, 0" : : "r" (intr_steer & ICU_INT_HWMASK)); } -static __inline void +static inline void i80321_enable_irq(int irq) { @@ -175,7 +175,7 @@ i80321_enable_irq(int irq) i80321_set_intrmask(); } -static __inline void +static inline void i80321_disable_irq(int irq) { @@ -298,7 +298,7 @@ i80321_intr_calculate_masks(void) } } -__inline void +inline void i80321_do_pending(void) { static __cpu_simple_lock_t processing = __SIMPLELOCK_UNLOCKED; diff --git a/sys/arch/arm/xscale/i80321_intr.h b/sys/arch/arm/xscale/i80321_intr.h index 71d4bd3b2d2..d139bc05ebf 100644 --- a/sys/arch/arm/xscale/i80321_intr.h +++ b/sys/arch/arm/xscale/i80321_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: i80321_intr.h,v 1.6 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: i80321_intr.h,v 1.7 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -49,12 +49,12 @@ void i80321_do_pending(void); -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) i80321_set_intrmask(void) { - extern __volatile uint32_t intr_enabled; + extern volatile uint32_t intr_enabled; - __asm __volatile("mcr p6, 0, %0, c0, c0, 0" + __asm volatile("mcr p6, 0, %0, c0, c0, 0" : : "r" (intr_enabled & ICU_INT_HWMASK)); } @@ -63,12 +63,12 @@ i80321_set_intrmask(void) ((1U << ICU_INT_bit26) | (1U << ICU_INT_bit22) | \ (1U << ICU_INT_bit5) | (1U << ICU_INT_bit4)) -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) i80321_splx(int new) { - extern __volatile uint32_t intr_enabled; - extern __volatile int current_spl_level; - extern __volatile int i80321_ipending; + extern volatile uint32_t intr_enabled; + extern volatile int current_spl_level; + extern volatile int i80321_ipending; extern void i80321_do_pending(void); int oldirqstate, hwpend; @@ -89,10 +89,10 @@ i80321_splx(int new) i80321_do_pending(); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) i80321_splraise(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int i80321_imask[]; int old; @@ -105,10 +105,10 @@ i80321_splraise(int ipl) return (old); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) i80321_spllower(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int i80321_imask[]; int old = current_spl_level; diff --git a/sys/arch/arm/xscale/i80321_timer.c b/sys/arch/arm/xscale/i80321_timer.c index c5b7583995e..0bea1b020e6 100644 --- a/sys/arch/arm/xscale/i80321_timer.c +++ b/sys/arch/arm/xscale/i80321_timer.c @@ -1,4 +1,4 @@ -/* $NetBSD: i80321_timer.c,v 1.12 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: i80321_timer.c,v 1.13 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i80321_timer.c,v 1.12 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i80321_timer.c,v 1.13 2005/12/24 20:06:52 perry Exp $"); #include "opt_perfctrs.h" #include "opt_i80321.h" @@ -73,58 +73,58 @@ static uint32_t counts_per_hz; int clockhandler(void *); -static __inline uint32_t +static inline uint32_t tmr0_read(void) { uint32_t rv; - __asm __volatile("mrc p6, 0, %0, c0, c1, 0" + __asm volatile("mrc p6, 0, %0, c0, c1, 0" : "=r" (rv)); return (rv); } -static __inline void +static inline void tmr0_write(uint32_t val) { - __asm __volatile("mcr p6, 0, %0, c0, c1, 0" + __asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (val)); } -static __inline uint32_t +static inline uint32_t tcr0_read(void) { uint32_t rv; - __asm __volatile("mrc p6, 0, %0, c2, c1, 0" + __asm volatile("mrc p6, 0, %0, c2, c1, 0" : "=r" (rv)); return (rv); } -static __inline void +static inline void tcr0_write(uint32_t val) { - __asm __volatile("mcr p6, 0, %0, c2, c1, 0" + __asm volatile("mcr p6, 0, %0, c2, c1, 0" : : "r" (val)); } -static __inline void +static inline void trr0_write(uint32_t val) { - __asm __volatile("mcr p6, 0, %0, c4, c1, 0" + __asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (val)); } -static __inline void +static inline void tisr_write(uint32_t val) { - __asm __volatile("mcr p6, 0, %0, c6, c1, 0" + __asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); } diff --git a/sys/arch/arm/xscale/i80321_wdog.c b/sys/arch/arm/xscale/i80321_wdog.c index 0bd6f5cf3ca..1ab0f6f784e 100644 --- a/sys/arch/arm/xscale/i80321_wdog.c +++ b/sys/arch/arm/xscale/i80321_wdog.c @@ -1,4 +1,4 @@ -/* $NetBSD: i80321_wdog.c,v 1.7 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: i80321_wdog.c,v 1.8 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i80321_wdog.c,v 1.7 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i80321_wdog.c,v 1.8 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -62,11 +62,11 @@ struct iopwdog_softc { int sc_wdog_period; }; -static __inline void +static inline void wdtcr_write(uint32_t val) { - __asm __volatile("mcr p6, 0, %0, c7, c1, 0" + __asm volatile("mcr p6, 0, %0, c7, c1, 0" : : "r" (val)); } diff --git a/sys/arch/arm/xscale/ixp425_intr.c b/sys/arch/arm/xscale/ixp425_intr.c index 6cfebb100e8..ec7bc8de0da 100644 --- a/sys/arch/arm/xscale/ixp425_intr.c +++ b/sys/arch/arm/xscale/ixp425_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixp425_intr.c,v 1.11 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: ixp425_intr.c,v 1.12 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2003 @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ixp425_intr.c,v 1.11 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixp425_intr.c,v 1.12 2005/12/24 20:06:52 perry Exp $"); #ifndef EVBARM_SPL_NOINLINE #define EVBARM_SPL_NOINLINE @@ -99,13 +99,13 @@ struct intrq intrq[NIRQ]; int ixp425_imask[NIPL]; /* Current interrupt priority level. */ -__volatile int current_spl_level; +volatile int current_spl_level; /* Interrupts pending. */ -__volatile int ixp425_ipending; +volatile int ixp425_ipending; /* Software copy of the IRQs we have enabled. */ -__volatile uint32_t intr_enabled; +volatile uint32_t intr_enabled; /* Mask if interrupts steered to FIQs. */ uint32_t intr_steer; @@ -144,19 +144,19 @@ static const int si_to_ipl[SI_NQUEUES] = { void ixp425_intr_dispatch(struct clockframe *frame); -static __inline uint32_t +static inline uint32_t ixp425_irq_read(void) { return IXPREG(IXP425_INT_STATUS) & intr_enabled; } -static __inline void +static inline void ixp425_set_intrsteer(void) { IXPREG(IXP425_INT_SELECT) = intr_steer & IXP425_INT_HWMASK; } -static __inline void +static inline void ixp425_enable_irq(int irq) { @@ -164,7 +164,7 @@ ixp425_enable_irq(int irq) ixp425_set_intrmask(); } -static __inline void +static inline void ixp425_disable_irq(int irq) { @@ -172,7 +172,7 @@ ixp425_disable_irq(int irq) ixp425_set_intrmask(); } -static __inline u_int32_t +static inline u_int32_t ixp425_irq2gpio_bit(int irq) { @@ -308,7 +308,7 @@ ixp425_intr_calculate_masks(void) } } -__inline void +inline void ixp425_do_pending(void) { static __cpu_simple_lock_t processing = __SIMPLELOCK_UNLOCKED; diff --git a/sys/arch/arm/xscale/ixp425_intr.h b/sys/arch/arm/xscale/ixp425_intr.h index 941ad5ba0c0..4ca008f1c2b 100644 --- a/sys/arch/arm/xscale/ixp425_intr.h +++ b/sys/arch/arm/xscale/ixp425_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: ixp425_intr.h,v 1.5 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: ixp425_intr.h,v 1.6 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -51,10 +51,10 @@ void ixp425_do_pending(void); -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ixp425_set_intrmask(void) { - extern __volatile uint32_t intr_enabled; + extern volatile uint32_t intr_enabled; IXPREG(IXP425_INT_ENABLE) = intr_enabled & IXP425_INT_HWMASK; } @@ -63,12 +63,12 @@ ixp425_set_intrmask(void) ((1U << IXP425_INT_bit31) | (1U << IXP425_INT_bit30) | \ (1U << IXP425_INT_bit14) | (1U << IXP425_INT_bit11)) -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ixp425_splx(int new) { - extern __volatile uint32_t intr_enabled; - extern __volatile int current_spl_level; - extern __volatile int ixp425_ipending; + extern volatile uint32_t intr_enabled; + extern volatile int current_spl_level; + extern volatile int ixp425_ipending; extern void ixp425_do_pending(void); int oldirqstate, hwpend; @@ -89,10 +89,10 @@ ixp425_splx(int new) ixp425_do_pending(); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) ixp425_splraise(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int ixp425_imask[]; int old; @@ -105,10 +105,10 @@ ixp425_splraise(int ipl) return (old); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) ixp425_spllower(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int ixp425_imask[]; int old = current_spl_level; diff --git a/sys/arch/arm/xscale/ixp425_pci_space.c b/sys/arch/arm/xscale/ixp425_pci_space.c index 60c62261a73..4f53d0687ef 100644 --- a/sys/arch/arm/xscale/ixp425_pci_space.c +++ b/sys/arch/arm/xscale/ixp425_pci_space.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixp425_pci_space.c,v 1.4 2005/11/24 13:08:32 yamt Exp $ */ +/* $NetBSD: ixp425_pci_space.c,v 1.5 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2003 @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ixp425_pci_space.c,v 1.4 2005/11/24 13:08:32 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixp425_pci_space.c,v 1.5 2005/12/24 20:06:52 perry Exp $"); /* * bus_space PCI functions for ixp425 @@ -54,9 +54,9 @@ __KERNEL_RCSID(0, "$NetBSD: ixp425_pci_space.c,v 1.4 2005/11/24 13:08:32 yamt Ex /* * Macros to read/write registers */ -#define CSR_READ_4(x) *(__volatile uint32_t *) \ +#define CSR_READ_4(x) *(volatile uint32_t *) \ (IXP425_PCI_CSR_BASE + (x)) -#define CSR_WRITE_4(x, v) *(__volatile uint32_t *) \ +#define CSR_WRITE_4(x, v) *(volatile uint32_t *) \ (IXP425_PCI_CSR_BASE + (x)) = (v) /* Proto types for all the bus_space structure functions */ diff --git a/sys/arch/arm/xscale/pxa2x0.c b/sys/arch/arm/xscale/pxa2x0.c index 2a34f1fa2cb..d9ad8311e75 100644 --- a/sys/arch/arm/xscale/pxa2x0.c +++ b/sys/arch/arm/xscale/pxa2x0.c @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0.c,v 1.10 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: pxa2x0.c,v 1.11 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved. @@ -94,7 +94,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pxa2x0.c,v 1.10 2005/12/11 12:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pxa2x0.c,v 1.11 2005/12/24 20:06:52 perry Exp $"); #include "pxaintc.h" #include "pxagpio.h" @@ -291,7 +291,7 @@ static inline uint32_t read_clock_counter_xsc1(void) { uint32_t x; - __asm __volatile("mrc p14, 0, %0, c1, c0, 0" : "=r" (x) ); + __asm volatile("mrc p14, 0, %0, c1, c0, 0" : "=r" (x) ); return x; } @@ -300,7 +300,7 @@ static inline uint32_t read_clock_counter_xsc2(void) { uint32_t x; - __asm __volatile("mrc p14, 0, %0, c1, c1, 0" : "=r" (x) ); + __asm volatile("mrc p14, 0, %0, c1, c1, 0" : "=r" (x) ); return x; } @@ -323,17 +323,17 @@ pxaip_measure_cpuclock(struct pxaip_softc *sc) irq = disable_interrupts(I32_bit|F32_bit); if (is_xsc2) { - __asm __volatile( + __asm volatile( "mrc p14, 0, %0, c0, c1, 0" : "=r" (pmcr_save)); /* Enable clock counter */ - __asm __volatile( + __asm volatile( "mcr p14, 0, %0, c0, c1, 0" : : "r" (PMNC_E|PMNC_C)); } else { - __asm __volatile( + __asm volatile( "mrc p14, 0, %0, c0, c0, 0" : "=r" (pmcr_save)); /* Enable clock counter */ - __asm __volatile( + __asm volatile( "mcr p14, 0, %0, c0, c0, 0" : : "r" (PMNC_E|PMNC_C)); } @@ -347,10 +347,10 @@ pxaip_measure_cpuclock(struct pxaip_softc *sc) end = read_clock_counter(); if (is_xsc2) - __asm __volatile( + __asm volatile( "mcr p14, 0, %0, c0, c1, 0" : : "r" (pmcr_save)); else - __asm __volatile( + __asm volatile( "mcr p14, 0, %0, c0, c0, 0" : : "r" (pmcr_save)); restore_interrupts(irq); @@ -362,7 +362,7 @@ pxaip_measure_cpuclock(struct pxaip_softc *sc) void pxa2x0_turbo_mode(int f) { - __asm __volatile("mcr p14, 0, %0, c6, c0, 0" : : "r" (f)); + __asm volatile("mcr p14, 0, %0, c6, c0, 0" : : "r" (f)); } void diff --git a/sys/arch/arm/xscale/pxa2x0_ac97.c b/sys/arch/arm/xscale/pxa2x0_ac97.c index 8a3f0a9af64..c9da923e66f 100644 --- a/sys/arch/arm/xscale/pxa2x0_ac97.c +++ b/sys/arch/arm/xscale/pxa2x0_ac97.c @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_ac97.c,v 1.2 2005/12/11 12:16:51 christos Exp $ */ +/* $NetBSD: pxa2x0_ac97.c,v 1.3 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2003, 2005 Wasabi Systems, Inc. @@ -190,28 +190,28 @@ static const struct audio_format acu_formats[] = { }; #define ACU_NFORMATS (sizeof(acu_formats) / sizeof(struct audio_format)) -static __inline u_int32_t +static inline u_int32_t acu_reg_read(struct acu_softc *sc, int reg) { return (bus_space_read_4(sc->sc_bust, sc->sc_bush, reg)); } -static __inline void +static inline void acu_reg_write(struct acu_softc *sc, int reg, u_int32_t val) { bus_space_write_4(sc->sc_bust, sc->sc_bush, reg, val); } -static __inline int +static inline int acu_codec_ready(struct acu_softc *sc) { return (acu_reg_read(sc, AC97_GSR) & GSR_PCR); } -static __inline int +static inline int acu_wait_gsr(struct acu_softc *sc, u_int32_t bit) { int timeout; diff --git a/sys/arch/arm/xscale/pxa2x0_dmac.c b/sys/arch/arm/xscale/pxa2x0_dmac.c index 89f84d9cf7f..890d5f495e1 100644 --- a/sys/arch/arm/xscale/pxa2x0_dmac.c +++ b/sys/arch/arm/xscale/pxa2x0_dmac.c @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_dmac.c,v 1.2 2005/12/11 12:16:52 christos Exp $ */ +/* $NetBSD: pxa2x0_dmac.c,v 1.3 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2003, 2005 Wasabi Systems, Inc. @@ -234,21 +234,21 @@ static void dmac_dmover_run(struct dmover_backend *); static void dmac_dmover_done(struct dmac_xfer *, int); #endif -static __inline u_int32_t +static inline u_int32_t dmac_reg_read(struct pxadmac_softc *sc, int reg) { return (bus_space_read_4(sc->sc_bust, sc->sc_bush, reg)); } -static __inline void +static inline void dmac_reg_write(struct pxadmac_softc *sc, int reg, u_int32_t val) { bus_space_write_4(sc->sc_bust, sc->sc_bush, reg, val); } -static __inline int +static inline int dmac_allocate_channel(struct pxadmac_softc *sc, dmac_priority_t priority, u_int *chanp) { @@ -264,7 +264,7 @@ dmac_allocate_channel(struct pxadmac_softc *sc, dmac_priority_t priority, return (0); } -static __inline void +static inline void dmac_free_channel(struct pxadmac_softc *sc, dmac_priority_t priority, u_int channel) { @@ -758,7 +758,7 @@ pxa2x0_dmac_free_xfer(struct dmac_xfer *dx) free(dx, M_DEVBUF); } -static __inline int +static inline int dmac_validate_desc(struct dmac_xfer_desc *xd, size_t *psize) { size_t size; @@ -782,7 +782,7 @@ dmac_validate_desc(struct dmac_xfer_desc *xd, size_t *psize) return (0); } -static __inline int +static inline int dmac_init_desc(struct dmac_desc_segs *ds, struct dmac_xfer_desc *xd, size_t *psize) { diff --git a/sys/arch/arm/xscale/pxa2x0_gpio.c b/sys/arch/arm/xscale/pxa2x0_gpio.c index 323e18f23e0..19635eaf72f 100644 --- a/sys/arch/arm/xscale/pxa2x0_gpio.c +++ b/sys/arch/arm/xscale/pxa2x0_gpio.c @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_gpio.c,v 1.4 2005/12/11 12:16:52 christos Exp $ */ +/* $NetBSD: pxa2x0_gpio.c,v 1.5 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pxa2x0_gpio.c,v 1.4 2005/12/11 12:16:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pxa2x0_gpio.c,v 1.5 2005/12/24 20:06:52 perry Exp $"); #include "opt_pxa2x0_gpio.h" @@ -93,7 +93,7 @@ static int gpio_dispatch(struct pxagpio_softc *, int); static int gpio_intrN(void *); #endif -static __inline u_int32_t +static inline u_int32_t pxagpio_reg_read(struct pxagpio_softc *sc, int reg) { if (__predict_true(sc != NULL)) @@ -104,7 +104,7 @@ pxagpio_reg_read(struct pxagpio_softc *sc, int reg) panic("pxagpio_reg_read: not bootstrapped"); } -static __inline void +static inline void pxagpio_reg_write(struct pxagpio_softc *sc, int reg, u_int32_t val) { if (__predict_true(sc != NULL)) diff --git a/sys/arch/arm/xscale/pxa2x0_intr.c b/sys/arch/arm/xscale/pxa2x0_intr.c index f37d7922bd3..3f174d7a5b0 100644 --- a/sys/arch/arm/xscale/pxa2x0_intr.c +++ b/sys/arch/arm/xscale/pxa2x0_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_intr.c,v 1.7 2005/12/11 12:16:52 christos Exp $ */ +/* $NetBSD: pxa2x0_intr.c,v 1.8 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 Genetec Corporation. All rights reserved. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pxa2x0_intr.c,v 1.7 2005/12/11 12:16:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pxa2x0_intr.c,v 1.8 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -90,9 +90,9 @@ static struct { /* struct evbnt ev; */ } handler[ICU_LEN]; -__volatile int softint_pending; -__volatile int current_spl_level; -__volatile int intr_mask; +volatile int softint_pending; +volatile int current_spl_level; +volatile int intr_mask; /* interrupt masks for each level */ int pxa2x0_imask[NIPL]; static int extirq_level[ICU_LEN]; @@ -146,7 +146,7 @@ pxa2x0_intr_bootstrap(vaddr_t addr) pxaic_base = addr; } -static __inline void +static inline void __raise(int ipl) { diff --git a/sys/arch/arm/xscale/pxa2x0_intr.h b/sys/arch/arm/xscale/pxa2x0_intr.h index b85e7edab2d..eccefc7b560 100644 --- a/sys/arch/arm/xscale/pxa2x0_intr.h +++ b/sys/arch/arm/xscale/pxa2x0_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_intr.h,v 1.6 2005/12/11 12:16:52 christos Exp $ */ +/* $NetBSD: pxa2x0_intr.h,v 1.7 2005/12/24 20:06:52 perry Exp $ */ /* Derived from i80321_intr.h */ @@ -58,9 +58,9 @@ vaddr_t pxaic_base; /* Shared with pxa2x0_irq.S */ #define write_icu(offset,value) \ (*(volatile uint32_t *)(pxaic_base+(offset))=(value)) -extern __volatile int current_spl_level; -extern __volatile int intr_mask; -extern __volatile int softint_pending; +extern volatile int current_spl_level; +extern volatile int intr_mask; +extern volatile int softint_pending; extern int pxa2x0_imask[]; void pxa2x0_do_pending(void); @@ -70,7 +70,7 @@ void pxa2x0_do_pending(void); */ #define SI_TO_IRQBIT(si) (1U<<(si)) -static __inline void +static inline void pxa2x0_setipl(int new) { current_spl_level = new; @@ -79,7 +79,7 @@ pxa2x0_setipl(int new) } -static __inline void +static inline void pxa2x0_splx(int new) { int psw; @@ -94,7 +94,7 @@ pxa2x0_splx(int new) } -static __inline int +static inline int pxa2x0_splraise(int ipl) { int old, psw; @@ -109,7 +109,7 @@ pxa2x0_splraise(int ipl) return (old); } -static __inline int +static inline int pxa2x0_spllower(int ipl) { int old = current_spl_level; @@ -119,7 +119,7 @@ pxa2x0_spllower(int ipl) return(old); } -static __inline void +static inline void pxa2x0_setsoftintr(int si) { atomic_set_bit( (u_int *)__UNVOLATILE(&softint_pending), @@ -135,7 +135,7 @@ pxa2x0_setsoftintr(int si) * An useful function for interrupt handlers. * XXX: This shouldn't be here. */ -static __inline int +static inline int find_first_bit( uint32_t bits ) { int count; @@ -175,7 +175,7 @@ void pxa2x0_irq_handler(void *); void *pxa2x0_intr_establish(int irqno, int level, int (*func)(void *), void *cookie); void pxa2x0_update_intr_masks(int irqno, int level); -extern __volatile int current_spl_level; +extern volatile int current_spl_level; #endif /* ! _LOCORE */ diff --git a/sys/arch/arm/xscale/xscale_pmc.c b/sys/arch/arm/xscale/xscale_pmc.c index e4b6e55cde2..e62779118ea 100644 --- a/sys/arch/arm/xscale/xscale_pmc.c +++ b/sys/arch/arm/xscale/xscale_pmc.c @@ -1,4 +1,4 @@ -/* $NetBSD: xscale_pmc.c,v 1.8 2005/12/11 12:16:52 christos Exp $ */ +/* $NetBSD: xscale_pmc.c,v 1.9 2005/12/24 20:06:52 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xscale_pmc.c,v 1.8 2005/12/11 12:16:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xscale_pmc.c,v 1.9 2005/12/24 20:06:52 perry Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -75,23 +75,23 @@ uint32_t pmc_reset_vals[3] = {0x80000000, 0x80000000, 0x80000000}; int pmc_usecount[3] = {0, 0, 0}; -static __inline uint32_t +static inline uint32_t xscale_pmnc_read(void) { uint32_t pmnc; - __asm __volatile("mrc p14, 0, %0, c0, c0, 0" + __asm volatile("mrc p14, 0, %0, c0, c0, 0" : "=r" (pmnc)); return pmnc; } -static __inline uint32_t +static inline uint32_t xscale_pmnc_write(uint32_t val) { uint32_t pmnc; - __asm __volatile("mcr p14, 0, %0, c0, c0, 0" + __asm volatile("mcr p14, 0, %0, c0, c0, 0" : : "r" (val)); return pmnc; @@ -122,7 +122,7 @@ xscale_pmc_dispatch(void *arg) if (pmnc & PMNC_CC_IF) { if (pmc_profiling_enabled & __PMC_CCNT) { proftick(frame); - __asm __volatile("mcr p14, 0, %0, c1, c0, 0" + __asm volatile("mcr p14, 0, %0, c1, c0, 0" : : "r" (pmc_reset_vals[__PMC_CCNT_I])); } else if ((p = curproc) != NULL && (p->p_md.pmc_enabled & __PMC_CCNT) != 0) { @@ -133,7 +133,7 @@ xscale_pmc_dispatch(void *arg) */ pmcs = p->p_md.pmc_state; pmcs->pmcv[__PMC_CCNT_I] += 0x100000000ULL; - __asm __volatile("mcr p14, 0, %0, c1, c0, 0" + __asm volatile("mcr p14, 0, %0, c1, c0, 0" : : "r" (pmcs->pmcr[__PMC_CCNT_I])); } } @@ -144,7 +144,7 @@ xscale_pmc_dispatch(void *arg) if (pmnc & PMNC_PMN0_IF) { if (pmc_profiling_enabled & __PMC0) { proftick(frame); - __asm __volatile("mcr p14, 0, %0, c2, c0, 0" + __asm volatile("mcr p14, 0, %0, c2, c0, 0" : : "r" (pmc_reset_vals[__PMC0_I])); } else if ((p = curproc) != NULL && (p->p_md.pmc_enabled & __PMC0) != 0) { @@ -153,7 +153,7 @@ xscale_pmc_dispatch(void *arg) */ pmcs = p->p_md.pmc_state; pmcs->pmcv[__PMC0_I] += 0x100000000ULL; - __asm __volatile("mcr p14, 0, %0, c2, c0, 0" + __asm volatile("mcr p14, 0, %0, c2, c0, 0" : : "r" (pmcs->pmcr[__PMC0_I])); } } @@ -164,13 +164,13 @@ xscale_pmc_dispatch(void *arg) if (pmnc & PMNC_PMN1_IF) { if (pmc_profiling_enabled & __PMC1) { proftick(frame); - __asm __volatile("mcr p14, 0, %0, c3, c0, 0" + __asm volatile("mcr p14, 0, %0, c3, c0, 0" : : "r" (pmc_reset_vals[__PMC1_I])); } else if ((p = curproc) != NULL && (p->p_md.pmc_enabled & __PMC1) != 0) { pmcs = p->p_md.pmc_state; pmcs->pmcv[__PMC1_I] += 0x100000000ULL; - __asm __volatile("mcr p14, 0, %0, c3, c0, 0" + __asm volatile("mcr p14, 0, %0, c3, c0, 0" : : "r" (pmcs->pmcr[__PMC1_I])); } } @@ -266,7 +266,7 @@ xscale_save_context(struct proc *p) if (p->p_md.pmc_enabled & __PMC_CCNT) { /* save ccnt */ - __asm __volatile("mrc p14, 0, %0, c1, c0, 0" + __asm volatile("mrc p14, 0, %0, c1, c0, 0" : "=r" (val)); pmcs->pmcv[__PMC_CCNT_I] &= ~0xffffffffULL; pmcs->pmcv[__PMC_CCNT_I] |= val; @@ -274,7 +274,7 @@ xscale_save_context(struct proc *p) if (p->p_md.pmc_enabled & __PMC0) { /* save pmc0 */ - __asm __volatile("mrc p14, 0, %0, c2, c0, 0" + __asm volatile("mrc p14, 0, %0, c2, c0, 0" : "=r" (val)); pmcs->pmcv[__PMC0_I] &= ~0xffffffffULL; pmcs->pmcv[__PMC0_I] |= val; @@ -282,14 +282,14 @@ xscale_save_context(struct proc *p) if (p->p_md.pmc_enabled & __PMC1) { /* save pmc1 */ - __asm __volatile("mrc p14, 0, %0, c3, c0, 0" + __asm volatile("mrc p14, 0, %0, c3, c0, 0" : "=r" (val)); pmcs->pmcv[__PMC1_I] &= ~0xffffffffULL; pmcs->pmcv[__PMC1_I] |= val; } if (pmc_kernel_bits) { - __asm __volatile("mcr p14, 0, %0, c0, c0, 0" + __asm volatile("mcr p14, 0, %0, c0, c0, 0" : : "r" (pmc_kernel_bits | PMNC_E)); } } @@ -308,21 +308,21 @@ xscale_restore_context(struct proc *p) if (p->p_md.pmc_enabled & __PMC1) { /* restore pmc1 */ val = pmcs->pmcv[__PMC1_I] & 0xffffffffULL; - __asm __volatile("mcr p14, 0, %0, c3, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c3, c0, 0" : : "r" (val)); } if (p->p_md.pmc_enabled & __PMC0) { /* restore pmc0 */ val = pmcs->pmcv[__PMC0_I] & 0xffffffffULL; - __asm __volatile("mcr p14, 0, %0, c2, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c2, c0, 0" : : "r" (val)); } if (p->p_md.pmc_enabled & __PMC_CCNT) { /* restore ccnt */ val = pmcs->pmcv[__PMC_CCNT_I] & 0xffffffffULL; - __asm __volatile("mcr p14, 0, %0, c1, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c1, c0, 0" : : "r" (val)); } @@ -332,7 +332,7 @@ xscale_restore_context(struct proc *p) if (r | pmc_kernel_bits) { /* restore pmnc & enable counters */ - __asm __volatile("mcr p14, 0, %0, c0, c0, 0" + __asm volatile("mcr p14, 0, %0, c0, c0, 0" : : "r" (r | pmc_kernel_bits | PMNC_E)); } } @@ -512,13 +512,13 @@ xscale_get_counter_value(struct proc *p, int ctr, int flags, uint64_t *pval) switch (ctr) { case __PMC_CCNT_I: - __asm __volatile("mrc p14, 0, %0, c1, c0, 0" : "=r" (val)); + __asm volatile("mrc p14, 0, %0, c1, c0, 0" : "=r" (val)); break; case __PMC0_I: - __asm __volatile("mrc p14, 0, %0, c2, c0, 0" : "=r" (val)); + __asm volatile("mrc p14, 0, %0, c2, c0, 0" : "=r" (val)); break; case __PMC1_I: - __asm __volatile("mrc p14, 0, %0, c3, c0, 0" : "=r" (val)); + __asm volatile("mrc p14, 0, %0, c3, c0, 0" : "=r" (val)); break; default: val = 0; @@ -567,27 +567,27 @@ xscale_start_profiling(int ctr, struct pmc_counter_cfg *cfg) pmc_kernel_bits |= PMNC_CC_IE; if (cfg->event_id) pmc_kernel_bits |= PMNC_D; - __asm __volatile("mcr p14, 0, %0, c1, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c1, c0, 0" : : "r" (pmc_reset_vals[__PMC_CCNT_I])); - __asm __volatile("mcr p14, 0, %0, c0, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c0, c0, 0" : : "r" (PMNC_CC_IF)); break; case __PMC0_I: pmc_kernel_bits &= ~PMNC_EVCNT0_MASK; pmc_kernel_bits |= (cfg->event_id << PMNC_EVCNT0_SHIFT) | PMNC_PMN0_IE; - __asm __volatile("mcr p14, 0, %0, c2, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c2, c0, 0" : : "r" (pmc_reset_vals[__PMC0_I])); - __asm __volatile("mcr p14, 0, %0, c0, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c0, c0, 0" : : "r" (PMNC_PMN0_IF)); break; case __PMC1_I: pmc_kernel_bits &= ~PMNC_EVCNT1_MASK; pmc_kernel_bits |= (cfg->event_id << PMNC_EVCNT1_SHIFT) | PMNC_PMN1_IE; - __asm __volatile("mcr p14, 0, %0, c3, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c3, c0, 0" : : "r" (pmc_reset_vals[__PMC1_I])); - __asm __volatile("mcr p14, 0, %0, c0, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c0, c0, 0" : : "r" (PMNC_PMN1_IF)); break; } @@ -672,19 +672,19 @@ xscale_alloc_kernel_counter(int ctr, struct pmc_counter_cfg *cfg) pmc_kernel_bits &= PMNC_D; if (cfg->event_id) pmc_kernel_bits |= PMNC_D; - __asm __volatile("mcr p14, 0, %0, c1, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c1, c0, 0" : : "r" (pmc_reset_vals[__PMC_CCNT_I])); break; case __PMC0_I: pmc_kernel_bits &= ~PMNC_EVCNT0_MASK; pmc_kernel_bits |= (cfg->event_id << PMNC_EVCNT0_SHIFT); - __asm __volatile("mcr p14, 0, %0, c2, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c2, c0, 0" : : "r" (pmc_reset_vals[__PMC0_I])); break; case __PMC1_I: pmc_kernel_bits &= ~PMNC_EVCNT1_MASK; pmc_kernel_bits |= (cfg->event_id << PMNC_EVCNT1_SHIFT); - __asm __volatile("mcr p14, 0, %0, c3, c0, 0" : : + __asm volatile("mcr p14, 0, %0, c3, c0, 0" : : "r" (pmc_reset_vals[__PMC1_I])); break; } diff --git a/sys/arch/atari/dev/atari5380.c b/sys/arch/atari/dev/atari5380.c index 7db50a590eb..bea67a19136 100644 --- a/sys/arch/atari/dev/atari5380.c +++ b/sys/arch/atari/dev/atari5380.c @@ -1,4 +1,4 @@ -/* $NetBSD: atari5380.c,v 1.38 2005/12/11 12:16:54 christos Exp $ */ +/* $NetBSD: atari5380.c,v 1.39 2005/12/24 20:06:58 perry Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.38 2005/12/11 12:16:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.39 2005/12/24 20:06:58 perry Exp $"); #include "opt_atariscsi.h" @@ -558,7 +558,7 @@ extern int *nofault; */ SCSI_DMA->s_hdma_ctrl |= SDH_BUSERR; } - __asm __volatile ("tstb %0@(0)": : "a" (dma_ptr)); + __asm volatile ("tstb %0@(0)": : "a" (dma_ptr)); nofault = (int *)0; } diff --git a/sys/arch/atari/dev/clock.c b/sys/arch/atari/dev/clock.c index 2ab062498bf..fd54d89dbf4 100644 --- a/sys/arch/atari/dev/clock.c +++ b/sys/arch/atari/dev/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.36 2005/12/11 12:16:54 christos Exp $ */ +/* $NetBSD: clock.c,v 1.37 2005/12/24 20:06:58 perry Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.36 2005/12/11 12:16:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.37 2005/12/24 20:06:58 perry Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -355,9 +355,9 @@ int n; { u_int temp; - __asm __volatile ("mulul %2,%1:%0" : "=d" (n), "=d" (temp) + __asm volatile ("mulul %2,%1:%0" : "=d" (n), "=d" (temp) : "d" (TIMB_FREQ), "d" (n)); - __asm __volatile ("divul %1,%2:%0" : "=d" (n) + __asm volatile ("divul %1,%2:%0" : "=d" (n) : "d"(1000000),"d"(temp),"0"(n)); } diff --git a/sys/arch/atari/dev/hdfd.c b/sys/arch/atari/dev/hdfd.c index ae7f617ae7a..3bd84f90c4e 100644 --- a/sys/arch/atari/dev/hdfd.c +++ b/sys/arch/atari/dev/hdfd.c @@ -1,4 +1,4 @@ -/* $NetBSD: hdfd.c,v 1.47 2005/12/11 12:16:54 christos Exp $ */ +/* $NetBSD: hdfd.c,v 1.48 2005/12/24 20:06:58 perry Exp $ */ /*- * Copyright (c) 1996 Leo Weppelman @@ -91,7 +91,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.47 2005/12/11 12:16:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.48 2005/12/24 20:06:58 perry Exp $"); #include "opt_ddb.h" @@ -319,7 +319,7 @@ static void fdgetdisklabel __P((struct fd_softc *, dev_t)); static void fdgetdefaultlabel __P((struct fd_softc *, struct disklabel *, int)); -__inline struct fd_type *fd_dev_to_type __P((struct fd_softc *, dev_t)); +inline struct fd_type *fd_dev_to_type __P((struct fd_softc *, dev_t)); int fdcprobe(parent, cfp, aux) @@ -590,7 +590,7 @@ fdc_ctrl_intr(frame) } } -__inline struct fd_type * +inline struct fd_type * fd_dev_to_type(fd, dev) struct fd_softc *fd; dev_t dev; diff --git a/sys/arch/atari/include/pmap.h b/sys/arch/atari/include/pmap.h index e1151a210b2..03c15bc7d94 100644 --- a/sys/arch/atari/include/pmap.h +++ b/sys/arch/atari/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.32 2005/12/11 12:16:59 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.33 2005/12/24 20:06:58 perry Exp $ */ /* * Copyright (c) 1991 Regents of the University of California. @@ -188,7 +188,7 @@ struct pmap kernel_pmap_store; #define pmap_update(pmap) /* nothing (yet) */ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/atari/vme/if_le_vme.c b/sys/arch/atari/vme/if_le_vme.c index 949e4aaf086..c89b360f415 100644 --- a/sys/arch/atari/vme/if_le_vme.c +++ b/sys/arch/atari/vme/if_le_vme.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_vme.c,v 1.21 2005/12/11 12:17:02 christos Exp $ */ +/* $NetBSD: if_le_vme.c,v 1.22 2005/12/24 20:06:58 perry Exp $ */ /*- * Copyright (c) 1998 maximum entropy. All rights reserved. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.21 2005/12/11 12:17:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.22 2005/12/24 20:06:58 perry Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -167,7 +167,7 @@ CFATTACH_DECL(le_vme, sizeof(struct le_softc), #define integrate #define hide #else -#define integrate static __inline +#define integrate static inline #define hide static #endif diff --git a/sys/arch/bebox/bebox/machdep.c b/sys/arch/bebox/bebox/machdep.c index bec67a032e3..bc6fee701d2 100644 --- a/sys/arch/bebox/bebox/machdep.c +++ b/sys/arch/bebox/bebox/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.87 2005/12/11 12:17:02 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.88 2005/12/24 20:06:58 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.87 2005/12/11 12:17:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.88 2005/12/24 20:06:58 perry Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -272,7 +272,7 @@ cpu_startup() int msr; splhigh(); - __asm __volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" + __asm volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" : "=r"(msr) : "K"(PSL_EE)); } } diff --git a/sys/arch/bebox/include/intr.h b/sys/arch/bebox/include/intr.h index 76403e9ae02..672591e2de6 100644 --- a/sys/arch/bebox/include/intr.h +++ b/sys/arch/bebox/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.20 2005/12/11 12:17:03 christos Exp $ */ +/* $NetBSD: intr.h,v 1.21 2005/12/24 20:06:58 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -89,10 +89,10 @@ void isa_intr_clr __P((int)); void enable_intr __P((void)); void disable_intr __P((void)); -static __inline int splraise __P((int)); -static __inline int spllower __P((int)); -static __inline void splx __P((int)); -static __inline void set_sint __P((int)); +static inline int splraise __P((int)); +static inline int spllower __P((int)); +static inline void splx __P((int)); +static inline void set_sint __P((int)); extern volatile int cpl, ipending, astpending, tickspending; extern int imask[]; @@ -103,7 +103,7 @@ extern long intrcnt[]; * achieved with the "eieio" instruction which the assembler * seems to detect and then doesn't move instructions past.... */ -static __inline int +static inline int splraise(newcpl) int newcpl; { @@ -116,7 +116,7 @@ splraise(newcpl) return(oldcpl); } -static __inline void +static inline void splx(newcpl) int newcpl; { @@ -127,7 +127,7 @@ splx(newcpl) __asm__ volatile("sync; eieio\n"); /* reorder protect */ } -static __inline int +static inline int spllower(newcpl) int newcpl; { @@ -144,7 +144,7 @@ spllower(newcpl) /* Following code should be implemented with lwarx/stwcx to avoid * the disable/enable. i need to read the manual once more.... */ -static __inline void +static inline void set_sint(pending) int pending; { diff --git a/sys/arch/bebox/include/kgdb.h b/sys/arch/bebox/include/kgdb.h index 9c0735c7b5f..ac078eba999 100644 --- a/sys/arch/bebox/include/kgdb.h +++ b/sys/arch/bebox/include/kgdb.h @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb.h,v 1.2 1998/01/05 07:02:54 perry Exp $ */ +/* $NetBSD: kgdb.h,v 1.3 2005/12/24 20:06:58 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -45,7 +45,7 @@ extern int kgdbregs[NREG]; extern char kgdbstep; /* Doesn't handle overlapping regions */ -__inline extern void +inline extern void kgdbcopy(s,d,n) void *s, *d; int n; @@ -56,7 +56,7 @@ kgdbcopy(s,d,n) *dp++ = *sp++; } -__inline extern void +inline extern void kgdbzero(d,n) void *d; int n; @@ -67,7 +67,7 @@ kgdbzero(d,n) *dp++ = 0; } -__inline extern int +inline extern int kgdbcmp(s,d,n) void *s, *d; { diff --git a/sys/arch/bebox/isa/isaclock.c b/sys/arch/bebox/isa/isaclock.c index eb503daafbb..f4ea5a95e43 100644 --- a/sys/arch/bebox/isa/isaclock.c +++ b/sys/arch/bebox/isa/isaclock.c @@ -1,4 +1,4 @@ -/* $NetBSD: isaclock.c,v 1.12 2005/12/11 12:17:03 christos Exp $ */ +/* $NetBSD: isaclock.c,v 1.13 2005/12/24 20:06:58 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -121,7 +121,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.12 2005/12/11 12:17:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.13 2005/12/24 20:06:58 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -150,15 +150,15 @@ static int yeartoday __P((int)); int hexdectodec __P((int)); int dectohexdec __P((int)); -__inline u_int mc146818_read __P((void *, u_int)); -__inline void mc146818_write __P((void *, u_int, u_int)); +inline u_int mc146818_read __P((void *, u_int)); +inline void mc146818_write __P((void *, u_int, u_int)); #define SECMIN ((unsigned)60) /* seconds per minute */ #define SECHOUR ((unsigned)(60*SECMIN)) /* seconds per hour */ #define SECDAY ((unsigned)(24*SECHOUR)) /* seconds per day */ #define SECYR ((unsigned)(365*SECDAY)) /* seconds per common year */ -__inline u_int +inline u_int mc146818_read(sc, reg) void *sc; /* XXX use it? */ u_int reg; @@ -168,7 +168,7 @@ mc146818_read(sc, reg) return (isa_inb(IO_RTC+1)); } -__inline void +inline void mc146818_write(sc, reg, datum) void *sc; /* XXX use it? */ u_int reg, datum; diff --git a/sys/arch/bebox/isa/pccons.c b/sys/arch/bebox/isa/pccons.c index 7afafcc6fe8..05d29346a33 100644 --- a/sys/arch/bebox/isa/pccons.c +++ b/sys/arch/bebox/isa/pccons.c @@ -1,4 +1,4 @@ -/* $NetBSD: pccons.c,v 1.36 2005/12/11 12:17:04 christos Exp $ */ +/* $NetBSD: pccons.c,v 1.37 2005/12/24 20:06:58 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.36 2005/12/11 12:17:04 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.37 2005/12/24 20:06:58 perry Exp $"); #include "opt_ddb.h" #include "opt_xserver.h" @@ -301,9 +301,9 @@ void update_leds __P((void)); #endif #if (NPCCONSKBD == 0) -static __inline int kbd_wait_output __P((void)); -static __inline int kbd_wait_input __P((void)); -static __inline void kbd_flush_input __P((void)); +static inline int kbd_wait_output __P((void)); +static inline int kbd_wait_input __P((void)); +static inline void kbd_flush_input __P((void)); static u_char kbc_get8042cmd __P((void)); static int kbc_put8042cmd __P((u_char)); #endif @@ -324,7 +324,7 @@ void pccnpollc __P((dev_t, int)); { u_char x = isa_inb(0x84); (void) x; } \ { u_char x = isa_inb(0x84); (void) x; } -static __inline int +static inline int kbd_wait_output() { u_int i; @@ -337,7 +337,7 @@ kbd_wait_output() return (0); } -static __inline int +static inline int kbd_wait_input() { u_int i; @@ -350,7 +350,7 @@ kbd_wait_input() return (0); } -static __inline void +static inline void kbd_flush_input() { u_int i; diff --git a/sys/arch/cobalt/cobalt/machdep.c b/sys/arch/cobalt/cobalt/machdep.c index c77b0676d50..a529072dd35 100644 --- a/sys/arch/cobalt/cobalt/machdep.c +++ b/sys/arch/cobalt/cobalt/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.55 2005/12/11 12:17:05 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.56 2005/12/24 20:06:58 perry Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.55 2005/12/11 12:17:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.56 2005/12/24 20:06:58 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -356,7 +356,7 @@ haltsys: unsigned long cpuspeed; -__inline void +inline void delay(n) unsigned long n; { diff --git a/sys/arch/cobalt/include/bus.h b/sys/arch/cobalt/include/bus.h index a81cdef89fa..6f225c820f2 100644 --- a/sys/arch/cobalt/include/bus.h +++ b/sys/arch/cobalt/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.12 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: bus.h,v 1.13 2005/12/24 20:06:58 perry Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -149,11 +149,11 @@ void bus_space_free(bus_space_tag_t t, bus_space_handle_t bsh, */ #define __COBALT_bus_space_read_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_read_multi_,BYTES) \ +static inline void __CONCAT(bus_space_read_multi_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_multi_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -187,11 +187,11 @@ __COBALT_bus_space_read_multi(4,32) */ #define __COBALT_bus_space_read_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_read_region_,BYTES) \ +static inline void __CONCAT(bus_space_read_region_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_region_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -257,11 +257,11 @@ do { \ */ #define __COBALT_bus_space_write_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_write_multi_,BYTES) \ +static inline void __CONCAT(bus_space_write_multi_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ const __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_multi_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -295,11 +295,11 @@ __COBALT_bus_space_write_multi(4,32) */ #define __COBALT_bus_space_write_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_write_region_,BYTES) \ +static inline void __CONCAT(bus_space_write_region_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ const __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_region_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -335,11 +335,11 @@ __COBALT_bus_space_write_region(4,32) */ #define __COBALT_bus_space_set_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_set_multi_,BYTES) \ +static inline void __CONCAT(bus_space_set_multi_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS), size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_multi_,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -373,11 +373,11 @@ __COBALT_bus_space_set_multi(4,32) */ #define __COBALT_bus_space_set_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_set_region_,BYTES) \ +static inline void __CONCAT(bus_space_set_region_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS), size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_region_,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -414,13 +414,13 @@ __COBALT_bus_space_set_region(4,32) */ #define __COBALT_copy_region(BYTES) \ -static __inline void __CONCAT(bus_space_copy_region_,BYTES) \ +static inline void __CONCAT(bus_space_copy_region_,BYTES) \ (bus_space_tag_t, \ bus_space_handle_t bsh1, bus_size_t off1, \ bus_space_handle_t bsh2, bus_size_t off2, \ bus_size_t count); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)(t, h1, o1, h2, o2, c) \ bus_space_tag_t t; \ bus_space_handle_t h1, h2; \ diff --git a/sys/arch/cobalt/include/param.h b/sys/arch/cobalt/include/param.h index 4ae5561dba6..91b23b99f7a 100644 --- a/sys/arch/cobalt/include/param.h +++ b/sys/arch/cobalt/include/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.9 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: param.h,v 1.10 2005/12/24 20:06:58 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -112,7 +112,7 @@ #ifdef _KERNEL #ifndef _LOCORE -__inline extern void delay(unsigned long); +inline extern void delay(unsigned long); #define DELAY(n) delay(n) #include <machine/intr.h> diff --git a/sys/arch/dreamcast/dev/g2/aica.c b/sys/arch/dreamcast/dev/g2/aica.c index 366cfb5f5dd..2b9fb3897e9 100644 --- a/sys/arch/dreamcast/dev/g2/aica.c +++ b/sys/arch/dreamcast/dev/g2/aica.c @@ -1,4 +1,4 @@ -/* $NetBSD: aica.c,v 1.10 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: aica.c,v 1.11 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2003 SHIMIZU Ryo <ryo@misakimix.org> @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aica.c,v 1.10 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aica.c,v 1.11 2005/12/24 20:06:59 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -125,7 +125,7 @@ const struct audio_device aica_device = { "aica" }; -__inline static void aica_g2fifo_wait(void); +inline static void aica_g2fifo_wait(void); void aica_enable(struct aica_softc *); void aica_disable(struct aica_softc *); void aica_memwrite(struct aica_softc *, bus_size_t, uint32_t *, int); diff --git a/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c b/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c index e3566aa6797..eb64eabc070 100644 --- a/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c +++ b/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: g2bus_bus_mem.c,v 1.11 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: g2bus_bus_mem.c,v 1.12 2005/12/24 20:06:59 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: g2bus_bus_mem.c,v 1.11 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: g2bus_bus_mem.c,v 1.12 2005/12/24 20:06:59 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -172,7 +172,7 @@ g2bus_bus_mem_unmap(void *v, bus_space_handle_t sh, bus_size_t size) do { \ __s = _cpu_intr_suspend(); \ /* suspend any G2 DMA here... */ \ - while ((*(__volatile uint32_t *)0xa05f688c) & 0x20) \ + while ((*(volatile uint32_t *)0xa05f688c) & 0x20) \ ; \ } while (/*CONSTCOND*/0) @@ -190,7 +190,7 @@ g2bus_bus_mem_read_1(void *v, bus_space_handle_t sh, bus_size_t off) G2_LOCK(); - rv = *(__volatile uint8_t *)(sh + off); + rv = *(volatile uint8_t *)(sh + off); G2_UNLOCK(); @@ -205,7 +205,7 @@ g2bus_bus_mem_read_2(void *v, bus_space_handle_t sh, bus_size_t off) G2_LOCK(); - rv = *(__volatile uint16_t *)(sh + off); + rv = *(volatile uint16_t *)(sh + off); G2_UNLOCK(); @@ -220,7 +220,7 @@ g2bus_bus_mem_read_4(void *v, bus_space_handle_t sh, bus_size_t off) G2_LOCK(); - rv = *(__volatile uint32_t *)(sh + off); + rv = *(volatile uint32_t *)(sh + off); G2_UNLOCK(); @@ -235,7 +235,7 @@ g2bus_bus_mem_write_1(void *v, bus_space_handle_t sh, bus_size_t off, G2_LOCK(); - *(__volatile uint8_t *)(sh + off) = val; + *(volatile uint8_t *)(sh + off) = val; G2_UNLOCK(); } @@ -248,7 +248,7 @@ g2bus_bus_mem_write_2(void *v, bus_space_handle_t sh, bus_size_t off, G2_LOCK(); - *(__volatile uint16_t *)(sh + off) = val; + *(volatile uint16_t *)(sh + off) = val; G2_UNLOCK(); } @@ -261,7 +261,7 @@ g2bus_bus_mem_write_4(void *v, bus_space_handle_t sh, bus_size_t off, G2_LOCK(); - *(__volatile uint32_t *)(sh + off) = val; + *(volatile uint32_t *)(sh + off) = val; G2_UNLOCK(); } @@ -271,7 +271,7 @@ g2bus_bus_mem_read_region_1(void *v, bus_space_handle_t sh, bus_size_t off, uint8_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile const uint8_t *baddr = (uint8_t *)(sh + off); + volatile const uint8_t *baddr = (uint8_t *)(sh + off); G2_LOCK(); @@ -286,7 +286,7 @@ g2bus_bus_mem_read_region_2(void *v, bus_space_handle_t sh, bus_size_t off, uint16_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile const uint16_t *baddr = (uint16_t *)(sh + off); + volatile const uint16_t *baddr = (uint16_t *)(sh + off); G2_LOCK(); @@ -301,7 +301,7 @@ g2bus_bus_mem_read_region_4(void *v, bus_space_handle_t sh, bus_size_t off, uint32_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile const uint32_t *baddr = (uint32_t *)(sh + off); + volatile const uint32_t *baddr = (uint32_t *)(sh + off); G2_LOCK(); @@ -316,7 +316,7 @@ g2bus_bus_mem_write_region_1(void *v, bus_space_handle_t sh, bus_size_t off, const uint8_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile uint8_t *baddr = (uint8_t *)(sh + off); + volatile uint8_t *baddr = (uint8_t *)(sh + off); G2_LOCK(); @@ -331,7 +331,7 @@ g2bus_bus_mem_write_region_2(void *v, bus_space_handle_t sh, bus_size_t off, const uint16_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile uint16_t *baddr = (uint16_t *)(sh + off); + volatile uint16_t *baddr = (uint16_t *)(sh + off); G2_LOCK(); @@ -346,7 +346,7 @@ g2bus_bus_mem_write_region_4(void *v, bus_space_handle_t sh, bus_size_t off, const uint32_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile uint32_t *baddr = (uint32_t *)(sh + off); + volatile uint32_t *baddr = (uint32_t *)(sh + off); G2_LOCK(); @@ -361,7 +361,7 @@ g2bus_bus_mem_set_region_4(void *v, bus_space_handle_t sh, bus_size_t off, uint32_t val, bus_size_t len) { G2LOCK_DECL; - __volatile uint32_t *baddr = (uint32_t *)(sh + off); + volatile uint32_t *baddr = (uint32_t *)(sh + off); G2_LOCK(); @@ -400,7 +400,7 @@ g2bus_sparse_bus_mem_read_1(void *v, bus_space_handle_t sh, bus_size_t off) G2_LOCK(); - rv = *(__volatile uint8_t *)(sh + (off * 4)); + rv = *(volatile uint8_t *)(sh + (off * 4)); G2_UNLOCK(); @@ -415,7 +415,7 @@ g2bus_sparse_bus_mem_read_2(void *v, bus_space_handle_t sh, bus_size_t off) G2_LOCK(); - rv = *(__volatile uint16_t *)(sh + (off * 4)); + rv = *(volatile uint16_t *)(sh + (off * 4)); G2_UNLOCK(); @@ -430,7 +430,7 @@ g2bus_sparse_bus_mem_read_4(void *v, bus_space_handle_t sh, bus_size_t off) G2_LOCK(); - rv = *(__volatile uint32_t *)(sh + (off * 4)); + rv = *(volatile uint32_t *)(sh + (off * 4)); G2_UNLOCK(); @@ -445,7 +445,7 @@ g2bus_sparse_bus_mem_write_1(void *v, bus_space_handle_t sh, bus_size_t off, G2_LOCK(); - *(__volatile uint8_t *)(sh + (off * 4)) = val; + *(volatile uint8_t *)(sh + (off * 4)) = val; G2_UNLOCK(); } @@ -458,7 +458,7 @@ g2bus_sparse_bus_mem_write_2(void *v, bus_space_handle_t sh, bus_size_t off, G2_LOCK(); - *(__volatile uint16_t *)(sh + (off * 4)) = val; + *(volatile uint16_t *)(sh + (off * 4)) = val; G2_UNLOCK(); } @@ -471,7 +471,7 @@ g2bus_sparse_bus_mem_write_4(void *v, bus_space_handle_t sh, bus_size_t off, G2_LOCK(); - *(__volatile uint32_t *)(sh + (off * 4)) = val; + *(volatile uint32_t *)(sh + (off * 4)) = val; G2_UNLOCK(); } @@ -481,7 +481,7 @@ g2bus_sparse_bus_mem_read_region_1(void *v, bus_space_handle_t sh, bus_size_t off, uint8_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile const uint8_t *baddr = (uint8_t *)(sh + (off * 4)); + volatile const uint8_t *baddr = (uint8_t *)(sh + (off * 4)); G2_LOCK(); @@ -498,7 +498,7 @@ g2bus_sparse_bus_mem_write_region_1(void *v, bus_space_handle_t sh, bus_size_t off, const uint8_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile uint8_t *baddr = (uint8_t *)(sh + (off * 4)); + volatile uint8_t *baddr = (uint8_t *)(sh + (off * 4)); G2_LOCK(); @@ -515,7 +515,7 @@ g2bus_sparse_bus_mem_read_multi_1(void *v, bus_space_handle_t sh, bus_size_t off, uint8_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile const uint8_t *baddr = (uint8_t *)(sh + (off * 4)); + volatile const uint8_t *baddr = (uint8_t *)(sh + (off * 4)); G2_LOCK(); @@ -530,7 +530,7 @@ g2bus_sparse_bus_mem_write_multi_1(void *v, bus_space_handle_t sh, bus_size_t off, const uint8_t *addr, bus_size_t len) { G2LOCK_DECL; - __volatile uint8_t *baddr = (uint8_t *)(sh + (off * 4)); + volatile uint8_t *baddr = (uint8_t *)(sh + (off * 4)); G2_LOCK(); diff --git a/sys/arch/dreamcast/dev/gdrom.c b/sys/arch/dreamcast/dev/gdrom.c index 6367fcb0295..f8b6f05e7d7 100644 --- a/sys/arch/dreamcast/dev/gdrom.c +++ b/sys/arch/dreamcast/dev/gdrom.c @@ -1,4 +1,4 @@ -/* $NetBSD: gdrom.c,v 1.18 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: gdrom.c,v 1.19 2005/12/24 20:06:58 perry Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: gdrom.c,v 1.18 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gdrom.c,v 1.19 2005/12/24 20:06:58 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -183,7 +183,7 @@ gdrom_intr(void *arg) } } while (cnt > 0) { - __volatile int16_t tmp; + volatile int16_t tmp; tmp = GDROM_DATA; cnt -= 2; } @@ -392,9 +392,9 @@ gdromattach(struct device *parent, struct device *self, void *aux) /* * reenable disabled drive */ - *((__volatile uint32_t *)0xa05f74e4) = 0x1fffff; + *((volatile uint32_t *)0xa05f74e4) = 0x1fffff; for (p = 0; p < 0x200000 / 4; p++) - x = ((__volatile uint32_t *)0xa0000000)[p]; + x = ((volatile uint32_t *)0xa0000000)[p]; printf(": %s\n", sysasic_intr_string(IPL_BIO)); sysasic_intr_establish(SYSASIC_EVENT_GDROM, IPL_BIO, gdrom_intr, sc); diff --git a/sys/arch/dreamcast/dev/maple/mlcd.c b/sys/arch/dreamcast/dev/maple/mlcd.c index 0f6a297bc5d..4e1e4b53a4a 100644 --- a/sys/arch/dreamcast/dev/maple/mlcd.c +++ b/sys/arch/dreamcast/dev/maple/mlcd.c @@ -1,4 +1,4 @@ -/* $NetBSD: mlcd.c,v 1.5 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: mlcd.c,v 1.6 2005/12/24 20:06:59 perry Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mlcd.c,v 1.5 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlcd.c,v 1.6 2005/12/24 20:06:59 perry Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -162,7 +162,7 @@ static void mlcd_intr(void *, struct maple_response *, int, int); static void mlcd_printerror(const char *, uint32_t); static struct mlcd_buf *mlcd_buf_alloc(int /*dev*/, int /*flags*/); static void mlcd_buf_free(struct mlcd_buf *); -static __inline uint32_t reverse_32(uint32_t); +static inline uint32_t reverse_32(uint32_t); static void mlcd_rotate_bitmap(void *, size_t); static void mlcdstart(struct mlcd_softc *); static void mlcdstart_bp(struct mlcd_softc *); @@ -633,7 +633,7 @@ mlcd_buf_free(struct mlcd_buf *bp) } /* invert order of bits */ -static __inline uint32_t +static inline uint32_t reverse_32(uint32_t b) { uint32_t b1; diff --git a/sys/arch/dreamcast/dev/microcode/aica_arm.c b/sys/arch/dreamcast/dev/microcode/aica_arm.c index 2da22371d2a..5c354cff50e 100644 --- a/sys/arch/dreamcast/dev/microcode/aica_arm.c +++ b/sys/arch/dreamcast/dev/microcode/aica_arm.c @@ -1,4 +1,4 @@ -/* $NetBSD: aica_arm.c,v 1.3 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: aica_arm.c,v 1.4 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2003 SHIMIZU Ryo <ryo@misakimix.org> @@ -57,8 +57,8 @@ typedef unsigned long uint32_t; #define CH_WRITE_4(ch,off,val) REG_WRITE_4(((ch) << 7) + (off), val) void aica_init(void); -__inline int in_first_half(unsigned int); -__inline int in_second_half(unsigned int); +inline int in_first_half(unsigned int); +inline int in_second_half(unsigned int); void bzero_4(void *, unsigned int); void bzero(void *, unsigned int); uint32_t rate2reg(unsigned int); @@ -104,7 +104,7 @@ aica_init() } -__inline int +inline int in_first_half(unsigned int loophalf) { @@ -112,7 +112,7 @@ in_first_half(unsigned int loophalf) return REG_READ_4(0x2814) < loophalf; } -__inline int +inline int in_second_half(unsigned int loophalf) { diff --git a/sys/arch/dreamcast/dev/pvr.c b/sys/arch/dreamcast/dev/pvr.c index 4b92700916e..d4305eac1cb 100644 --- a/sys/arch/dreamcast/dev/pvr.c +++ b/sys/arch/dreamcast/dev/pvr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pvr.c,v 1.20 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: pvr.c,v 1.21 2005/12/24 20:06:58 perry Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt. @@ -65,7 +65,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.20 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.21 2005/12/24 20:06:58 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -155,9 +155,9 @@ __KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.20 2005/12/11 12:17:06 christos Exp $"); #define DIWVSTRT_V2(x) ((x) << 16) #define PVR_REG_READ(dc, reg) \ - ((__volatile uint32_t *)(dc)->dc_regvaddr)[(reg) >> 2] + ((volatile uint32_t *)(dc)->dc_regvaddr)[(reg) >> 2] #define PVR_REG_WRITE(dc, reg, val) \ - ((__volatile uint32_t *)(dc)->dc_regvaddr)[(reg) >> 2] = (val) + ((volatile uint32_t *)(dc)->dc_regvaddr)[(reg) >> 2] = (val) struct fb_devconfig { vaddr_t dc_vaddr; /* framebuffer virtual address */ @@ -466,15 +466,15 @@ pvr_show_screen(void *v, void *cookie, int waitok, static void pvr_check_cable(struct fb_devconfig *dc) { - __volatile uint32_t *porta = - (__volatile uint32_t *)0xff80002c; + volatile uint32_t *porta = + (volatile uint32_t *)0xff80002c; uint16_t v; /* PORT8 and PORT9 is input */ *porta = (*porta & ~0xf0000) | 0xa0000; /* Read PORT8 and PORT9 */ - v = ((*(__volatile uint16_t *)(porta + 1)) >> 8) & 3; + v = ((*(volatile uint16_t *)(porta + 1)) >> 8) & 3; if ((v & 2) == 0) dc->dc_dispflags |= PVR_VGAMODE|PVR_RGBMODE; @@ -487,7 +487,7 @@ pvr_check_tvsys(struct fb_devconfig *dc) { /* XXX should use flashmem device when one exists */ - dc->dc_tvsystem = (*(__volatile uint8_t *)0xa021a004) & 3; + dc->dc_tvsystem = (*(volatile uint8_t *)0xa021a004) & 3; } void @@ -591,7 +591,7 @@ pvrinit(struct fb_devconfig *dc) PVR_REG_WRITE(dc, PVRREG_DIWCONF, DIWCONF_MAGIC); /* RGB / composite */ - *(__volatile uint32_t *) + *(volatile uint32_t *) SH3_PHYS_TO_P2SEG(0x00702c00) = ((dc->dc_dispflags & PVR_RGBMODE) ? 0 : 3) << 8; diff --git a/sys/arch/dreamcast/dreamcast/sysasic.c b/sys/arch/dreamcast/dreamcast/sysasic.c index 18544b57653..ef9e6b86c28 100644 --- a/sys/arch/dreamcast/dreamcast/sysasic.c +++ b/sys/arch/dreamcast/dreamcast/sysasic.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysasic.c,v 1.10 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: sysasic.c,v 1.11 2005/12/24 20:06:59 perry Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysasic.c,v 1.10 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysasic.c,v 1.11 2005/12/24 20:06:59 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -216,7 +216,7 @@ sysasic_intr_enable(void *arg, int on) struct syh_eventhand *hnd = arg; struct sysasic_intrhand *syh; int event; - __volatile uint32_t *masks, *stats; + volatile uint32_t *masks, *stats; int evmap; unsigned evbit; @@ -231,8 +231,8 @@ sysasic_intr_enable(void *arg, int on) event, SYSASIC_IRQ_INDEX_TO_IRQ(syh->syh_idx)); #endif - masks = (__volatile uint32_t *) SYSASIC_INTR_EN(syh->syh_idx); - stats = (__volatile uint32_t *) SYSASIC_INTR_ST; + masks = (volatile uint32_t *) SYSASIC_INTR_EN(syh->syh_idx); + stats = (volatile uint32_t *) SYSASIC_INTR_ST; evmap = SYSASIC_EVENT_INTR_MAP(event); evbit = SYSASIC_EVENT_INTR_BIT(event); @@ -264,7 +264,7 @@ sysasic_intr(void *arg) unsigned ev; int n, pos; uint32_t *evwatched; - __volatile uint32_t *evmap; + volatile uint32_t *evmap; struct syh_eventhand *evh; #ifdef DEBUG int handled = 0; @@ -275,7 +275,7 @@ sysasic_intr(void *arg) evwatched = syh->syh_events; /* status / clear */ - evmap = (__volatile uint32_t *) SYSASIC_INTR_ST; + evmap = (volatile uint32_t *) SYSASIC_INTR_ST; for (n = 0; n < (SYSASIC_EVENT_NMAP << 5); n |= 31, n++, evmap++) { if ((ev = *evwatched++) && (ev &= *evmap)) { diff --git a/sys/arch/evbarm/adi_brh/brh_7seg.c b/sys/arch/evbarm/adi_brh/brh_7seg.c index d2d148ccba7..4e6dae5c312 100644 --- a/sys/arch/evbarm/adi_brh/brh_7seg.c +++ b/sys/arch/evbarm/adi_brh/brh_7seg.c @@ -1,4 +1,4 @@ -/* $NetBSD: brh_7seg.c,v 1.3 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: brh_7seg.c,v 1.4 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: brh_7seg.c,v 1.3 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: brh_7seg.c,v 1.4 2005/12/24 20:06:59 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: brh_7seg.c,v 1.3 2005/12/11 12:17:06 christos Exp $" #include <evbarm/adi_brh/brhreg.h> #include <evbarm/adi_brh/brhvar.h> -#define WRITE(x, v) *((__volatile uint8_t *) (x)) = (v) +#define WRITE(x, v) *((volatile uint8_t *) (x)) = (v) static int snakestate; diff --git a/sys/arch/evbarm/adi_brh/brh_machdep.c b/sys/arch/evbarm/adi_brh/brh_machdep.c index db00847da40..68ae96df482 100644 --- a/sys/arch/evbarm/adi_brh/brh_machdep.c +++ b/sys/arch/evbarm/adi_brh/brh_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: brh_machdep.c,v 1.22 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: brh_machdep.c,v 1.23 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: brh_machdep.c,v 1.22 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: brh_machdep.c,v 1.23 2005/12/24 20:06:59 perry Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -708,7 +708,7 @@ initarm(void *arg) PCI_CLASS_REG; uint32_t reg; - reg = *(__volatile uint32_t *) va; + reg = *(volatile uint32_t *) va; becc_rev = PCI_REVISION(reg); if (becc_rev <= BECC_REV_V7 && memsize > (64UL * 1024 * 1024)) { diff --git a/sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c b/sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c index c29cb242661..56c1f239043 100644 --- a/sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c +++ b/sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: g42xxeb_machdep.c,v 1.5 2005/12/11 12:17:08 christos Exp $ */ +/* $NetBSD: g42xxeb_machdep.c,v 1.6 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2002, 2003, 2004, 2005 Genetec Corporation. @@ -329,13 +329,13 @@ cpu_reboot(int howto, char *bootstr) /*NOTREACHED*/ } -static __inline +static inline pd_entry_t * read_ttb(void) { long ttb; - __asm __volatile("mrc p15, 0, %0, c2, c0, 0" : "=r" (ttb)); + __asm volatile("mrc p15, 0, %0, c2, c0, 0" : "=r" (ttb)); return (pd_entry_t *)(ttb & ~((1<<14)-1)); diff --git a/sys/arch/evbarm/g42xxeb/gb225_pcic.c b/sys/arch/evbarm/g42xxeb/gb225_pcic.c index 377ec8b273b..183a1129b64 100644 --- a/sys/arch/evbarm/g42xxeb/gb225_pcic.c +++ b/sys/arch/evbarm/g42xxeb/gb225_pcic.c @@ -115,7 +115,7 @@ static struct sapcic_tag opcic_tag = { #define HAVE_CARD(r) (((r)&CARDDET_DET)==0) -static __inline uint8_t +static inline uint8_t opcic_read_card_status(struct opcic_socket *so) { struct opcic_softc *sc = (struct opcic_softc *)(so->ss.sc); diff --git a/sys/arch/evbarm/ifpga/ifpga_clock.c b/sys/arch/evbarm/ifpga/ifpga_clock.c index d70df30136e..f6f1f292205 100644 --- a/sys/arch/evbarm/ifpga/ifpga_clock.c +++ b/sys/arch/evbarm/ifpga/ifpga_clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: ifpga_clock.c,v 1.9 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: ifpga_clock.c,v 1.10 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001 ARM Ltd @@ -39,7 +39,7 @@ /* Include header files */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ifpga_clock.c,v 1.9 2005/12/11 12:17:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ifpga_clock.c,v 1.10 2005/12/24 20:06:59 perry Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -87,14 +87,14 @@ static int clock_started = 0; static int load_timer(int, int); -static __inline u_int +static inline u_int getclock(void) { return bus_space_read_4(ifpga_sc->sc_iot, ifpga_sc->sc_tmr_ioh, TIMER_1_VALUE); } -static __inline u_int +static inline u_int getstatclock(void) { return bus_space_read_4(ifpga_sc->sc_iot, ifpga_sc->sc_tmr_ioh, diff --git a/sys/arch/evbarm/ifpga/ifpga_intr.c b/sys/arch/evbarm/ifpga/ifpga_intr.c index f62d453394f..b1a714e6fdf 100644 --- a/sys/arch/evbarm/ifpga/ifpga_intr.c +++ b/sys/arch/evbarm/ifpga/ifpga_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ifpga_intr.c,v 1.2 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: ifpga_intr.c,v 1.3 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -64,13 +64,13 @@ struct intrq intrq[NIRQ]; int ifpga_imask[NIPL]; /* Current interrupt priority level. */ -__volatile int current_spl_level; +volatile int current_spl_level; /* Interrupts pending. */ -__volatile int ifpga_ipending; +volatile int ifpga_ipending; /* Software copy of the IRQs we have enabled. */ -__volatile uint32_t intr_enabled; +volatile uint32_t intr_enabled; /* Mask if interrupts steered to FIQs. */ uint32_t intr_steer; @@ -141,14 +141,14 @@ void ifpga_intr_dispatch(struct clockframe *frame); extern struct ifpga_softc *ifpga_sc; -static __inline uint32_t +static inline uint32_t ifpga_iintsrc_read(void) { return bus_space_read_4(ifpga_sc->sc_iot, ifpga_sc->sc_irq_ioh, IFPGA_INTR_STATUS); } -static __inline void +static inline void ifpga_enable_irq(int irq) { @@ -156,7 +156,7 @@ ifpga_enable_irq(int irq) ifpga_set_intrmask(); } -static __inline void +static inline void ifpga_disable_irq(int irq) { @@ -279,7 +279,7 @@ ifpga_intr_calculate_masks(void) } } -__inline void +inline void ifpga_do_pending(void) { static __cpu_simple_lock_t processing = __SIMPLELOCK_UNLOCKED; diff --git a/sys/arch/evbarm/ifpga/ifpga_intr.h b/sys/arch/evbarm/ifpga/ifpga_intr.h index e6153aa1511..d58ea1ac9f2 100644 --- a/sys/arch/evbarm/ifpga/ifpga_intr.h +++ b/sys/arch/evbarm/ifpga/ifpga_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: ifpga_intr.h,v 1.4 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: ifpga_intr.h,v 1.5 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -50,10 +50,10 @@ void ifpga_do_pending(void); -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ifpga_set_intrmask(void) { - extern __volatile uint32_t intr_enabled; + extern volatile uint32_t intr_enabled; extern struct ifpga_softc *ifpga_sc; uint32_t mask = intr_enabled; @@ -67,12 +67,12 @@ ifpga_set_intrmask(void) (IFPGA_INTR_bit31 | IFPGA_INTR_bit30 | \ IFPGA_INTR_bit29 | IFPGA_INTR_bit28) -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ifpga_splx(int new) { - extern __volatile uint32_t intr_enabled; - extern __volatile int current_spl_level; - extern __volatile int ifpga_ipending; + extern volatile uint32_t intr_enabled; + extern volatile int current_spl_level; + extern volatile int ifpga_ipending; extern void ifpga_do_pending(void); int oldirqstate, hwpend; @@ -93,10 +93,10 @@ ifpga_splx(int new) ifpga_do_pending(); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) ifpga_splraise(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int ifpga_imask[]; int old; @@ -108,10 +108,10 @@ ifpga_splraise(int ipl) return (old); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) ifpga_spllower(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int ifpga_imask[]; int old = current_spl_level; diff --git a/sys/arch/evbarm/include/intr.h b/sys/arch/evbarm/include/intr.h index 30491cc9e31..fabe836e0b3 100644 --- a/sys/arch/evbarm/include/intr.h +++ b/sys/arch/evbarm/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.12 2003/06/16 20:00:59 thorpej Exp $ */ +/* $NetBSD: intr.h,v 1.13 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2003 Wasabi Systems, Inc. @@ -112,14 +112,14 @@ void _setsoftintr(int); * void splx(int); * void _setsoftintr(int); * - * These may be defined as functions, static __inline functions, or macros, + * These may be defined as functions, static inline functions, or macros, * but there must be a _spllower() and splx() defined as functions callable * from assembly language (for cpu_switch()). However, since it's quite * useful to be able to inline splx(), you could do something like the * following: * * in <boardtype>_intr.h: - * static __inline int + * static inline int * boardtype_splx(int spl) * {...} * diff --git a/sys/arch/evbarm/iq31244/iq31244_7seg.c b/sys/arch/evbarm/iq31244/iq31244_7seg.c index 34171caf7a2..e2bca9651db 100644 --- a/sys/arch/evbarm/iq31244/iq31244_7seg.c +++ b/sys/arch/evbarm/iq31244/iq31244_7seg.c @@ -1,4 +1,4 @@ -/* $NetBSD: iq31244_7seg.c,v 1.3 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: iq31244_7seg.c,v 1.4 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iq31244_7seg.c,v 1.3 2005/12/11 12:17:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iq31244_7seg.c,v 1.4 2005/12/24 20:06:59 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: iq31244_7seg.c,v 1.3 2005/12/11 12:17:09 christos Ex #include <evbarm/iq80321/iq80321reg.h> #include <evbarm/iq80321/iq80321var.h> -#define WRITE(x, v) *((__volatile uint8_t *) (x)) = (v) +#define WRITE(x, v) *((volatile uint8_t *) (x)) = (v) static int snakestate; diff --git a/sys/arch/evbarm/iq80310/iq80310_intr.c b/sys/arch/evbarm/iq80310/iq80310_intr.c index 795b72c6c8c..ee4cf03ce13 100644 --- a/sys/arch/evbarm/iq80310/iq80310_intr.c +++ b/sys/arch/evbarm/iq80310/iq80310_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: iq80310_intr.c,v 1.22 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: iq80310_intr.c,v 1.23 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iq80310_intr.c,v 1.22 2005/12/11 12:17:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iq80310_intr.c,v 1.23 2005/12/24 20:06:59 perry Exp $"); #ifndef EVBARM_SPL_NOINLINE #define EVBARM_SPL_NOINLINE @@ -71,10 +71,10 @@ struct intrq intrq[NIRQ]; int iq80310_imask[NIPL]; /* Current interrupt priority level. */ -__volatile int current_spl_level; +volatile int current_spl_level; /* Interrupts pending. */ -__volatile int iq80310_ipending; +volatile int iq80310_ipending; /* Software copy of the IRQs we have enabled. */ uint32_t intr_enabled; @@ -97,7 +97,7 @@ static const int si_to_ipl[SI_NQUEUES] = { void iq80310_intr_dispatch(struct irqframe *frame); -static __inline uint32_t +static inline uint32_t iq80310_intstat_read(void) { uint32_t intstat; @@ -112,7 +112,7 @@ iq80310_intstat_read(void) return (intstat & intr_enabled); } -static __inline void +static inline void iq80310_set_intrmask(void) { uint32_t disabled; @@ -125,7 +125,7 @@ iq80310_set_intrmask(void) CPLD_WRITE(IQ80310_XINT_MASK, disabled & 0x1f); } -static __inline void +static inline void iq80310_enable_irq(int irq) { @@ -133,7 +133,7 @@ iq80310_enable_irq(int irq) iq80310_set_intrmask(); } -static __inline void +static inline void iq80310_disable_irq(int irq) { @@ -296,7 +296,7 @@ _splraise(int ipl) return (iq80310_splraise(ipl)); } -__inline void +inline void splx(int new) { diff --git a/sys/arch/evbarm/iq80310/iq80310_intr.h b/sys/arch/evbarm/iq80310/iq80310_intr.h index 631de70cb67..71117b4a91e 100644 --- a/sys/arch/evbarm/iq80310/iq80310_intr.h +++ b/sys/arch/evbarm/iq80310/iq80310_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: iq80310_intr.h,v 1.4 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: iq80310_intr.h,v 1.5 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -68,10 +68,10 @@ void iq80310_do_soft(void); -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) iq80310_splraise(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int iq80310_imask[]; int old; @@ -84,11 +84,11 @@ iq80310_splraise(int ipl) return (old); } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) iq80310_splx(int new) { - extern __volatile int iq80310_ipending; - extern __volatile int current_spl_level; + extern volatile int iq80310_ipending; + extern volatile int current_spl_level; int old; /* Don't let the compiler re-order this code with preceding code */ @@ -115,10 +115,10 @@ iq80310_splx(int new) i80200_intr_enable(INTCTL_IM | INTCTL_PM); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) iq80310_spllower(int ipl) { - extern __volatile int current_spl_level; + extern volatile int current_spl_level; extern int iq80310_imask[]; int old = current_spl_level; diff --git a/sys/arch/evbarm/iq80310/iq80310_timer.c b/sys/arch/evbarm/iq80310/iq80310_timer.c index 92806a9257a..dc01f7ab16d 100644 --- a/sys/arch/evbarm/iq80310/iq80310_timer.c +++ b/sys/arch/evbarm/iq80310/iq80310_timer.c @@ -1,4 +1,4 @@ -/* $NetBSD: iq80310_timer.c,v 1.18 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: iq80310_timer.c,v 1.19 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iq80310_timer.c,v 1.18 2005/12/11 12:17:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iq80310_timer.c,v 1.19 2005/12/24 20:06:59 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -82,7 +82,7 @@ static uint32_t counts_per_hz; int clockhandler(void *); -static __inline void +static inline void timer_enable(uint8_t bit) { @@ -90,7 +90,7 @@ timer_enable(uint8_t bit) CPLD_READ(IQ80310_TIMER_ENABLE) | bit); } -static __inline void +static inline void timer_disable(uint8_t bit) { @@ -98,7 +98,7 @@ timer_disable(uint8_t bit) CPLD_READ(IQ80310_TIMER_ENABLE) & ~bit); } -static __inline uint32_t +static inline uint32_t timer_read(void) { uint32_t rv; @@ -125,7 +125,7 @@ timer_read(void) return (rv); } -static __inline void +static inline void timer_write(uint32_t x) { diff --git a/sys/arch/evbarm/iq80310/iq80310reg.h b/sys/arch/evbarm/iq80310/iq80310reg.h index 5150d67edca..75f84131387 100644 --- a/sys/arch/evbarm/iq80310/iq80310reg.h +++ b/sys/arch/evbarm/iq80310/iq80310reg.h @@ -1,4 +1,4 @@ -/* $NetBSD: iq80310reg.h,v 1.5 2003/05/14 19:46:40 thorpej Exp $ */ +/* $NetBSD: iq80310reg.h,v 1.6 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -76,8 +76,8 @@ * We map the CPLD registers VA==PA, so we go ahead and cheat * with register access. */ -#define CPLD_READ(x) *((__volatile uint8_t *)(x)) -#define CPLD_WRITE(x, v) *((__volatile uint8_t *)(x)) = (v) +#define CPLD_READ(x) *((volatile uint8_t *)(x)) +#define CPLD_WRITE(x, v) *((volatile uint8_t *)(x)) = (v) /* * We allocate a page table for VA 0xfe400000 (4MB) and map the i80312 diff --git a/sys/arch/evbarm/iq80321/iq80321_7seg.c b/sys/arch/evbarm/iq80321/iq80321_7seg.c index 826f3ae79a0..7a9566db99f 100644 --- a/sys/arch/evbarm/iq80321/iq80321_7seg.c +++ b/sys/arch/evbarm/iq80321/iq80321_7seg.c @@ -1,4 +1,4 @@ -/* $NetBSD: iq80321_7seg.c,v 1.5 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: iq80321_7seg.c,v 1.6 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iq80321_7seg.c,v 1.5 2005/12/11 12:17:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iq80321_7seg.c,v 1.6 2005/12/24 20:06:59 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: iq80321_7seg.c,v 1.5 2005/12/11 12:17:09 christos Ex #include <evbarm/iq80321/iq80321reg.h> #include <evbarm/iq80321/iq80321var.h> -#define WRITE(x, v) *((__volatile uint8_t *) (x)) = (v) +#define WRITE(x, v) *((volatile uint8_t *) (x)) = (v) static int snakestate; diff --git a/sys/arch/evbarm/iq80321/iq80321_machdep.c b/sys/arch/evbarm/iq80321/iq80321_machdep.c index 80ec79f484e..4a60554ae12 100644 --- a/sys/arch/evbarm/iq80321/iq80321_machdep.c +++ b/sys/arch/evbarm/iq80321/iq80321_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: iq80321_machdep.c,v 1.34 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: iq80321_machdep.c,v 1.35 2005/12/24 20:06:59 perry Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iq80321_machdep.c,v 1.34 2005/12/11 12:17:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iq80321_machdep.c,v 1.35 2005/12/24 20:06:59 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -316,7 +316,7 @@ cpu_reboot(int howto, char *bootstr) * and poke the Internal Bus and Peripheral Bus reset lines. */ (void) disable_interrupts(I32_bit|F32_bit); - *(__volatile uint32_t *)(IQ80321_80321_VBASE + VERDE_ATU_BASE + + *(volatile uint32_t *)(IQ80321_80321_VBASE + VERDE_ATU_BASE + ATU_PCSR) = PCSR_RIB | PCSR_RPB; /* ...and if that didn't work, just croak. */ diff --git a/sys/arch/evbarm/lubbock/lubbock_machdep.c b/sys/arch/evbarm/lubbock/lubbock_machdep.c index 1e29887d8ac..7725323dfa5 100644 --- a/sys/arch/evbarm/lubbock/lubbock_machdep.c +++ b/sys/arch/evbarm/lubbock/lubbock_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: lubbock_machdep.c,v 1.9 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: lubbock_machdep.c,v 1.10 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -112,7 +112,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lubbock_machdep.c,v 1.9 2005/12/11 12:17:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lubbock_machdep.c,v 1.10 2005/12/24 20:07:03 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -334,13 +334,13 @@ cpu_reboot(int howto, char *bootstr) /*NOTREACHED*/ } -static __inline +static inline pd_entry_t * read_ttb(void) { long ttb; - __asm __volatile("mrc p15, 0, %0, c2, c0, 0" : "=r" (ttb)); + __asm volatile("mrc p15, 0, %0, c2, c0, 0" : "=r" (ttb)); return (pd_entry_t *)(ttb & ~((1<<14)-1)); diff --git a/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c b/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c index c6db568b2d3..84a792e4d6d 100644 --- a/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c +++ b/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: npwr_fc_machdep.c,v 1.1 2005/12/22 16:17:24 briggs Exp $ */ +/* $NetBSD: npwr_fc_machdep.c,v 1.2 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: npwr_fc_machdep.c,v 1.1 2005/12/22 16:17:24 briggs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npwr_fc_machdep.c,v 1.2 2005/12/24 20:07:03 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -315,7 +315,7 @@ cpu_reboot(int howto, char *bootstr) * and poke the Internal Bus and Peripheral Bus reset lines. */ (void) disable_interrupts(I32_bit|F32_bit); - *(__volatile uint32_t *)(IQ80321_80321_VBASE + VERDE_ATU_BASE + + *(volatile uint32_t *)(IQ80321_80321_VBASE + VERDE_ATU_BASE + ATU_PCSR) = PCSR_RIB | PCSR_RPB; /* ...and if that didn't work, just croak. */ diff --git a/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c b/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c index 1c133a5a122..ee385169db5 100644 --- a/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c +++ b/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: smdk2410_machdep.c,v 1.13 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: smdk2410_machdep.c,v 1.14 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 2002, 2003 Fujitsu Component Limited @@ -105,7 +105,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smdk2410_machdep.c,v 1.13 2005/12/11 12:17:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smdk2410_machdep.c,v 1.14 2005/12/24 20:07:03 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -407,12 +407,12 @@ static const struct pmap_devmap smdk2410_devmap[] = { #undef _A #undef _S -static __inline pd_entry_t * +static inline pd_entry_t * read_ttb(void) { long ttb; - __asm __volatile("mrc p15, 0, %0, c2, c0, 0" : "=r"(ttb)); + __asm volatile("mrc p15, 0, %0, c2, c0, 0" : "=r"(ttb)); return (pd_entry_t *)(ttb & ~((1 << 14) - 1)); @@ -1022,7 +1022,7 @@ kgdb_port_init(void) } #endif -static __inline void +static inline void writeback_dcache_line(vaddr_t va) { /* writeback Dcache line */ @@ -1034,7 +1034,7 @@ writeback_dcache_line(vaddr_t va) : : "r"(va)); } -static __inline void +static inline void clean_dcache_line(vaddr_t va) { /* writeback and invalidate Dcache line */ diff --git a/sys/arch/evbarm/stand/board/becc_mem.c b/sys/arch/evbarm/stand/board/becc_mem.c index ece4fe685c5..0e394e4bb20 100644 --- a/sys/arch/evbarm/stand/board/becc_mem.c +++ b/sys/arch/evbarm/stand/board/becc_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: becc_mem.c,v 1.1 2003/03/25 23:33:49 thorpej Exp $ */ +/* $NetBSD: becc_mem.c,v 1.2 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -50,11 +50,11 @@ #include "board.h" #define BECC_PCICORE_READ(x) \ - *((__volatile uint32_t *) \ + *((volatile uint32_t *) \ (BECC_PCI_CONF_BASE | (1U << BECC_IDSEL_BIT) | (x))) #define BECC_PCICORE_WRITE(x, v) \ - *((__volatile uint32_t *) \ + *((volatile uint32_t *) \ (BECC_PCI_CONF_BASE | (1U << BECC_IDSEL_BIT) | (x))) = (v) #define BECC_SDRAM_BAR (PCI_MAPREG_START + 0x08) diff --git a/sys/arch/evbarm/stand/board/epcom.c b/sys/arch/evbarm/stand/board/epcom.c index fa79af5bba1..28db0075697 100644 --- a/sys/arch/evbarm/stand/board/epcom.c +++ b/sys/arch/evbarm/stand/board/epcom.c @@ -1,4 +1,4 @@ -/* $NetBSD: epcom.c,v 1.2 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: epcom.c,v 1.3 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 2004 Jesse Off @@ -46,12 +46,12 @@ #include "board.h" #define SCADDR (EP93XX_APB_HWBASE + EP93XX_APB_SYSCON) -#define EPCOM_READ(x) *((__volatile uint32_t *) (CONADDR + (EPCOM_ ## x))) -#define EPCOM_WRITE(x, v) *((__volatile uint32_t *) \ +#define EPCOM_READ(x) *((volatile uint32_t *) (CONADDR + (EPCOM_ ## x))) +#define EPCOM_WRITE(x, v) *((volatile uint32_t *) \ (CONADDR + (EPCOM_ ## x))) = (v) -#define SYSCON_READ(x) *((__volatile uint32_t *) \ +#define SYSCON_READ(x) *((volatile uint32_t *) \ (SCADDR + (EP93XX_SYSCON_ ## x))) -#define SYSCON_WRITE(x, v) *((__volatile uint32_t *) \ +#define SYSCON_WRITE(x, v) *((volatile uint32_t *) \ (SCADDR + (EP93XX_SYSCON_ ## x))) = (v) #define ISSET(t,f) ((t) & (f)) diff --git a/sys/arch/evbarm/stand/board/i80312_mem.c b/sys/arch/evbarm/stand/board/i80312_mem.c index 4d1cd09d569..69ce762c328 100644 --- a/sys/arch/evbarm/stand/board/i80312_mem.c +++ b/sys/arch/evbarm/stand/board/i80312_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: i80312_mem.c,v 1.2 2002/04/25 22:11:51 thorpej Exp $ */ +/* $NetBSD: i80312_mem.c,v 1.3 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -47,7 +47,7 @@ #include "board.h" -#define INL(x) *((__volatile uint32_t *) \ +#define INL(x) *((volatile uint32_t *) \ (I80312_PMMR_BASE + I80312_MEM_BASE + (x))) void diff --git a/sys/arch/evbarm/stand/board/i80321_mem.c b/sys/arch/evbarm/stand/board/i80321_mem.c index 99397df8212..05b2ef17784 100644 --- a/sys/arch/evbarm/stand/board/i80321_mem.c +++ b/sys/arch/evbarm/stand/board/i80321_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: i80321_mem.c,v 1.2 2002/04/25 22:11:51 thorpej Exp $ */ +/* $NetBSD: i80321_mem.c,v 1.3 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -47,7 +47,7 @@ #include "board.h" -#define INL(x) *((__volatile uint32_t *) \ +#define INL(x) *((volatile uint32_t *) \ (VERDE_PMMR_BASE + VERDE_MCU_BASE + (x))) void diff --git a/sys/arch/evbarm/stand/board/integrator_mem.c b/sys/arch/evbarm/stand/board/integrator_mem.c index 2d3e8cd0e93..db5cf222b58 100644 --- a/sys/arch/evbarm/stand/board/integrator_mem.c +++ b/sys/arch/evbarm/stand/board/integrator_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: integrator_mem.c,v 1.2 2002/04/25 22:11:51 thorpej Exp $ */ +/* $NetBSD: integrator_mem.c,v 1.3 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -45,7 +45,7 @@ #include "board.h" -#define INL(x) *((__volatile uint32_t *) (x)) +#define INL(x) *((volatile uint32_t *) (x)) void mem_init(void) diff --git a/sys/arch/evbarm/stand/board/ns16550.c b/sys/arch/evbarm/stand/board/ns16550.c index 9004d399584..2673dc99615 100644 --- a/sys/arch/evbarm/stand/board/ns16550.c +++ b/sys/arch/evbarm/stand/board/ns16550.c @@ -1,4 +1,4 @@ -/* $NetBSD: ns16550.c,v 1.2 2003/03/25 23:32:41 thorpej Exp $ */ +/* $NetBSD: ns16550.c,v 1.3 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -46,8 +46,8 @@ #include "board.h" -#define INB(x) *((__volatile uint8_t *) (CONADDR + (x))) -#define OUTB(x, v) *((__volatile uint8_t *) (CONADDR + (x))) = (v) +#define INB(x) *((volatile uint8_t *) (CONADDR + (x))) +#define OUTB(x, v) *((volatile uint8_t *) (CONADDR + (x))) = (v) #define ISSET(t,f) ((t) & (f)) diff --git a/sys/arch/evbarm/stand/board/sscom.c b/sys/arch/evbarm/stand/board/sscom.c index c14a19ab7bd..4bcb841a0fe 100644 --- a/sys/arch/evbarm/stand/board/sscom.c +++ b/sys/arch/evbarm/stand/board/sscom.c @@ -1,4 +1,4 @@ -/* $NetBSD: sscom.c,v 1.4 2005/12/11 12:17:09 christos Exp $ */ +/* $NetBSD: sscom.c,v 1.5 2005/12/24 20:07:03 perry Exp $ */ /* @@ -88,10 +88,10 @@ #define SSCOM_TOLERANCE 30 /* XXX: baud rate tolerance, in 0.1% units */ #endif -#define INB(x) *((__volatile uint8_t *) ((CONADDR) + (x))) -#define INW(x) *((__volatile uint32_t *) ((CONADDR) + (x))) -#define OUTB(x, v) (*((__volatile uint8_t *) ((CONADDR) + (x))) = (v)) -#define OUTW(x, v) (*((__volatile uint32_t *) ((CONADDR) + (x))) = (v)) +#define INB(x) *((volatile uint8_t *) ((CONADDR) + (x))) +#define INW(x) *((volatile uint32_t *) ((CONADDR) + (x))) +#define OUTB(x, v) (*((volatile uint8_t *) ((CONADDR) + (x))) = (v)) +#define OUTW(x, v) (*((volatile uint32_t *) ((CONADDR) + (x))) = (v)) #define ISSET(t,f) ((t) & (f)) diff --git a/sys/arch/evbmips/malta/dev/gtreg.h b/sys/arch/evbmips/malta/dev/gtreg.h index 3da7cc1a08b..50e66a0d3ad 100644 --- a/sys/arch/evbmips/malta/dev/gtreg.h +++ b/sys/arch/evbmips/malta/dev/gtreg.h @@ -1,6 +1,6 @@ -/* $NetBSD: gtreg.h,v 1.1 2002/03/07 14:44:05 simonb Exp $ */ +/* $NetBSD: gtreg.h,v 1.2 2005/12/24 20:07:03 perry Exp $ */ -#define GT_REGVAL(x) *((__volatile u_int32_t *) \ +#define GT_REGVAL(x) *((volatile u_int32_t *) \ (MIPS_PHYS_TO_KSEG1(MALTA_CORECTRL_BASE + (x)))) /* CPU Configuration Register Map */ diff --git a/sys/arch/evbmips/malta/machdep.c b/sys/arch/evbmips/malta/machdep.c index ed59df9930f..43f76ef2355 100644 --- a/sys/arch/evbmips/malta/machdep.c +++ b/sys/arch/evbmips/malta/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.21 2005/12/11 12:17:11 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.22 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -112,7 +112,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2005/12/11 12:17:11 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.22 2005/12/24 20:07:03 perry Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -157,7 +157,7 @@ int comcnrate = 38400; /* XXX should be config option */ #endif /* NCOM > 0 */ -#define REGVAL(x) *((__volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1((x)))) +#define REGVAL(x) *((volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1((x)))) struct malta_config malta_configuration; diff --git a/sys/arch/evbppc/ev64260/clock.c b/sys/arch/evbppc/ev64260/clock.c index 89eccdf88be..fb51aad9774 100644 --- a/sys/arch/evbppc/ev64260/clock.c +++ b/sys/arch/evbppc/ev64260/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.7 2005/11/23 13:00:51 nonaka Exp $ */ +/* $NetBSD: clock.c,v 1.8 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.7 2005/11/23 13:00:51 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.8 2005/12/24 20:07:03 perry Exp $"); #include "opt_ppcparam.h" @@ -65,10 +65,10 @@ static inline int yeartoday(int); #endif void decr_intr(struct clockframe *frame); -static __inline void +static inline void mttb(u_quad_t tb) { - __asm __volatile ("mttbl %0; mttbu %1; mttbl %1+1" + __asm volatile ("mttbl %0; mttbu %1; mttbl %1+1" :: "r" (0), "r" (tb)); } @@ -249,10 +249,10 @@ decr_intr(struct clockframe *frame) * Based on the actual time delay since the last decrementer reload, * we arrange for earlier interrupt next time. */ - __asm __volatile ("mfdec %0" : "=r"(decrtick)); + __asm volatile ("mfdec %0" : "=r"(decrtick)); for (nticks = 0; decrtick < 0; nticks++) decrtick += ticks_per_intr; - __asm __volatile ("mtdec %0" :: "r"(decrtick)); + __asm volatile ("mtdec %0" :: "r"(decrtick)); uvmexp.intrs++; curcpu()->ci_ev_clock.ev_count++; @@ -339,7 +339,7 @@ calc_delayconst() ns_per_tick = 1000000000 / ticks_per_sec; ticks_per_intr = ticks_per_sec / hz; curcpu()->ci_lasttb = mftb(); - __asm __volatile ("mtdec %0" :: "r"(ticks_per_intr)); + __asm volatile ("mtdec %0" :: "r"(ticks_per_intr)); } /* @@ -418,7 +418,7 @@ clock_stop_time(struct stop_time *stp) return; stp->st_msr = extintr_disable(); - __asm __volatile ("mfdec %0" : "=r"(stp->st_decr)); + __asm volatile ("mfdec %0" : "=r"(stp->st_decr)); stp->st_tb = mftb(); stp->st_state = STS_STOPPED; } @@ -440,7 +440,7 @@ clock_restart_time(struct stop_time *stp) } stp->st_state = 0; mttb(stp->st_tb); - __asm __volatile ("mtdec %0" :: "r"(stp->st_decr)); + __asm volatile ("mtdec %0" :: "r"(stp->st_decr)); extintr_restore(stp->st_msr); } diff --git a/sys/arch/evbppc/ev64260/machdep.c b/sys/arch/evbppc/ev64260/machdep.c index 51016f40538..5aff2939ac6 100644 --- a/sys/arch/evbppc/ev64260/machdep.c +++ b/sys/arch/evbppc/ev64260/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.18 2005/12/11 12:17:12 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.19 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2005/12/11 12:17:12 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2005/12/24 20:07:03 perry Exp $"); #include "opt_marvell.h" #include "opt_ev64260.h" @@ -258,7 +258,7 @@ mem_regions(struct mem_region **mem, struct mem_region **avail) *avail = availmemr; } -static __inline void +static inline void gt_record_memory(int j, paddr_t start, paddr_t end, paddr_t endkernel) { physmemr[j].start = start; @@ -331,7 +331,7 @@ cpu_startup(void) * Now allow hardware interrupts. */ splhigh(); - __asm __volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" + __asm volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" : "=r"(msr) : "K"(PSL_EE)); } diff --git a/sys/arch/evbsh3/evbsh3/machdep.c b/sys/arch/evbsh3/evbsh3/machdep.c index 5cb97e5fce0..5bfaf46fb8e 100644 --- a/sys/arch/evbsh3/evbsh3/machdep.c +++ b/sys/arch/evbsh3/evbsh3/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.55 2005/11/24 13:08:33 yamt Exp $ */ +/* $NetBSD: machdep.c,v 1.56 2005/12/24 20:07:03 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.55 2005/11/24 13:08:33 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.56 2005/12/24 20:07:03 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -282,7 +282,7 @@ initSH3(void *pc) /* XXX return address */ * XXX We can't return here, because we change stack pointer. * So jump to return address directly. */ - __asm __volatile ( + __asm volatile ( "jmp @%0;" "mov %1, r15" :: "r"(pc),"r"(lwp0.l_md.md_pcb->pcb_sf.sf_r7_bank)); diff --git a/sys/arch/evbsh5/evbsh5/machdep.c b/sys/arch/evbsh5/evbsh5/machdep.c index 86b654cc9a3..93ef5a9381f 100644 --- a/sys/arch/evbsh5/evbsh5/machdep.c +++ b/sys/arch/evbsh5/evbsh5/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.22 2005/12/11 12:17:13 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.23 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.22 2005/12/11 12:17:13 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.23 2005/12/24 20:07:03 perry Exp $"); #include "opt_sh5_debug.h" #include "opt_sh5_cpu.h" @@ -296,7 +296,7 @@ compute_ctc_tick_per_us(void) while (r64cnt == rtc_read_r64cnt(bt, bh)) ; - __asm __volatile("putcon %0, ctc" :: "r"(ctcstart)); + __asm volatile("putcon %0, ctc" :: "r"(ctcstart)); r64cnt = (r64cnt + 17) & RTC_R64CNT_MASK; @@ -306,7 +306,7 @@ compute_ctc_tick_per_us(void) while (rtc_read_r64cnt(bt, bh) != r64cnt) ; - __asm __volatile("getcon ctc, %0" : "=r"(ctcstop)); + __asm volatile("getcon ctc, %0" : "=r"(ctcstop)); /* * Compute the number of CTC ticks per micro-second, for use diff --git a/sys/arch/hp300/dev/dio.c b/sys/arch/hp300/dev/dio.c index 75593c7830d..f8528270ddb 100644 --- a/sys/arch/hp300/dev/dio.c +++ b/sys/arch/hp300/dev/dio.c @@ -1,4 +1,4 @@ -/* $NetBSD: dio.c,v 1.31 2005/12/11 12:17:13 christos Exp $ */ +/* $NetBSD: dio.c,v 1.32 2005/12/24 20:07:03 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dio.c,v 1.31 2005/12/11 12:17:13 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dio.c,v 1.32 2005/12/24 20:07:03 perry Exp $"); #define _HP300_INTR_H_PRIVATE @@ -383,7 +383,7 @@ dio_bus_space_read_multi_oddbyte_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t offset, uint8_t *addr, bus_size_t len) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%a1 ;\n" " movl %2,%%d0 ;\n" @@ -400,7 +400,7 @@ dio_bus_space_write_multi_oddbyte_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t offset, const uint8_t *addr, bus_size_t len) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%a1 ;\n" " movl %2,%%d0 ;\n" @@ -416,7 +416,7 @@ static void dio_bus_space_read_region_oddbyte_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t offset, uint8_t *addr, bus_size_t len) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%a1 ;\n" " movl %2,%%d0 ;\n" @@ -435,7 +435,7 @@ dio_bus_space_write_region_oddbyte_1(bus_space_tag_t bst, bus_size_t len) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%a1 ;\n" " movl %2,%%d0 ;\n" @@ -452,7 +452,7 @@ static void dio_bus_space_set_multi_oddbyte_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t offset, uint8_t val, bus_size_t count) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%d1 ;\n" " movl %2,%%d0 ;\n" @@ -469,7 +469,7 @@ dio_bus_space_set_region_oddbyte_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t offset, uint8_t val, bus_size_t count) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%d1 ;\n" " movl %2,%%d0 ;\n" diff --git a/sys/arch/hp300/dev/frodo.c b/sys/arch/hp300/dev/frodo.c index 68ad25550d6..e449e39f405 100644 --- a/sys/arch/hp300/dev/frodo.c +++ b/sys/arch/hp300/dev/frodo.c @@ -1,4 +1,4 @@ -/* $NetBSD: frodo.c,v 1.22 2005/12/11 12:17:13 christos Exp $ */ +/* $NetBSD: frodo.c,v 1.23 2005/12/24 20:07:03 perry Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: frodo.c,v 1.22 2005/12/11 12:17:13 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: frodo.c,v 1.23 2005/12/24 20:07:03 perry Exp $"); #define _HP300_INTR_H_PRIVATE @@ -425,7 +425,7 @@ frodo_bus_space_read_multi_sparse_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t offset, uint8_t *addr, bus_size_t len) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%a1 ;\n" " movl %2,%%d0 ;\n" @@ -443,7 +443,7 @@ frodo_bus_space_write_multi_sparse_1(bus_space_tag_t bst, bus_size_t len) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%a1 ;\n" " movl %2,%%d0 ;\n" @@ -459,7 +459,7 @@ static void frodo_bus_space_read_region_sparse_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t offset, uint8_t *addr, bus_size_t len) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%a1 ;\n" " movl %2,%%d0 ;\n" @@ -478,7 +478,7 @@ frodo_bus_space_write_region_sparse_1(bus_space_tag_t bst, bus_size_t len) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%a1 ;\n" " movl %2,%%d0 ;\n" @@ -495,7 +495,7 @@ static void frodo_bus_space_set_multi_sparse_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t offset, uint8_t val, bus_size_t count) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%d1 ;\n" " movl %2,%%d0 ;\n" @@ -512,7 +512,7 @@ frodo_bus_space_set_region_sparse_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t offset, uint8_t val, bus_size_t count) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;\n" " movl %1,%%d1 ;\n" " movl %2,%%d0 ;\n" diff --git a/sys/arch/hp300/dev/intiovar.h b/sys/arch/hp300/dev/intiovar.h index 9199ecba7dc..ff4e27765cb 100644 --- a/sys/arch/hp300/dev/intiovar.h +++ b/sys/arch/hp300/dev/intiovar.h @@ -1,4 +1,4 @@ -/* $NetBSD: intiovar.h,v 1.9 2005/12/11 12:17:14 christos Exp $ */ +/* $NetBSD: intiovar.h,v 1.10 2005/12/24 20:07:03 perry Exp $ */ /*- * Copyright (c) 1996, 1998, 2001 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ struct intio_builtins { while (!(bus_space_read_1(bst, bsh, INTIO_DEV_3xx_STAT) \ & INTIO_DEV_DATA_READY)) -static __inline int +static inline int intio_device_readcmd(bus_space_tag_t bst, bus_space_handle_t bsh, int cmd, uint8_t *datap) { @@ -98,7 +98,7 @@ intio_device_readcmd(bus_space_tag_t bst, bus_space_handle_t bsh, int cmd, return (0); } -static __inline int +static inline int intio_device_writecmd(bus_space_tag_t bst, bus_space_handle_t bsh, int cmd, uint8_t *datap, int len) { @@ -111,7 +111,7 @@ intio_device_writecmd(bus_space_tag_t bst, bus_space_handle_t bsh, return (0); } -static __inline int +static inline int intio_device_readstate(bus_space_tag_t bst, bus_space_handle_t bsh, uint8_t *statusp, uint8_t *datap) { diff --git a/sys/arch/hp300/hp300/leds.c b/sys/arch/hp300/hp300/leds.c index 154eb260397..de3219c26ae 100644 --- a/sys/arch/hp300/hp300/leds.c +++ b/sys/arch/hp300/hp300/leds.c @@ -1,4 +1,4 @@ -/* $NetBSD: leds.c,v 1.16 2005/12/11 12:17:18 christos Exp $ */ +/* $NetBSD: leds.c,v 1.17 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: leds.c,v 1.16 2005/12/11 12:17:18 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: leds.c,v 1.17 2005/12/24 20:07:03 perry Exp $"); #include <sys/param.h> @@ -115,7 +115,7 @@ void ledcontrol(int ons, int offs, int togs) { - __asm __volatile ( + __asm volatile ( "orb %1,%0 ;\n" "andb %2,%0 ;\n" "eorb %3,%0" diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c index 0524cd94d98..f77a40fdb42 100644 --- a/sys/arch/hp300/hp300/trap.c +++ b/sys/arch/hp300/hp300/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.113 2005/12/11 12:17:18 christos Exp $ */ +/* $NetBSD: trap.c,v 1.114 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.113 2005/12/11 12:17:18 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.114 2005/12/24 20:07:03 perry Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -215,7 +215,7 @@ int mmupid = -1; * trap and syscall both need the following work done before returning * to user mode. */ -static __inline void +static inline void userret(struct lwp *l, struct frame *fp, u_quad_t oticks, u_int faultaddr, int fromtrap) { diff --git a/sys/arch/hp300/include/bus.h b/sys/arch/hp300/include/bus.h index 9a623b920d2..ac17cc3ec06 100644 --- a/sys/arch/hp300/include/bus.h +++ b/sys/arch/hp300/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.11 2005/12/11 12:17:19 christos Exp $ */ +/* $NetBSD: bus.h,v 1.12 2005/12/24 20:07:03 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -261,7 +261,7 @@ do { \ if ((t)->bsrm1 != NULL) \ ((t)->bsrm1)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -279,7 +279,7 @@ do { \ if ((t)->bsrm2 != NULL) \ ((t)->bsrm2)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -296,7 +296,7 @@ do { \ if ((t)->bsrm4 != NULL) \ ((t)->bsrm4)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -328,7 +328,7 @@ do { \ if ((t)->bsrr1 != NULL) \ ((t)->bsrr1)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -346,7 +346,7 @@ do { \ if ((t)->bsrr2 != NULL) \ ((t)->bsrr2)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -364,7 +364,7 @@ do { \ if ((t)->bsrr4 != NULL) \ ((t)->bsrr4)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -432,7 +432,7 @@ do { \ if ((t)->bswm1 != NULL) \ ((t)->bswm1)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -450,7 +450,7 @@ do { \ if ((t)->bswm2 != NULL) \ ((t)->bswm2)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -469,7 +469,7 @@ do { \ if ((t)->bswm4 != NULL) \ ((t)->bswm4)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -501,7 +501,7 @@ do { \ if ((t)->bswr1 != NULL) \ ((t)->bswr1)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -519,7 +519,7 @@ do { \ if ((t)->bswr2) != NULL) \ ((t)->bswr2)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -537,7 +537,7 @@ do { \ if ((t)->bswr4) != NULL) \ ((t)->bswr4)(t, h, o, a, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -569,7 +569,7 @@ do { \ if ((t)->bssm1 != NULL) \ ((t)->bssm1)(t, h, o, val, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -587,7 +587,7 @@ do { \ if ((t)->bssm2 != NULL) \ ((t)->bssm2)(t, h, o, val, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -605,7 +605,7 @@ do { \ if ((t)->bssm4 != NULL) \ ((t)->bssm4)(t, h, o, val, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -637,7 +637,7 @@ do { \ if ((t)->bssr1 != NULL) \ ((t)->bssr1)(t, h, o, val, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -655,7 +655,7 @@ do { \ if ((t)->bssr2 != NULL) \ ((t)->bssr2)(t, h, o, val, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -674,7 +674,7 @@ do { \ if ((t)->bssr4 != NULL) \ ((t)->bssr4)(t, h, o, val, c); \ else { \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -703,7 +703,7 @@ do { \ */ #define __HP300_copy_region_N(BYTES) \ -static __inline void __unused \ +static inline void __unused \ __CONCAT(bus_space_copy_region_,BYTES)(bus_space_tag_t t, \ bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, \ bus_size_t o2, bus_size_t c) \ diff --git a/sys/arch/hp300/include/cacheops_machdep.h b/sys/arch/hp300/include/cacheops_machdep.h index ffdb18b290a..94e53d091d0 100644 --- a/sys/arch/hp300/include/cacheops_machdep.h +++ b/sys/arch/hp300/include/cacheops_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: cacheops_machdep.h,v 1.5 2005/12/11 12:17:19 christos Exp $ */ +/* $NetBSD: cacheops_machdep.h,v 1.6 2005/12/24 20:07:03 perry Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -75,7 +75,7 @@ extern vaddr_t MMUbase; -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) DCIA_md(void) { volatile int *ip = (void *)(MMUbase + MMUCMD); @@ -89,7 +89,7 @@ DCIA_md(void) return 1; } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) DCIS_md(void) { volatile int *ip = (void *)(MMUbase + MMUSSTP); @@ -102,7 +102,7 @@ DCIS_md(void) return 1; } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) DCIU_md(void) { volatile int *ip = (void *)(MMUbase + MMUUSTP); @@ -115,7 +115,7 @@ DCIU_md(void) return 1; } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) PCIA_md(void) { volatile int *ip = (void *)(MMUbase + MMUCMD); @@ -135,7 +135,7 @@ PCIA_md(void) return 0; } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) TBIA_md(void) { volatile int *ip = (void *)(MMUbase + MMUTBINVAL); @@ -148,7 +148,7 @@ TBIA_md(void) return 1; } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) TBIS_md(vaddr_t va) { register vaddr_t r_va __asm("%a1") = va; @@ -159,7 +159,7 @@ TBIS_md(vaddr_t va) } s = splhigh(); - __asm __volatile (" movc %0, %%dfc;" /* select purge space */ + __asm volatile (" movc %0, %%dfc;" /* select purge space */ " movsl %3, %1@;" /* purge it */ " movc %2, %%dfc;" : : "r" (FC_PURGE), "a" (r_va), "r" (FC_USERD), @@ -168,7 +168,7 @@ TBIS_md(vaddr_t va) return 1; } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) TBIAS_md(void) { volatile int *ip = (void *)(MMUbase + MMUTBINVAL); @@ -181,7 +181,7 @@ TBIAS_md(void) return 1; } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) TBIAU_md(void) { volatile int *ip = (void *)(MMUbase + MMUTBINVAL); diff --git a/sys/arch/hp700/dev/pdc.c b/sys/arch/hp700/dev/pdc.c index cea665d427f..bb18547e0c4 100644 --- a/sys/arch/hp700/dev/pdc.c +++ b/sys/arch/hp700/dev/pdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: pdc.c,v 1.14 2005/12/11 12:17:24 christos Exp $ */ +/* $NetBSD: pdc.c,v 1.15 2005/12/24 20:07:03 perry Exp $ */ /* $OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $ */ @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.14 2005/12/11 12:17:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.15 2005/12/24 20:07:03 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -422,7 +422,7 @@ pdccnputc(dev_t dev, int c) if (err < 0) { #if defined(DDB) || defined(KGDB) - __asm __volatile ("break %0, %1" + __asm volatile ("break %0, %1" :: "i" (HPPA_BREAK_KERNEL), "i" (HPPA_BREAK_KGDB)); #endif /* DDB || KGDB */ delay(250000); diff --git a/sys/arch/hp700/gsc/if_ie_gsc.c b/sys/arch/hp700/gsc/if_ie_gsc.c index aa40eefe192..b6eb385138c 100644 --- a/sys/arch/hp700/gsc/if_ie_gsc.c +++ b/sys/arch/hp700/gsc/if_ie_gsc.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ie_gsc.c,v 1.11 2005/12/11 12:17:24 christos Exp $ */ +/* $NetBSD: if_ie_gsc.c,v 1.12 2005/12/24 20:07:03 perry Exp $ */ /* $OpenBSD: if_ie_gsc.c,v 1.6 2001/01/12 22:57:04 mickey Exp $ */ @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ie_gsc.c,v 1.11 2005/12/11 12:17:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ie_gsc.c,v 1.12 2005/12/24 20:07:03 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -247,7 +247,7 @@ ie_gsc_read16(struct ie_softc *sc, int offset) { uint16_t val; - __asm __volatile( + __asm volatile( " ldh 0(%1), %0 \n" " fdc %%r0(%1) \n" : "=&r" (val) @@ -259,7 +259,7 @@ void ie_gsc_write16(struct ie_softc *sc, int offset, uint16_t v) { - __asm __volatile( + __asm volatile( " sth %0, 0(%1) \n" " fdc %%r0(%1) \n" : /* no outputs */ @@ -275,7 +275,7 @@ ie_gsc_write24(struct ie_softc *sc, int offset, int addr) * zero, so we have to add in the appropriate offset here. */ addr += sc->sc_dmamap->dm_segs[0].ds_addr; - __asm __volatile( + __asm volatile( " ldi 2, %%r21 \n" " extru %0, 15, 16, %%r22 \n" " sth %0, 0(%1) \n" diff --git a/sys/arch/hp700/hp700/autoconf.c b/sys/arch/hp700/hp700/autoconf.c index 09130cc73f7..173de7a3b82 100644 --- a/sys/arch/hp700/hp700/autoconf.c +++ b/sys/arch/hp700/hp700/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.19 2005/12/11 12:17:24 christos Exp $ */ +/* $NetBSD: autoconf.c,v 1.20 2005/12/24 20:07:04 perry Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.19 2005/12/11 12:17:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.20 2005/12/24 20:07:04 perry Exp $"); #include "opt_kgdb.h" #include "opt_useleds.h" @@ -162,7 +162,7 @@ cpu_configure(void) /* in spl*() we trust */ hp700_intr_init(); - __asm __volatile("ssm %0, %%r0" :: "i" (PSW_I)); + __asm volatile("ssm %0, %%r0" :: "i" (PSW_I)); kpsw |= PSW_I; spl0(); diff --git a/sys/arch/hp700/hp700/machdep.c b/sys/arch/hp700/hp700/machdep.c index 80472d06c8e..d7640c9b412 100644 --- a/sys/arch/hp700/hp700/machdep.c +++ b/sys/arch/hp700/hp700/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.28 2005/12/11 12:17:24 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.29 2005/12/24 20:07:04 perry Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28 2005/12/11 12:17:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2005/12/24 20:07:04 perry Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -265,7 +265,7 @@ struct vm_map *phys_map = NULL; void delay_init(void); -static __inline void fall(int, int, int, int, int); +static inline void fall(int, int, int, int, int); void dumpsys(void); /* @@ -957,7 +957,7 @@ delay(u_int us) } } -static __inline void +static inline void fall(int c_base, int c_count, int c_loop, int c_stride, int data) { int loop; @@ -1397,12 +1397,12 @@ cpu_reboot(int howto, char *user_boot_string) if (howto & RB_HALT) { printf("System halted!\n"); DELAY(1000000); - __asm __volatile("stwas %0, 0(%1)" + __asm volatile("stwas %0, 0(%1)" :: "r" (CMD_STOP), "r" (LBCAST_ADDR + iomod_command)); } else { printf("rebooting..."); DELAY(1000000); - __asm __volatile("stwas %0, 0(%1)" + __asm volatile("stwas %0, 0(%1)" :: "r" (CMD_RESET), "r" (LBCAST_ADDR + iomod_command)); } diff --git a/sys/arch/hp700/hp700/softintr.c b/sys/arch/hp700/hp700/softintr.c index 1e3ef5f3e44..107510be07c 100644 --- a/sys/arch/hp700/hp700/softintr.c +++ b/sys/arch/hp700/hp700/softintr.c @@ -1,4 +1,4 @@ -/* $NetBSD: softintr.c,v 1.5 2005/12/11 12:17:24 christos Exp $ */ +/* $NetBSD: softintr.c,v 1.6 2005/12/24 20:07:04 perry Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.5 2005/12/11 12:17:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.6 2005/12/24 20:07:04 perry Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -129,7 +129,7 @@ softintr_dispatch(void *arg) /* Special handling for softnet. */ if (which == HP700_SOFTINTR_SOFTNET) { - __asm __volatile( + __asm volatile( " mfctl %%eiem, %%r22 \n" " mtctl %%r0, %%eiem \n" " ldw 0(%1), %0 \n" diff --git a/sys/arch/hp700/include/cpu.h b/sys/arch/hp700/include/cpu.h index 9c8370f8fe9..0cb391caab3 100644 --- a/sys/arch/hp700/include/cpu.h +++ b/sys/arch/hp700/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.16 2005/12/11 12:17:24 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.17 2005/12/24 20:07:04 perry Exp $ */ /* $OpenBSD: cpu.h,v 1.20 2001/01/29 00:01:58 mickey Exp $ */ @@ -227,12 +227,12 @@ extern int want_resched; #define DELAY(x) delay(x) -static __inline paddr_t +static inline paddr_t kvtop(const caddr_t va) { paddr_t pa; - __asm __volatile ("lpa %%r0(%1), %0" : "=r" (pa) : "r" (va)); + __asm volatile ("lpa %%r0(%1), %0" : "=r" (pa) : "r" (va)); return pa; } diff --git a/sys/arch/hp700/include/intr.h b/sys/arch/hp700/include/intr.h index 190a0c6a05a..189835ab8fa 100644 --- a/sys/arch/hp700/include/intr.h +++ b/sys/arch/hp700/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.4 2005/11/27 14:01:45 yamt Exp $ */ +/* $NetBSD: intr.h,v 1.5 2005/12/24 20:07:04 perry Exp $ */ /*- * Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc. @@ -83,8 +83,8 @@ extern int softnetmask; /* * Add a mask to cpl, and return the old value of cpl. */ -static __inline int splraise __P((int)); -static __inline int +static inline int splraise __P((int)); +static inline int splraise(ncpl) register int ncpl; { diff --git a/sys/arch/hp700/stand/common/pdc.c b/sys/arch/hp700/stand/common/pdc.c index 661f41281a9..442ef8ca761 100644 --- a/sys/arch/hp700/stand/common/pdc.c +++ b/sys/arch/hp700/stand/common/pdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: pdc.c,v 1.6 2005/12/11 12:17:25 christos Exp $ */ +/* $NetBSD: pdc.c,v 1.7 2005/12/24 20:07:04 perry Exp $ */ /* $OpenBSD: pdc.c,v 1.10 1999/05/06 02:27:44 mickey Exp $ */ @@ -404,7 +404,7 @@ pdc_findev(int unit, int class) return NULL; } -static __inline void +static inline void fall(int c_base, int c_count, int c_loop, int c_stride, int data) { int loop; diff --git a/sys/arch/hp700/stand/xxboot/main.c b/sys/arch/hp700/stand/xxboot/main.c index 14889aa949d..b758deb9c58 100644 --- a/sys/arch/hp700/stand/xxboot/main.c +++ b/sys/arch/hp700/stand/xxboot/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.3 2005/12/11 12:17:25 christos Exp $ */ +/* $NetBSD: main.c,v 1.4 2005/12/24 20:07:04 perry Exp $ */ /* * Copyright (c) 2003 ITOH Yasufumi. @@ -55,8 +55,8 @@ struct loadinfo { #endif unsigned entry_offset; }; -static __inline void xi_elf32 __P((struct loadinfo *, Elf32_Ehdr *)); -static __inline void xi_elf64 __P((struct loadinfo *, Elf64_Ehdr *)); +static inline void xi_elf32 __P((struct loadinfo *, Elf32_Ehdr *)); +static inline void xi_elf64 __P((struct loadinfo *, Elf64_Ehdr *)); int xi_load __P((struct loadinfo *, void *)); void reboot __P((void)), halt __P((void)); @@ -355,7 +355,7 @@ load_file_ino(ino, fn, loadadr, interactive, part) /* * fill in loading information from an ELF executable */ -static __inline void +static inline void xi_elf32(inf, hdr) struct loadinfo *inf; Elf32_Ehdr *hdr; @@ -374,7 +374,7 @@ xi_elf32(inf, hdr) inf->entry_offset = hdr->e_entry - ph->p_vaddr; } -static __inline void +static inline void xi_elf64(inf, hdr) struct loadinfo *inf; Elf64_Ehdr *hdr; diff --git a/sys/arch/hpc/stand/include/machine/endian.h b/sys/arch/hpc/stand/include/machine/endian.h index 639bde3195b..28403ecc88f 100644 --- a/sys/arch/hpc/stand/include/machine/endian.h +++ b/sys/arch/hpc/stand/include/machine/endian.h @@ -1,4 +1,4 @@ -/* $NetBSD: endian.h,v 1.3 2005/12/11 12:17:29 christos Exp $ */ +/* $NetBSD: endian.h,v 1.4 2005/12/24 20:07:04 perry Exp $ */ /* Windows CE architecture */ @@ -202,7 +202,7 @@ __END_DECLS * to/from an octet stream. */ -static __inline void __unused +static inline void __unused be16enc(void *buf, uint16_t u) { uint8_t *p = (uint8_t *)buf; @@ -211,7 +211,7 @@ be16enc(void *buf, uint16_t u) p[1] = u & 0xff; } -static __inline void __unused +static inline void __unused le16enc(void *buf, uint16_t u) { uint8_t *p = (uint8_t *)buf; @@ -220,7 +220,7 @@ le16enc(void *buf, uint16_t u) p[1] = ((unsigned)u >> 8) & 0xff; } -static __inline uint16_t __unused +static inline uint16_t __unused be16dec(const void *buf) { const uint8_t *p = (const uint8_t *)buf; @@ -228,7 +228,7 @@ be16dec(const void *buf) return ((p[0] << 8) | p[1]); } -static __inline uint16_t __unused +static inline uint16_t __unused le16dec(const void *buf) { const uint8_t *p = (const uint8_t *)buf; @@ -236,7 +236,7 @@ le16dec(const void *buf) return ((p[1] << 8) | p[0]); } -static __inline void __unused +static inline void __unused be32enc(void *buf, uint32_t u) { uint8_t *p = (uint8_t *)buf; @@ -247,7 +247,7 @@ be32enc(void *buf, uint32_t u) p[3] = u & 0xff; } -static __inline void __unused +static inline void __unused le32enc(void *buf, uint32_t u) { uint8_t *p = (uint8_t *)buf; @@ -258,7 +258,7 @@ le32enc(void *buf, uint32_t u) p[3] = (u >> 24) & 0xff; } -static __inline uint32_t __unused +static inline uint32_t __unused be32dec(const void *buf) { const uint8_t *p = (const uint8_t *)buf; @@ -266,7 +266,7 @@ be32dec(const void *buf) return ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]); } -static __inline uint32_t __unused +static inline uint32_t __unused le32dec(const void *buf) { const uint8_t *p = (const uint8_t *)buf; @@ -281,7 +281,7 @@ le32dec(const void *buf) */ #ifndef _WIN32 -static __inline void __unused +static inline void __unused be64enc(void *buf, uint64_t u) { uint8_t *p = (uint8_t *)buf; @@ -290,7 +290,7 @@ be64enc(void *buf, uint64_t u) be32enc(p + 4, (uint32_t)(u & 0xffffffffULL)); } -static __inline void __unused +static inline void __unused le64enc(void *buf, uint64_t u) { uint8_t *p = (uint8_t *)buf; @@ -299,7 +299,7 @@ le64enc(void *buf, uint64_t u) le32enc(p + 4, (uint32_t)(u >> 32)); } -static __inline uint64_t __unused +static inline uint64_t __unused be64dec(const void *buf) { const uint8_t *p = (const uint8_t *)buf; @@ -307,7 +307,7 @@ be64dec(const void *buf) return (((uint64_t)be32dec(p) << 32) | be32dec(p + 4)); } -static __inline uint64_t __unused +static inline uint64_t __unused le64dec(const void *buf) { const uint8_t *p = (const uint8_t *)buf; diff --git a/sys/arch/hpcmips/tx/tx39.c b/sys/arch/hpcmips/tx/tx39.c index 6d56e404fe8..8ad5507c181 100644 --- a/sys/arch/hpcmips/tx/tx39.c +++ b/sys/arch/hpcmips/tx/tx39.c @@ -1,4 +1,4 @@ -/* $NetBSD: tx39.c,v 1.34 2005/12/11 12:17:34 christos Exp $ */ +/* $NetBSD: tx39.c,v 1.35 2005/12/24 20:07:04 perry Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tx39.c,v 1.34 2005/12/11 12:17:34 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tx39.c,v 1.35 2005/12/24 20:07:04 perry Exp $"); #include "opt_vr41xx.h" #include "opt_tx39xx.h" @@ -188,8 +188,8 @@ tx_find_dram(paddr_t start, paddr_t end) { caddr_t page, startaddr, endaddr; u_int32_t magic0, magic1; -#define MAGIC0 (*(__volatile u_int32_t *)(page + 0)) -#define MAGIC1 (*(__volatile u_int32_t *)(page + 4)) +#define MAGIC0 (*(volatile u_int32_t *)(page + 0)) +#define MAGIC1 (*(volatile u_int32_t *)(page + 4)) startaddr = (void *)MIPS_PHYS_TO_KSEG1(start); endaddr = (void *)MIPS_PHYS_TO_KSEG1(end); diff --git a/sys/arch/hpcmips/tx/tx39sib.c b/sys/arch/hpcmips/tx/tx39sib.c index a6f8bdb5390..f0c76fdb0cc 100644 --- a/sys/arch/hpcmips/tx/tx39sib.c +++ b/sys/arch/hpcmips/tx/tx39sib.c @@ -1,4 +1,4 @@ -/* $NetBSD: tx39sib.c,v 1.17 2005/12/11 12:17:34 christos Exp $ */ +/* $NetBSD: tx39sib.c,v 1.18 2005/12/24 20:07:04 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tx39sib.c,v 1.17 2005/12/11 12:17:34 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tx39sib.c,v 1.18 2005/12/24 20:07:04 perry Exp $"); #undef TX39SIBDEBUG @@ -137,7 +137,7 @@ struct tx39sib_softc { int sc_attached; }; -__inline int __txsibsf0_ready(tx_chipset_tag_t); +inline int __txsibsf0_ready(tx_chipset_tag_t); #ifdef TX39SIBDEBUG void tx39sib_dump(struct tx39sib_softc *); #endif diff --git a/sys/arch/hppa/hppa/db_interface.c b/sys/arch/hppa/hppa/db_interface.c index ac507e43406..a34159f2f05 100644 --- a/sys/arch/hppa/hppa/db_interface.c +++ b/sys/arch/hppa/hppa/db_interface.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.5 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: db_interface.c,v 1.6 2005/12/24 20:07:04 perry Exp $ */ /* $OpenBSD: db_interface.c,v 1.16 2001/03/22 23:31:45 mickey Exp $ */ @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.5 2005/12/11 12:17:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.6 2005/12/24 20:07:04 perry Exp $"); #define DDB_DEBUG @@ -136,7 +136,7 @@ int db_active = 0; void Debugger(void) { - __asm __volatile ("break %0, %1" + __asm volatile ("break %0, %1" :: "i" (HPPA_BREAK_KERNEL), "i" (HPPA_BREAK_KGDB)); } diff --git a/sys/arch/hppa/hppa/fpu.c b/sys/arch/hppa/hppa/fpu.c index 3861a76ee04..37a66bea4b7 100644 --- a/sys/arch/hppa/hppa/fpu.c +++ b/sys/arch/hppa/hppa/fpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: fpu.c,v 1.11 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: fpu.c,v 1.12 2005/12/24 20:07:04 perry Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.11 2005/12/11 12:17:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.12 2005/12/24 20:07:04 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -182,7 +182,7 @@ hppa_fpu_bootstrap(u_int ccr_enable) * wrapped in double word stores of fr0, * otherwise its operation is undefined. */ - __asm __volatile( + __asm volatile( " ldo %0, %%r22 \n" " fstds %%fr0, 0(%%r22) \n" " ldo %1, %%r22 \n" @@ -263,7 +263,7 @@ hppa_fpu_ls(struct trapframe *frame, struct lwp *l) * and t is a five-bit field starting at bit 31. */ inst = frame->tf_iir; - __asm __volatile( + __asm volatile( " extru %4, 10, 5, %1 \n" " extru %4, 15, 5, %2 \n" " extru %4, 17, 2, %3 \n" @@ -375,7 +375,7 @@ hppa_fpu_emulate(struct trapframe *frame, struct lwp *l, u_int inst) * it is a three bit field starting at bit 18. */ #if 0 - __asm __volatile( + __asm volatile( " extru %3, 22, 2, %1 \n" " extru %3, 5, 6, %0 \n" " extru %3, 18, 3, %2 \n" diff --git a/sys/arch/hppa/hppa/kgdb_hppa.c b/sys/arch/hppa/hppa/kgdb_hppa.c index 0059f46c686..96df5dd3f67 100644 --- a/sys/arch/hppa/hppa/kgdb_hppa.c +++ b/sys/arch/hppa/hppa/kgdb_hppa.c @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_hppa.c,v 1.5 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: kgdb_hppa.c,v 1.6 2005/12/24 20:07:04 perry Exp $ */ /* * Copyright (c) 1990, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kgdb_hppa.c,v 1.5 2005/12/11 12:17:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kgdb_hppa.c,v 1.6 2005/12/24 20:07:04 perry Exp $"); #include <sys/param.h> #include <sys/kgdb.h> @@ -244,7 +244,7 @@ kgdb_connect(int verbose) if (verbose) printf("kgdb waiting..."); - __asm __volatile ("break %0, %1" + __asm volatile ("break %0, %1" :: "i" (HPPA_BREAK_KERNEL), "i" (HPPA_BREAK_KGDB)); if (verbose) diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c index 5c6dc96c221..5f6d45f8a30 100644 --- a/sys/arch/hppa/hppa/pmap.c +++ b/sys/arch/hppa/hppa/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.17 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: pmap.c,v 1.18 2005/12/24 20:07:04 perry Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -158,7 +158,7 @@ * (maybe just use the pid itself) * some ppl say, block tlb entries should be maintained somewhere in uvm * and be ready for reloads in the fault handler. - * usage of __inline grows the code size by 100%, but hopefully + * usage of inline grows the code size by 100%, but hopefully * makes it faster as well, since the functions are actually * very small. * retail: 8.1k -> 15.1K @@ -171,7 +171,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.17 2005/12/11 12:17:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.18 2005/12/24 20:07:04 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -193,7 +193,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.17 2005/12/11 12:17:37 christos Exp $"); #include <hppa/hppa/machdep.h> #define static /**/ -#define __inline /* */ +#define inline /* */ #ifdef PMAPDEBUG #define PDB_INIT 0x00000002 @@ -304,14 +304,14 @@ vsize_t hpt_mask; /* Prototypes. */ void __pmap_pv_update(paddr_t, struct pv_entry *, u_int, u_int); -static __inline void pmap_pv_remove(struct pv_entry *); +static inline void pmap_pv_remove(struct pv_entry *); /* * Given a directly-mapped region, this makes pv_entries out of it and * adds them to the free list. */ -static __inline void pmap_pv_add(vaddr_t, vaddr_t); -static __inline void +static inline void pmap_pv_add(vaddr_t, vaddr_t); +static inline void pmap_pv_add(vaddr_t pv_start, vaddr_t pv_end) { struct pv_entry *pv; @@ -342,8 +342,8 @@ pmap_pv_add(vaddr_t pv_start, vaddr_t pv_end) * in physical mode and thus require that all pv_entries be directly * mapped, a quality unlikely for malloc()-returned memory. */ -static __inline struct pv_entry *pmap_pv_alloc(void); -static __inline struct pv_entry * +static inline struct pv_entry *pmap_pv_alloc(void); +static inline struct pv_entry * pmap_pv_alloc(void) { struct pv_entry *pv, *pv_fallback; @@ -406,8 +406,8 @@ pmap_pv_alloc(void) /* * Given a struct pv_entry allocated by pmap_pv_alloc, this frees it. */ -static __inline void pmap_pv_free(struct pv_entry *); -static __inline void +static inline void pmap_pv_free(struct pv_entry *); +static inline void pmap_pv_free(struct pv_entry *pv) { PMAP_PRINTF(PDB_PV_ALLOC, ("(%p)\n", pv)); @@ -429,12 +429,12 @@ pmap_pv_free(struct pv_entry *pv) * This HPT is also used as a general VA->PA mapping store, with * struct pv_entry chains hanging off of the HPT entries. */ -static __inline struct hpt_entry *pmap_hpt_hash(pa_space_t, vaddr_t); -static __inline struct hpt_entry * +static inline struct hpt_entry *pmap_hpt_hash(pa_space_t, vaddr_t); +static inline struct hpt_entry * pmap_hpt_hash(pa_space_t sp, vaddr_t va) { struct hpt_entry *hpt; - __asm __volatile ( + __asm volatile ( "extru %2, 23, 20, %%r22\n\t" /* r22 = (va >> 8) */ "zdep %1, 22, 16, %%r23\n\t" /* r23 = (sp << 9) */ "dep %%r0, 31, 4, %%r22\n\t" /* r22 &= ~0xf */ @@ -450,8 +450,8 @@ pmap_hpt_hash(pa_space_t sp, vaddr_t va) /* * Given a PA, returns the table offset for it. */ -static __inline int pmap_table_find_pa(paddr_t); -static __inline int +static inline int pmap_table_find_pa(paddr_t); +static inline int pmap_table_find_pa(paddr_t pa) { int off; @@ -463,8 +463,8 @@ pmap_table_find_pa(paddr_t pa) /* * Given a PA, returns the first mapping for it. */ -static __inline struct pv_entry *pmap_pv_find_pa(paddr_t); -static __inline struct pv_entry * +static inline struct pv_entry *pmap_pv_find_pa(paddr_t); +static inline struct pv_entry * pmap_pv_find_pa(paddr_t pa) { int table_off; @@ -477,8 +477,8 @@ pmap_pv_find_pa(paddr_t pa) /* * Given a VA, this finds any mapping for it. */ -static __inline struct pv_entry *pmap_pv_find_va(pa_space_t, vaddr_t); -static __inline struct pv_entry * +static inline struct pv_entry *pmap_pv_find_va(pa_space_t, vaddr_t); +static inline struct pv_entry * pmap_pv_find_va(pa_space_t space, vaddr_t va) { struct pv_entry *pv = pmap_hpt_hash(space, va)->hpt_entry; @@ -559,8 +559,8 @@ pmap_pv_check_alias(paddr_t pa) * the protection accordingly. This is used when a mapping is * changing. */ -static __inline void _pmap_pv_update(paddr_t, struct pv_entry *, u_int, u_int); -static __inline void +static inline void _pmap_pv_update(paddr_t, struct pv_entry *, u_int, u_int); +static inline void _pmap_pv_update(paddr_t pa, struct pv_entry *pv, u_int tlbprot_clear, u_int tlbprot_set) { @@ -623,9 +623,9 @@ _pmap_pv_update(paddr_t pa, struct pv_entry *pv, u_int tlbprot_clear, * Given a pmap, a VA, a PA, and a TLB protection, this enters * a new mapping and returns the new struct pv_entry. */ -static __inline struct pv_entry *pmap_pv_enter(pmap_t, pa_space_t, vaddr_t, +static inline struct pv_entry *pmap_pv_enter(pmap_t, pa_space_t, vaddr_t, paddr_t, u_int); -static __inline struct pv_entry * +static inline struct pv_entry * pmap_pv_enter(pmap_t pmap, pa_space_t space, vaddr_t va, paddr_t pa, u_int tlbprot) { @@ -711,7 +711,7 @@ pmap_pv_enter(pmap_t pmap, pa_space_t space, vaddr_t va, paddr_t pa, /* * Given a particular VA->PA mapping, this removes it. */ -static __inline void +static inline void pmap_pv_remove(struct pv_entry *pv) { paddr_t pa = tlbptob(pv->pv_tlbpage); @@ -961,7 +961,7 @@ pmap_bootstrap(vaddr_t *vstart, vaddr_t *vend) * is to allow (smaller) kernels (linked lower) to work fine. */ btlb_entry_min = (vaddr_t) &kernel_text; - __asm __volatile ( + __asm volatile ( " ldil L%%$global$, %0 \n" " ldo R%%$global$(%0), %0 \n" : "=r" (kernel_data)); @@ -1703,8 +1703,8 @@ pmap_copy_page(paddr_t spa, paddr_t dpa) * Given a PA and a bit, this tests and clears that bit in * the modref information for the PA. */ -static __inline boolean_t pmap_clear_bit(paddr_t, u_int); -static __inline boolean_t +static inline boolean_t pmap_clear_bit(paddr_t, u_int); +static inline boolean_t pmap_clear_bit(paddr_t pa, u_int tlbprot_bit) { int table_off; @@ -1729,8 +1729,8 @@ pmap_clear_bit(paddr_t pa, u_int tlbprot_bit) * Given a PA and a bit, this tests that bit in the modref * information for the PA. */ -static __inline boolean_t pmap_test_bit(paddr_t, u_int); -static __inline boolean_t +static inline boolean_t pmap_test_bit(paddr_t, u_int); +static inline boolean_t pmap_test_bit(paddr_t pa, u_int tlbprot_bit) { int table_off; diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index a029d48f756..5f7b6e404cd 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.29 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: trap.c,v 1.30 2005/12/24 20:07:04 perry Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -69,7 +69,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.29 2005/12/11 12:17:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.30 2005/12/24 20:07:04 perry Exp $"); /* #define INTRDEBUG */ /* #define TRAPDEBUG */ @@ -198,7 +198,7 @@ void syscall(struct trapframe *, int *); u_int rctr_next_iioq; #endif -static __inline void +static inline void userret(struct lwp *l, register_t pc, u_quad_t oticks) { struct proc *p = l->l_proc; diff --git a/sys/arch/hppa/include/byte_swap.h b/sys/arch/hppa/include/byte_swap.h index 75b6ac177fd..2b1f95bb4cf 100644 --- a/sys/arch/hppa/include/byte_swap.h +++ b/sys/arch/hppa/include/byte_swap.h @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap.h,v 1.3 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: byte_swap.h,v 1.4 2005/12/24 20:07:10 perry Exp $ */ /* $OpenBSD: endian.h,v 1.7 2001/06/29 20:28:54 mickey Exp $ */ @@ -35,10 +35,10 @@ #ifndef _HPPA_BYTE_SWAP_H_ #define _HPPA_BYTE_SWAP_H_ -static __inline u_int16_t __byte_swap_word __P((u_int16_t)); -static __inline u_int32_t __byte_swap_long __P((u_int32_t)); +static inline u_int16_t __byte_swap_word __P((u_int16_t)); +static inline u_int32_t __byte_swap_long __P((u_int32_t)); -static __inline u_int32_t +static inline u_int32_t __byte_swap_long(u_int32_t x) { register in_addr_t __swap32md_x; \ @@ -61,7 +61,7 @@ __byte_swap_long(u_int32_t x) */ #define __swap16md(x) __swap16gen(x) #else -static __inline u_int16_t +static inline u_int16_t __byte_swap_word(u_int16_t x) { register in_port_t __swap16md_x; \ diff --git a/sys/arch/hppa/include/cpufunc.h b/sys/arch/hppa/include/cpufunc.h index 2e2ae38d48b..5aae92eb435 100644 --- a/sys/arch/hppa/include/cpufunc.h +++ b/sys/arch/hppa/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.5 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: cpufunc.h,v 1.6 2005/12/24 20:07:10 perry Exp $ */ /* $OpenBSD: cpufunc.h,v 1.17 2000/05/15 17:22:40 mickey Exp $ */ @@ -72,47 +72,47 @@ #define hptbtop(b) ((b) >> 17) /* Get space register for an address */ -static __inline register_t ldsid(vaddr_t p) { +static inline register_t ldsid(vaddr_t p) { register_t ret; - __asm __volatile("ldsid (%1),%0" : "=r" (ret) : "r" (p)); + __asm volatile("ldsid (%1),%0" : "=r" (ret) : "r" (p)); return ret; } -#define mtctl(v,r) __asm __volatile("mtctl %0,%1":: "r" (v), "i" (r)) -#define mfctl(r,v) __asm __volatile("mfctl %1,%0": "=r" (v): "i" (r)) +#define mtctl(v,r) __asm volatile("mtctl %0,%1":: "r" (v), "i" (r)) +#define mfctl(r,v) __asm volatile("mfctl %1,%0": "=r" (v): "i" (r)) #define mfcpu(r,v) /* XXX for the lack of the mnemonics */ \ - __asm __volatile("diag %1\n\t" \ + __asm volatile("diag %1\n\t" \ "copy %%r22, %0" \ : "=r" (v) : "i" ((0x1400 | ((r) << 21) | (22))) : "r22") -#define mtsp(v,r) __asm __volatile("mtsp %0,%1":: "r" (v), "i" (r)) -#define mfsp(r,v) __asm __volatile("mfsp %1,%0": "=r" (v): "i" (r)) +#define mtsp(v,r) __asm volatile("mtsp %0,%1":: "r" (v), "i" (r)) +#define mfsp(r,v) __asm volatile("mfsp %1,%0": "=r" (v): "i" (r)) -#define ssm(v,r) __asm __volatile("ssm %1,%0": "=r" (r): "i" (v)) -#define rsm(v,r) __asm __volatile("rsm %1,%0": "=r" (r): "i" (v)) +#define ssm(v,r) __asm volatile("ssm %1,%0": "=r" (r): "i" (v)) +#define rsm(v,r) __asm volatile("rsm %1,%0": "=r" (r): "i" (v)) /* Move to system mask. Old value of system mask is returned. */ -static __inline register_t mtsm(register_t mask) { +static inline register_t mtsm(register_t mask) { register_t ret; - __asm __volatile("ssm 0,%0\n\t" + __asm volatile("ssm 0,%0\n\t" "mtsm %1": "=&r" (ret) : "r" (mask)); return ret; } -static __inline register_t get_psw(void) +static inline register_t get_psw(void) { register_t ret; - __asm __volatile("break %1, %2\n\tcopy %%ret0, %0" : "=r" (ret) + __asm volatile("break %1, %2\n\tcopy %%ret0, %0" : "=r" (ret) : "i" (HPPA_BREAK_KERNEL), "i" (HPPA_BREAK_GET_PSW) : "r28"); return ret; } -static __inline register_t set_psw(register_t psw) +static inline register_t set_psw(register_t psw) { register_t ret; - __asm __volatile("copy %0, %%arg0\n\tbreak %1, %2\n\tcopy %%ret0, %0" + __asm volatile("copy %0, %%arg0\n\tbreak %1, %2\n\tcopy %%ret0, %0" : "=r" (ret) : "i" (HPPA_BREAK_KERNEL), "i" (HPPA_BREAK_SET_PSW), "0" (psw) : "r26", "r28"); @@ -120,61 +120,61 @@ static __inline register_t set_psw(register_t psw) } -#define fdce(sp,off) __asm __volatile("fdce 0(%0,%1)":: "i" (sp), "r" (off)) -#define fice(sp,off) __asm __volatile("fice 0(%0,%1)":: "i" (sp), "r" (off)) +#define fdce(sp,off) __asm volatile("fdce 0(%0,%1)":: "i" (sp), "r" (off)) +#define fice(sp,off) __asm volatile("fice 0(%0,%1)":: "i" (sp), "r" (off)) #define sync_caches() \ - __asm __volatile("sync\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop") + __asm volatile("sync\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop") -static __inline void +static inline void iitlba(u_int pg, pa_space_t sp, vaddr_t va) { mtsp(sp, 1); __asm volatile("iitlba %0,(%%sr1, %1)":: "r" (pg), "r" (va)); } -static __inline void +static inline void idtlba(u_int pg, pa_space_t sp, vaddr_t va) { mtsp(sp, 1); __asm volatile("idtlba %0,(%%sr1, %1)":: "r" (pg), "r" (va)); } -static __inline void +static inline void iitlbp(u_int prot, pa_space_t sp, vaddr_t va) { mtsp(sp, 1); __asm volatile("iitlbp %0,(%%sr1, %1)":: "r" (prot), "r" (va)); } -static __inline void +static inline void idtlbp(u_int prot, pa_space_t sp, vaddr_t va) { mtsp(sp, 1); __asm volatile("idtlbp %0,(%%sr1, %1)":: "r" (prot), "r" (va)); } -static __inline void +static inline void pitlb(pa_space_t sp, vaddr_t va) { mtsp(sp, 1); __asm volatile("pitlb %%r0(%%sr1, %0)":: "r" (va)); } -static __inline void +static inline void pdtlb(pa_space_t sp, vaddr_t va) { mtsp(sp, 1); __asm volatile("pdtlb %%r0(%%sr1, %0)":: "r" (va)); } -static __inline void +static inline void pitlbe(pa_space_t sp, vaddr_t va) { mtsp(sp, 1); __asm volatile("pitlbe %%r0(%%sr1, %0)":: "r" (va)); } -static __inline void +static inline void pdtlbe(pa_space_t sp, vaddr_t va) { mtsp(sp, 1); @@ -199,7 +199,7 @@ void eaio_l2(int); * size is <= the size of a data cache line, however they don't * check this constraint. */ -static __inline void +static inline void fdcache_small(pa_space_t sp, vaddr_t va, vsize_t size) { __asm volatile( @@ -211,7 +211,7 @@ fdcache_small(pa_space_t sp, vaddr_t va, vsize_t size) : : "r" (sp), "r" (va), "r" (size - 1)); } -static __inline void +static inline void pdcache_small(pa_space_t sp, vaddr_t va, vsize_t size) { __asm volatile( diff --git a/sys/arch/hppa/include/db_machdep.h b/sys/arch/hppa/include/db_machdep.h index e2bd9a5a390..358871f8ce6 100644 --- a/sys/arch/hppa/include/db_machdep.h +++ b/sys/arch/hppa/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.2 2003/04/29 17:06:05 scw Exp $ */ +/* $NetBSD: db_machdep.h,v 1.3 2005/12/24 20:07:10 perry Exp $ */ /* $OpenBSD: db_machdep.h,v 1.5 2001/02/16 19:20:13 mickey Exp $ */ @@ -82,33 +82,33 @@ typedef long kgdb_reg_t; #define DB_VALID_BREAKPOINT(addr) db_valid_breakpoint(addr) -static __inline int inst_call(u_int ins) { +static inline int inst_call(u_int ins) { return (ins & 0xfc00e000) == 0xe8000000 || (ins & 0xfc00e000) == 0xe8004000 || (ins & 0xfc000000) == 0xe4000000; } -static __inline int inst_branch(u_int ins) { +static inline int inst_branch(u_int ins) { return (ins & 0xf0000000) == 0xe0000000 || (ins & 0xf0000000) == 0xc0000000 || (ins & 0xf0000000) == 0xa0000000 || (ins & 0xf0000000) == 0x80000000; } -static __inline int inst_load(u_int ins) { +static inline int inst_load(u_int ins) { return (ins & 0xf0000000) == 0x40000000 || (ins & 0xf4000200) == 0x24000000 || (ins & 0xfc000200) == 0x0c000000 || (ins & 0xfc001fc0) != 0x0c0011c0; } -static __inline int inst_store(u_int ins) { +static inline int inst_store(u_int ins) { return (ins & 0xf0000000) == 0x60000000 || (ins & 0xf4000200) == 0x24000200 || (ins & 0xfc000200) == 0x0c000200; } -static __inline int inst_return(u_int ins) { +static inline int inst_return(u_int ins) { return (ins & 0xfc00e000) == 0xe800c000 || (ins & 0xfc000000) == 0xe0000000; } -static __inline int inst_trap_return(u_int ins) { +static inline int inst_trap_return(u_int ins) { return (ins & 0xfc001fc0) == 0x00000ca0; } diff --git a/sys/arch/hppa/include/int_mwgwtypes.h b/sys/arch/hppa/include/int_mwgwtypes.h index 365a6c077ef..7bf4d29c6e5 100644 --- a/sys/arch/hppa/include/int_mwgwtypes.h +++ b/sys/arch/hppa/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.1 2002/06/05 01:04:22 fredette Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.2 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; @@ -63,7 +63,7 @@ typedef unsigned long long int uint_least64_t; /* 7.18.1.3 Fastest minimum-width integer types */ -typedef __signed char int_fast8_t; +typedef signed char int_fast8_t; typedef unsigned char uint_fast8_t; typedef short int int_fast16_t; typedef unsigned short int uint_fast16_t; diff --git a/sys/arch/hppa/include/int_types.h b/sys/arch/hppa/include/int_types.h index d44224453bf..ed6b5942576 100644 --- a/sys/arch/hppa/include/int_types.h +++ b/sys/arch/hppa/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.4 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.5 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/hppa/include/lock.h b/sys/arch/hppa/include/lock.h index 5b564be7f67..db40cbc7668 100644 --- a/sys/arch/hppa/include/lock.h +++ b/sys/arch/hppa/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.7 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: lock.h,v 1.8 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -44,10 +44,10 @@ #ifndef _HPPA_LOCK_H_ #define _HPPA_LOCK_H_ -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { - __asm __volatile( + __asm volatile( " ; BEGIN __cpu_simple_lock_init\n" " stw %1, %0 \n" " sync \n" @@ -56,7 +56,7 @@ __cpu_simple_lock_init(__cpu_simple_lock_t *alp) : "r" (__SIMPLELOCK_UNLOCKED)); } -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *alp) { int32_t t0; @@ -69,7 +69,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) */ #if 0 - __asm __volatile( + __asm volatile( " ; BEGIN __cpu_simple_lock\n" " ldcw %1, %0 \n" " comb,<>,n %%r0,%0, 2f \n" @@ -86,13 +86,13 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) #endif } -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { int32_t t0; #if 0 - __asm __volatile( + __asm volatile( " ; BEGIN __cpu_simple_lock_try\n" " ldcw %1, %0 \n" " sync \n" @@ -104,10 +104,10 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *alp) return (t0 != 0); } -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *alp) { - __asm __volatile( + __asm volatile( " ; BEGIN __cpu_simple_unlock\n" " sync \n" " stw %1, %0 \n" diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h index 73a9b450ebf..0e4fe83f11d 100644 --- a/sys/arch/hppa/include/pmap.h +++ b/sys/arch/hppa/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.9 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.10 2005/12/24 20:07:10 perry Exp $ */ /* $OpenBSD: pmap.h,v 1.14 2001/05/09 15:31:24 art Exp $ */ @@ -134,7 +134,7 @@ do { if (pmap) { \ #define pmap_update(p) void pmap_activate __P((struct lwp *)); -static __inline void +static inline void pmap_deactivate(struct lwp *lwp) { } @@ -142,13 +142,13 @@ pmap_deactivate(struct lwp *lwp) #define pmap_phys_address(x) ((x) << PGSHIFT) #define pmap_phys_to_frame(x) ((x) >> PGSHIFT) -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ } -static __inline int +static inline int pmap_prot(struct pmap *pmap, vm_prot_t prot) { extern u_int kern_prot[], user_prot[]; diff --git a/sys/arch/hppa/include/profile.h b/sys/arch/hppa/include/profile.h index b5fcc6b5cb8..cc06c6e27e0 100644 --- a/sys/arch/hppa/include/profile.h +++ b/sys/arch/hppa/include/profile.h @@ -1,4 +1,4 @@ -/* $NetBSD: profile.h,v 1.3 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: profile.h,v 1.4 2005/12/24 20:07:10 perry Exp $ */ /* $OpenBSD: profile.h,v 1.1 1998/12/05 17:25:55 mickey Exp $ */ @@ -33,7 +33,7 @@ * @(#)profile.h 8.1 (Berkeley) 6/11/93 */ -#define _MCOUNT_DECL static __inline void _mcount +#define _MCOUNT_DECL static inline void _mcount #define MCOUNT \ extern void mcount __P((void)) __asm__("mcount"); \ diff --git a/sys/arch/hppa/include/types.h b/sys/arch/hppa/include/types.h index 2906b7fd979..bac317bd2f6 100644 --- a/sys/arch/hppa/include/types.h +++ b/sys/arch/hppa/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.12 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: types.h,v 1.13 2005/12/24 20:07:10 perry Exp $ */ /* $OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $ */ @@ -63,7 +63,7 @@ typedef unsigned long vm_size_t; /* * Semaphores must be aligned on 16-byte boundaries on the PA-RISC. */ -typedef __volatile unsigned long __cpu_simple_lock_t; +typedef volatile unsigned long __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 0 #define __SIMPLELOCK_UNLOCKED 1 diff --git a/sys/arch/i386/acpi/acpi_wakeup.c b/sys/arch/i386/acpi/acpi_wakeup.c index 23c484f5b25..a95584d9f82 100644 --- a/sys/arch/i386/acpi/acpi_wakeup.c +++ b/sys/arch/i386/acpi/acpi_wakeup.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_wakeup.c,v 1.17 2005/12/11 12:17:40 christos Exp $ */ +/* $NetBSD: acpi_wakeup.c,v 1.18 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.17 2005/12/11 12:17:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.18 2005/12/24 20:07:10 perry Exp $"); /*- * Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org> @@ -200,7 +200,7 @@ static struct region_descriptor r_idt, r_gdt; extern int acpi_savecpu(void); extern int acpi_restorecpu(void); -static __inline void +static inline void clear_reg(void) { r_ldt = 0; diff --git a/sys/arch/i386/i386/bios32.c b/sys/arch/i386/i386/bios32.c index 1db7ec7dcc2..a43ec286fc3 100644 --- a/sys/arch/i386/i386/bios32.c +++ b/sys/arch/i386/i386/bios32.c @@ -1,4 +1,4 @@ -/* $NetBSD: bios32.c,v 1.7 2002/10/01 12:56:48 fvdl Exp $ */ +/* $NetBSD: bios32.c,v 1.8 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.7 2002/10/01 12:56:48 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.8 2005/12/24 20:07:10 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -148,7 +148,7 @@ bios32_service(service, e, ei) if (bios32_entry.offset == 0) return (0); /* BIOS32 not present */ - __asm __volatile("lcall *(%%edi)" + __asm volatile("lcall *(%%edi)" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "0" (service), "1" (0), "D" (&bios32_entry)); diff --git a/sys/arch/i386/i386/gdt.c b/sys/arch/i386/i386/gdt.c index bacadea7c56..485a4111386 100644 --- a/sys/arch/i386/i386/gdt.c +++ b/sys/arch/i386/i386/gdt.c @@ -1,4 +1,4 @@ -/* $NetBSD: gdt.c,v 1.35 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: gdt.c,v 1.36 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.35 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.36 2005/12/24 20:07:10 perry Exp $"); #include "opt_multiprocessor.h" @@ -58,8 +58,8 @@ int gdt_free; /* next free slot; terminated with GNULL_SEL */ struct lock gdt_lock_store; -static __inline void gdt_lock(void); -static __inline void gdt_unlock(void); +static inline void gdt_lock(void); +static inline void gdt_unlock(void); void gdt_init(void); void gdt_grow(void); int gdt_get_slot(void); @@ -74,14 +74,14 @@ void gdt_put_slot(int); * some time after the GDT is unlocked, so gdt_compact() could attempt to * reclaim it. */ -static __inline void +static inline void gdt_lock() { (void) lockmgr(&gdt_lock_store, LK_EXCLUSIVE, NULL); } -static __inline void +static inline void gdt_unlock() { diff --git a/sys/arch/i386/i386/identcpu.c b/sys/arch/i386/i386/identcpu.c index 77a207fa74a..d4cafec4b7e 100644 --- a/sys/arch/i386/i386/identcpu.c +++ b/sys/arch/i386/i386/identcpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.22 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: identcpu.c,v 1.23 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.22 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.23 2005/12/24 20:07:10 perry Exp $"); #include "opt_cputype.h" #include "opt_enhanced_speedstep.h" @@ -146,14 +146,14 @@ static const char *intel_family6_name(struct cpu_info *); static void transmeta_cpu_info(struct cpu_info *); -static __inline u_char +static inline u_char cyrix_read_reg(u_char reg) { outb(0x22, reg); return inb(0x23); } -static __inline void +static inline void cyrix_write_reg(u_char reg, u_char data) { outb(0x22, reg); diff --git a/sys/arch/i386/i386/ipifuncs.c b/sys/arch/i386/i386/ipifuncs.c index b44bfa6319b..b2a674e25a7 100644 --- a/sys/arch/i386/i386/ipifuncs.c +++ b/sys/arch/i386/i386/ipifuncs.c @@ -1,4 +1,4 @@ -/* $NetBSD: ipifuncs.c,v 1.11 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: ipifuncs.c,v 1.12 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.11 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.12 2005/12/24 20:07:10 perry Exp $"); #include "opt_ddb.h" #include "opt_mtrr.h" @@ -108,7 +108,7 @@ i386_ipi_halt(struct cpu_info *ci) printf("%s: shutting down\n", ci->ci_dev->dv_xname); for(;;) { - __asm __volatile("hlt"); + __asm volatile("hlt"); } } diff --git a/sys/arch/i386/i386/ipkdb_glue.c b/sys/arch/i386/i386/ipkdb_glue.c index 7b631585048..73ee74531ae 100644 --- a/sys/arch/i386/i386/ipkdb_glue.c +++ b/sys/arch/i386/i386/ipkdb_glue.c @@ -1,4 +1,4 @@ -/* $NetBSD: ipkdb_glue.c,v 1.7 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: ipkdb_glue.c,v 1.8 2005/12/24 20:07:10 perry Exp $ */ /* * Copyright (C) 2000 Wolfgang Solfrank. @@ -31,7 +31,7 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ipkdb_glue.c,v 1.7 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipkdb_glue.c,v 1.8 2005/12/24 20:07:10 perry Exp $"); #include "opt_ipkdb.h" @@ -72,7 +72,7 @@ void ipkdb_trap() { ipkdb_mode = IPKDB_CMD_STEP; - __asm __volatile ("pushf; pop %%eax; orl %0,%%eax; push %%eax; popf" + __asm volatile ("pushf; pop %%eax; orl %0,%%eax; push %%eax; popf" :: "i"(PSL_T)); } @@ -87,7 +87,7 @@ ipkdb_trap_glue(frame) || (ipkdb_mode != IPKDB_CMD_STEP && frame.tf_trapno == T_TRCTRAP)) return 0; - __asm __volatile ("cli"); /* Interrupts need to be disabled while in IPKDB */ + __asm volatile ("cli"); /* Interrupts need to be disabled while in IPKDB */ ipkdbregs[EAX] = frame.tf_eax; ipkdbregs[ECX] = frame.tf_ecx; ipkdbregs[EDX] = frame.tf_edx; diff --git a/sys/arch/i386/i386/kgdb_machdep.c b/sys/arch/i386/i386/kgdb_machdep.c index 0f256d95003..c910cb0461a 100644 --- a/sys/arch/i386/i386/kgdb_machdep.c +++ b/sys/arch/i386/i386/kgdb_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_machdep.c,v 1.14 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: kgdb_machdep.c,v 1.15 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.14 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.15 2005/12/24 20:07:10 perry Exp $"); #include "opt_ddb.h" #include "opt_largepages.h" @@ -199,7 +199,7 @@ kgdb_getregs(regs, gdb_regs) */ gdb_regs[ 4] = (kgdb_reg_t)®s->tf_esp; /* kernel stack pointer */ - __asm __volatile("movw %%ss,%w0" : "=r" (gdb_regs[11])); + __asm volatile("movw %%ss,%w0" : "=r" (gdb_regs[11])); } } diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index a2b4524b219..8ab7a520cf1 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.566 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.567 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.566 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.567 2005/12/24 20:07:10 perry Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -804,7 +804,7 @@ haltsys: if (cngetc() == 0) { /* no console attached, so just hlt */ for(;;) { - __asm __volatile("hlt"); + __asm volatile("hlt"); } } cnpollc(0); @@ -2088,7 +2088,7 @@ cpu_reset() memset((caddr_t)idt, 0, NIDT * sizeof(idt[0])); setregion(®ion, idt, NIDT * sizeof(idt[0]) - 1); lidt(®ion); - __asm __volatile("divl %0,%1" : : "q" (0), "a" (0)); + __asm volatile("divl %0,%1" : : "q" (0), "a" (0)); #if 0 /* diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c index bc65b8d95ce..3ca32a3b9a3 100644 --- a/sys/arch/i386/i386/pmap.c +++ b/sys/arch/i386/i386/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.186 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: pmap.c,v 1.187 2005/12/24 20:07:10 perry Exp $ */ /* * @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.186 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.187 2005/12/24 20:07:10 perry Exp $"); #include "opt_cputype.h" #include "opt_user_ldt.h" @@ -384,7 +384,7 @@ static int pv_nfpvents; /* # of free pv entries */ #define PVE_HIWAT (PVE_LOWAT + (PVE_PER_PVPAGE * 2)) /* high water mark */ -static __inline int +static inline int pv_compare(struct pv_entry *a, struct pv_entry *b) { if (a->pv_pmap < b->pv_pmap) @@ -508,7 +508,7 @@ static boolean_t pmap_reactivate(struct pmap *); * of course the kernel is always loaded */ -__inline static boolean_t +inline static boolean_t pmap_is_curpmap(pmap) struct pmap *pmap; { @@ -521,7 +521,7 @@ pmap_is_curpmap(pmap) * pmap_is_active: is this pmap loaded into the specified processor's %cr3? */ -__inline static boolean_t +inline static boolean_t pmap_is_active(pmap, cpu_id) struct pmap *pmap; int cpu_id; @@ -535,7 +535,7 @@ pmap_is_active(pmap, cpu_id) * pmap_tmpmap_pa: map a page in for tmp usage */ -__inline static vaddr_t +inline static vaddr_t pmap_tmpmap_pa(pa) paddr_t pa; { @@ -556,7 +556,7 @@ pmap_tmpmap_pa(pa) * pmap_tmpunmap_pa: unmap a tmp use page (undoes pmap_tmpmap_pa) */ -__inline static void +inline static void pmap_tmpunmap_pa() { #ifdef MULTIPROCESSOR @@ -583,7 +583,7 @@ pmap_tmpunmap_pa() * => do NOT use this on kernel mappings [why? because pv_ptp may be NULL] */ -__inline static pt_entry_t * +inline static pt_entry_t * pmap_tmpmap_pvepte(pve) struct pv_entry *pve; { @@ -604,7 +604,7 @@ pmap_tmpmap_pvepte(pve) * pmap_tmpunmap_pvepte: release a mapping obtained with pmap_tmpmap_pvepte */ -__inline static void +inline static void pmap_tmpunmap_pvepte(pve) struct pv_entry *pve; { @@ -615,7 +615,7 @@ pmap_tmpunmap_pvepte(pve) pmap_tmpunmap_pa(); } -__inline static void +inline static void pmap_apte_flush(struct pmap *pmap) { #if defined(MULTIPROCESSOR) @@ -657,7 +657,7 @@ pmap_apte_flush(struct pmap *pmap) * => must be undone with pmap_unmap_ptes before returning */ -__inline static pt_entry_t * +inline static pt_entry_t * pmap_map_ptes(pmap) struct pmap *pmap; { @@ -707,7 +707,7 @@ pmap_map_ptes(pmap) * pmap_unmap_ptes: unlock the PTE mapping of "pmap" */ -__inline static void +inline static void pmap_unmap_ptes(pmap) struct pmap *pmap; { @@ -730,7 +730,7 @@ pmap_unmap_ptes(pmap) } } -__inline static void +inline static void pmap_exec_account(struct pmap *pm, vaddr_t va, pt_entry_t opte, pt_entry_t npte) { if (curproc == NULL || curproc->p_vmspace == NULL || @@ -1194,7 +1194,7 @@ pmap_init() * "try" is for optional functions like pmap_copy(). */ -__inline static struct pv_entry * +inline static struct pv_entry * pmap_alloc_pv(pmap, mode) struct pmap *pmap; int mode; @@ -1332,7 +1332,7 @@ pmap_add_pvpage(pvp, need_entry) * => we must be holding pvalloc_lock */ -__inline static void +inline static void pmap_free_pv_doit(pv) struct pv_entry *pv; { @@ -1367,7 +1367,7 @@ pmap_free_pv_doit(pv) * => we gain the pvalloc_lock */ -__inline static void +inline static void pmap_free_pv(pmap, pv) struct pmap *pmap; struct pv_entry *pv; @@ -1392,7 +1392,7 @@ pmap_free_pv(pmap, pv) * => we gain the pvalloc_lock */ -__inline static void +inline static void pmap_free_pvs(pmap, pvs) struct pmap *pmap; struct pv_entry *pvs; @@ -1447,7 +1447,7 @@ pmap_free_pvpage() * Observe locking order when locking both pvhs */ -__inline static void +inline static void pmap_lock_pvhs(struct pv_head *pvh1, struct pv_head *pvh2) { @@ -1484,7 +1484,7 @@ pmap_lock_pvhs(struct pv_head *pvh1, struct pv_head *pvh2) * => caller should adjust ptp's wire_count before calling */ -__inline static void +inline static void pmap_enter_pv(pvh, pve, pmap, va, ptp) struct pv_head *pvh; struct pv_entry *pve; /* preallocated pve for us to use */ @@ -1508,7 +1508,7 @@ pmap_enter_pv(pvh, pve, pmap, va, ptp) * => we return the removed pve */ -__inline static struct pv_entry * +inline static struct pv_entry * pmap_remove_pv(pvh, pmap, va) struct pv_head *pvh; struct pmap *pmap; @@ -1538,7 +1538,7 @@ pmap_remove_pv(pvh, pmap, va) * will ever leak onto the active/inactive queues) */ -__inline static struct vm_page * +inline static struct vm_page * pmap_alloc_ptp(pmap, pde_index) struct pmap *pmap; int pde_index; @@ -2260,7 +2260,7 @@ pmap_pageidlezero(pa) } #if defined(I686_CPU) if (cpu_features & CPUID_SSE2) - __asm __volatile ("movnti %1, %0" : + __asm volatile ("movnti %1, %0" : "=m"(*ptr) : "r" (0)); else #endif /* defined(I686_CPU) */ @@ -2269,7 +2269,7 @@ pmap_pageidlezero(pa) #if defined(I686_CPU) if (cpu_features & CPUID_SSE2) - __asm __volatile ("sfence" ::: "memory"); + __asm volatile ("sfence" ::: "memory"); #endif /* defined(I686_CPU) */ #ifdef DIAGNOSTIC @@ -3750,7 +3750,7 @@ pmap_tlb_shootdown(pmap, va, pte, cpumaskp) * => called at splvm if !MULTIPROCESSOR. * => return TRUE if we need to maintain user tlbs. */ -static __inline boolean_t +static inline boolean_t pmap_do_tlb_shootdown_checktlbstate(struct cpu_info *ci) { diff --git a/sys/arch/i386/i386/process_machdep.c b/sys/arch/i386/i386/process_machdep.c index ab72cfc176f..ccde3eb4a7d 100644 --- a/sys/arch/i386/i386/process_machdep.c +++ b/sys/arch/i386/i386/process_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: process_machdep.c,v 1.53 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: process_machdep.c,v 1.54 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.53 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.54 2005/12/24 20:07:10 perry Exp $"); #include "opt_vm86.h" #include "npx.h" @@ -83,14 +83,14 @@ __KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.53 2005/12/11 12:17:41 christo #include <machine/vm86.h> #endif -static __inline struct trapframe * +static inline struct trapframe * process_frame(struct lwp *l) { return (l->l_md.md_regs); } -static __inline union savefpu * +static inline union savefpu * process_fpframe(struct lwp *l) { diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index 15af04b7a26..b6af28152d3 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.206 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: trap.c,v 1.207 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1998, 2000, 2005 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.206 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.207 2005/12/24 20:07:10 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -126,7 +126,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.206 2005/12/11 12:17:41 christos Exp $"); #include "npx.h" -static __inline int xmm_si_code(struct lwp *); +static inline int xmm_si_code(struct lwp *); void trap(struct trapframe *); void trap_tss(struct i386tss *, int, int); #if defined(I386_CPU) @@ -200,7 +200,7 @@ trap_tss(struct i386tss *tss, int trapno, int code) trap(&tf); } -static __inline int +static inline int xmm_si_code(struct lwp *l) { uint32_t mxcsr, mask; diff --git a/sys/arch/i386/i386/vm86.c b/sys/arch/i386/i386/vm86.c index 53cc156fd0e..d520b325134 100644 --- a/sys/arch/i386/i386/vm86.c +++ b/sys/arch/i386/i386/vm86.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm86.c,v 1.39 2005/12/11 12:17:41 christos Exp $ */ +/* $NetBSD: vm86.c,v 1.40 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vm86.c,v 1.39 2005/12/11 12:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm86.c,v 1.40 2005/12/24 20:07:10 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -65,7 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: vm86.c,v 1.39 2005/12/11 12:17:41 christos Exp $"); #include <machine/vm86.h> static void fast_intxx(struct lwp *, int); -static __inline int is_bitset(int, caddr_t); +static inline int is_bitset(int, caddr_t); #define CS(tf) (*(u_short *)&tf->tf_cs) #define IP(tf) (*(u_short *)&tf->tf_eip) @@ -110,7 +110,7 @@ static __inline int is_bitset(int, caddr_t); dword = w1 | w2 << 16; \ } while (0) -static __inline int +static inline int is_bitset(nr, bitmap) int nr; caddr_t bitmap; diff --git a/sys/arch/i386/include/acpi_func.h b/sys/arch/i386/include/acpi_func.h index 8567394d13d..05c7b71942e 100644 --- a/sys/arch/i386/include/acpi_func.h +++ b/sys/arch/i386/include/acpi_func.h @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_func.h,v 1.5 2005/12/11 12:17:43 christos Exp $ */ +/* $NetBSD: acpi_func.h,v 1.6 2005/12/24 20:07:10 perry Exp $ */ #include <machine/cpufunc.h> @@ -9,7 +9,7 @@ #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - __asm __volatile( \ + __asm volatile( \ "1: movl %1,%%eax ;" \ " movl %%eax,%%edx ;" \ " andl %2,%%edx ;" \ @@ -28,7 +28,7 @@ do { \ #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - __asm __volatile( \ + __asm volatile( \ "1: movl %1,%%eax ;" \ " andl %2,%%edx ;" \ " lock ;" \ diff --git a/sys/arch/i386/include/atomic.h b/sys/arch/i386/include/atomic.h index 941422223b8..819b0a1bd0f 100644 --- a/sys/arch/i386/include/atomic.h +++ b/sys/arch/i386/include/atomic.h @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.h,v 1.3 2003/02/26 21:28:59 fvdl Exp $ */ +/* $NetBSD: atomic.h,v 1.4 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -43,26 +43,26 @@ #ifndef _LOCORE -static __inline unsigned long +static inline unsigned long x86_atomic_testset_ul (volatile u_int32_t *ptr, unsigned long val) { __asm__ volatile ("xchgl %0,(%2)" :"=r" (val):"0" (val),"r" (ptr)); return val; } -static __inline int +static inline int x86_atomic_testset_i (volatile int *ptr, int val) { __asm__ volatile ("xchgl %0,(%2)" :"=r" (val):"0" (val),"r" (ptr)); return val; } -static __inline void +static inline void x86_atomic_setbits_l (volatile u_int32_t *ptr, unsigned long bits) { - __asm __volatile("lock ; orl %1,%0" : "=m" (*ptr) : "ir" (bits)); + __asm volatile("lock ; orl %1,%0" : "=m" (*ptr) : "ir" (bits)); } -static __inline void +static inline void x86_atomic_clearbits_l (volatile u_int32_t *ptr, unsigned long bits) { - __asm __volatile("lock ; andl %1,%0" : "=m" (*ptr) : "ir" (~bits)); + __asm volatile("lock ; andl %1,%0" : "=m" (*ptr) : "ir" (~bits)); } #endif diff --git a/sys/arch/i386/include/byte_swap.h b/sys/arch/i386/include/byte_swap.h index 8496392e352..94969b86783 100644 --- a/sys/arch/i386/include/byte_swap.h +++ b/sys/arch/i386/include/byte_swap.h @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap.h,v 1.6 2001/11/29 02:46:55 lukem Exp $ */ +/* $NetBSD: byte_swap.h,v 1.7 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -46,13 +46,13 @@ #endif -static __inline u_int32_t __byte_swap_long_variable(u_int32_t); -static __inline u_int16_t __byte_swap_word_variable(u_int16_t); +static inline u_int32_t __byte_swap_long_variable(u_int32_t); +static inline u_int16_t __byte_swap_word_variable(u_int16_t); -static __inline u_int32_t +static inline u_int32_t __byte_swap_long_variable(u_int32_t x) { - __asm __volatile ( + __asm volatile ( #if defined(_KERNEL) && !defined(_LKM) && !defined(I386_CPU) "bswap %1" #else @@ -62,10 +62,10 @@ __byte_swap_long_variable(u_int32_t x) return (x); } -static __inline u_int16_t +static inline u_int16_t __byte_swap_word_variable(u_int16_t x) { - __asm __volatile ("rorw $8, %w1" : "=r" (x) : "0" (x)); + __asm volatile ("rorw $8, %w1" : "=r" (x) : "0" (x)); return (x); } diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h index d5fd9147c44..d823b3c418c 100644 --- a/sys/arch/i386/include/cpu.h +++ b/sys/arch/i386/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.118 2005/08/11 20:32:55 cube Exp $ */ +/* $NetBSD: cpu.h,v 1.119 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -192,12 +192,12 @@ extern struct cpu_info *cpu_info_list; static struct cpu_info *curcpu(void); -__inline static struct cpu_info * __attribute__((__unused__)) +inline static struct cpu_info * __attribute__((__unused__)) curcpu() { struct cpu_info *ci; - __asm __volatile("movl %%fs:%1, %0" : + __asm volatile("movl %%fs:%1, %0" : "=r" (ci) : "m" (*(struct cpu_info * const *)offsetof(struct cpu_info, ci_self))); diff --git a/sys/arch/i386/include/cpu_counter.h b/sys/arch/i386/include/cpu_counter.h index a7edb2d54c4..752147675b9 100644 --- a/sys/arch/i386/include/cpu_counter.h +++ b/sys/arch/i386/include/cpu_counter.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_counter.h,v 1.2 2005/06/25 00:08:35 fair Exp $ */ +/* $NetBSD: cpu_counter.h,v 1.3 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ #ifdef _KERNEL -static __inline int +static inline int cpu_hascounter(void) { @@ -71,21 +71,21 @@ cpu_hascounter(void) #endif } -static __inline uint64_t +static inline uint64_t cpu_counter(void) { return (rdtsc()); } -static __inline uint32_t +static inline uint32_t cpu_counter32(void) { return (rdtsc() & 0xffffffffUL); } -static __inline uint64_t +static inline uint64_t cpu_frequency(struct cpu_info *ci) { diff --git a/sys/arch/i386/include/cpufunc.h b/sys/arch/i386/include/cpufunc.h index f9cdbc4151a..cdff9816fbc 100644 --- a/sys/arch/i386/include/cpufunc.h +++ b/sys/arch/i386/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.28 2004/01/14 11:31:55 yamt Exp $ */ +/* $NetBSD: cpufunc.h,v 1.29 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -48,101 +48,101 @@ #include <machine/specialreg.h> -static __inline void +static inline void x86_pause(void) { - __asm __volatile("pause"); + __asm volatile("pause"); } -static __inline void +static inline void x86_lfence(void) { /* * XXX it's better to use real lfence insn if available. */ - __asm __volatile("lock; addl $0, 0(%%esp)" : : : "memory"); + __asm volatile("lock; addl $0, 0(%%esp)" : : : "memory"); } #ifdef _KERNEL extern unsigned int cpu_feature; -static __inline void +static inline void invlpg(u_int addr) { - __asm __volatile("invlpg (%0)" : : "r" (addr) : "memory"); + __asm volatile("invlpg (%0)" : : "r" (addr) : "memory"); } -static __inline void +static inline void lidt(void *p) { - __asm __volatile("lidt (%0)" : : "r" (p)); + __asm volatile("lidt (%0)" : : "r" (p)); } -static __inline void +static inline void lldt(u_short sel) { - __asm __volatile("lldt %0" : : "r" (sel)); + __asm volatile("lldt %0" : : "r" (sel)); } -static __inline void +static inline void ltr(u_short sel) { - __asm __volatile("ltr %0" : : "r" (sel)); + __asm volatile("ltr %0" : : "r" (sel)); } -static __inline void +static inline void lcr0(u_int val) { - __asm __volatile("movl %0,%%cr0" : : "r" (val)); + __asm volatile("movl %0,%%cr0" : : "r" (val)); } -static __inline u_int +static inline u_int rcr0(void) { u_int val; - __asm __volatile("movl %%cr0,%0" : "=r" (val)); + __asm volatile("movl %%cr0,%0" : "=r" (val)); return val; } -static __inline u_int +static inline u_int rcr2(void) { u_int val; - __asm __volatile("movl %%cr2,%0" : "=r" (val)); + __asm volatile("movl %%cr2,%0" : "=r" (val)); return val; } -static __inline void +static inline void lcr3(u_int val) { - __asm __volatile("movl %0,%%cr3" : : "r" (val)); + __asm volatile("movl %0,%%cr3" : : "r" (val)); } -static __inline u_int +static inline u_int rcr3(void) { u_int val; - __asm __volatile("movl %%cr3,%0" : "=r" (val)); + __asm volatile("movl %%cr3,%0" : "=r" (val)); return val; } -static __inline void +static inline void lcr4(u_int val) { - __asm __volatile("movl %0,%%cr4" : : "r" (val)); + __asm volatile("movl %0,%%cr4" : : "r" (val)); } -static __inline u_int +static inline u_int rcr4(void) { u_int val; - __asm __volatile("movl %%cr4,%0" : "=r" (val)); + __asm volatile("movl %%cr4,%0" : "=r" (val)); return val; } -static __inline void +static inline void tlbflush(void) { u_int val; @@ -150,7 +150,7 @@ tlbflush(void) lcr3(val); } -static __inline void +static inline void tlbflushg(void) { /* @@ -191,95 +191,95 @@ void setidt(int idx, /*XXX*/caddr_t func, int typ, int dpl); /* debug register */ void dr0(caddr_t, u_int32_t, u_int32_t, u_int32_t); -static __inline u_int +static inline u_int rdr6(void) { u_int val; - __asm __volatile("movl %%dr6,%0" : "=r" (val)); + __asm volatile("movl %%dr6,%0" : "=r" (val)); return val; } -static __inline void +static inline void ldr6(u_int val) { - __asm __volatile("movl %0,%%dr6" : : "r" (val)); + __asm volatile("movl %0,%%dr6" : : "r" (val)); } /* XXXX ought to be in psl.h with spl() functions */ -static __inline void +static inline void disable_intr(void) { - __asm __volatile("cli"); + __asm volatile("cli"); } -static __inline void +static inline void enable_intr(void) { - __asm __volatile("sti"); + __asm volatile("sti"); } -static __inline u_long +static inline u_long read_eflags(void) { u_long ef; - __asm __volatile("pushfl; popl %0" : "=r" (ef)); + __asm volatile("pushfl; popl %0" : "=r" (ef)); return (ef); } -static __inline void +static inline void write_eflags(u_long ef) { - __asm __volatile("pushl %0; popfl" : : "r" (ef)); + __asm volatile("pushl %0; popfl" : : "r" (ef)); } -static __inline u_int64_t +static inline u_int64_t rdmsr(u_int msr) { u_int64_t rv; - __asm __volatile("rdmsr" : "=A" (rv) : "c" (msr)); + __asm volatile("rdmsr" : "=A" (rv) : "c" (msr)); return (rv); } -static __inline void +static inline void wrmsr(u_int msr, u_int64_t newval) { - __asm __volatile("wrmsr" : : "A" (newval), "c" (msr)); + __asm volatile("wrmsr" : : "A" (newval), "c" (msr)); } -static __inline void +static inline void wbinvd(void) { - __asm __volatile("wbinvd"); + __asm volatile("wbinvd"); } -static __inline u_int64_t +static inline u_int64_t rdtsc(void) { u_int64_t rv; - __asm __volatile("rdtsc" : "=A" (rv)); + __asm volatile("rdtsc" : "=A" (rv)); return (rv); } -static __inline u_int64_t +static inline u_int64_t rdpmc(u_int pmc) { u_int64_t rv; - __asm __volatile("rdpmc" : "=A" (rv) : "c" (pmc)); + __asm volatile("rdpmc" : "=A" (rv) : "c" (pmc)); return (rv); } /* Break into DDB/KGDB. */ -static __inline void +static inline void breakpoint(void) { - __asm __volatile("int $3"); + __asm volatile("int $3"); } #define read_psl() read_eflags() diff --git a/sys/arch/i386/include/int_mwgwtypes.h b/sys/arch/i386/include/int_mwgwtypes.h index 75b1dc059f2..3113d27cc81 100644 --- a/sys/arch/i386/include/int_mwgwtypes.h +++ b/sys/arch/i386/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.4 2004/05/22 14:16:59 kleink Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.5 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; @@ -63,7 +63,7 @@ typedef unsigned long long int uint_least64_t; /* 7.18.1.3 Fastest minimum-width integer types */ -typedef __signed char int_fast8_t; +typedef signed char int_fast8_t; typedef unsigned char uint_fast8_t; typedef int int_fast16_t; typedef unsigned int uint_fast16_t; diff --git a/sys/arch/i386/include/int_types.h b/sys/arch/i386/include/int_types.h index 7b578eeecbe..db41141762b 100644 --- a/sys/arch/i386/include/int_types.h +++ b/sys/arch/i386/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.9 2005/05/25 20:58:00 kleink Exp $ */ +/* $NetBSD: int_types.h,v 1.10 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h index 3da978a34ba..c5127d700ca 100644 --- a/sys/arch/i386/include/pmap.h +++ b/sys/arch/i386/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.83 2005/08/08 05:54:07 junyoung Exp $ */ +/* $NetBSD: pmap.h,v 1.84 2005/12/24 20:07:10 perry Exp $ */ /* * @@ -370,7 +370,7 @@ boolean_t pmap_pageidlezero(paddr_t); */ /*ARGSUSED*/ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ @@ -381,7 +381,7 @@ pmap_remove_all(struct pmap *pmap) * if hardware doesn't support one-page flushing) */ -__inline static void __attribute__((__unused__)) +inline static void __attribute__((__unused__)) pmap_update_pg(vaddr_t va) { #if defined(I386_CPU) @@ -396,7 +396,7 @@ pmap_update_pg(vaddr_t va) * pmap_update_2pg: flush two pages from the TLB */ -__inline static void __attribute__((__unused__)) +inline static void __attribute__((__unused__)) pmap_update_2pg(vaddr_t va, vaddr_t vb) { #if defined(I386_CPU) @@ -419,7 +419,7 @@ pmap_update_2pg(vaddr_t va, vaddr_t vb) * unprotecting a page is done on-demand at fault time. */ -__inline static void __attribute__((__unused__)) +inline static void __attribute__((__unused__)) pmap_page_protect(struct vm_page *pg, vm_prot_t prot) { if ((prot & VM_PROT_WRITE) == 0) { @@ -439,7 +439,7 @@ pmap_page_protect(struct vm_page *pg, vm_prot_t prot) * unprotecting a page is done on-demand at fault time. */ -__inline static void __attribute__((__unused__)) +inline static void __attribute__((__unused__)) pmap_protect(struct pmap *pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot) { if ((prot & VM_PROT_WRITE) == 0) { @@ -462,7 +462,7 @@ pmap_protect(struct pmap *pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot) #include <lib/libkern/libkern.h> -static __inline pt_entry_t * __attribute__((__unused__)) +static inline pt_entry_t * __attribute__((__unused__)) vtopte(vaddr_t va) { @@ -471,7 +471,7 @@ vtopte(vaddr_t va) return (PTE_BASE + x86_btop(va)); } -static __inline pt_entry_t * __attribute__((__unused__)) +static inline pt_entry_t * __attribute__((__unused__)) kvtopte(vaddr_t va) { diff --git a/sys/arch/i386/include/proc.h b/sys/arch/i386/include/proc.h index cb67c005273..bc6f7710a00 100644 --- a/sys/arch/i386/include/proc.h +++ b/sys/arch/i386/include/proc.h @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.26 2004/02/21 04:31:40 junyoung Exp $ */ +/* $NetBSD: proc.h,v 1.27 2005/12/24 20:07:10 perry Exp $ */ /* * Copyright (c) 1991 Regents of the University of California. @@ -56,7 +56,7 @@ struct mdproc { int md_flags; void (*md_syscall)(struct trapframe *); /* Syscall handling function */ - __volatile int md_astpending; /* AST pending for this process */ + volatile int md_astpending; /* AST pending for this process */ }; /* md_flags */ diff --git a/sys/arch/i386/include/profile.h b/sys/arch/i386/include/profile.h index 3de36bbfe4c..ed3fa07ed3b 100644 --- a/sys/arch/i386/include/profile.h +++ b/sys/arch/i386/include/profile.h @@ -1,4 +1,4 @@ -/* $NetBSD: profile.h,v 1.22 2005/10/02 15:34:17 chs Exp $ */ +/* $NetBSD: profile.h,v 1.23 2005/12/24 20:07:10 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #include <machine/cpufunc.h> -#define _MCOUNT_DECL static __inline void _mcount +#define _MCOUNT_DECL static inline void _mcount #ifdef __ELF__ #define MCOUNT_ENTRY "__mcount" diff --git a/sys/arch/i386/include/types.h b/sys/arch/i386/include/types.h index 2d9efa019a6..8229f80d661 100644 --- a/sys/arch/i386/include/types.h +++ b/sys/arch/i386/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.45 2004/01/18 18:23:19 martin Exp $ */ +/* $NetBSD: types.h,v 1.46 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -56,7 +56,7 @@ typedef int pmc_evid_t; typedef __uint64_t pmc_ctr_t; typedef int register_t; -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/i386/include/userret.h b/sys/arch/i386/include/userret.h index fac41306c4f..ad999b6bca0 100644 --- a/sys/arch/i386/include/userret.h +++ b/sys/arch/i386/include/userret.h @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.6 2003/10/31 16:44:35 cl Exp $ */ +/* $NetBSD: userret.h,v 1.7 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -71,13 +71,13 @@ #include <sys/userret.h> -static __inline void userret(register struct lwp *); +static inline void userret(register struct lwp *); /* * Define the code needed before returning to user mode, for * trap and syscall. */ -static __inline void +static inline void userret(l) register struct lwp *l; { diff --git a/sys/arch/i386/include/vm86.h b/sys/arch/i386/include/vm86.h index 4590cd0081b..3564170f979 100644 --- a/sys/arch/i386/include/vm86.h +++ b/sys/arch/i386/include/vm86.h @@ -1,4 +1,4 @@ -/* $NetBSD: vm86.h,v 1.12 2003/10/27 13:44:20 junyoung Exp $ */ +/* $NetBSD: vm86.h,v 1.13 2005/12/24 20:07:10 perry Exp $ */ #undef VM86_USE_VIF @@ -82,14 +82,14 @@ int compat_16_i386_vm86(struct lwp *, char *, register_t *); #endif void vm86_gpfault(struct lwp *, int); void vm86_return(struct lwp *, int); -static __inline void clr_vif(struct lwp *); -static __inline void set_vif(struct lwp *); -static __inline void set_vflags(struct lwp *, int); -static __inline int get_vflags(struct lwp *); -static __inline void set_vflags_short(struct lwp *, int); -static __inline int get_vflags_short(struct lwp *); - -static __inline void +static inline void clr_vif(struct lwp *); +static inline void set_vif(struct lwp *); +static inline void set_vflags(struct lwp *, int); +static inline int get_vflags(struct lwp *); +static inline void set_vflags_short(struct lwp *, int); +static inline int get_vflags_short(struct lwp *); + +static inline void clr_vif(l) struct lwp *l; { @@ -102,7 +102,7 @@ clr_vif(l) #endif } -static __inline void +static inline void set_vif(l) struct lwp *l; { @@ -118,7 +118,7 @@ set_vif(l) vm86_return(l, VM86_STI); } -static __inline void +static inline void set_vflags(l, flags) struct lwp *l; int flags; @@ -137,7 +137,7 @@ set_vflags(l, flags) vm86_return(l, VM86_STI); } -static __inline int +static inline int get_vflags(l) struct lwp *l; { @@ -150,7 +150,7 @@ get_vflags(l) return (flags); } -static __inline void +static inline void set_vflags_short(l, flags) struct lwp *l; int flags; @@ -167,7 +167,7 @@ set_vflags_short(l, flags) #endif } -static __inline int +static inline int get_vflags_short(l) struct lwp *l; { diff --git a/sys/arch/i386/isa/clock.c b/sys/arch/i386/isa/clock.c index c4a736b4d09..686c884c8a9 100644 --- a/sys/arch/i386/isa/clock.c +++ b/sys/arch/i386/isa/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.88 2005/12/11 12:17:43 christos Exp $ */ +/* $NetBSD: clock.c,v 1.89 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -121,7 +121,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.88 2005/12/11 12:17:43 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.89 2005/12/24 20:07:10 perry Exp $"); /* #define CLOCKDEBUG */ /* #define CLOCK_PARANOIA */ @@ -193,11 +193,11 @@ static int clock_expandyear(int); static inline int gettick_broken_latch(void); -__inline u_int mc146818_read(void *, u_int); -__inline void mc146818_write(void *, u_int, u_int); +inline u_int mc146818_read(void *, u_int); +inline void mc146818_write(void *, u_int, u_int); /* XXX use sc? */ -__inline u_int +inline u_int mc146818_read(void *sc, u_int reg) { @@ -206,7 +206,7 @@ mc146818_read(void *sc, u_int reg) } /* XXX use sc? */ -__inline void +inline void mc146818_write(void *sc, u_int reg, u_int datum) { @@ -517,10 +517,10 @@ i8254_delay(int n) * quantity to prevent loss of significance. */ int m; - __asm __volatile("mul %3" + __asm volatile("mul %3" : "=a" (n), "=d" (m) : "0" (n), "r" (TIMER_FREQ)); - __asm __volatile("div %4" + __asm volatile("div %4" : "=a" (n), "=d" (m) : "0" (n), "1" (m), "r" (1000000)); #else diff --git a/sys/arch/i386/isa/npx.c b/sys/arch/i386/isa/npx.c index 643f56891a0..414ec33574d 100644 --- a/sys/arch/i386/isa/npx.c +++ b/sys/arch/i386/isa/npx.c @@ -1,4 +1,4 @@ -/* $NetBSD: npx.c,v 1.108 2005/12/11 12:17:43 christos Exp $ */ +/* $NetBSD: npx.c,v 1.109 2005/12/24 20:07:10 perry Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.108 2005/12/11 12:17:43 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.109 2005/12/24 20:07:10 perry Exp $"); #if 0 #define IPRINTF(x) printf x @@ -158,7 +158,7 @@ extern int i386_fpu_fdivbug; struct npx_softc *npx_softc; -static __inline void +static inline void fpu_save(union savefpu *addr) { #ifdef I686_CPU diff --git a/sys/arch/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c index 7b5ec3e31ff..e8f973cf425 100644 --- a/sys/arch/i386/isa/pccons.c +++ b/sys/arch/i386/isa/pccons.c @@ -1,4 +1,4 @@ -/* $NetBSD: pccons.c,v 1.174 2005/12/11 12:17:43 christos Exp $ */ +/* $NetBSD: pccons.c,v 1.175 2005/12/24 20:07:11 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.174 2005/12/11 12:17:43 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.175 2005/12/24 20:07:11 perry Exp $"); #include "opt_ddb.h" #include "opt_xserver.h" @@ -297,9 +297,9 @@ void update_leds(void); #endif #if (NPCCONSKBD == 0) -static __inline int kbd_wait_output(void); -static __inline int kbd_wait_input(void); -static __inline void kbd_flush_input(void); +static inline int kbd_wait_output(void); +static inline int kbd_wait_input(void); +static inline void kbd_flush_input(void); static u_char kbc_get8042cmd(void); static int kbc_put8042cmd(u_char); #endif @@ -320,7 +320,7 @@ void pccnpollc(dev_t, int); { u_char x = inb(0x84); (void) x; } \ { u_char x = inb(0x84); (void) x; } -static __inline int +static inline int kbd_wait_output(void) { u_int i; @@ -333,7 +333,7 @@ kbd_wait_output(void) return (0); } -static __inline int +static inline int kbd_wait_input(void) { u_int i; @@ -346,7 +346,7 @@ kbd_wait_input(void) return (0); } -static __inline void +static inline void kbd_flush_input(void) { u_int i; diff --git a/sys/arch/i386/pci/gscpcib.c b/sys/arch/i386/pci/gscpcib.c index 4f74acabfad..16abd378875 100644 --- a/sys/arch/i386/pci/gscpcib.c +++ b/sys/arch/i386/pci/gscpcib.c @@ -1,4 +1,4 @@ -/* $NetBSD: gscpcib.c,v 1.3 2005/12/11 12:17:43 christos Exp $ */ +/* $NetBSD: gscpcib.c,v 1.4 2005/12/24 20:07:11 perry Exp $ */ /* $OpenBSD: gscpcib.c,v 1.3 2004/10/05 19:02:33 grange Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> @@ -139,7 +139,7 @@ corepcib: } #ifndef SMALL_KERNEL -static __inline void +static inline void gscpcib_gpio_pin_select(struct gscpcib_softc *sc, int pin) { bus_space_write_4(sc->sc_gpio_iot, sc->sc_gpio_ioh, GSCGPIO_SEL, pin); diff --git a/sys/arch/i386/pci/pcibios.c b/sys/arch/i386/pci/pcibios.c index cb2159ebe68..1f9c93c5fa1 100644 --- a/sys/arch/i386/pci/pcibios.c +++ b/sys/arch/i386/pci/pcibios.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcibios.c,v 1.29 2005/12/11 12:17:44 christos Exp $ */ +/* $NetBSD: pcibios.c,v 1.30 2005/12/24 20:07:11 perry Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcibios.c,v 1.29 2005/12/11 12:17:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcibios.c,v 1.30 2005/12/24 20:07:11 perry Exp $"); #include "opt_pcibios.h" #include "opt_pcifixup.h" @@ -369,7 +369,7 @@ pcibios_get_status(u_int32_t *rev_maj, u_int32_t *rev_min, u_int32_t edx; int rv; - __asm __volatile("lcall *(%%edi) ; \ + __asm volatile("lcall *(%%edi) ; \ jc 1f ; \ xor %%ah, %%ah ; \ 1:" @@ -415,7 +415,7 @@ pcibios_get_intr_routing(struct pcibios_intr_routing *table, memset(table, 0, args.size); - __asm __volatile("lcall *(%%esi) ; \ + __asm volatile("lcall *(%%esi) ; \ jc 1f ; \ xor %%ah, %%ah ; \ 1: movw %w2, %%ds ; \ @@ -629,7 +629,7 @@ pcibios_biosroute(int bus, int device, int func, int pin, int irq) bx = (bus << 8) | (device << 3) | func; cx = (irq << 8) | (0xa + pin); - __asm __volatile("lcall *(%%esi) ; \ + __asm volatile("lcall *(%%esi) ; \ jc 1f ; \ xor %%ah, %%ah ; \ 1: movw %w1, %%ds ; \ diff --git a/sys/arch/ibmnws/ibmnws/machdep.c b/sys/arch/ibmnws/ibmnws/machdep.c index 478a546ae58..fb58c60e0c3 100644 --- a/sys/arch/ibmnws/ibmnws/machdep.c +++ b/sys/arch/ibmnws/ibmnws/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.3 2005/12/11 12:17:50 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.4 2005/12/24 20:07:11 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -234,7 +234,7 @@ cpu_startup() int msr; splraise(-1); - __asm __volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" + __asm volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" : "=r"(msr) : "K"(PSL_EE)); } diff --git a/sys/arch/ibmnws/include/intr.h b/sys/arch/ibmnws/include/intr.h index 25105549776..d5bc2d45b4c 100644 --- a/sys/arch/ibmnws/include/intr.h +++ b/sys/arch/ibmnws/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.2 2005/12/11 12:17:50 christos Exp $ */ +/* $NetBSD: intr.h,v 1.3 2005/12/24 20:07:11 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -93,9 +93,9 @@ void isa_intr_mask(int); void isa_intr_clr(int); void isa_setirqstat(int, int, int); -static __inline int splraise(int); -static __inline void spllower(int); -static __inline void set_sint(int); +static inline int splraise(int); +static inline void spllower(int); +static inline void set_sint(int); extern volatile int cpl, ipending, astpending, tickspending; extern int imen; @@ -111,7 +111,7 @@ extern vaddr_t prep_intr_reg; * achieved with the "eieio" instruction which the assembler * seems to detect and then doesn't move instructions past.... */ -static __inline int +static inline int splraise(int newcpl) { int oldcpl; @@ -123,7 +123,7 @@ splraise(int newcpl) return(oldcpl); } -static __inline void +static inline void spllower(int newcpl) { @@ -136,7 +136,7 @@ spllower(int newcpl) /* Following code should be implemented with lwarx/stwcx to avoid * the disable/enable. i need to read the manual once more.... */ -static __inline void +static inline void set_sint(int pending) { int msrsave; diff --git a/sys/arch/ibmnws/include/kgdb.h b/sys/arch/ibmnws/include/kgdb.h index 96f120c69e4..39f11a9200d 100644 --- a/sys/arch/ibmnws/include/kgdb.h +++ b/sys/arch/ibmnws/include/kgdb.h @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb.h,v 1.2 2005/12/11 12:17:50 christos Exp $ */ +/* $NetBSD: kgdb.h,v 1.3 2005/12/24 20:07:11 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -45,7 +45,7 @@ extern int kgdbregs[NREG]; extern char kgdbstep; /* Doesn't handle overlapping regions */ -__inline extern void +inline extern void kgdbcopy(s,d,n) void *s, *d; int n; @@ -56,7 +56,7 @@ kgdbcopy(s,d,n) *dp++ = *sp++; } -__inline extern void +inline extern void kgdbzero(d,n) void *d; int n; @@ -67,7 +67,7 @@ kgdbzero(d,n) *dp++ = 0; } -__inline extern int +inline extern int kgdbcmp(s,d,n) void *s, *d; { diff --git a/sys/arch/iyonix/include/intr.h b/sys/arch/iyonix/include/intr.h index deaa20496dd..1b144c7da1a 100644 --- a/sys/arch/iyonix/include/intr.h +++ b/sys/arch/iyonix/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.2 2005/12/11 12:17:51 christos Exp $ */ +/* $NetBSD: intr.h,v 1.3 2005/12/24 20:07:14 perry Exp $ */ /* * Copyright (c) 2001, 2003 Wasabi Systems, Inc. @@ -98,14 +98,14 @@ void _setsoftintr(int); * void splx(int); * void _setsoftintr(int); * - * These may be defined as functions, static __inline functions, or macros, + * These may be defined as functions, static inline functions, or macros, * but there must be a _spllower() and splx() defined as functions callable * from assembly language (for cpu_switch()). However, since it's quite * useful to be able to inline splx(), you could do something like the * following: * * in <boardtype>_intr.h: - * static __inline int + * static inline int * boardtype_splx(int spl) * {...} * diff --git a/sys/arch/iyonix/iyonix/iyonix_machdep.c b/sys/arch/iyonix/iyonix/iyonix_machdep.c index 636ab07ceb0..23ce2baac29 100644 --- a/sys/arch/iyonix/iyonix/iyonix_machdep.c +++ b/sys/arch/iyonix/iyonix/iyonix_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: iyonix_machdep.c,v 1.3 2005/12/11 12:17:51 christos Exp $ */ +/* $NetBSD: iyonix_machdep.c,v 1.4 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.3 2005/12/11 12:17:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.4 2005/12/24 20:07:15 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -315,7 +315,7 @@ cpu_reboot(int howto, char *bootstr) * and poke the Internal Bus and Peripheral Bus reset lines. */ (void) disable_interrupts(I32_bit|F32_bit); - *(__volatile uint32_t *)(IYONIX_80321_VBASE + VERDE_ATU_BASE + + *(volatile uint32_t *)(IYONIX_80321_VBASE + VERDE_ATU_BASE + ATU_PCSR) = PCSR_RIB | PCSR_RPB; /* ...and if that didn't work, just croak. */ diff --git a/sys/arch/luna68k/include/bus.h b/sys/arch/luna68k/include/bus.h index 40405c434c9..51a78bfb0ec 100644 --- a/sys/arch/luna68k/include/bus.h +++ b/sys/arch/luna68k/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.6 2005/12/11 12:17:52 christos Exp $ */ +/* $NetBSD: bus.h,v 1.7 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -173,7 +173,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_read_multi_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -187,7 +187,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_read_multi_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -201,7 +201,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_read_multi_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -229,7 +229,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_read_region_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -243,7 +243,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_read_region_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -257,7 +257,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_read_region_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -306,7 +306,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_write_multi_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -320,7 +320,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_write_multi_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -334,7 +334,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_write_multi_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -362,7 +362,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_write_region_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -376,7 +376,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_write_region_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -390,7 +390,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_write_region_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -418,7 +418,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_set_multi_1(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -433,7 +433,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_set_multi_2(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -448,7 +448,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_set_multi_4(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -477,7 +477,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_set_region_1(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -492,7 +492,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_set_region_2(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -507,7 +507,7 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #define bus_space_set_region_4(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -536,13 +536,13 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, */ #define __MACHINE_copy_region_N(BYTES) \ -static __inline void __CONCAT(bus_space_copy_region_,BYTES) \ +static inline void __CONCAT(bus_space_copy_region_,BYTES) \ __P((bus_space_tag_t, \ bus_space_handle_t bsh1, bus_size_t off1, \ bus_space_handle_t bsh2, bus_size_t off2, \ bus_size_t count)); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)(t, h1, o1, h2, o2, c) \ bus_space_tag_t t; \ bus_space_handle_t h1, h2; \ diff --git a/sys/arch/luna68k/include/cpu.h b/sys/arch/luna68k/include/cpu.h index 572ffc56450..dd74e6731da 100644 --- a/sys/arch/luna68k/include/cpu.h +++ b/sys/arch/luna68k/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.11 2005/12/11 12:17:52 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.12 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -166,9 +166,9 @@ extern unsigned char ssir; #define SIR_CLOCK 0x2 #define siron(x) \ - __asm __volatile ("orb %0,%1" : : "di" ((u_char)(x)), "g" (ssir)) + __asm volatile ("orb %0,%1" : : "di" ((u_char)(x)), "g" (ssir)) #define siroff(x) \ - __asm __volatile ("andb %0,%1" : : "di" ((u_char)~(x)), "g" (ssir)) + __asm volatile ("andb %0,%1" : : "di" ((u_char)~(x)), "g" (ssir)) #define setsoftnet() siron(SIR_NET) #define setsoftclock() siron(SIR_CLOCK) diff --git a/sys/arch/m68k/fpe/fpu_subr.c b/sys/arch/m68k/fpe/fpu_subr.c index 2425cab01d4..ac1f77c15e1 100644 --- a/sys/arch/m68k/fpe/fpu_subr.c +++ b/sys/arch/m68k/fpe/fpu_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_subr.c,v 1.7 2005/12/11 12:17:52 christos Exp $ */ +/* $NetBSD: fpu_subr.c,v 1.8 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v 1.7 2005/12/11 12:17:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v 1.8 2005/12/24 20:07:15 perry Exp $"); #include <sys/types.h> #include <sys/systm.h> @@ -165,7 +165,7 @@ fpu_norm(register struct fpn *fp) * We have a supernormal number. We need to shift it right. * We may assume m2==0. */ - __asm __volatile("bfffo %1{#0:#32},%0" : "=d"(rsh) : "g"(m0)); + __asm volatile("bfffo %1{#0:#32},%0" : "=d"(rsh) : "g"(m0)); rsh = 31 - rsh - FP_LG; exp += rsh; lsh = 32 - rsh; @@ -177,7 +177,7 @@ fpu_norm(register struct fpn *fp) * We have a regular denorm (a subnormal number), and need * to shift it left. */ - __asm __volatile("bfffo %1{#0:#32},%0" : "=d"(lsh) : "g"(m0)); + __asm volatile("bfffo %1{#0:#32},%0" : "=d"(lsh) : "g"(m0)); lsh = FP_LG - 31 + lsh; exp -= lsh; rsh = 32 - lsh; diff --git a/sys/arch/m68k/include/asm_single.h b/sys/arch/m68k/include/asm_single.h index b3f435c4217..90a28053742 100644 --- a/sys/arch/m68k/include/asm_single.h +++ b/sys/arch/m68k/include/asm_single.h @@ -1,4 +1,4 @@ -/* $NetBSD: asm_single.h,v 1.4 2002/01/25 16:42:22 thorpej Exp $ */ +/* $NetBSD: asm_single.h,v 1.5 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. @@ -41,34 +41,34 @@ */ #define single_inst_bset_b(var, bit) \ - __asm __volatile ("orb %1,%0" \ + __asm volatile ("orb %1,%0" \ : "=m" (var) \ : "di" ((u_char)bit), "0" (var)) #define single_inst_bclr_b(var, bit) \ - __asm __volatile ("andb %1,%0" \ + __asm volatile ("andb %1,%0" \ : "=m" (var) \ : "di" ((u_char)~(bit)), "0" (var)) #define single_inst_bset_w(var, bit) \ - __asm __volatile ("orw %1,%0" \ + __asm volatile ("orw %1,%0" \ : "=m" (var) \ : "di" ((u_short)bit), "0" (var)) #define single_inst_bclr_w(var, bit) \ - __asm __volatile ("andw %1,%0" \ + __asm volatile ("andw %1,%0" \ : "=m" (var) \ : "di" ((u_short)~(bit)), "0" (var)) #define single_inst_bset_l(var, bit) \ - __asm __volatile ("orl %1,%0" \ + __asm volatile ("orl %1,%0" \ : "=m" (var) \ : "di" ((u_long)bit), "0" (var)) #define single_inst_bclr_l(var, bit) \ - __asm __volatile ("andl %1,%0" \ + __asm volatile ("andl %1,%0" \ : "=m" (var) \ : "di" ((u_long)~(bit)), "0" (var)) diff --git a/sys/arch/m68k/include/byte_swap.h b/sys/arch/m68k/include/byte_swap.h index 444f8c563f3..4f0195f41f0 100644 --- a/sys/arch/m68k/include/byte_swap.h +++ b/sys/arch/m68k/include/byte_swap.h @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap.h,v 1.4 2001/12/05 04:37:28 lukem Exp $ */ +/* $NetBSD: byte_swap.h,v 1.5 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -39,20 +39,20 @@ #ifndef M68K_BYTE_SWAP_H_ #define M68K_BYTE_SWAP_H_ -static __inline u_int16_t __byte_swap_word(u_int16_t); -static __inline u_int32_t __byte_swap_long(u_int32_t); +static inline u_int16_t __byte_swap_word(u_int16_t); +static inline u_int32_t __byte_swap_long(u_int32_t); -static __inline u_int16_t +static inline u_int16_t __byte_swap_word(u_int16_t var) { - __asm__ __volatile ("rorw #8, %0" : "=d" (var) : "0" (var)); + __asm__ volatile ("rorw #8, %0" : "=d" (var) : "0" (var)); return (var); } -static __inline u_int32_t +static inline u_int32_t __byte_swap_long(u_int32_t var) { - __asm__ __volatile ( + __asm__ volatile ( "rorw #8, %0; swap %0; rorw #8, %0" : "=d" (var) : "0" (var)); return (var); } diff --git a/sys/arch/m68k/include/cacheops_20.h b/sys/arch/m68k/include/cacheops_20.h index 450e84ba8aa..f461d725322 100644 --- a/sys/arch/m68k/include/cacheops_20.h +++ b/sys/arch/m68k/include/cacheops_20.h @@ -1,4 +1,4 @@ -/* $NetBSD: cacheops_20.h,v 1.6 2002/11/03 01:34:42 chs Exp $ */ +/* $NetBSD: cacheops_20.h,v 1.7 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -39,53 +39,53 @@ /* * Invalidate entire TLB. */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIA_20(void) { - __asm __volatile (" pflusha"); + __asm volatile (" pflusha"); } /* * Invalidate any TLB entry for given VA (TB Invalidate Single) */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIS_20(vaddr_t va) { - __asm __volatile (" pflushs #0,#0,%0@" : : "a" (va) ); + __asm volatile (" pflushs #0,#0,%0@" : : "a" (va) ); } /* * Invalidate supervisor side of TLB */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIAS_20(void) { - __asm __volatile (" pflushs #4,#4"); + __asm volatile (" pflushs #4,#4"); } /* * Invalidate user side of TLB */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIAU_20(void) { - __asm __volatile (" pflushs #0,#4;"); + __asm volatile (" pflushs #0,#4;"); } /* * Invalidate instruction cache */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICIA_20(void) { - __asm __volatile (" movc %0,%%cacr;" : : "d" (IC_CLEAR)); + __asm volatile (" movc %0,%%cacr;" : : "d" (IC_CLEAR)); } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICPA_20(void) { - __asm __volatile (" movc %0,%%cacr;" : : "d" (IC_CLEAR)); + __asm volatile (" movc %0,%%cacr;" : : "d" (IC_CLEAR)); } /* @@ -102,8 +102,8 @@ ICPA_20(void) #define DCFA_20() #define DCPA_20() -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) PCIA_20(void) { - __asm __volatile (" movc %0,%%cacr;" : : "d" (DC_CLEAR)); + __asm volatile (" movc %0,%%cacr;" : : "d" (DC_CLEAR)); } diff --git a/sys/arch/m68k/include/cacheops_30.h b/sys/arch/m68k/include/cacheops_30.h index eee7e12ecc1..57f05c762ea 100644 --- a/sys/arch/m68k/include/cacheops_30.h +++ b/sys/arch/m68k/include/cacheops_30.h @@ -1,4 +1,4 @@ -/* $NetBSD: cacheops_30.h,v 1.6 2002/11/03 01:34:42 chs Exp $ */ +/* $NetBSD: cacheops_30.h,v 1.7 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -39,58 +39,58 @@ /* * Invalidate entire TLB. */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIA_30(void) { int tmp = DC_CLEAR; - __asm __volatile (" pflusha;" + __asm volatile (" pflusha;" " movc %0,%%cacr" : : "d" (tmp)); } /* * Invalidate any TLB entry for given VA (TB Invalidate Single) */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIS_30(vaddr_t va) { - __asm __volatile (" pflush #0,#0,%0@;" + __asm volatile (" pflush #0,#0,%0@;" " movc %1,%%cacr" : : "a" (va), "d" (DC_CLEAR)); } /* * Invalidate supervisor side of TLB */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIAS_30(void) { - __asm __volatile (" pflush #4,#4;" + __asm volatile (" pflush #4,#4;" " movc %0,%%cacr;" :: "d" (DC_CLEAR)); } /* * Invalidate user side of TLB */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIAU_30(void) { - __asm __volatile (" pflush #0,#4;" + __asm volatile (" pflush #0,#4;" " movc %0,%%cacr;" :: "d" (DC_CLEAR)); } /* * Invalidate instruction cache */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICIA_30(void) { - __asm __volatile (" movc %0,%%cacr;" : : "d" (IC_CLEAR)); + __asm volatile (" movc %0,%%cacr;" : : "d" (IC_CLEAR)); } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICPA_30(void) { - __asm __volatile (" movc %0,%%cacr;" : : "d" (IC_CLEAR)); + __asm volatile (" movc %0,%%cacr;" : : "d" (IC_CLEAR)); } /* @@ -107,8 +107,8 @@ ICPA_30(void) #define DCFA_30() #define DCPA_30() -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) PCIA_30(void) { - __asm __volatile (" movc %0,%%cacr;" : : "d" (DC_CLEAR)); + __asm volatile (" movc %0,%%cacr;" : : "d" (DC_CLEAR)); } diff --git a/sys/arch/m68k/include/cacheops_40.h b/sys/arch/m68k/include/cacheops_40.h index 3033ae9a7b1..98f27e2b7e5 100644 --- a/sys/arch/m68k/include/cacheops_40.h +++ b/sys/arch/m68k/include/cacheops_40.h @@ -1,4 +1,4 @@ -/* $NetBSD: cacheops_40.h,v 1.6 2002/11/03 01:34:42 chs Exp $ */ +/* $NetBSD: cacheops_40.h,v 1.7 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -39,22 +39,22 @@ /* * Invalidate entire TLB. */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIA_40(void) { - __asm __volatile (" .word 0xf518" ); /* pflusha */ + __asm volatile (" .word 0xf518" ); /* pflusha */ } /* * Invalidate any TLB entry for given VA (TB Invalidate Single) */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIS_40(vaddr_t va) { register vaddr_t r_va __asm("%a0") = va; int tmp; - __asm __volatile (" movc %1, %%dfc;" /* select supervisor */ + __asm volatile (" movc %1, %%dfc;" /* select supervisor */ " .word 0xf508;" /* pflush %a0@ */ " moveq %3, %1;" /* select user */ " movc %1, %%dfc;" @@ -65,140 +65,140 @@ TBIS_40(vaddr_t va) /* * Invalidate supervisor side of TLB */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIAS_40(void) { /* * Cannot specify supervisor/user on pflusha, so we flush all */ - __asm __volatile (" .word 0xf518;"); + __asm volatile (" .word 0xf518;"); } /* * Invalidate user side of TLB */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIAU_40(void) { /* * Cannot specify supervisor/user on pflusha, so we flush all */ - __asm __volatile (" .word 0xf518;"); + __asm volatile (" .word 0xf518;"); } /* * Invalidate instruction cache */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICIA_40(void) { - __asm __volatile (" .word 0xf498;"); /* cinva ic */ + __asm volatile (" .word 0xf498;"); /* cinva ic */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICPA_40(void) { - __asm __volatile (" .word 0xf498;"); /* cinva ic */ + __asm volatile (" .word 0xf498;"); /* cinva ic */ } /* * Invalidate data cache. */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCIA_40(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCIS_40(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCIU_40(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCIAS_40(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf468;" : : "a" (r_pa)); /* cpushl dc,%a0@ */ + __asm volatile (" .word 0xf468;" : : "a" (r_pa)); /* cpushl dc,%a0@ */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) PCIA_40(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCFA_40(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } /* invalidate instruction physical cache line */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICPL_40(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf488;" : : "a" (r_pa)); /* cinvl ic,%a0@ */ + __asm volatile (" .word 0xf488;" : : "a" (r_pa)); /* cinvl ic,%a0@ */ } /* invalidate instruction physical cache page */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICPP_40(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf490;" : : "a" (r_pa)); /* cinvp ic,%a0@ */ + __asm volatile (" .word 0xf490;" : : "a" (r_pa)); /* cinvp ic,%a0@ */ } /* invalidate data physical cache line */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCPL_40(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf448;" : : "a" (r_pa)); /* cinvl dc,%a0@ */ + __asm volatile (" .word 0xf448;" : : "a" (r_pa)); /* cinvl dc,%a0@ */ } /* invalidate data physical cache page */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCPP_40(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf450;" : : "a" (r_pa)); /* cinvp dc,%a0@ */ + __asm volatile (" .word 0xf450;" : : "a" (r_pa)); /* cinvp dc,%a0@ */ } /* invalidate data physical all */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCPA_40(void) { - __asm __volatile (" .word 0xf458;"); /* cinva dc */ + __asm volatile (" .word 0xf458;"); /* cinva dc */ } /* data cache flush line */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCFL_40(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf468;" : : "a" (r_pa)); /* cpushl dc,%a0@ */ + __asm volatile (" .word 0xf468;" : : "a" (r_pa)); /* cpushl dc,%a0@ */ } /* data cache flush page */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCFP_40(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf470;" : : "a" (r_pa)); /* cpushp dc,%a0@ */ + __asm volatile (" .word 0xf470;" : : "a" (r_pa)); /* cpushp dc,%a0@ */ } diff --git a/sys/arch/m68k/include/cacheops_60.h b/sys/arch/m68k/include/cacheops_60.h index 11f7b64b548..23a8687081a 100644 --- a/sys/arch/m68k/include/cacheops_60.h +++ b/sys/arch/m68k/include/cacheops_60.h @@ -1,4 +1,4 @@ -/* $NetBSD: cacheops_60.h,v 1.5 2002/11/03 01:34:42 chs Exp $ */ +/* $NetBSD: cacheops_60.h,v 1.6 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -39,22 +39,22 @@ /* * Invalidate entire TLB. */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIA_60(void) { - __asm __volatile (" .word 0xf518" ); /* pflusha */ + __asm volatile (" .word 0xf518" ); /* pflusha */ } /* * Invalidate any TLB entry for given VA (TB Invalidate Single) */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIS_60(vaddr_t va) { register vaddr_t r_va __asm("%a0") = va; int tmp; - __asm __volatile (" movc %1, %%dfc;" /* select supervisor */ + __asm volatile (" movc %1, %%dfc;" /* select supervisor */ " .word 0xf508;" /* pflush %a0@ */ " moveq %3, %1;" /* select user */ " movc %1, %%dfc;" @@ -69,7 +69,7 @@ TBIS_60(vaddr_t va) /* * Invalidate supervisor side of TLB */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIAS_60(void) { int tmp; @@ -77,7 +77,7 @@ TBIAS_60(void) /* * Cannot specify supervisor/user on pflusha, so we flush all */ - __asm __volatile (" .word 0xf518;" + __asm volatile (" .word 0xf518;" " movc %%cacr,%0;" " orl %1,%0;" " movc %0,%%cacr" /* clear all branch cache @@ -88,7 +88,7 @@ TBIAS_60(void) /* * Invalidate user side of TLB */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) TBIAU_60(void) { int tmp; @@ -96,7 +96,7 @@ TBIAU_60(void) /* * Cannot specify supervisor/user on pflusha, so we flush all */ - __asm __volatile (" .word 0xf518;" + __asm volatile (" .word 0xf518;" " movc %%cacr,%0;" " orl %1,%0;" " movc %0,%%cacr" /* clear all branch cache @@ -107,118 +107,118 @@ TBIAU_60(void) /* * Invalidate instruction cache */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICIA_60(void) { /* inva ic (also clears branch cache) */ - __asm __volatile (" .word 0xf498;"); + __asm volatile (" .word 0xf498;"); } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICPA_60(void) { /* inva ic (also clears branch cache) */ - __asm __volatile (" .word 0xf498;"); + __asm volatile (" .word 0xf498;"); } /* * Invalidate data cache. */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCIA_60(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCIS_60(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCIU_60(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCIAS_60(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf468;" : : "a" (r_pa)); /* cpushl dc,%a0@ */ + __asm volatile (" .word 0xf468;" : : "a" (r_pa)); /* cpushl dc,%a0@ */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) PCIA_60(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCFA_60(void) { - __asm __volatile (" .word 0xf478;"); /* cpusha dc */ + __asm volatile (" .word 0xf478;"); /* cpusha dc */ } /* invalidate instruction physical cache line */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICPL_60(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf488;" : : "a" (r_pa)); /* cinvl ic,%a0@ */ + __asm volatile (" .word 0xf488;" : : "a" (r_pa)); /* cinvl ic,%a0@ */ } /* invalidate instruction physical cache page */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) ICPP_60(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf490;" : : "a" (r_pa)); /* cinvp ic,%a0@ */ + __asm volatile (" .word 0xf490;" : : "a" (r_pa)); /* cinvp ic,%a0@ */ } /* invalidate data physical cache line */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCPL_60(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf448;" : : "a" (r_pa)); /* cinvl dc,%a0@ */ + __asm volatile (" .word 0xf448;" : : "a" (r_pa)); /* cinvl dc,%a0@ */ } /* invalidate data physical cache page */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCPP_60(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf450;" : : "a" (r_pa)); /* cinvp dc,%a0@ */ + __asm volatile (" .word 0xf450;" : : "a" (r_pa)); /* cinvp dc,%a0@ */ } /* invalidate data physical all */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCPA_60(void) { - __asm __volatile (" .word 0xf458;"); /* cinva dc */ + __asm volatile (" .word 0xf458;"); /* cinva dc */ } /* data cache flush line */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCFL_60(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf468;" : : "a" (r_pa)); /* cpushl dc,%a0@ */ + __asm volatile (" .word 0xf468;" : : "a" (r_pa)); /* cpushl dc,%a0@ */ } /* data cache flush page */ -static __inline void __attribute__((__unused__)) +static inline void __attribute__((__unused__)) DCFP_60(paddr_t pa) { register paddr_t r_pa __asm("%a0") = pa; - __asm __volatile (" .word 0xf470;" : : "a" (r_pa)); /* cpushp dc,%a0@ */ + __asm volatile (" .word 0xf470;" : : "a" (r_pa)); /* cpushp dc,%a0@ */ } diff --git a/sys/arch/m68k/include/int_mwgwtypes.h b/sys/arch/m68k/include/int_mwgwtypes.h index d2f8ef8e291..3b77865fa4f 100644 --- a/sys/arch/m68k/include/int_mwgwtypes.h +++ b/sys/arch/m68k/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.2 2001/04/26 16:25:22 kleink Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.3 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; @@ -63,7 +63,7 @@ typedef unsigned long long int uint_least64_t; /* 7.18.1.3 Fastest minimum-width integer types */ -typedef __signed char int_fast8_t; +typedef signed char int_fast8_t; typedef unsigned char uint_fast8_t; typedef short int int_fast16_t; typedef unsigned short int uint_fast16_t; diff --git a/sys/arch/m68k/include/int_types.h b/sys/arch/m68k/include/int_types.h index 574414ccc19..fd67c063977 100644 --- a/sys/arch/m68k/include/int_types.h +++ b/sys/arch/m68k/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.8 2005/12/11 12:17:53 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.9 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/m68k/include/lock.h b/sys/arch/m68k/include/lock.h index 688d9d52a89..30b2a970477 100644 --- a/sys/arch/m68k/include/lock.h +++ b/sys/arch/m68k/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.7 2005/12/11 12:17:53 christos Exp $ */ +/* $NetBSD: lock.h,v 1.8 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -43,29 +43,29 @@ #ifndef _M68K_LOCK_H_ #define _M68K_LOCK_H_ -static __inline void __unused +static inline void __unused __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { *alp = __SIMPLELOCK_UNLOCKED; } -static __inline void __unused +static inline void __unused __cpu_simple_lock(__cpu_simple_lock_t *alp) { - __asm __volatile( + __asm volatile( "1: tas %0 \n" " jne 1b \n" : "=m" (*alp)); } -static __inline int __unused +static inline int __unused __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { int __rv; - __asm __volatile( + __asm volatile( " moveq #1, %1 \n" " tas %0 \n" " jeq 1f \n" @@ -76,7 +76,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *alp) return (__rv); } -static __inline void __unused +static inline void __unused __cpu_simple_unlock(__cpu_simple_lock_t *alp) { diff --git a/sys/arch/m68k/include/pmap_motorola.h b/sys/arch/m68k/include/pmap_motorola.h index 8bb1d692e93..4317fc5e85b 100644 --- a/sys/arch/m68k/include/pmap_motorola.h +++ b/sys/arch/m68k/include/pmap_motorola.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_motorola.h,v 1.8 2005/12/11 12:17:53 christos Exp $ */ +/* $NetBSD: pmap_motorola.h,v 1.9 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1991, 1993 @@ -174,7 +174,7 @@ extern struct pv_entry *pv_table; /* array of entries, one per page */ #define pmap_update(pmap) /* nothing (yet) */ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/m68k/include/profile.h b/sys/arch/m68k/include/profile.h index c556e648e5a..aec7c347eef 100644 --- a/sys/arch/m68k/include/profile.h +++ b/sys/arch/m68k/include/profile.h @@ -1,4 +1,4 @@ -/* $NetBSD: profile.h,v 1.15 2005/12/11 12:17:53 christos Exp $ */ +/* $NetBSD: profile.h,v 1.16 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -31,7 +31,7 @@ * @(#)profile.h 8.1 (Berkeley) 6/10/93 */ -#define _MCOUNT_DECL static __inline void _mcount +#define _MCOUNT_DECL static inline void _mcount #ifdef __ELF__ #define MCOUNT_ENTRY "__mcount" diff --git a/sys/arch/m68k/include/psl.h b/sys/arch/m68k/include/psl.h index 9f8e16f4723..0a0f5a5b286 100644 --- a/sys/arch/m68k/include/psl.h +++ b/sys/arch/m68k/include/psl.h @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.11 2005/12/11 12:17:53 christos Exp $ */ +/* $NetBSD: psl.h,v 1.12 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -73,26 +73,26 @@ * spl functions; platform-specific code must define spl0 and splx(). */ -static __inline int +static inline int _spl(int s) { int sr; - __asm __volatile ("movew %%sr,%0; movew %1,%%sr" : + __asm volatile ("movew %%sr,%0; movew %1,%%sr" : "=&d" (sr) : "di" (s)); return sr; } -static __inline int +static inline int _splraise(int level) { int sr; - __asm __volatile("movw %%sr,%0" : "=d" (sr)); + __asm volatile("movw %%sr,%0" : "=d" (sr)); if ((u_int16_t)level >= PSL_HIGHIPL || (u_int16_t)level > (u_int16_t)sr) - __asm __volatile("movw %0,%%sr" :: "di" (level)); + __asm volatile("movw %0,%%sr" :: "di" (level)); return sr; } diff --git a/sys/arch/m68k/include/types.h b/sys/arch/m68k/include/types.h index d209a467f19..179d013ecf8 100644 --- a/sys/arch/m68k/include/types.h +++ b/sys/arch/m68k/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.23 2005/12/11 12:17:53 christos Exp $ */ +/* $NetBSD: types.h,v 1.24 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -56,7 +56,7 @@ typedef vm_size_t vsize_t; typedef int register_t; -typedef __volatile unsigned char __cpu_simple_lock_t; +typedef volatile unsigned char __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 0x80 /* result of `tas' insn */ #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/m68k/m68k/kgdb_machdep.c b/sys/arch/m68k/m68k/kgdb_machdep.c index fd7e0f856b2..dbb21e17da9 100644 --- a/sys/arch/m68k/m68k/kgdb_machdep.c +++ b/sys/arch/m68k/m68k/kgdb_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_machdep.c,v 1.4 2005/12/11 12:17:59 christos Exp $ */ +/* $NetBSD: kgdb_machdep.c,v 1.5 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1990, 1993 @@ -45,13 +45,13 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.4 2005/12/11 12:17:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.5 2005/12/24 20:07:15 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> #include <sys/kgdb.h> -#define INVOKE_KGDB() __asm __volatile("trap #15") +#define INVOKE_KGDB() __asm volatile("trap #15") /* * Determine if the memory at va..(va+len) is valid. diff --git a/sys/arch/m68k/m68k/process_machdep.c b/sys/arch/m68k/m68k/process_machdep.c index f718a0a6c0d..3e02bb31150 100644 --- a/sys/arch/m68k/m68k/process_machdep.c +++ b/sys/arch/m68k/m68k/process_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: process_machdep.c,v 1.24 2005/12/11 12:17:59 christos Exp $ */ +/* $NetBSD: process_machdep.c,v 1.25 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1993 Christopher G. Demetriou @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.24 2005/12/11 12:17:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.25 2005/12/24 20:07:15 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -65,7 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.24 2005/12/11 12:17:59 christo #include <machine/psl.h> #include <machine/reg.h> -static __inline struct frame * +static inline struct frame * process_frame(struct lwp *l) { void *ptr; @@ -74,7 +74,7 @@ process_frame(struct lwp *l) return (ptr); } -static __inline struct fpframe * +static inline struct fpframe * process_fpframe(struct lwp *l) { diff --git a/sys/arch/mac68k/dev/adb_direct.c b/sys/arch/mac68k/dev/adb_direct.c index 4d4f525f119..918ceb2b5eb 100644 --- a/sys/arch/mac68k/dev/adb_direct.c +++ b/sys/arch/mac68k/dev/adb_direct.c @@ -1,4 +1,4 @@ -/* $NetBSD: adb_direct.c,v 1.52 2005/12/11 12:18:02 christos Exp $ */ +/* $NetBSD: adb_direct.c,v 1.53 2005/12/24 20:07:15 perry Exp $ */ /* From: adb_direct.c 2.02 4/18/97 jpw */ @@ -62,7 +62,7 @@ #ifdef __NetBSD__ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adb_direct.c,v 1.52 2005/12/11 12:18:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adb_direct.c,v 1.53 2005/12/24 20:07:15 perry Exp $"); #include "opt_adb.h" @@ -1788,7 +1788,7 @@ adb_soft_intr(void) /* call default completion routine if it's valid */ if (comprout) { #ifdef __NetBSD__ - __asm __volatile ( + __asm volatile ( " movml #0xffff,%%sp@- \n" /* save all regs */ " movl %0,%%a2 \n" /* compdata */ " movl %1,%%a1 \n" /* comprout */ @@ -2362,7 +2362,7 @@ adb_comp_exec(void) { if ((long)0 != adbCompRout) /* don't call if empty return location */ #ifdef __NetBSD__ - __asm __volatile( + __asm volatile( " movml #0xffff,%%sp@- \n" /* save all registers */ " movl %0,%%a2 \n" /* adbCompData */ " movl %1,%%a1 \n" /* adbCompRout */ diff --git a/sys/arch/mac68k/dev/if_mcvar.h b/sys/arch/mac68k/dev/if_mcvar.h index 40b681a8004..3cad6599c5d 100644 --- a/sys/arch/mac68k/dev/if_mcvar.h +++ b/sys/arch/mac68k/dev/if_mcvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_mcvar.h,v 1.10 2005/12/11 12:18:02 christos Exp $ */ +/* $NetBSD: if_mcvar.h,v 1.11 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1997 David Huang <khym@azeotrope.org> @@ -30,7 +30,7 @@ #define integrate #define hide #else -#define integrate static __inline +#define integrate static inline #define hide static #endif diff --git a/sys/arch/mac68k/dev/pm_direct.c b/sys/arch/mac68k/dev/pm_direct.c index 24fa156fb57..c5f3ebab2b6 100644 --- a/sys/arch/mac68k/dev/pm_direct.c +++ b/sys/arch/mac68k/dev/pm_direct.c @@ -1,4 +1,4 @@ -/* $NetBSD: pm_direct.c,v 1.26 2005/12/11 12:18:02 christos Exp $ */ +/* $NetBSD: pm_direct.c,v 1.27 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (C) 1997 Takashi Hamada @@ -32,7 +32,7 @@ /* From: pm_direct.c 1.3 03/18/98 Takashi Hamada */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pm_direct.c,v 1.26 2005/12/11 12:18:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm_direct.c,v 1.27 2005/12/24 20:07:15 perry Exp $"); #include "opt_adb.h" @@ -889,7 +889,7 @@ pm_pmgrop_mrg(PMData *pmdata) { u_int32_t rval=0; - __asm __volatile( + __asm volatile( " movl %1,%%a0 \n" " .word 0xa085 \n" " movl %%d0,%0" diff --git a/sys/arch/mac68k/include/bus.h b/sys/arch/mac68k/include/bus.h index 0376487ad26..207040309c2 100644 --- a/sys/arch/mac68k/include/bus.h +++ b/sys/arch/mac68k/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.22 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: bus.h,v 1.23 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -710,13 +710,13 @@ void mac68k_bssr4_gen(bus_space_tag_t, bus_space_handle_t *, bus_size_t, */ #define __MAC68K_copy_region_N(BYTES) \ -static __inline void __CONCAT(bus_space_copy_region_,BYTES) \ +static inline void __CONCAT(bus_space_copy_region_,BYTES) \ (bus_space_tag_t, \ bus_space_handle_t, bus_size_t, \ bus_space_handle_t, bus_size_t, \ bus_size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)( \ bus_space_tag_t t, \ bus_space_handle_t h1, \ diff --git a/sys/arch/mac68k/include/intr.h b/sys/arch/mac68k/include/intr.h index 619ee774fdf..51f13f5640f 100644 --- a/sys/arch/mac68k/include/intr.h +++ b/sys/arch/mac68k/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.22 2005/11/27 14:01:45 yamt Exp $ */ +/* $NetBSD: intr.h,v 1.23 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (C) 1997 Scott Reynolds @@ -102,9 +102,9 @@ extern volatile u_int8_t ssir; #define SIR_ADB 0x10 #define siron(mask) \ - __asm __volatile ( "orb %1,%0" : "=m" (ssir) : "i" (mask)) + __asm volatile ( "orb %1,%0" : "=m" (ssir) : "i" (mask)) #define siroff(mask) \ - __asm __volatile ( "andb %1,%0" : "=m" (ssir) : "ir" (~(mask))); + __asm volatile ( "andb %1,%0" : "=m" (ssir) : "ir" (~(mask))); #define setsoftnet() siron(SIR_NET) #define setsoftclock() siron(SIR_CLOCK) diff --git a/sys/arch/mac68k/mac68k/bus_space.c b/sys/arch/mac68k/mac68k/bus_space.c index cface99baa9..63b3ee67eff 100644 --- a/sys/arch/mac68k/mac68k/bus_space.c +++ b/sys/arch/mac68k/mac68k/bus_space.c @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.c,v 1.27 2005/11/24 13:08:33 yamt Exp $ */ +/* $NetBSD: bus_space.c,v 1.28 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.27 2005/11/24 13:08:33 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.28 2005/12/24 20:07:15 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -466,7 +466,7 @@ void mac68k_bsrm1(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int8_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -491,7 +491,7 @@ void mac68k_bsrm2(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int16_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -507,7 +507,7 @@ void mac68k_bsrm2_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int16_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -543,7 +543,7 @@ void mac68k_bsrm4(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int32_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -559,7 +559,7 @@ void mac68k_bsrm4_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int32_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -597,7 +597,7 @@ void mac68k_bsrr1(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int8_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -623,7 +623,7 @@ void mac68k_bsrr2(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int16_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -639,7 +639,7 @@ void mac68k_bsrr2_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int16_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -677,7 +677,7 @@ void mac68k_bsrr4(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int32_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -693,7 +693,7 @@ void mac68k_bsrr4_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int32_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -823,7 +823,7 @@ void mac68k_bswm1(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int8_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -848,7 +848,7 @@ void mac68k_bswm2(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int16_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -864,7 +864,7 @@ void mac68k_bswm2_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int16_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -900,7 +900,7 @@ void mac68k_bswm4(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int32_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -916,7 +916,7 @@ void mac68k_bswm4_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int32_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -954,7 +954,7 @@ void mac68k_bswr1(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int8_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -980,7 +980,7 @@ void mac68k_bswr2(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int16_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -996,7 +996,7 @@ void mac68k_bswr2_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int16_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -1034,7 +1034,7 @@ void mac68k_bswr4(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int32_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -1050,7 +1050,7 @@ void mac68k_bswr4_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, const u_int32_t *a, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%a1 ;" " movl %2,%%d0 ;" @@ -1090,7 +1090,7 @@ void mac68k_bssm1(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int8_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " movl %2,%%d0 ;" @@ -1115,7 +1115,7 @@ void mac68k_bssm2(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int16_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " movl %2,%%d0 ;" @@ -1131,7 +1131,7 @@ void mac68k_bssm2_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int16_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " rolw #8,%%d1 ;" @@ -1157,7 +1157,7 @@ void mac68k_bssm4(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int32_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " movl %2,%%d0 ;" @@ -1173,7 +1173,7 @@ void mac68k_bssm4_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int32_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " rolw #8,%%d1 ;" @@ -1201,7 +1201,7 @@ void mac68k_bssr1(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int8_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " movl %2,%%d0 ;" @@ -1227,7 +1227,7 @@ void mac68k_bssr2(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int16_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " movl %2,%%d0 ;" @@ -1243,7 +1243,7 @@ void mac68k_bssr2_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int16_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " rolw #8,%%d1 ;" @@ -1270,7 +1270,7 @@ void mac68k_bssr4(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int32_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " movl %2,%%d0 ;" @@ -1286,7 +1286,7 @@ void mac68k_bssr4_swap(bus_space_tag_t t, bus_space_handle_t *h, bus_size_t offset, u_int32_t v, size_t c) { - __asm __volatile ( + __asm volatile ( " movl %0,%%a0 ;" " movl %1,%%d1 ;" " rolw #8,%%d1 ;" diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index df656846ba9..523d9cc6df3 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.307 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.308 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -107,7 +107,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.307 2005/12/11 12:18:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.308 2005/12/24 20:07:15 perry Exp $"); #include "opt_adb.h" #include "opt_ddb.h" @@ -2340,7 +2340,7 @@ gray_bar(void) 3) restore regs */ - __asm __volatile ( + __asm volatile ( " movl %a0,%sp@-;" " movl %a1,%sp@-;" " movl %d0,%sp@-;" @@ -2356,7 +2356,7 @@ gray_bar(void) ((u_long *)videoaddr)[gray_nextaddr++] = 0x00000000; } - __asm __volatile ( + __asm volatile ( " movl %sp@+,%d1;" " movl %sp@+,%d0;" " movl %sp@+,%a1;" @@ -2748,7 +2748,7 @@ printstar(void) * Be careful as we assume that no registers are clobbered * when we call this from assembly. */ - __asm __volatile ( + __asm volatile ( " movl %a0,%sp@-;" " movl %a1,%sp@-;" " movl %d0,%sp@-;" @@ -2756,7 +2756,7 @@ printstar(void) /* printf("*"); */ - __asm __volatile ( + __asm volatile ( " movl %sp@+,%d1;" " movl %sp@+,%d0;" " movl %sp@+,%a1;" diff --git a/sys/arch/mac68k/mac68k/macrom.c b/sys/arch/mac68k/mac68k/macrom.c index 33f7f849f09..6e91a008279 100644 --- a/sys/arch/mac68k/mac68k/macrom.c +++ b/sys/arch/mac68k/mac68k/macrom.c @@ -1,4 +1,4 @@ -/* $NetBSD: macrom.c,v 1.58 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: macrom.c,v 1.59 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (C) 1994 Bradley A. Grantham @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: macrom.c,v 1.58 2005/12/11 12:18:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: macrom.c,v 1.59 2005/12/24 20:07:15 perry Exp $"); #include "opt_adb.h" #include "opt_ddb.h" @@ -145,7 +145,7 @@ mrg_Delay(void) #define TICK_DURATION 16625 u_int32_t ticks; - __asm __volatile ("movl %%a0,%0" /* get arguments */ + __asm volatile ("movl %%a0,%0" /* get arguments */ : "=g" (ticks) : : "a0"); @@ -175,7 +175,7 @@ mrg_DTInstall(void) { caddr_t ptr, prev; - __asm __volatile ("movl %%a0,%0" : "=g" (ptr)); + __asm volatile ("movl %%a0,%0" : "=g" (ptr)); (caddr_t *)prev = &mrg_DTList; while (*(caddr_t *)prev != NULL) @@ -184,7 +184,7 @@ mrg_DTInstall(void) *(caddr_t *)prev = ptr; setsoftdtmgr(); - __asm __volatile ("clrl %%d0" : : : "d0"); + __asm volatile ("clrl %%d0" : : : "d0"); } void @@ -199,7 +199,7 @@ mrg_execute_deferred(void) mrg_DTList = *(caddr_t *)ptr; splx(s); - __asm __volatile ( + __asm volatile ( " moveml %%a0-%%a6/%%d1-%%d7,%%sp@- \n" " movl %0,%%a0 \n" " movl %%a0@(8),%%a2 \n" @@ -232,7 +232,7 @@ mrg_VBLQueue(void) printf("mrg: mrg_VBLQueue: calling VBL task at 0x%x with VBLTask block at %p\n", *((u_int32_t *)(vbltask + vblAddr)), vbltask); #endif - __asm __volatile( + __asm volatile( " movml #0xfffe,%%sp@- \n" " movl %0,%%a0 \n" " movl %1,%%a1 \n" @@ -267,9 +267,9 @@ mrg_VBLQueue(void) void mrg_init_stub_1(void) { - __asm __volatile ("movml #0xffff,%sp@-"); + __asm volatile ("movml #0xffff,%sp@-"); printf("mrg: hit mrg_init_stub_1\n"); - __asm __volatile ("movml %sp@+, #0xffff"); + __asm volatile ("movml %sp@+, #0xffff"); } void @@ -417,7 +417,7 @@ mrg_adbintr(void) /* Call ROM ADB Interrupt */ /* Gotta load a1 with VIA address. */ /* ADB int expects it from Mac intr routine. */ - __asm __volatile ( + __asm volatile ( " movml #0xffff,%%sp@- \n" " movl %0,%%a0 \n" " movl " ___STRING(_C_LABEL(VIA)) ",%%a1 \n" @@ -445,7 +445,7 @@ mrg_pmintr(void) /* Call ROM PM Interrupt */ /* Gotta load a1 with VIA address. */ /* ADB int expects it from Mac intr routine. */ - __asm __volatile ( + __asm volatile ( " movml #0xffff,%%sp@- \n" " movl %0,%%a0 \n" " movl " ___STRING(_C_LABEL(VIA)) ",%%a1 \n" @@ -486,7 +486,7 @@ mrg_NewPtr(void) /* u_int32_t trapword; */ caddr_t ptr; - __asm __volatile ("movl %%d0,%0" : "=g" (numbytes) : : "d0"); + __asm volatile ("movl %%d0,%0" : "=g" (numbytes) : : "d0"); #if defined(MRG_SHOWTRAPS) printf("mrg: NewPtr(%d bytes, ? clear, ? sys)", numbytes); @@ -511,7 +511,7 @@ mrg_NewPtr(void) bzero(ptr, numbytes); /* NewPtr, Clear ! */ } - __asm __volatile("movl %0,%%a0" : : "g" (ptr) : "a0"); + __asm volatile("movl %0,%%a0" : : "g" (ptr) : "a0"); return (result); } @@ -521,7 +521,7 @@ mrg_DisposPtr(void) int result = noErr; caddr_t ptr; - __asm __volatile("movl %%a0,%0" : "=g" (ptr) : : "a0"); + __asm volatile("movl %%a0,%0" : "=g" (ptr) : : "a0"); #if defined(MRG_SHOWTRAPS) printf("mrg: DisposPtr(%p)\n", ptr); @@ -540,7 +540,7 @@ mrg_GetPtrSize(void) { caddr_t ptr; - __asm __volatile("movl %%a0,%0" : "=g" (ptr) : : "a0"); + __asm volatile("movl %%a0,%0" : "=g" (ptr) : : "a0"); #if defined(MRG_SHOWTRAPS) printf("mrg: GetPtrSize(%p)\n", ptr); @@ -558,7 +558,7 @@ mrg_SetPtrSize(void) caddr_t ptr; int newbytes; - __asm __volatile( + __asm volatile( " movl %%a0,%0 \n" " movl %%d0,%1" : "=g" (ptr), "=g" (newbytes) : : "d0","a0"); @@ -588,7 +588,7 @@ mrg_SetTrapAddress(void) caddr_t ptr; int trap_num; - __asm __volatile( + __asm volatile( " movl %%a0,%0 \n" " movl %%d0,%1" : "=g" (ptr), "=g" (trap_num) : : "d0","a0"); @@ -725,7 +725,7 @@ mrg_aline_super(struct frame *frame) /* store a0 in d0bucket */ /* This will change a2,a1,d1,d0,a0 and possibly a6 */ - __asm __volatile ( + __asm volatile ( " movl %2@,%%d0 \n" " movl %2@(4),%%d1 \n" " movl %2@(32),%%a0 \n" @@ -823,14 +823,14 @@ mrg_init(void) #if defined(MRG_TEST) if (ROMResourceMap) { printf("mrg: testing CountResources\n"); - __asm __volatile ( + __asm volatile ( " clrl %%sp@- \n" " clrl %%sp@- \n" " .word 0xa99c \n" " movw %%sp@+,%0" : "=g" (rcnt)); printf("mrg: found %d resources in ROM\n", rcnt); - __asm __volatile ( + __asm volatile ( " clrl %%sp@- \n" " movl #0x44525652,%%sp@- \n" " .word 0xa99c \n" @@ -844,7 +844,7 @@ mrg_init(void) #if defined(MRG_TEST) if (ROMResourceMap) { printf("mrg: testing GetIndResource\n"); - __asm __volatile ( + __asm volatile ( " clrl %%sp@- \n" " movl #0x44525652,%%sp@- \n" " movw #0x01,%%sp@- \n" @@ -856,7 +856,7 @@ mrg_init(void) (long)Get_Ind_Resource(0x44525652, 1), (long)*Get_Ind_Resource(0x44525652, 1), (long)*((u_int32_t *)*Get_Ind_Resource(0x44525652, 1))); - __asm __volatile ( + __asm volatile ( " clrl %%sp@- \n" " movl #0x44525652,%%sp@- \n" " movw #0x02,%%sp@- \n" @@ -1047,7 +1047,7 @@ setup_egret(void) /* This initializes ADBState (mrg_ADBStore2) and enables interrupts */ - __asm __volatile ( + __asm volatile ( " movml %%a0-%%a2,%%sp@- \n" " movl %1,%%a0 \n" /* ADBState, mrg_adbstore2 */ " movl %0,%%a1 \n" @@ -1298,7 +1298,7 @@ ADBAlternateInit(void) if (0 == mrg_ADBAlternateInit) { ADBReInit(); } else { - __asm __volatile ( + __asm volatile ( " movml %%a0-%%a6/%%d0-%%d7,%%sp@- \n" " movl %0,%%a1 \n" " movl %1,%%a3 \n" diff --git a/sys/arch/mac68k/nubus/grf_nubus.c b/sys/arch/mac68k/nubus/grf_nubus.c index 6e86bfa88cb..a6b374d36d0 100644 --- a/sys/arch/mac68k/nubus/grf_nubus.c +++ b/sys/arch/mac68k/nubus/grf_nubus.c @@ -1,4 +1,4 @@ -/* $NetBSD: grf_nubus.c,v 1.69 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: grf_nubus.c,v 1.70 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1995 Allen Briggs. All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.69 2005/12/11 12:18:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.70 2005/12/24 20:07:15 perry Exp $"); #include <sys/param.h> @@ -475,7 +475,7 @@ grfmv_intr_cb264(void *vsc) sc = (struct grfbus_softc *)vsc; slotbase = (volatile char *)(sc->sc_handle.base); /* XXX evil hack */ - __asm __volatile( + __asm volatile( " movl %0,%%a0 \n" " movl %%a0@(0xff6028),%%d0 \n" " andl #0x2,%%d0 \n" @@ -529,7 +529,7 @@ grfmv_intr_cb364(void *vsc) sc = (struct grfbus_softc *)vsc; slotbase = (volatile char *)(sc->sc_handle.base); /* XXX evil hack */ - __asm __volatile( + __asm volatile( " movl %0,%%a0 \n" " movl %%a0@(0xfe6028),%%d0 \n" " andl #0x2,%%d0 \n" diff --git a/sys/arch/mac68k/nubus/if_netdock_nubus.c b/sys/arch/mac68k/nubus/if_netdock_nubus.c index 87580515b2d..494fe2537dd 100644 --- a/sys/arch/mac68k/nubus/if_netdock_nubus.c +++ b/sys/arch/mac68k/nubus/if_netdock_nubus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_netdock_nubus.c,v 1.9 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: if_netdock_nubus.c,v 1.10 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (C) 2000,2002 Daishi Kato <daishi@axlight.com> @@ -43,7 +43,7 @@ /***********************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.9 2005/12/11 12:18:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.10 2005/12/24 20:07:15 perry Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -172,16 +172,16 @@ static struct mbuf *netdock_get(struct netdock_softc *, int); (sc)->sc_regh, (o), (val))) #define NIC_BSET(sc, o, b) \ - __asm__ __volatile("bset %0,%1" : : "di" ((u_short)(b)), \ + __asm__ volatile("bset %0,%1" : : "di" ((u_short)(b)), \ "g" (*(u_int8_t *)((sc)->sc_regh.base + (o)))) #define NIC_BCLR(sc, o, b) \ - __asm__ __volatile("bclr %0,%1" : : "di" ((u_short)(b)), \ + __asm__ volatile("bclr %0,%1" : : "di" ((u_short)(b)), \ "g" (*(u_int8_t *)((sc)->sc_regh.base + (o)))) #define NIC_ANDW(sc, o, b) \ - __asm__ __volatile("andw %0,%1" : : "di" ((u_short)(b)), \ + __asm__ volatile("andw %0,%1" : : "di" ((u_short)(b)), \ "g" (*(u_int8_t *)((sc)->sc_regh.base + (o)))) #define NIC_ORW(sc, o, b) \ - __asm__ __volatile("orw %0,%1" : : "di" ((u_short)(b)), \ + __asm__ volatile("orw %0,%1" : : "di" ((u_short)(b)), \ "g" (*(u_int8_t *)((sc)->sc_regh.base + (o)))) diff --git a/sys/arch/mac68k/obio/esp.c b/sys/arch/mac68k/obio/esp.c index 11570914c1a..e9dcc72e2af 100644 --- a/sys/arch/mac68k/obio/esp.c +++ b/sys/arch/mac68k/obio/esp.c @@ -1,4 +1,4 @@ -/* $NetBSD: esp.c,v 1.41 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: esp.c,v 1.42 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1997 Jason R. Thorpe. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.41 2005/12/11 12:18:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.42 2005/12/24 20:07:15 perry Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -744,7 +744,7 @@ restart_dmago: if (esc->sc_datain == 0) { /* while (cnt32--) { 16 instances of *pdma = *addr++; } */ /* while (cnt2--) { *pdma = *addr++; } */ - __asm __volatile ( + __asm volatile ( " movl %1, %%a2 \n" " movl %2, %%a3 \n" " movw %3, %%d2 \n" @@ -787,7 +787,7 @@ restart_dmago: } else { /* while (cnt32--) { 16 instances of *addr++ = *pdma; } */ /* while (cnt2--) { *addr++ = *pdma; } */ - __asm __volatile ( + __asm volatile ( " movl %1, %%a2 \n" " movl %2, %%a3 \n" " movw %3, %%d2 \n" diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c index 9be5a0adf28..bf5ea8f6f55 100644 --- a/sys/arch/macppc/dev/if_bm.c +++ b/sys/arch/macppc/dev/if_bm.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_bm.c,v 1.26 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: if_bm.c,v 1.27 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (C) 1998, 1999, 2000 Tsubai Masanari. All rights reserved. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.26 2005/12/11 12:18:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.27 2005/12/24 20:07:15 perry Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -104,10 +104,10 @@ struct bmac_softc { extern u_int *heathrow_FCR; -static __inline int bmac_read_reg __P((struct bmac_softc *, int)); -static __inline void bmac_write_reg __P((struct bmac_softc *, int, int)); -static __inline void bmac_set_bits __P((struct bmac_softc *, int, int)); -static __inline void bmac_reset_bits __P((struct bmac_softc *, int, int)); +static inline int bmac_read_reg __P((struct bmac_softc *, int)); +static inline void bmac_write_reg __P((struct bmac_softc *, int, int)); +static inline void bmac_set_bits __P((struct bmac_softc *, int, int)); +static inline void bmac_reset_bits __P((struct bmac_softc *, int, int)); int bmac_match __P((struct device *, struct cfdata *, void *)); void bmac_attach __P((struct device *, struct device *, void *)); diff --git a/sys/arch/macppc/dev/if_gm.c b/sys/arch/macppc/dev/if_gm.c index af0bc1f0ad3..3e9b2e77850 100644 --- a/sys/arch/macppc/dev/if_gm.c +++ b/sys/arch/macppc/dev/if_gm.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_gm.c,v 1.25 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: if_gm.c,v 1.26 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.25 2005/12/11 12:18:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.26 2005/12/24 20:07:15 perry Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -100,13 +100,13 @@ struct gmac_softc { int gmac_match __P((struct device *, struct cfdata *, void *)); void gmac_attach __P((struct device *, struct device *, void *)); -static __inline u_int gmac_read_reg __P((struct gmac_softc *, int)); -static __inline void gmac_write_reg __P((struct gmac_softc *, int, u_int)); +static inline u_int gmac_read_reg __P((struct gmac_softc *, int)); +static inline void gmac_write_reg __P((struct gmac_softc *, int, u_int)); -static __inline void gmac_start_txdma __P((struct gmac_softc *)); -static __inline void gmac_start_rxdma __P((struct gmac_softc *)); -static __inline void gmac_stop_txdma __P((struct gmac_softc *)); -static __inline void gmac_stop_rxdma __P((struct gmac_softc *)); +static inline void gmac_start_txdma __P((struct gmac_softc *)); +static inline void gmac_start_rxdma __P((struct gmac_softc *)); +static inline void gmac_stop_txdma __P((struct gmac_softc *)); +static inline void gmac_stop_rxdma __P((struct gmac_softc *)); int gmac_intr __P((void *)); void gmac_tint __P((struct gmac_softc *)); @@ -417,7 +417,7 @@ gmac_rint(sc) next: dp->cmd_hi = 0; - __asm __volatile ("sync"); + __asm volatile ("sync"); dp->cmd = htole32(GMAC_OWN); } sc->sc_rxlast = i; @@ -517,7 +517,7 @@ gmac_start(ifp) i++; if (i == NTXBUF) i = 0; - __asm __volatile ("sync"); + __asm volatile ("sync"); gmac_write_reg(sc, GMAC_TXDMAKICK, i); sc->sc_txnext = i; @@ -588,7 +588,7 @@ gmac_reset(sc) sc->sc_rxlast = 0; for (i = 0; i < NRXBUF; i++) sc->sc_rxlist[i].cmd = htole32(GMAC_OWN); - __asm __volatile ("sync"); + __asm volatile ("sync"); gmac_write_reg(sc, GMAC_TXDMADESCBASEHI, 0); gmac_write_reg(sc, GMAC_TXDMADESCBASELO, diff --git a/sys/arch/macppc/dev/if_mc.c b/sys/arch/macppc/dev/if_mc.c index bf0c29254d3..04a5d323725 100644 --- a/sys/arch/macppc/dev/if_mc.c +++ b/sys/arch/macppc/dev/if_mc.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_mc.c,v 1.10 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: if_mc.c,v 1.11 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1997 David Huang <khym@bga.com> @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.10 2005/12/11 12:18:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.11 2005/12/24 20:07:15 perry Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -268,7 +268,7 @@ mc_dmaintr(arg) statoff = offset + datalen; DBDMA_BUILD_CMD(cmd, DBDMA_CMD_STOP, 0, 0, 0, 0); - __asm __volatile("eieio"); + __asm volatile("eieio"); /* flushcache(sc->sc_rxbuf + offset, datalen + 4); */ @@ -283,7 +283,7 @@ mc_dmaintr(arg) next: DBDMA_BUILD_CMD(cmd, DBDMA_CMD_IN_LAST, 0, DBDMA_INT_ALWAYS, DBDMA_WAIT_NEVER, DBDMA_BRANCH_NEVER); - __asm __volatile("eieio"); + __asm volatile("eieio"); cmd->d_status = 0; cmd->d_resid = 0; sc->sc_tail = i + 1; diff --git a/sys/arch/macppc/dev/if_mcvar.h b/sys/arch/macppc/dev/if_mcvar.h index c3cc5338a4f..ac602c37a64 100644 --- a/sys/arch/macppc/dev/if_mcvar.h +++ b/sys/arch/macppc/dev/if_mcvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_mcvar.h,v 1.9 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: if_mcvar.h,v 1.10 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1997 David Huang <khym@bga.com> @@ -31,7 +31,7 @@ #define integrate #define hide #else -#define integrate static /*__inline*/ +#define integrate static /*inline*/ #define hide static #endif diff --git a/sys/arch/macppc/dev/mesh.c b/sys/arch/macppc/dev/mesh.c index bae2ddf0d2f..4ad19f8967f 100644 --- a/sys/arch/macppc/dev/mesh.c +++ b/sys/arch/macppc/dev/mesh.c @@ -1,4 +1,4 @@ -/* $NetBSD: mesh.c,v 1.23 2005/12/17 21:48:13 macallan Exp $ */ +/* $NetBSD: mesh.c,v 1.24 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mesh.c,v 1.23 2005/12/17 21:48:13 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mesh.c,v 1.24 2005/12/24 20:07:15 perry Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -133,8 +133,8 @@ struct mesh_softc { #define SEND_IDENTIFY 2 #define SEND_SDTR 4 -static __inline int mesh_read_reg __P((struct mesh_softc *, int)); -static __inline void mesh_set_reg __P((struct mesh_softc *, int, int)); +static inline int mesh_read_reg __P((struct mesh_softc *, int)); +static inline void mesh_set_reg __P((struct mesh_softc *, int, int)); int mesh_match __P((struct device *, struct cfdata *, void *)); void mesh_attach __P((struct device *, struct device *, void *)); diff --git a/sys/arch/macppc/dev/viareg.h b/sys/arch/macppc/dev/viareg.h index 348a1dab13e..adbaccff3e8 100644 --- a/sys/arch/macppc/dev/viareg.h +++ b/sys/arch/macppc/dev/viareg.h @@ -1,4 +1,4 @@ -/* $NetBSD: viareg.h,v 1.4 2001/06/19 12:02:56 simonb Exp $ */ +/* $NetBSD: viareg.h,v 1.5 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (C) 1993 Allen K. Briggs, Chris P. Caputo, @@ -188,13 +188,13 @@ extern volatile unsigned char *Via1Base; #include <machine/pio.h> -static __inline void via_reg_and(int, int, int); -static __inline void via_reg_or(int, int, int); -static __inline void via_reg_xor(int, int, int); -static __inline void write_via_reg(int, int, int); -static __inline int read_via_reg(int, int); +static inline void via_reg_and(int, int, int); +static inline void via_reg_or(int, int, int); +static inline void via_reg_xor(int, int, int); +static inline void write_via_reg(int, int, int); +static inline int read_via_reg(int, int); -static __inline void +static inline void via_reg_and(ign, reg, val) int ign, reg, val; { @@ -203,7 +203,7 @@ via_reg_and(ign, reg, val) out8(addr, in8(addr) & val); } -static __inline void +static inline void via_reg_or(ign, reg, val) int ign, reg, val; { @@ -212,7 +212,7 @@ via_reg_or(ign, reg, val) out8(addr, in8(addr) | val); } -static __inline void +static inline void via_reg_xor(ign, reg, val) int ign, reg, val; { @@ -221,7 +221,7 @@ via_reg_xor(ign, reg, val) out8(addr, in8(addr) ^ val); } -static __inline int +static inline int read_via_reg(ign, reg) int ign, reg; { @@ -230,7 +230,7 @@ read_via_reg(ign, reg) return in8(addr); } -static __inline void +static inline void write_via_reg(ign, reg, val) int ign, reg, val; { diff --git a/sys/arch/macppc/dev/zs.c b/sys/arch/macppc/dev/zs.c index b4820d59602..bf2bc72bd52 100644 --- a/sys/arch/macppc/dev/zs.c +++ b/sys/arch/macppc/dev/zs.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.34 2005/12/11 12:18:03 christos Exp $ */ +/* $NetBSD: zs.c,v 1.35 2005/12/24 20:07:15 perry Exp $ */ /* * Copyright (c) 1996, 1998 Bill Studenmund @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.34 2005/12/11 12:18:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.35 2005/12/24 20:07:15 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -559,7 +559,7 @@ zs_dma_setup(struct zs_chanstate *cs, caddr_t pa, int len) DBDMA_BUILD(cmdp, DBDMA_CMD_STOP, 0, 0, 0, DBDMA_INT_NEVER, DBDMA_WAIT_NEVER, DBDMA_BRANCH_NEVER); - __asm __volatile("eieio"); + __asm volatile("eieio"); dbdma_start(zsc->zsc_txdmareg[ch], zsc->zsc_txdmacmd[ch]); } diff --git a/sys/arch/macppc/include/bus.h b/sys/arch/macppc/include/bus.h index 2cd97917716..239398ec248 100644 --- a/sys/arch/macppc/include/bus.h +++ b/sys/arch/macppc/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.19 2005/12/11 12:18:06 christos Exp $ */ +/* $NetBSD: bus.h,v 1.20 2005/12/24 20:07:15 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -110,50 +110,50 @@ typedef u_int32_t bus_space_handle_t; #define BUS_SPACE_MAP_LINEAR 0x02 #define BUS_SPACE_MAP_PREFETCHABLE 0x04 -static __inline int bus_space_map(bus_space_tag_t, bus_addr_t, +static inline int bus_space_map(bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); -static __inline void bus_space_read_region_1(bus_space_tag_t, +static inline void bus_space_read_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, size_t); -static __inline void bus_space_read_region_2(bus_space_tag_t, +static inline void bus_space_read_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, size_t); -static __inline void bus_space_read_region_4(bus_space_tag_t, +static inline void bus_space_read_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, size_t); -static __inline void bus_space_read_region_stream_2(bus_space_tag_t, +static inline void bus_space_read_region_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, size_t); -static __inline void bus_space_read_region_stream_4(bus_space_tag_t, +static inline void bus_space_read_region_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, size_t); -static __inline void bus_space_write_region_1(bus_space_tag_t, +static inline void bus_space_write_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int8_t *, size_t); -static __inline void bus_space_write_region_2(bus_space_tag_t, +static inline void bus_space_write_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int16_t *, size_t); -static __inline void bus_space_write_region_4(bus_space_tag_t, +static inline void bus_space_write_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int32_t *, size_t); -static __inline void bus_space_write_region_stream_2(bus_space_tag_t, +static inline void bus_space_write_region_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int16_t *, size_t); -static __inline void bus_space_write_region_stream_4(bus_space_tag_t, +static inline void bus_space_write_region_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int32_t *, size_t); -static __inline void bus_space_set_multi_1(bus_space_tag_t, +static inline void bus_space_set_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, size_t); -static __inline void bus_space_set_multi_2(bus_space_tag_t, +static inline void bus_space_set_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, size_t); -static __inline void bus_space_set_multi_4(bus_space_tag_t, +static inline void bus_space_set_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, size_t); -static __inline void bus_space_set_multi_stream_2(bus_space_tag_t, +static inline void bus_space_set_multi_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, size_t); -static __inline void bus_space_set_multi_stream_4(bus_space_tag_t, +static inline void bus_space_set_multi_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, size_t); -static __inline void bus_space_set_region_1(bus_space_tag_t, +static inline void bus_space_set_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, size_t); -static __inline void bus_space_set_region_2(bus_space_tag_t, +static inline void bus_space_set_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, size_t); -static __inline void bus_space_set_region_4(bus_space_tag_t, +static inline void bus_space_set_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, size_t); -static __inline void bus_space_set_region_stream_2(bus_space_tag_t, +static inline void bus_space_set_region_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, size_t); -static __inline void bus_space_set_region_stream_4(bus_space_tag_t, +static inline void bus_space_set_region_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, size_t); -static __inline int +static inline int bus_space_map(t, addr, size, flags, bshp) bus_space_tag_t t; bus_addr_t addr; @@ -285,7 +285,7 @@ bus_space_map(t, addr, size, flags, bshp) * buffer provided. */ -static __inline void +static inline void bus_space_read_region_1(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -297,10 +297,10 @@ bus_space_read_region_1(tag, bsh, offset, addr, count) while (count--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_read_region_2(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -311,12 +311,12 @@ bus_space_read_region_2(tag, bsh, offset, addr, count) volatile u_int16_t *s = __BA(tag, bsh, offset); while (count--) - __asm __volatile("lhbrx %0, 0, %1" : + __asm volatile("lhbrx %0, 0, %1" : "=r"(*addr++) : "r"(s++)); - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_read_region_4(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -327,16 +327,16 @@ bus_space_read_region_4(tag, bsh, offset, addr, count) volatile u_int32_t *s = __BA(tag, bsh, offset); while (count--) - __asm __volatile("lwbrx %0, 0, %1" : + __asm volatile("lwbrx %0, 0, %1" : "=r"(*addr++) : "r"(s++)); - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } #if 0 /* Cause a link error for bus_space_read_region_8 */ #define bus_space_read_region_8 !!! unimplemented !!! #endif -static __inline void +static inline void bus_space_read_region_stream_2(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -348,10 +348,10 @@ bus_space_read_region_stream_2(tag, bsh, offset, addr, count) while (count--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_read_region_stream_4(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -363,7 +363,7 @@ bus_space_read_region_stream_4(tag, bsh, offset, addr, count) while (count--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } #if 0 /* Cause a link error */ @@ -445,7 +445,7 @@ bus_space_read_region_stream_4(tag, bsh, offset, addr, count) * to bus space described by tag/handle starting at `offset'. */ -static __inline void +static inline void bus_space_write_region_1(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -457,10 +457,10 @@ bus_space_write_region_1(tag, bsh, offset, addr, count) while (count--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_write_region_2(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -471,12 +471,12 @@ bus_space_write_region_2(tag, bsh, offset, addr, count) volatile u_int16_t *d = __BA(tag, bsh, offset); while (count--) - __asm __volatile("sthbrx %0, 0, %1" :: + __asm volatile("sthbrx %0, 0, %1" :: "r"(*addr++), "r"(d++)); - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_write_region_4(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -487,16 +487,16 @@ bus_space_write_region_4(tag, bsh, offset, addr, count) volatile u_int32_t *d = __BA(tag, bsh, offset); while (count--) - __asm __volatile("stwbrx %0, 0, %1" :: + __asm volatile("stwbrx %0, 0, %1" :: "r"(*addr++), "r"(d++)); - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } #if 0 #define bus_space_write_region_8 !!! bus_space_write_region_8 unimplemented !!! #endif -static __inline void +static inline void bus_space_write_region_stream_2(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -508,10 +508,10 @@ bus_space_write_region_stream_2(tag, bsh, offset, addr, count) while (count--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_write_region_stream_4(tag, bsh, offset, addr, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -523,7 +523,7 @@ bus_space_write_region_stream_4(tag, bsh, offset, addr, count) while (count--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } #if 0 @@ -539,7 +539,7 @@ bus_space_write_region_stream_4(tag, bsh, offset, addr, count) * by tag/handle/offset `count' times. */ -static __inline void +static inline void bus_space_set_multi_1(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -551,10 +551,10 @@ bus_space_set_multi_1(tag, bsh, offset, val, count) while (count--) *d = val; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_set_multi_2(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -565,12 +565,12 @@ bus_space_set_multi_2(tag, bsh, offset, val, count) volatile u_int16_t *d = __BA(tag, bsh, offset); while (count--) - __asm __volatile("sthbrx %0, 0, %1" :: + __asm volatile("sthbrx %0, 0, %1" :: "r"(val), "r"(d)); - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_set_multi_4(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -581,16 +581,16 @@ bus_space_set_multi_4(tag, bsh, offset, val, count) volatile u_int32_t *d = __BA(tag, bsh, offset); while (count--) - __asm __volatile("stwbrx %0, 0, %1" :: + __asm volatile("stwbrx %0, 0, %1" :: "r"(val), "r"(d)); - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } #if 0 #define bus_space_set_multi_8 !!! bus_space_set_multi_8 unimplemented !!! #endif -static __inline void +static inline void bus_space_set_multi_stream_2(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -602,10 +602,10 @@ bus_space_set_multi_stream_2(tag, bsh, offset, val, count) while (count--) *d = val; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_set_multi_stream_4(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -617,7 +617,7 @@ bus_space_set_multi_stream_4(tag, bsh, offset, val, count) while (count--) *d = val; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } #if 0 @@ -633,7 +633,7 @@ bus_space_set_multi_stream_4(tag, bsh, offset, val, count) * by tag/handle starting at `offset'. */ -static __inline void +static inline void bus_space_set_region_1(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -645,10 +645,10 @@ bus_space_set_region_1(tag, bsh, offset, val, count) while (count--) *d++ = val; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_set_region_2(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -659,12 +659,12 @@ bus_space_set_region_2(tag, bsh, offset, val, count) volatile u_int16_t *d = __BA(tag, bsh, offset); while (count--) - __asm __volatile("sthbrx %0, 0, %1" :: + __asm volatile("sthbrx %0, 0, %1" :: "r"(val), "r"(d++)); - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_set_region_4(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -675,16 +675,16 @@ bus_space_set_region_4(tag, bsh, offset, val, count) volatile u_int32_t *d = __BA(tag, bsh, offset); while (count--) - __asm __volatile("stwbrx %0, 0, %1" :: + __asm volatile("stwbrx %0, 0, %1" :: "r"(val), "r"(d++)); - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } #if 0 #define bus_space_set_region_8 !!! bus_space_set_region_8 unimplemented !!! #endif -static __inline void +static inline void bus_space_set_region_stream_2(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -696,10 +696,10 @@ bus_space_set_region_stream_2(tag, bsh, offset, val, count) while (count--) *d++ = val; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } -static __inline void +static inline void bus_space_set_region_stream_4(tag, bsh, offset, val, count) bus_space_tag_t tag; bus_space_handle_t bsh; @@ -711,7 +711,7 @@ bus_space_set_region_stream_4(tag, bsh, offset, val, count) while (count--) *d++ = val; - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } #if 0 diff --git a/sys/arch/macppc/macppc/extintr.c b/sys/arch/macppc/macppc/extintr.c index 5bc6ae5facd..d7c46e6de68 100644 --- a/sys/arch/macppc/macppc/extintr.c +++ b/sys/arch/macppc/macppc/extintr.c @@ -1,4 +1,4 @@ -/* $NetBSD: extintr.c,v 1.53 2005/12/11 12:18:06 christos Exp $ */ +/* $NetBSD: extintr.c,v 1.54 2005/12/24 20:07:16 perry Exp $ */ /*- * Copyright (c) 2000, 2001 Tsubai Masanari. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.53 2005/12/11 12:18:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.54 2005/12/24 20:07:16 perry Exp $"); #include "opt_multiprocessor.h" @@ -184,7 +184,7 @@ mapirq(irq) /* * Count leading zeros. */ -static __inline int +static inline int cntlzw(x) int x; { diff --git a/sys/arch/macppc/stand/bootxx/bootxx.c b/sys/arch/macppc/stand/bootxx/bootxx.c index 2e7c1c5df0c..25d38d4688c 100644 --- a/sys/arch/macppc/stand/bootxx/bootxx.c +++ b/sys/arch/macppc/stand/bootxx/bootxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.14 2005/12/11 12:18:06 christos Exp $ */ +/* $NetBSD: bootxx.c,v 1.15 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -98,7 +98,7 @@ asm( ); -static __inline int +static inline int OF_finddevice(name) char *name; { @@ -120,7 +120,7 @@ OF_finddevice(name) return args.phandle; } -static __inline int +static inline int OF_getprop(handle, prop, buf, buflen) int handle; char *prop; @@ -151,7 +151,7 @@ OF_getprop(handle, prop, buf, buflen) return args.size; } -static __inline int +static inline int OF_open(dname) char *dname; { @@ -173,7 +173,7 @@ OF_open(dname) return args.handle; } -static __inline int +static inline int OF_read(handle, addr, len) int handle; void *addr; @@ -201,7 +201,7 @@ OF_read(handle, addr, len) return args.actual; } -static __inline int +static inline int OF_seek(handle, pos) int handle; u_quad_t pos; @@ -228,7 +228,7 @@ OF_seek(handle, pos) return args.status; } -static __inline int +static inline int OF_write(handle, addr, len) int handle; const void *addr; diff --git a/sys/arch/mips/alchemy/au_icu.c b/sys/arch/mips/alchemy/au_icu.c index 16e9d18919e..6f11c03b629 100644 --- a/sys/arch/mips/alchemy/au_icu.c +++ b/sys/arch/mips/alchemy/au_icu.c @@ -1,4 +1,4 @@ -/* $NetBSD: au_icu.c,v 1.11 2005/12/11 12:18:06 christos Exp $ */ +/* $NetBSD: au_icu.c,v 1.12 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: au_icu.c,v 1.11 2005/12/11 12:18:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: au_icu.c,v 1.12 2005/12/24 20:07:19 perry Exp $"); #include "opt_ddb.h" @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: au_icu.c,v 1.11 2005/12/11 12:18:06 christos Exp $") #include <mips/alchemy/include/aureg.h> #include <mips/alchemy/include/auvar.h> -#define REGVAL(x) *((__volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1((x)))) +#define REGVAL(x) *((volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1((x)))) /* * This is a mask of bits to clear in the SR when we go to a diff --git a/sys/arch/mips/bonito/bonitoreg.h b/sys/arch/mips/bonito/bonitoreg.h index 6349d6f2558..0368393a3d6 100644 --- a/sys/arch/mips/bonito/bonitoreg.h +++ b/sys/arch/mips/bonito/bonitoreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: bonitoreg.h,v 1.5 2002/08/18 16:00:33 simonb Exp $ */ +/* $NetBSD: bonitoreg.h,v 1.6 2005/12/24 20:07:19 perry Exp $ */ /* * Bonito Register Map @@ -22,7 +22,7 @@ #define BONITO(x) (BONITO_REG_BASE + (x)) -#define REGVAL(x) *((__volatile u_int32_t *) MIPS_PHYS_TO_KSEG1(x)) +#define REGVAL(x) *((volatile u_int32_t *) MIPS_PHYS_TO_KSEG1(x)) #define BONITO_BOOT_BASE 0x1fc00000 #define BONITO_BOOT_SIZE 0x00100000 diff --git a/sys/arch/mips/include/cache_r4k.h b/sys/arch/mips/include/cache_r4k.h index 13741f4e6e3..78900ec97d4 100644 --- a/sys/arch/mips/include/cache_r4k.h +++ b/sys/arch/mips/include/cache_r4k.h @@ -1,4 +1,4 @@ -/* $NetBSD: cache_r4k.h,v 1.10 2003/03/08 04:43:26 rafal Exp $ */ +/* $NetBSD: cache_r4k.h,v 1.11 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -64,7 +64,7 @@ */ #define cache_op_r4k_line(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %1, 0(%0) \n\t" \ ".set reorder" \ @@ -80,7 +80,7 @@ do { \ */ #define cache_r4k_op_8lines_16(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %1, 0x00(%0); cache %1, 0x10(%0) \n\t" \ "cache %1, 0x20(%0); cache %1, 0x30(%0) \n\t" \ @@ -99,7 +99,7 @@ do { \ */ #define cache_r4k_op_8lines_32(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %1, 0x00(%0); cache %1, 0x20(%0) \n\t" \ "cache %1, 0x40(%0); cache %1, 0x60(%0) \n\t" \ @@ -119,7 +119,7 @@ do { \ */ #define cache_r4k_op_32lines_16(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %1, 0x000(%0); cache %1, 0x010(%0); \n\t" \ "cache %1, 0x020(%0); cache %1, 0x030(%0); \n\t" \ @@ -151,7 +151,7 @@ do { \ */ #define cache_r4k_op_32lines_32(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %1, 0x000(%0); cache %1, 0x020(%0); \n\t" \ "cache %1, 0x040(%0); cache %1, 0x060(%0); \n\t" \ @@ -183,7 +183,7 @@ do { \ */ #define cache_r4k_op_32lines_128(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %1, 0x0000(%0); cache %1, 0x0080(%0); \n\t" \ "cache %1, 0x0100(%0); cache %1, 0x0180(%0); \n\t" \ @@ -215,7 +215,7 @@ do { \ */ #define cache_r4k_op_16lines_16_2way(va1, va2, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %2, 0x000(%0); cache %2, 0x000(%1); \n\t" \ "cache %2, 0x010(%0); cache %2, 0x010(%1); \n\t" \ @@ -247,7 +247,7 @@ do { \ */ #define cache_r4k_op_16lines_32_2way(va1, va2, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %2, 0x000(%0); cache %2, 0x000(%1); \n\t" \ "cache %2, 0x020(%0); cache %2, 0x020(%1); \n\t" \ @@ -279,7 +279,7 @@ do { \ */ #define cache_r4k_op_8lines_16_4way(va1, va2, va3, va4, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %4, 0x000(%0); cache %4, 0x000(%1); \n\t" \ "cache %4, 0x000(%2); cache %4, 0x000(%3); \n\t" \ @@ -311,7 +311,7 @@ do { \ */ #define cache_r4k_op_8lines_32_4way(va1, va2, va3, va4, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "cache %4, 0x000(%0); cache %4, 0x000(%1); \n\t" \ "cache %4, 0x000(%2); cache %4, 0x000(%3); \n\t" \ diff --git a/sys/arch/mips/include/cache_r5900.h b/sys/arch/mips/include/cache_r5900.h index ba2b926da6a..8cfa849b0ed 100644 --- a/sys/arch/mips/include/cache_r5900.h +++ b/sys/arch/mips/include/cache_r5900.h @@ -1,4 +1,4 @@ -/* $NetBSD: cache_r5900.h,v 1.4 2003/02/17 11:35:02 simonb Exp $ */ +/* $NetBSD: cache_r5900.h,v 1.5 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ #define cache_op_r5900_line_64(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "sync.l \n\t" \ "sync.p \n\t" \ @@ -75,7 +75,7 @@ do { \ #define cache_r5900_op_4lines_64(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "sync.l \n\t" \ "sync.p \n\t" \ @@ -99,7 +99,7 @@ do { \ #define cache_r5900_op_4lines_64_2way(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ "sync.l \n\t" \ "sync.p \n\t" \ diff --git a/sys/arch/mips/include/cache_tx39.h b/sys/arch/mips/include/cache_tx39.h index f0a1e143e08..e7e4592f5ce 100644 --- a/sys/arch/mips/include/cache_tx39.h +++ b/sys/arch/mips/include/cache_tx39.h @@ -1,4 +1,4 @@ -/* $NetBSD: cache_tx39.h,v 1.4 2003/02/17 11:35:03 simonb Exp $ */ +/* $NetBSD: cache_tx39.h,v 1.5 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #define cache_op_tx39_line(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ ".set push \n\t" \ ".set mips3 \n\t" \ @@ -88,7 +88,7 @@ do { \ */ #define cache_tx39_op_32lines_4(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ ".set push \n\t" \ ".set mips3 \n\t" \ @@ -123,7 +123,7 @@ do { \ */ #define cache_tx39_op_32lines_16(va, op) \ do { \ - __asm __volatile( \ + __asm volatile( \ ".set noreorder \n\t" \ ".set push \n\t" \ ".set mips3 \n\t" \ diff --git a/sys/arch/mips/include/cpu_counter.h b/sys/arch/mips/include/cpu_counter.h index 9fbac4c5754..c4fd30e145a 100644 --- a/sys/arch/mips/include/cpu_counter.h +++ b/sys/arch/mips/include/cpu_counter.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:54 nakayama Exp $ */ +/* $NetBSD: cpu_counter.h,v 1.2 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -38,7 +38,7 @@ #ifdef _KERNEL #ifdef MIPS3_PLUS -static __inline int +static inline int cpu_hascounter(void) { @@ -51,7 +51,7 @@ cpu_hascounter(void) #define cpu_counter() cpu_counter32() -static __inline uint32_t +static inline uint32_t cpu_counter32(void) { @@ -59,7 +59,7 @@ cpu_counter32(void) } #if 0 /* XXX MI microtime() needs frequency of CPU counter. */ -static __inline uint64_t +static inline uint64_t cpu_frequency(struct cpu_info *ci) { } diff --git a/sys/arch/mips/include/int_mwgwtypes.h b/sys/arch/mips/include/int_mwgwtypes.h index eb74dcb78e0..a794510a58c 100644 --- a/sys/arch/mips/include/int_mwgwtypes.h +++ b/sys/arch/mips/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.3 2002/11/03 19:55:23 thorpej Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.4 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; diff --git a/sys/arch/mips/include/int_types.h b/sys/arch/mips/include/int_types.h index 8901d08c203..284c5264e58 100644 --- a/sys/arch/mips/include/int_types.h +++ b/sys/arch/mips/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.9 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.10 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/mips/include/lock.h b/sys/arch/mips/include/lock.h index 212db4c46f0..f877a29fc21 100644 --- a/sys/arch/mips/include/lock.h +++ b/sys/arch/mips/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.6 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: lock.h,v 1.7 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,11 +45,11 @@ #ifndef _MIPS_LOCK_H_ #define _MIPS_LOCK_H_ -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *lp) { - __asm __volatile( + __asm volatile( "# -- BEGIN __cpu_simple_lock_init\n" " .set push \n" " .set mips2 \n" @@ -60,7 +60,7 @@ __cpu_simple_lock_init(__cpu_simple_lock_t *lp) : "=m" (*lp)); } -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *lp) { unsigned long t0; @@ -72,7 +72,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *lp) * some work. */ - __asm __volatile( + __asm volatile( "# -- BEGIN __cpu_simple_lock \n" " .set push \n" " .set mips2 \n" @@ -100,12 +100,12 @@ __cpu_simple_lock(__cpu_simple_lock_t *lp) : "i" (__SIMPLELOCK_LOCKED), "1" (*lp)); } -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *lp) { unsigned long t0, v0; - __asm __volatile( + __asm volatile( "# -- BEGIN __cpu_simple_lock_try\n" " .set push \n" " .set mips2 \n" @@ -131,11 +131,11 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *lp) return (v0 != 0); } -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *lp) { - __asm __volatile( + __asm volatile( "# -- BEGIN __cpu_simple_unlock \n" " .set push \n" " .set mips2 \n" diff --git a/sys/arch/mips/include/pmap.h b/sys/arch/mips/include/pmap.h index 05482d5ebe0..f2ee75ce034 100644 --- a/sys/arch/mips/include/pmap.h +++ b/sys/arch/mips/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.48 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.49 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -150,7 +150,7 @@ extern struct pmap kernel_pmap_store; #define pmap_update(pmap) /* nothing (yet) */ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/mips/include/proc.h b/sys/arch/mips/include/proc.h index 8175910ccd6..8b4ac720be5 100644 --- a/sys/arch/mips/include/proc.h +++ b/sys/arch/mips/include/proc.h @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.18 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: proc.h,v 1.19 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -54,7 +54,7 @@ struct mdlwp { }; struct mdproc { - __volatile int md_astpending; /* AST pending on return to userland */ + volatile int md_astpending; /* AST pending on return to userland */ /* syscall entry for this process */ void (*md_syscall)(struct lwp *, u_int, u_int, u_int); }; diff --git a/sys/arch/mips/include/pte.h b/sys/arch/mips/include/pte.h index 401afaa142c..26151440095 100644 --- a/sys/arch/mips/include/pte.h +++ b/sys/arch/mips/include/pte.h @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.14 2005/11/25 14:10:35 simonb Exp $ */ +/* $NetBSD: pte.h,v 1.15 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -123,25 +123,25 @@ int pmap_is_page_ro(pmap_t, vaddr_t, int); /* MIPS1 and MIPS3 (or greater) */ #if defined(MIPS1) && defined(MIPS3_PLUS) -static __inline int +static inline int mips_pg_v(unsigned int entry), mips_pg_wired(unsigned int entry), PAGE_IS_RDONLY(unsigned int pte, vaddr_t va); -static __inline unsigned int +static inline unsigned int mips_pg_wired_bit(void), mips_pg_m_bit(void), mips_pg_ro_bit(void), mips_pg_rw_bit(void), mips_pg_ropage_bit(void), mips_pg_cwpage_bit(void), mips_pg_rwpage_bit(void), mips_pg_global_bit(void); -static __inline paddr_t PTE_TO_PADDR(unsigned int pte); +static inline paddr_t PTE_TO_PADDR(unsigned int pte); -static __inline paddr_t mips_tlbpfn_to_paddr(unsigned int pfn); -static __inline unsigned int mips_paddr_to_tlbpfn(paddr_t pa); +static inline paddr_t mips_tlbpfn_to_paddr(unsigned int pfn); +static inline unsigned int mips_paddr_to_tlbpfn(paddr_t pa); -static __inline int +static inline int mips_pg_v(entry) unsigned int entry; { @@ -150,7 +150,7 @@ mips_pg_v(entry) return (entry & MIPS1_PG_V); } -static __inline int +static inline int mips_pg_wired(entry) unsigned int entry; { @@ -159,7 +159,7 @@ mips_pg_wired(entry) return (entry & MIPS1_PG_WIRED); } -static __inline unsigned int +static inline unsigned int mips_pg_m_bit(void) { if (MIPS_HAS_R4K_MMU) @@ -167,7 +167,7 @@ mips_pg_m_bit(void) return (MIPS1_PG_D); } -static __inline unsigned int +static inline unsigned int mips_pg_ro_bit(void) { if (MIPS_HAS_R4K_MMU) @@ -175,7 +175,7 @@ mips_pg_ro_bit(void) return (MIPS1_PG_RO); } -static __inline unsigned int +static inline unsigned int mips_pg_rw_bit(void) { if (MIPS_HAS_R4K_MMU) @@ -183,7 +183,7 @@ mips_pg_rw_bit(void) return (MIPS1_PG_RW); } -static __inline unsigned int +static inline unsigned int mips_pg_ropage_bit(void) { if (MIPS_HAS_R4K_MMU) @@ -191,7 +191,7 @@ mips_pg_ropage_bit(void) return (MIPS1_PG_RO); } -static __inline unsigned int +static inline unsigned int mips_pg_rwpage_bit(void) { if (MIPS_HAS_R4K_MMU) @@ -199,7 +199,7 @@ mips_pg_rwpage_bit(void) return (MIPS1_PG_RWPAGE); } -static __inline unsigned int +static inline unsigned int mips_pg_cwpage_bit(void) { if (MIPS_HAS_R4K_MMU) @@ -208,7 +208,7 @@ mips_pg_cwpage_bit(void) } -static __inline unsigned int +static inline unsigned int mips_pg_global_bit(void) { if (MIPS_HAS_R4K_MMU) @@ -216,7 +216,7 @@ mips_pg_global_bit(void) return (MIPS1_PG_G); } -static __inline unsigned int +static inline unsigned int mips_pg_wired_bit(void) { if (MIPS_HAS_R4K_MMU) @@ -224,7 +224,7 @@ mips_pg_wired_bit(void) return (MIPS1_PG_WIRED); } -static __inline paddr_t +static inline paddr_t PTE_TO_PADDR(pte) unsigned int pte; { @@ -233,7 +233,7 @@ PTE_TO_PADDR(pte) return (MIPS1_PTE_TO_PADDR(pte)); } -static __inline int +static inline int PAGE_IS_RDONLY(pte, va) unsigned int pte; vaddr_t va; @@ -243,7 +243,7 @@ PAGE_IS_RDONLY(pte, va) return (MIPS1_PAGE_IS_RDONLY(pte, va)); } -static __inline paddr_t +static inline paddr_t mips_tlbpfn_to_paddr(pfn) unsigned int pfn; { @@ -252,7 +252,7 @@ mips_tlbpfn_to_paddr(pfn) return (mips1_tlbpfn_to_paddr(pfn)); } -static __inline unsigned int +static inline unsigned int mips_paddr_to_tlbpfn(pa) paddr_t pa; { diff --git a/sys/arch/mips/include/types.h b/sys/arch/mips/include/types.h index 897685f2646..21684e0968b 100644 --- a/sys/arch/mips/include/types.h +++ b/sys/arch/mips/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.41 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: types.h,v 1.42 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -87,7 +87,7 @@ typedef struct label_t { } label_t; #endif -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/mips/include/userret.h b/sys/arch/mips/include/userret.h index 250666aefce..fbf2148fcac 100644 --- a/sys/arch/mips/include/userret.h +++ b/sys/arch/mips/include/userret.h @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.9 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: userret.h,v 1.10 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -81,7 +81,7 @@ #include <sys/userret.h> -static __inline void +static inline void userret(struct lwp *l) { diff --git a/sys/arch/mips/mips/cache_mipsNN.c b/sys/arch/mips/mips/cache_mipsNN.c index 86f6379514d..0e2d27037d5 100644 --- a/sys/arch/mips/mips/cache_mipsNN.c +++ b/sys/arch/mips/mips/cache_mipsNN.c @@ -1,4 +1,4 @@ -/* $NetBSD: cache_mipsNN.c,v 1.9 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: cache_mipsNN.c,v 1.10 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cache_mipsNN.c,v 1.9 2005/12/11 12:18:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache_mipsNN.c,v 1.10 2005/12/24 20:07:19 perry Exp $"); #include <sys/param.h> @@ -55,9 +55,9 @@ __KERNEL_RCSID(0, "$NetBSD: cache_mipsNN.c,v 1.9 2005/12/11 12:18:09 christos Ex #ifdef SB1250_PASS1 -#define SYNC __asm __volatile("sync; sync") +#define SYNC __asm volatile("sync; sync") #else -#define SYNC __asm __volatile("sync") +#define SYNC __asm volatile("sync") #endif __asm(".set mips32"); diff --git a/sys/arch/mips/mips/cache_r10k.c b/sys/arch/mips/mips/cache_r10k.c index bc7533aa3a4..ac2b81b4d11 100644 --- a/sys/arch/mips/mips/cache_r10k.c +++ b/sys/arch/mips/mips/cache_r10k.c @@ -1,4 +1,4 @@ -/* $NetBSD: cache_r10k.c,v 1.3 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: cache_r10k.c,v 1.4 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 2003 Takao Shinohara. @@ -86,7 +86,7 @@ r10k_icache_sync_all(void) mips_dcache_wbinv_all(); - __asm __volatile("sync"); + __asm volatile("sync"); while (va < eva) { cache_op_r4k_line(va+0, CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); @@ -104,7 +104,7 @@ r10k_icache_sync_range(vaddr_t va, vsize_t size) mips_dcache_wb_range(va, (eva - va)); - __asm __volatile("sync"); + __asm volatile("sync"); while (va < eva) { cache_op_r4k_line(va, CACHE_R4K_I|CACHEOP_R4K_HIT_INV); @@ -124,7 +124,7 @@ r10k_icache_sync_range_index(vaddr_t va, vsize_t size) mips_dcache_wbinv_range_index(va, (eva - va)); - __asm __volatile("sync"); + __asm volatile("sync"); /* * Since we're doing Index ops, we expect to not be able diff --git a/sys/arch/mips/mips/cache_r4k.c b/sys/arch/mips/mips/cache_r4k.c index 7c1721bcddc..83aafb4441e 100644 --- a/sys/arch/mips/mips/cache_r4k.c +++ b/sys/arch/mips/mips/cache_r4k.c @@ -1,4 +1,4 @@ -/* $NetBSD: cache_r4k.c,v 1.9 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: cache_r4k.c,v 1.10 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cache_r4k.c,v 1.9 2005/12/11 12:18:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache_r4k.c,v 1.10 2005/12/24 20:07:19 perry Exp $"); #include <sys/param.h> @@ -66,7 +66,7 @@ r4k_icache_sync_all_16(void) mips_dcache_wbinv_all(); - __asm __volatile("sync"); + __asm volatile("sync"); while (va < eva) { cache_r4k_op_32lines_16(va, CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); @@ -83,7 +83,7 @@ r4k_icache_sync_range_16(vaddr_t va, vsize_t size) mips_dcache_wb_range(va, (eva - va)); - __asm __volatile("sync"); + __asm volatile("sync"); while ((eva - va) >= (32 * 16)) { cache_r4k_op_32lines_16(va, CACHE_R4K_I|CACHEOP_R4K_HIT_INV); @@ -108,7 +108,7 @@ r4k_icache_sync_range_index_16(vaddr_t va, vsize_t size) mips_dcache_wbinv_range_index(va, (eva - va)); - __asm __volatile("sync"); + __asm volatile("sync"); /* * Since we're doing Index ops, we expect to not be able @@ -242,7 +242,7 @@ r4k_icache_sync_all_32(void) mips_dcache_wbinv_all(); - __asm __volatile("sync"); + __asm volatile("sync"); while (va < eva) { cache_r4k_op_32lines_32(va, CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); @@ -259,7 +259,7 @@ r4k_icache_sync_range_32(vaddr_t va, vsize_t size) mips_dcache_wb_range(va, (eva - va)); - __asm __volatile("sync"); + __asm volatile("sync"); while ((eva - va) >= (32 * 32)) { cache_r4k_op_32lines_32(va, CACHE_R4K_I|CACHEOP_R4K_HIT_INV); @@ -282,7 +282,7 @@ r4k_icache_sync_range_index_32(vaddr_t va, vsize_t size) mips_dcache_wbinv_range_index(va, (eva - va)); - __asm __volatile("sync"); + __asm volatile("sync"); /* * Since we're doing Index ops, we expect to not be able diff --git a/sys/arch/mips/mips/cache_r5k.c b/sys/arch/mips/mips/cache_r5k.c index af3f13d9810..2e4b50023d0 100644 --- a/sys/arch/mips/mips/cache_r5k.c +++ b/sys/arch/mips/mips/cache_r5k.c @@ -1,4 +1,4 @@ -/* $NetBSD: cache_r5k.c,v 1.11 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: cache_r5k.c,v 1.12 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cache_r5k.c,v 1.11 2005/12/11 12:18:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache_r5k.c,v 1.12 2005/12/24 20:07:19 perry Exp $"); #include <sys/param.h> @@ -98,7 +98,7 @@ r5k_icache_sync_all_32(void) mips_dcache_wbinv_all(); - __asm __volatile("sync"); + __asm volatile("sync"); while (va < eva) { cache_r4k_op_32lines_32(va, CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); @@ -115,7 +115,7 @@ r5k_icache_sync_range_32(vaddr_t va, vsize_t size) mips_dcache_wb_range(va, (eva - va)); - __asm __volatile("sync"); + __asm volatile("sync"); while ((eva - va) >= (32 * 32)) { cache_r4k_op_32lines_32(va, CACHE_R4K_I|CACHEOP_R4K_HIT_INV); @@ -140,7 +140,7 @@ r5k_icache_sync_range_index_32(vaddr_t va, vsize_t size) mips_dcache_wbinv_range_index(va, (eva - va)); - __asm __volatile("sync"); + __asm volatile("sync"); /* * Since we're doing Index ops, we expect to not be able @@ -233,7 +233,7 @@ r4600v1_pdcache_wbinv_range_32(vaddr_t va, vsize_t size) mips_cp0_status_write(ostatus & ~MIPS_SR_INT_IE); while (va < eva) { - __asm __volatile("nop; nop; nop; nop;"); + __asm volatile("nop; nop; nop; nop;"); cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB_INV); va += 32; } @@ -254,13 +254,13 @@ r4600v2_pdcache_wbinv_range_32(vaddr_t va, vsize_t size) mips_cp0_status_write(ostatus & ~MIPS_SR_INT_IE); while ((eva - va) >= (32 * 32)) { - (void) *(__volatile int *)MIPS_PHYS_TO_KSEG1(0); + (void) *(volatile int *)MIPS_PHYS_TO_KSEG1(0); cache_r4k_op_32lines_32(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB_INV); va += (32 * 32); } - (void) *(__volatile int *)MIPS_PHYS_TO_KSEG1(0); + (void) *(volatile int *)MIPS_PHYS_TO_KSEG1(0); while (va < eva) { cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB_INV); va += 32; @@ -412,7 +412,7 @@ r4600v1_pdcache_inv_range_32(vaddr_t va, vsize_t size) mips_cp0_status_write(ostatus & ~MIPS_SR_INT_IE); while (va < eva) { - __asm __volatile("nop; nop; nop; nop;"); + __asm volatile("nop; nop; nop; nop;"); cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_INV); va += 32; } @@ -437,12 +437,12 @@ r4600v2_pdcache_inv_range_32(vaddr_t va, vsize_t size) * a chance to get though. */ while ((eva - va) >= (32 * 32)) { - (void) *(__volatile int *)MIPS_PHYS_TO_KSEG1(0); + (void) *(volatile int *)MIPS_PHYS_TO_KSEG1(0); cache_r4k_op_32lines_32(va, CACHE_R4K_D|CACHEOP_R4K_HIT_INV); va += (32 * 32); } - (void) *(__volatile int *)MIPS_PHYS_TO_KSEG1(0); + (void) *(volatile int *)MIPS_PHYS_TO_KSEG1(0); while (va < eva) { cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_INV); va += 32; @@ -506,7 +506,7 @@ r4600v1_pdcache_wb_range_32(vaddr_t va, vsize_t size) mips_cp0_status_write(ostatus & ~MIPS_SR_INT_IE); while (va < eva) { - __asm __volatile("nop; nop; nop; nop;"); + __asm volatile("nop; nop; nop; nop;"); cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB); va += 32; } @@ -531,12 +531,12 @@ r4600v2_pdcache_wb_range_32(vaddr_t va, vsize_t size) * a chance to get though. */ while ((eva - va) >= (32 * 32)) { - (void) *(__volatile int *)MIPS_PHYS_TO_KSEG1(0); + (void) *(volatile int *)MIPS_PHYS_TO_KSEG1(0); cache_r4k_op_32lines_32(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB); va += (32 * 32); } - (void) *(__volatile int *)MIPS_PHYS_TO_KSEG1(0); + (void) *(volatile int *)MIPS_PHYS_TO_KSEG1(0); while (va < eva) { cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB); va += 32; @@ -632,7 +632,7 @@ r5k_sdcache_wbinv_range(vaddr_t va, vsize_t size) va = trunc_page(va); - __asm __volatile( + __asm volatile( ".set noreorder \n\t" ".set noat \n\t" "mfc0 %0, $12 \n\t" @@ -641,16 +641,16 @@ r5k_sdcache_wbinv_range(vaddr_t va, vsize_t size) ".set at" : "=r"(ostatus)); - __asm __volatile("mfc0 %0, $28" : "=r"(taglo)); - __asm __volatile("mtc0 $0, $28"); + __asm volatile("mfc0 %0, $28" : "=r"(taglo)); + __asm volatile("mtc0 $0, $28"); while (va < eva) { cache_op_r4k_line(va, R5K_Page_Invalidate_S); va += (128 * 32); } - __asm __volatile("mtc0 %0, $12; nop" :: "r"(ostatus)); - __asm __volatile("mtc0 %0, $28; nop" :: "r"(taglo)); + __asm volatile("mtc0 %0, $12; nop" :: "r"(ostatus)); + __asm volatile("mtc0 %0, $28; nop" :: "r"(taglo)); } void diff --git a/sys/arch/mips/mips/cache_tx39.c b/sys/arch/mips/mips/cache_tx39.c index 38e2ab92b4c..289352f2edc 100644 --- a/sys/arch/mips/mips/cache_tx39.c +++ b/sys/arch/mips/mips/cache_tx39.c @@ -1,4 +1,4 @@ -/* $NetBSD: cache_tx39.c,v 1.4 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: cache_tx39.c,v 1.5 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cache_tx39.c,v 1.4 2005/12/11 12:18:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache_tx39.c,v 1.5 2005/12/24 20:07:19 perry Exp $"); #include <sys/param.h> @@ -95,7 +95,7 @@ tx3900_pdcache_wbinv_all_4(void) { vaddr_t va = MIPS_PHYS_TO_KSEG0(0); vaddr_t eva = va + mips_pdcache_size; - __volatile int *p; + volatile int *p; /* * No Index Invalidate for the TX3900 -- have to execute a @@ -154,7 +154,7 @@ tx3920_icache_sync_all_16wb(void) mips_dcache_wbinv_all(); - __asm __volatile("sync"); + __asm volatile("sync"); tx3920_icache_do_inv_16(MIPS_PHYS_TO_KSEG0(0), MIPS_PHYS_TO_KSEG0(mips_picache_size)); @@ -179,7 +179,7 @@ tx3920_icache_sync_range_16wb(vaddr_t va, vsize_t size) mips_dcache_wb_range(va, (eva - va)); - __asm __volatile("sync"); + __asm volatile("sync"); tx3920_icache_do_inv_16(va, eva); } diff --git a/sys/arch/mips/mips/db_interface.c b/sys/arch/mips/mips/db_interface.c index 896124c3f39..3e79203c286 100644 --- a/sys/arch/mips/mips/db_interface.c +++ b/sys/arch/mips/mips/db_interface.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.54 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: db_interface.c,v 1.55 2005/12/24 20:07:19 perry Exp $ */ /* * Mach Operating System @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.54 2005/12/11 12:18:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.55 2005/12/24 20:07:19 perry Exp $"); #include "opt_cputype.h" /* which mips CPUs do we support? */ #include "opt_ddb.h" @@ -406,7 +406,7 @@ db_kvtophys_cmd(db_expr_t addr, int have_addr, db_expr_t count, do { \ uint32_t __val; \ \ - __asm __volatile("mfc0 %0,$" ___STRING(reg) : "=r"(__val)); \ + __asm volatile("mfc0 %0,$" ___STRING(reg) : "=r"(__val)); \ printf(" %s:%*s %#x\n", name, FLDWIDTH - (int) strlen(name), \ "", __val); \ } while (0) @@ -416,7 +416,7 @@ do { \ do { \ uint64_t __val; \ \ - __asm __volatile( \ + __asm volatile( \ ".set push \n\t" \ ".set mips3 \n\t" \ ".set noat \n\t" \ diff --git a/sys/arch/mips/mips/mips_emul.c b/sys/arch/mips/mips/mips_emul.c index 7373d63fa92..189e177ecfb 100644 --- a/sys/arch/mips/mips/mips_emul.c +++ b/sys/arch/mips/mips/mips_emul.c @@ -1,4 +1,4 @@ -/* $NetBSD: mips_emul.c,v 1.12 2005/12/11 12:18:09 christos Exp $ */ +/* $NetBSD: mips_emul.c,v 1.13 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (c) 1999 Shuichiro URATA. All rights reserved. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.12 2005/12/11 12:18:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.13 2005/12/24 20:07:19 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -45,9 +45,9 @@ __KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.12 2005/12/11 12:18:09 christos Exp void MachEmulateFP(u_int32_t, struct frame *, u_int32_t); -static __inline void send_sigsegv(u_int32_t, u_int32_t, struct frame *, +static inline void send_sigsegv(u_int32_t, u_int32_t, struct frame *, u_int32_t); -static __inline void update_pc(struct frame *, u_int32_t); +static inline void update_pc(struct frame *, u_int32_t); vaddr_t MachEmulateBranch(struct frame *, vaddr_t, unsigned, int); void MachEmulateInst(u_int32_t, u_int32_t, u_int32_t, struct frame *); @@ -264,7 +264,7 @@ MachEmulateInst(status, cause, opc, frame) } } -static __inline void +static inline void send_sigsegv(u_int32_t vaddr, u_int32_t exccode, struct frame *frame, u_int32_t cause) { @@ -280,7 +280,7 @@ send_sigsegv(u_int32_t vaddr, u_int32_t exccode, struct frame *frame, (*curproc->p_emul->e_trapsignal)(curlwp, &ksi); } -static __inline void +static inline void update_pc(struct frame *frame, u_int32_t cause) { diff --git a/sys/arch/mips/mips/mips_machdep.c b/sys/arch/mips/mips/mips_machdep.c index 43eb4ce8ace..a11155d27a8 100644 --- a/sys/arch/mips/mips/mips_machdep.c +++ b/sys/arch/mips/mips/mips_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: mips_machdep.c,v 1.183 2005/12/20 21:06:43 tron Exp $ */ +/* $NetBSD: mips_machdep.c,v 1.184 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -119,7 +119,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.183 2005/12/20 21:06:43 tron Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.184 2005/12/24 20:07:19 perry Exp $"); #include "opt_cputype.h" @@ -1493,7 +1493,7 @@ savefpregs(l) /* * turnoff interrupts enabling CP1 to read FPCSR register. */ - __asm __volatile ( + __asm volatile ( ".set noreorder \n\t" ".set noat \n\t" "mfc0 %0, $" ___STRING(MIPS_COP_0_STATUS) " \n\t" @@ -1516,7 +1516,7 @@ savefpregs(l) */ fp = (int *)l->l_addr->u_pcb.pcb_fpregs.r_regs; fp[32] = fpcsr; - __asm __volatile ( + __asm volatile ( ".set noreorder ;" "swc1 $f0, 0(%0) ;" "swc1 $f1, 4(%0) ;" @@ -1554,7 +1554,7 @@ savefpregs(l) /* * stop CP1, enable interrupts. */ - __asm __volatile ("mtc0 %0, $" ___STRING(MIPS_COP_0_STATUS) + __asm volatile ("mtc0 %0, $" ___STRING(MIPS_COP_0_STATUS) :: "r"(status)); #endif } @@ -1573,7 +1573,7 @@ loadfpregs(l) /* * turnoff interrupts enabling CP1 to load FP registers. */ - __asm __volatile( + __asm volatile( ".set noreorder \n\t" ".set noat \n\t" "mfc0 %0, $" ___STRING(MIPS_COP_0_STATUS) " \n\t" @@ -1588,7 +1588,7 @@ loadfpregs(l) /* * load 32bit FP registers and establish processes' FP context. */ - __asm __volatile( + __asm volatile( ".set noreorder ;" "lwc1 $f0, 0(%0) ;" "lwc1 $f1, 4(%0) ;" @@ -1626,7 +1626,7 @@ loadfpregs(l) /* * load FPCSR and stop CP1 again while enabling interrupts. */ - __asm __volatile( + __asm volatile( ".set noreorder \n\t" ".set noat \n\t" "ctc1 %0, $31 \n\t" diff --git a/sys/arch/mips/mips/pmap.c b/sys/arch/mips/mips/pmap.c index ca9ca02913a..4c81c0ebdd2 100644 --- a/sys/arch/mips/mips/pmap.c +++ b/sys/arch/mips/mips/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.165 2005/12/17 05:44:11 jmc Exp $ */ +/* $NetBSD: pmap.c,v 1.166 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.165 2005/12/17 05:44:11 jmc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.166 2005/12/24 20:07:19 perry Exp $"); /* * Manages physical address maps. @@ -755,7 +755,7 @@ pmap_remove(pmap_t pmap, vaddr_t sva, vaddr_t eva) if (PMAP_IS_ACTIVE(pmap)) { unsigned asid; - __asm __volatile("mfc0 %0,$10; nop" : "=r"(asid)); + __asm volatile("mfc0 %0,$10; nop" : "=r"(asid)); asid = (MIPS_HAS_R4K_MMU) ? (asid & 0xff) : (asid & 0xfc0) >> 6; if (asid != pmap->pm_asid) { panic("inconsistency for active TLB flush: %d <-> %d", @@ -913,7 +913,7 @@ pmap_protect(pmap_t pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot) if (PMAP_IS_ACTIVE(pmap)) { unsigned asid; - __asm __volatile("mfc0 %0,$10; nop" : "=r"(asid)); + __asm volatile("mfc0 %0,$10; nop" : "=r"(asid)); asid = (MIPS_HAS_R4K_MMU) ? (asid & 0xff) : (asid & 0xfc0) >> 6; if (asid != pmap->pm_asid) { panic("inconsistency for active TLB update: %d <-> %d", @@ -1283,7 +1283,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags) if (PMAP_IS_ACTIVE(pmap)) { unsigned asid; - __asm __volatile("mfc0 %0,$10; nop" : "=r"(asid)); + __asm volatile("mfc0 %0,$10; nop" : "=r"(asid)); asid = (MIPS_HAS_R4K_MMU) ? (asid & 0xff) : (asid & 0xfc0) >> 6; if (asid != pmap->pm_asid) { panic("inconsistency for active TLB update: %d <-> %d", diff --git a/sys/arch/mipsco/include/bus.h b/sys/arch/mipsco/include/bus.h index a66e680684d..cc82eb91c70 100644 --- a/sys/arch/mipsco/include/bus.h +++ b/sys/arch/mipsco/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.13 2005/12/11 12:18:13 christos Exp $ */ +/* $NetBSD: bus.h,v 1.14 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -372,7 +372,7 @@ int mipsco_bus_space_alloc __P((bus_space_tag_t, bus_addr_t, bus_addr_t, */ #define __bus_space_read(BYTES,BITS) \ -static __inline __CONCAT3(u_int,BITS,_t) \ +static inline __CONCAT3(u_int,BITS,_t) \ __CONCAT(bus_space_read_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, bus_size_t offset) \ { \ @@ -394,11 +394,11 @@ __bus_space_read(8,64) */ #define __bus_space_read_multi(BYTES,BITS) \ -static __inline void __BS_FUNCTION(bus_space_read_multi,BYTES) \ +static inline void __BS_FUNCTION(bus_space_read_multi,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __BS_TYPENAME(BITS) *, size_t)); \ \ -static __inline void \ +static inline void \ __BS_FUNCTION(bus_space_read_multi,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -428,11 +428,11 @@ __bus_space_read_multi(8,64) */ #define __bus_space_read_region(BYTES,BITS) \ -static __inline void __BS_FUNCTION(bus_space_read_region,BYTES) \ +static inline void __BS_FUNCTION(bus_space_read_region,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __BS_TYPENAME(BITS) *, size_t)); \ \ -static __inline void \ +static inline void \ __BS_FUNCTION(bus_space_read_region,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -463,7 +463,7 @@ __bus_space_read_region(8,64) */ #define __bus_space_write(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, \ bus_size_t offset, __CONCAT3(u_int,BITS,_t) data) \ @@ -487,11 +487,11 @@ __bus_space_write(8,64) */ #define __bus_space_write_multi(BYTES,BITS) \ -static __inline void __BS_FUNCTION(bus_space_write_multi,BYTES) \ +static inline void __BS_FUNCTION(bus_space_write_multi,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __BS_TYPENAME(BITS) *, size_t)); \ \ -static __inline void \ +static inline void \ __BS_FUNCTION(bus_space_write_multi,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -520,11 +520,11 @@ __bus_space_write_multi(8,64) */ #define __bus_space_write_region(BYTES,BITS) \ -static __inline void __BS_FUNCTION(bus_space_write_region,BYTES) \ +static inline void __BS_FUNCTION(bus_space_write_region,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ const __BS_TYPENAME(BITS) *, size_t)); \ \ -static __inline void \ +static inline void \ __BS_FUNCTION(bus_space_write_region,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -555,11 +555,11 @@ __bus_space_write_region(8,64) */ #define __bus_space_set_multi(BYTES,BITS) \ -static __inline void __BS_FUNCTION(bus_space_set_multi,BYTES) \ +static inline void __BS_FUNCTION(bus_space_set_multi,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __BS_TYPENAME(BITS), size_t)); \ \ -static __inline void \ +static inline void \ __BS_FUNCTION(bus_space_set_multi,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -588,11 +588,11 @@ __bus_space_set_multi(8,64) */ #define __bus_space_set_region(BYTES,BITS) \ -static __inline void __BS_FUNCTION(bus_space_set_region,BYTES) \ +static inline void __BS_FUNCTION(bus_space_set_region,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __BS_TYPENAME(BITS), size_t)); \ \ -static __inline void \ +static inline void \ __BS_FUNCTION(bus_space_set_region,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -624,13 +624,13 @@ __bus_space_set_region(8,64) */ #define __bus_space_copy_region(BYTES) \ -static __inline void __BS_FUNCTION(bus_space_copy_region,BYTES) \ +static inline void __BS_FUNCTION(bus_space_copy_region,BYTES) \ __P((bus_space_tag_t, \ bus_space_handle_t bsh1, bus_size_t off1, \ bus_space_handle_t bsh2, bus_size_t off2, \ bus_size_t count)); \ \ -static __inline void \ +static inline void \ __BS_FUNCTION(bus_space_copy_region,BYTES)(t, h1, o1, h2, o2, c) \ bus_space_tag_t t; \ bus_space_handle_t h1, h2; \ @@ -683,7 +683,7 @@ __bus_space_copy_region(8) #define __bus_space_read_stream(BYTES,BITS) \ -static __inline __BS_TYPENAME(BITS) \ +static inline __BS_TYPENAME(BITS) \ __CONCAT(bus_space_read_stream_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, bus_size_t offset) \ { \ @@ -699,7 +699,7 @@ __bus_space_read_stream(8, 64) /* bus_space_read_stream_8 */ #define __bus_space_write_stream(BYTES,BITS) \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_stream_,BYTES)(bus_space_tag_t bst, \ bus_space_handle_t bsh, \ bus_size_t offset, __CONCAT3(u_int,BITS,_t) data) \ diff --git a/sys/arch/mipsco/obio/asc.c b/sys/arch/mipsco/obio/asc.c index 75905f9461b..c8f9e0ff44c 100644 --- a/sys/arch/mipsco/obio/asc.c +++ b/sys/arch/mipsco/obio/asc.c @@ -1,4 +1,4 @@ -/* $NetBSD: asc.c,v 1.16 2005/12/11 12:18:13 christos Exp $ */ +/* $NetBSD: asc.c,v 1.17 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: asc.c,v 1.16 2005/12/11 12:18:13 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: asc.c,v 1.17 2005/12/24 20:07:19 perry Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -247,7 +247,7 @@ dma_status(struct ncr53c9x_softc *sc) asc_read_reg(sc, NCR_FFLAG)); } -static __inline void +static inline void check_fifo(struct asc_softc *esc) { register int i=100; diff --git a/sys/arch/mipsco/obio/if_le.c b/sys/arch/mipsco/obio/if_le.c index 9281ed857d0..7bc283fafe3 100644 --- a/sys/arch/mipsco/obio/if_le.c +++ b/sys/arch/mipsco/obio/if_le.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le.c,v 1.8 2005/12/11 12:18:13 christos Exp $ */ +/* $NetBSD: if_le.c,v 1.9 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.8 2005/12/11 12:18:13 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.9 2005/12/24 20:07:19 perry Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -104,7 +104,7 @@ static int le_attached; #define integrate #define hide #else -#define integrate static __inline +#define integrate static inline #define hide static #endif diff --git a/sys/arch/mmeye/dev/mmeyepcmcia.c b/sys/arch/mmeye/dev/mmeyepcmcia.c index 075f9dc4baa..723f094209e 100644 --- a/sys/arch/mmeye/dev/mmeyepcmcia.c +++ b/sys/arch/mmeye/dev/mmeyepcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: mmeyepcmcia.c,v 1.10 2005/12/11 12:18:16 christos Exp $ */ +/* $NetBSD: mmeyepcmcia.c,v 1.11 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (c) 1997 Marc Horowitz. All rights reserved. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mmeyepcmcia.c,v 1.10 2005/12/11 12:18:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mmeyepcmcia.c,v 1.11 2005/12/24 20:07:19 perry Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -192,8 +192,8 @@ void mmeyepcmcia_chip_io_unmap(pcmcia_chipset_handle_t, int); void mmeyepcmcia_chip_socket_enable(pcmcia_chipset_handle_t); void mmeyepcmcia_chip_socket_disable(pcmcia_chipset_handle_t); -static __inline int mmeyepcmcia_read(struct mmeyepcmcia_handle *, int); -static __inline int +static inline int mmeyepcmcia_read(struct mmeyepcmcia_handle *, int); +static inline int mmeyepcmcia_read(struct mmeyepcmcia_handle *h, int idx) { static int prev_idx = 0; @@ -205,8 +205,8 @@ mmeyepcmcia_read(struct mmeyepcmcia_handle *h, int idx) return (bus_space_read_stream_2(h->sc->iot, h->sc->ioh, idx)); } -static __inline void mmeyepcmcia_write(struct mmeyepcmcia_handle *, int, int); -static __inline void +static inline void mmeyepcmcia_write(struct mmeyepcmcia_handle *, int, int); +static inline void mmeyepcmcia_write(struct mmeyepcmcia_handle *h, int idx, int data) { static int prev_idx; diff --git a/sys/arch/mmeye/mmeye/machdep.c b/sys/arch/mmeye/mmeye/machdep.c index 21859de3c69..147f6e45627 100644 --- a/sys/arch/mmeye/mmeye/machdep.c +++ b/sys/arch/mmeye/mmeye/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.37 2005/12/11 12:18:16 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.38 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.37 2005/12/11 12:18:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38 2005/12/24 20:07:19 perry Exp $"); #include "opt_ddb.h" #include "opt_memsize.h" @@ -269,7 +269,7 @@ initSH3(void *pc) /* XXX return address */ * XXX We can't return here, because we change stack pointer. * So jump to return address directly. */ - __asm __volatile ( + __asm volatile ( "jmp @%0;" "mov %1, r15" :: "r"(pc),"r"(lwp0.l_md.md_pcb->pcb_sf.sf_r7_bank)); diff --git a/sys/arch/mvme68k/include/bus_space.h b/sys/arch/mvme68k/include/bus_space.h index 37c694135a3..9dc282d9094 100644 --- a/sys/arch/mvme68k/include/bus_space.h +++ b/sys/arch/mvme68k/include/bus_space.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.h,v 1.9 2005/12/11 12:18:17 christos Exp $ */ +/* $NetBSD: bus_space.h,v 1.10 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -228,7 +228,7 @@ struct mvme68k_bus_space_tag { #define bus_space_read_multi_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -242,7 +242,7 @@ struct mvme68k_bus_space_tag { #define bus_space_read_multi_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -256,7 +256,7 @@ struct mvme68k_bus_space_tag { #define bus_space_read_multi_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -284,7 +284,7 @@ struct mvme68k_bus_space_tag { #define bus_space_read_region_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -298,7 +298,7 @@ struct mvme68k_bus_space_tag { #define bus_space_read_region_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -312,7 +312,7 @@ struct mvme68k_bus_space_tag { #define bus_space_read_region_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -360,7 +360,7 @@ struct mvme68k_bus_space_tag { #define bus_space_write_multi_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -374,7 +374,7 @@ struct mvme68k_bus_space_tag { #define bus_space_write_multi_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -388,7 +388,7 @@ struct mvme68k_bus_space_tag { #define bus_space_write_multi_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -416,7 +416,7 @@ struct mvme68k_bus_space_tag { #define bus_space_write_region_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -430,7 +430,7 @@ struct mvme68k_bus_space_tag { #define bus_space_write_region_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -444,7 +444,7 @@ struct mvme68k_bus_space_tag { #define bus_space_write_region_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -472,7 +472,7 @@ struct mvme68k_bus_space_tag { #define bus_space_set_multi_1(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -486,7 +486,7 @@ struct mvme68k_bus_space_tag { #define bus_space_set_multi_2(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -500,7 +500,7 @@ struct mvme68k_bus_space_tag { #define bus_space_set_multi_4(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -528,7 +528,7 @@ struct mvme68k_bus_space_tag { #define bus_space_set_region_1(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -542,7 +542,7 @@ struct mvme68k_bus_space_tag { #define bus_space_set_region_2(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -556,7 +556,7 @@ struct mvme68k_bus_space_tag { #define bus_space_set_region_4(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -584,13 +584,13 @@ struct mvme68k_bus_space_tag { */ #define __MVME68K_copy_region_N(BYTES) \ -static __inline void __CONCAT(bus_space_copy_region_,BYTES) \ +static inline void __CONCAT(bus_space_copy_region_,BYTES) \ __P((bus_space_tag_t, \ bus_space_handle_t bsh1, bus_size_t off1, \ bus_space_handle_t bsh2, bus_size_t off2, \ bus_size_t count)); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)(t, h1, o1, h2, o2, c) \ bus_space_tag_t t; \ bus_space_handle_t h1, h2; \ diff --git a/sys/arch/mvme68k/include/intr.h b/sys/arch/mvme68k/include/intr.h index f1f93e8a9c8..256d8507874 100644 --- a/sys/arch/mvme68k/include/intr.h +++ b/sys/arch/mvme68k/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.11 2001/07/06 19:00:14 scw Exp $ */ +/* $NetBSD: intr.h,v 1.12 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -90,11 +90,11 @@ #ifndef _LOCORE -static __inline void +static inline void splx(int sr) { - __asm __volatile("movw %0,%%sr" : : "di" (sr)); + __asm volatile("movw %0,%%sr" : : "di" (sr)); } #define setsoft(x) x = 0 diff --git a/sys/arch/mvme68k/include/prom.h b/sys/arch/mvme68k/include/prom.h index e1fcf014093..4e7a08f9077 100644 --- a/sys/arch/mvme68k/include/prom.h +++ b/sys/arch/mvme68k/include/prom.h @@ -1,4 +1,4 @@ -/* $NetBSD: prom.h,v 1.15 2005/12/11 12:18:17 christos Exp $ */ +/* $NetBSD: prom.h,v 1.16 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -150,17 +150,17 @@ struct mvmeprom_args { #endif #define MVMEPROM_CALL(x) \ - __asm__ __volatile ("trap #15; .short " __STRING(x)) + __asm__ volatile ("trap #15; .short " __STRING(x)) #define MVMEPROM_NOARG() \ - __asm__ __volatile ("clrl %sp@-") + __asm__ volatile ("clrl %sp@-") #define MVMEPROM_ARG1(arg) \ - __asm__ __volatile ("movel %0, %%sp@-"::"d" (arg)) + __asm__ volatile ("movel %0, %%sp@-"::"d" (arg)) #define MVMEPROM_ARG2(arg) \ - __asm__ __volatile ("movel %0, %%sp@-"::"d" (arg)) + __asm__ volatile ("movel %0, %%sp@-"::"d" (arg)) #define MVMEPROM_GETRES(ret) \ - __asm__ __volatile ("movel %%sp@+,%0": "=d" (ret):) + __asm__ volatile ("movel %%sp@+,%0": "=d" (ret):) #define MVMEPROM_GETSR(ret) \ - __asm__ __volatile ("movew %%sr,%0": "=d" (ret):) + __asm__ volatile ("movew %%sr,%0": "=d" (ret):) #define MVMEPROM_RETURN(ret) \ MVMEPROM_GETRES(ret); \ return (ret); /* return a value (int) */ diff --git a/sys/arch/mvme68k/mvme68k/softintr.c b/sys/arch/mvme68k/mvme68k/softintr.c index d5f7a043096..019e05bb51c 100644 --- a/sys/arch/mvme68k/mvme68k/softintr.c +++ b/sys/arch/mvme68k/mvme68k/softintr.c @@ -1,4 +1,4 @@ -/* $NetBSD: softintr.c,v 1.7 2005/12/11 12:18:17 christos Exp $ */ +/* $NetBSD: softintr.c,v 1.8 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.7 2005/12/11 12:18:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.8 2005/12/24 20:07:19 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -68,12 +68,12 @@ static struct mvme68k_soft_intr mvme68k_soft_intrs[IPL_NSOFT]; static void dummy_softintr_assert(void); #endif -static __inline int +static inline int ssir_pending(volatile unsigned char *ssptr) { int __rv; - __asm __volatile( + __asm volatile( " moveq #0, %0 \n" " tas %1 \n" " jne 1f \n" diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c index 84c9b97189d..a78f83a847b 100644 --- a/sys/arch/mvme68k/mvme68k/trap.c +++ b/sys/arch/mvme68k/mvme68k/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.78 2005/12/11 12:18:17 christos Exp $ */ +/* $NetBSD: trap.c,v 1.79 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.78 2005/12/11 12:18:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.79 2005/12/24 20:07:19 perry Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -773,8 +773,8 @@ char wberrstr[] = /* * Because calling memcpy() for 16 bytes is *way* too much overhead ... */ -static __inline void fastcopy16(u_int *, u_int *); -static __inline void +static inline void fastcopy16(u_int *, u_int *); +static inline void fastcopy16(src, dst) u_int *src, *dst; { diff --git a/sys/arch/mvmeppc/include/intr.h b/sys/arch/mvmeppc/include/intr.h index ad960480ea9..6eead34cb80 100644 --- a/sys/arch/mvmeppc/include/intr.h +++ b/sys/arch/mvmeppc/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.6 2005/12/11 12:18:19 christos Exp $ */ +/* $NetBSD: intr.h,v 1.7 2005/12/24 20:07:19 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -94,9 +94,9 @@ void isa_intr_mask(int); void isa_intr_clr(int); void isa_setirqstat(int, int, int); -static __inline int splraise(int); -static __inline void spllower(int); -static __inline void set_sint(int); +static inline int splraise(int); +static inline void spllower(int); +static inline void set_sint(int); extern volatile int cpl, ipending, astpending, tickspending; extern int imen; @@ -112,7 +112,7 @@ extern vaddr_t mvmeppc_intr_reg; * achieved with the "eieio" instruction which the assembler * seems to detect and then doesn't move instructions past.... */ -static __inline int +static inline int splraise(int newcpl) { int oldcpl; @@ -124,7 +124,7 @@ splraise(int newcpl) return(oldcpl); } -static __inline void +static inline void spllower(int newcpl) { @@ -137,7 +137,7 @@ spllower(int newcpl) /* Following code should be implemented with lwarx/stwcx to avoid * the disable/enable. i need to read the manual once more.... */ -static __inline void +static inline void set_sint(int pending) { int msrsave; diff --git a/sys/arch/mvmeppc/include/kgdb.h b/sys/arch/mvmeppc/include/kgdb.h index 7633f4a3f93..5eb5cfb8d38 100644 --- a/sys/arch/mvmeppc/include/kgdb.h +++ b/sys/arch/mvmeppc/include/kgdb.h @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb.h,v 1.1 2002/02/27 21:02:17 scw Exp $ */ +/* $NetBSD: kgdb.h,v 1.2 2005/12/24 20:07:19 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -45,7 +45,7 @@ extern int kgdbregs[NREG]; extern char kgdbstep; /* Doesn't handle overlapping regions */ -__inline extern void +inline extern void kgdbcopy(s,d,n) void *s, *d; int n; @@ -56,7 +56,7 @@ kgdbcopy(s,d,n) *dp++ = *sp++; } -__inline extern void +inline extern void kgdbzero(d,n) void *d; int n; @@ -67,7 +67,7 @@ kgdbzero(d,n) *dp++ = 0; } -__inline extern int +inline extern int kgdbcmp(s,d,n) void *s, *d; { diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index ab250835132..ba91ea5e7e2 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.20 2005/12/11 12:18:20 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.21 2005/12/24 20:07:20 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 2005/12/11 12:18:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2005/12/24 20:07:20 perry Exp $"); #include "opt_compat_netbsd.h" #include "opt_mvmetype.h" @@ -256,7 +256,7 @@ cpu_startup() int msr; splraise(-1); - __asm __volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" + __asm volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" : "=r"(msr) : "K"(PSL_EE)); } @@ -413,12 +413,12 @@ lcsplx(ipl) { int oldcpl; - __asm __volatile("sync; eieio\n"); /* reorder protect */ + __asm volatile("sync; eieio\n"); /* reorder protect */ oldcpl = cpl; cpl = ipl; if (ipending & ~ipl) do_pending_int(); - __asm __volatile("sync; eieio\n"); /* reorder protect */ + __asm volatile("sync; eieio\n"); /* reorder protect */ return (oldcpl); } diff --git a/sys/arch/news68k/dev/dmac_0266.h b/sys/arch/news68k/dev/dmac_0266.h index 004a0c82603..630418a8d77 100644 --- a/sys/arch/news68k/dev/dmac_0266.h +++ b/sys/arch/news68k/dev/dmac_0266.h @@ -1,4 +1,4 @@ -/* $NetBSD: dmac_0266.h,v 1.3 2005/12/11 12:18:23 christos Exp $ */ +/* $NetBSD: dmac_0266.h,v 1.4 2005/12/24 20:07:20 perry Exp $ */ /*- * Copyright (C) 1999 Izumi Tsutsui. All rights reserved. @@ -46,7 +46,7 @@ struct dma_regs { uint32_t mapent; /* Map entry Register */ }; -#define DMAC_WAIT __asm __volatile ("nop; nop; nop; nop; nop; nop") +#define DMAC_WAIT __asm volatile ("nop; nop; nop; nop; nop; nop") #define DMAC_SEG_SIZE 0x1000 /* 4kbyte per DMA segment */ #define DMAC_SEG_OFFSET 0x0fff diff --git a/sys/arch/news68k/dev/if_le.c b/sys/arch/news68k/dev/if_le.c index 194a17a405b..f1cecdf2e28 100644 --- a/sys/arch/news68k/dev/if_le.c +++ b/sys/arch/news68k/dev/if_le.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le.c,v 1.14 2005/12/11 12:18:23 christos Exp $ */ +/* $NetBSD: if_le.c,v 1.15 2005/12/24 20:07:20 perry Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.14 2005/12/11 12:18:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.15 2005/12/24 20:07:20 perry Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -108,7 +108,7 @@ extern uint32_t lance_mem_phys; #define integrate #define hide #else -#define integrate static __inline +#define integrate static inline #define hide static #endif diff --git a/sys/arch/news68k/dev/timer_hb.c b/sys/arch/news68k/dev/timer_hb.c index b1f5d19f5c2..246e538db71 100644 --- a/sys/arch/news68k/dev/timer_hb.c +++ b/sys/arch/news68k/dev/timer_hb.c @@ -1,4 +1,4 @@ -/* $NetBSD: timer_hb.c,v 1.11 2005/12/11 12:18:23 christos Exp $ */ +/* $NetBSD: timer_hb.c,v 1.12 2005/12/24 20:07:20 perry Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v 1.11 2005/12/11 12:18:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v 1.12 2005/12/24 20:07:20 perry Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -70,7 +70,7 @@ static void timer_hb_attach(struct device *, struct device *, void *); static void timer_hb_initclocks(int, int); void clock_intr(struct clockframe *); -static __inline void leds_intr(void); +static inline void leds_intr(void); extern void _isr_clock(void); /* locore.s */ @@ -176,7 +176,7 @@ clock_intr(struct clockframe *cf) #define LED0 0x01 #define LED1 0x02 -static __inline void +static inline void leds_intr(void) { static u_char led_countdown, led_stat; diff --git a/sys/arch/news68k/include/bus.h b/sys/arch/news68k/include/bus.h index 10d58ea8fab..a1aee9562ff 100644 --- a/sys/arch/news68k/include/bus.h +++ b/sys/arch/news68k/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.5 2005/12/11 12:18:23 christos Exp $ */ +/* $NetBSD: bus.h,v 1.6 2005/12/24 20:07:20 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -189,7 +189,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_read_multi_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -203,7 +203,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_read_multi_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -217,7 +217,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_read_multi_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -245,7 +245,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_read_region_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -259,7 +259,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_read_region_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -273,7 +273,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_read_region_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -322,7 +322,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_write_multi_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -336,7 +336,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_write_multi_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -350,7 +350,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_write_multi_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -378,7 +378,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_write_region_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -392,7 +392,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_write_region_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -406,7 +406,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_write_region_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -434,7 +434,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_set_multi_1(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -448,7 +448,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_set_multi_2(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -462,7 +462,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_set_multi_4(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -490,7 +490,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_set_region_1(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -504,7 +504,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_set_region_2(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -518,7 +518,7 @@ int news68k_bus_space_probe(bus_space_tag_t t, #define bus_space_set_region_4(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -546,13 +546,13 @@ int news68k_bus_space_probe(bus_space_tag_t t, */ #define __NEWS68K_copy_region_N(BYTES) \ -static __inline void __CONCAT(bus_space_copy_region_,BYTES) \ +static inline void __CONCAT(bus_space_copy_region_,BYTES) \ (bus_space_tag_t, \ bus_space_handle_t bsh1, bus_size_t off1, \ bus_space_handle_t bsh2, bus_size_t off2, \ bus_size_t count); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)(bus_space_tag_t t, \ bus_space_handle_t h1, bus_space_handle_t h2, \ bus_size_t o1, bus_size_t o2, bus_size_t c) \ diff --git a/sys/arch/news68k/include/cacheops_machdep.h b/sys/arch/news68k/include/cacheops_machdep.h index bc5b9204758..c4e22f501f3 100644 --- a/sys/arch/news68k/include/cacheops_machdep.h +++ b/sys/arch/news68k/include/cacheops_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: cacheops_machdep.h,v 1.4 2005/12/11 12:18:23 christos Exp $ */ +/* $NetBSD: cacheops_machdep.h,v 1.5 2005/12/24 20:07:20 perry Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -73,7 +73,7 @@ extern void *cache_clr; -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) DCIx_md(void) { volatile uint8_t *p = cache_clr; @@ -86,25 +86,25 @@ DCIx_md(void) return 1; } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) DCIA_md(void) { return DCIx_md(); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) DCIS_md(void) { return DCIx_md(); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) DCIU_md(void) { return DCIx_md(); } -static __inline int __attribute__((__unused__)) +static inline int __attribute__((__unused__)) PCIA_md(void) { volatile uint8_t *p = cache_clr; diff --git a/sys/arch/news68k/include/intr.h b/sys/arch/news68k/include/intr.h index 518f738db73..e6d00ba4401 100644 --- a/sys/arch/news68k/include/intr.h +++ b/sys/arch/news68k/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.10 2005/12/11 12:18:23 christos Exp $ */ +/* $NetBSD: intr.h,v 1.11 2005/12/24 20:07:20 perry Exp $ */ /* * @@ -63,11 +63,11 @@ #define splsched() spl7() #define spllock() spl7() -static __inline void +static inline void splx(int sr) { - __asm __volatile("movw %0,%%sr" : : "di" (sr)); + __asm volatile("movw %0,%%sr" : : "di" (sr)); } /* diff --git a/sys/arch/news68k/stand/boot/boot.c b/sys/arch/news68k/stand/boot/boot.c index 7a7dcf8ccd3..4375493a57a 100644 --- a/sys/arch/news68k/stand/boot/boot.c +++ b/sys/arch/news68k/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.12 2005/12/11 12:18:24 christos Exp $ */ +/* $NetBSD: boot.c,v 1.13 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (C) 1999 Izumi Tsutsui. All rights reserved. @@ -125,11 +125,11 @@ boot(uint32_t d4, uint32_t d5, uint32_t d6, uint32_t d7) printf("\n"); ICIA(); - __asm __volatile ("movl %0,%%d7" : : "m" (d7)); - __asm __volatile ("movl %0,%%d6" : : "m" (bootdev)); - __asm __volatile ("movl %0,%%d5" : : "m" (netbsd)); - __asm __volatile ("movl %0,%%d4" : : "m" (d4)); - __asm __volatile ("movl %0,%%d2" : : "m" (marks[MARK_END])); + __asm volatile ("movl %0,%%d7" : : "m" (d7)); + __asm volatile ("movl %0,%%d6" : : "m" (bootdev)); + __asm volatile ("movl %0,%%d5" : : "m" (netbsd)); + __asm volatile ("movl %0,%%d4" : : "m" (d4)); + __asm volatile ("movl %0,%%d2" : : "m" (marks[MARK_END])); (*entry)(); } diff --git a/sys/arch/newsmips/apbus/if_snvar.h b/sys/arch/newsmips/apbus/if_snvar.h index c76fef52e67..888e1be2105 100644 --- a/sys/arch/newsmips/apbus/if_snvar.h +++ b/sys/arch/newsmips/apbus/if_snvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_snvar.h,v 1.6 2005/12/11 12:18:24 christos Exp $ */ +/* $NetBSD: if_snvar.h,v 1.7 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1991 Algorithmics Ltd (http://www.algor.co.uk) @@ -34,7 +34,7 @@ void mips3_wbflush(void); void apbus_wbflush(void); -static __inline void +static inline void wbflush(void) { mips3_wbflush(); diff --git a/sys/arch/newsmips/apbus/xafb.c b/sys/arch/newsmips/apbus/xafb.c index 9153aff86c9..5dbd85dcb37 100644 --- a/sys/arch/newsmips/apbus/xafb.c +++ b/sys/arch/newsmips/apbus/xafb.c @@ -1,4 +1,4 @@ -/* $NetBSD: xafb.c,v 1.11 2005/12/11 12:18:24 christos Exp $ */ +/* $NetBSD: xafb.c,v 1.12 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -29,7 +29,7 @@ /* "xa" frame buffer driver. Currently supports 1280x1024x8 only. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xafb.c,v 1.11 2005/12/11 12:18:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xafb.c,v 1.12 2005/12/24 20:07:24 perry Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -93,7 +93,7 @@ int xafb_cnattach(void); int xafb_getcmap(struct xafb_softc *, struct wsdisplay_cmap *); int xafb_putcmap(struct xafb_softc *, struct wsdisplay_cmap *); -static __inline void xafb_setcolor(struct xafb_devconfig *, int, int, int, int); +static inline void xafb_setcolor(struct xafb_devconfig *, int, int, int, int); CFATTACH_DECL(xafb, sizeof(struct xafb_softc), xafb_match, xafb_attach, NULL, NULL); diff --git a/sys/arch/newsmips/dev/if_le.c b/sys/arch/newsmips/dev/if_le.c index 07b72540bf5..9db56a1de53 100644 --- a/sys/arch/newsmips/dev/if_le.c +++ b/sys/arch/newsmips/dev/if_le.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le.c,v 1.14 2005/12/11 12:18:24 christos Exp $ */ +/* $NetBSD: if_le.c,v 1.15 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.14 2005/12/11 12:18:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.15 2005/12/24 20:07:24 perry Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -101,7 +101,7 @@ CFATTACH_DECL(le, sizeof(struct le_softc), #define integrate #define hide #else -#define integrate static __inline +#define integrate static inline #define hide static #endif diff --git a/sys/arch/newsmips/include/bus.h b/sys/arch/newsmips/include/bus.h index 6952d112061..2b26069df98 100644 --- a/sys/arch/newsmips/include/bus.h +++ b/sys/arch/newsmips/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.12 2005/12/11 12:18:24 christos Exp $ */ +/* $NetBSD: bus.h,v 1.13 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -149,11 +149,11 @@ void bus_space_free(bus_space_tag_t t, bus_space_handle_t bsh, */ #define __NEWSMIPS_bus_space_read_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_read_multi_,BYTES) \ +static inline void __CONCAT(bus_space_read_multi_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_multi_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -187,11 +187,11 @@ __NEWSMIPS_bus_space_read_multi(4,32) */ #define __NEWSMIPS_bus_space_read_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_read_region_,BYTES) \ +static inline void __CONCAT(bus_space_read_region_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_region_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -257,11 +257,11 @@ do { \ */ #define __NEWSMIPS_bus_space_write_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_write_multi_,BYTES) \ +static inline void __CONCAT(bus_space_write_multi_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ const __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_multi_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -295,11 +295,11 @@ __NEWSMIPS_bus_space_write_multi(4,32) */ #define __NEWSMIPS_bus_space_write_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_write_region_,BYTES) \ +static inline void __CONCAT(bus_space_write_region_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ const __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_region_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -335,11 +335,11 @@ __NEWSMIPS_bus_space_write_region(4,32) */ #define __NEWSMIPS_bus_space_set_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_set_multi_,BYTES) \ +static inline void __CONCAT(bus_space_set_multi_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS), size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_multi_,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -373,11 +373,11 @@ __NEWSMIPS_bus_space_set_multi(4,32) */ #define __NEWSMIPS_bus_space_set_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_set_region_,BYTES) \ +static inline void __CONCAT(bus_space_set_region_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS), size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_region_,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -414,13 +414,13 @@ __NEWSMIPS_bus_space_set_region(4,32) */ #define __NEWSMIPS_copy_region(BYTES) \ -static __inline void __CONCAT(bus_space_copy_region_,BYTES) \ +static inline void __CONCAT(bus_space_copy_region_,BYTES) \ (bus_space_tag_t, \ bus_space_handle_t bsh1, bus_size_t off1, \ bus_space_handle_t bsh2, bus_size_t off2, \ bus_size_t count); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)(t, h1, o1, h2, o2, c) \ bus_space_tag_t t; \ bus_space_handle_t h1, h2; \ diff --git a/sys/arch/next68k/dev/nextdma.c b/sys/arch/next68k/dev/nextdma.c index 1b05c6eecfb..b6d99fbfc21 100644 --- a/sys/arch/next68k/dev/nextdma.c +++ b/sys/arch/next68k/dev/nextdma.c @@ -1,4 +1,4 @@ -/* $NetBSD: nextdma.c,v 1.39 2005/12/11 12:18:25 christos Exp $ */ +/* $NetBSD: nextdma.c,v 1.40 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1998 Darrin B. Jewell * All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nextdma.c,v 1.39 2005/12/11 12:18:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nextdma.c,v 1.40 2005/12/24 20:07:24 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -66,7 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: nextdma.c,v 1.39 2005/12/11 12:18:25 christos Exp $" extern int turbo; -#define panic __asm __volatile("trap #15"); printf +#define panic __asm volatile("trap #15"); printf #define NEXTDMA_DEBUG nextdma_debug /* (nsc->sc_chan->nd_intr == NEXT_I_SCSI_DMA) && nextdma_debug */ diff --git a/sys/arch/next68k/include/bus_space.h b/sys/arch/next68k/include/bus_space.h index 61749ebad6b..097511f302b 100644 --- a/sys/arch/next68k/include/bus_space.h +++ b/sys/arch/next68k/include/bus_space.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.h,v 1.12 2005/12/11 12:18:25 christos Exp $ */ +/* $NetBSD: bus_space.h,v 1.13 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -163,7 +163,7 @@ typedef u_long bus_space_handle_t; #define bus_space_read_multi_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -177,7 +177,7 @@ typedef u_long bus_space_handle_t; #define bus_space_read_multi_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -191,7 +191,7 @@ typedef u_long bus_space_handle_t; #define bus_space_read_multi_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -219,7 +219,7 @@ typedef u_long bus_space_handle_t; #define bus_space_read_region_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -233,7 +233,7 @@ typedef u_long bus_space_handle_t; #define bus_space_read_region_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -247,7 +247,7 @@ typedef u_long bus_space_handle_t; #define bus_space_read_region_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -296,7 +296,7 @@ typedef u_long bus_space_handle_t; #define bus_space_write_multi_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -310,7 +310,7 @@ typedef u_long bus_space_handle_t; #define bus_space_write_multi_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -324,7 +324,7 @@ typedef u_long bus_space_handle_t; #define bus_space_write_multi_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -352,7 +352,7 @@ typedef u_long bus_space_handle_t; #define bus_space_write_region_1(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -366,7 +366,7 @@ typedef u_long bus_space_handle_t; #define bus_space_write_region_2(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -380,7 +380,7 @@ typedef u_long bus_space_handle_t; #define bus_space_write_region_4(t, h, o, a, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%a1 ; \ movl %2,%%d0 ; \ @@ -408,7 +408,7 @@ typedef u_long bus_space_handle_t; #define bus_space_set_multi_1(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -422,7 +422,7 @@ typedef u_long bus_space_handle_t; #define bus_space_set_multi_2(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -436,7 +436,7 @@ typedef u_long bus_space_handle_t; #define bus_space_set_multi_4(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -464,7 +464,7 @@ typedef u_long bus_space_handle_t; #define bus_space_set_region_1(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -478,7 +478,7 @@ typedef u_long bus_space_handle_t; #define bus_space_set_region_2(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -492,7 +492,7 @@ typedef u_long bus_space_handle_t; #define bus_space_set_region_4(t, h, o, val, c) do { \ (void) t; \ - __asm __volatile (" \ + __asm volatile (" \ movl %0,%%a0 ; \ movl %1,%%d1 ; \ movl %2,%%d0 ; \ @@ -520,13 +520,13 @@ typedef u_long bus_space_handle_t; */ #define __NEXT68K_copy_region_N(BYTES) \ -static __inline void __CONCAT(bus_space_copy_region_,BYTES) \ +static inline void __CONCAT(bus_space_copy_region_,BYTES) \ (bus_space_tag_t, \ bus_space_handle_t, bus_size_t, \ bus_space_handle_t, bus_size_t, \ bus_size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)(t, h1, o1, h2, o2, c) \ bus_space_tag_t t; \ bus_space_handle_t h1, h2; \ diff --git a/sys/arch/next68k/include/intr.h b/sys/arch/next68k/include/intr.h index a67c8adbbf8..0215d93f70d 100644 --- a/sys/arch/next68k/include/intr.h +++ b/sys/arch/next68k/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.14 2005/12/11 12:18:25 christos Exp $ */ +/* $NetBSD: intr.h,v 1.15 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (C) 1997 Scott Reynolds @@ -74,9 +74,9 @@ extern volatile u_int8_t ssir; #define SIR_ADB 0x10 #define siron(mask) \ - __asm __volatile ( "orb %1,%0" : "=m" (ssir) : "i" (mask)) + __asm volatile ( "orb %1,%0" : "=m" (ssir) : "i" (mask)) #define siroff(mask) \ - __asm __volatile ( "andb %1,%0" : "=m" (ssir) : "ir" (~(mask))); + __asm volatile ( "andb %1,%0" : "=m" (ssir) : "ir" (~(mask))); #define setsoftnet() siron(SIR_NET) #define setsoftclock() siron(SIR_CLOCK) diff --git a/sys/arch/ofppc/firepower/firepower_intr.c b/sys/arch/ofppc/firepower/firepower_intr.c index 7a94481e862..d732d1cf07c 100644 --- a/sys/arch/ofppc/firepower/firepower_intr.c +++ b/sys/arch/ofppc/firepower/firepower_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: firepower_intr.c,v 1.7 2005/11/23 13:00:51 nonaka Exp $ */ +/* $NetBSD: firepower_intr.c,v 1.8 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: firepower_intr.c,v 1.7 2005/11/23 13:00:51 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: firepower_intr.c,v 1.8 2005/12/24 20:07:24 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -85,13 +85,13 @@ void firepower_extintr(void); int imask[NIPL]; /* Current interrupt priority level. */ - __volatile int cpl; + volatile int cpl; /* Number of clock interrupts pending. */ -static __volatile int clockpending; +static volatile int clockpending; /* Other interrupts pending. */ - __volatile int ipending; + volatile int ipending; /* * The Firepower's system controller provides 32 interrupt sources. @@ -135,7 +135,7 @@ static const uint32_t softint_to_intrmask[SI_NQUEUES] = { INTR_SOFT(3), /* SI_SOFTSERIAL */ }; -static __inline void +static inline void firepower_enable_irq(int irq) { @@ -143,7 +143,7 @@ firepower_enable_irq(int irq) CSR_WRITE4(FPR_INTR_MASK0, intr_mask); } -static __inline void +static inline void firepower_disable_irq(int irq) { @@ -295,7 +295,7 @@ do_pending_int(void) struct intrhand *ih; int emsr, dmsr; int new, irq, hwpend; - static __volatile int processing; + static volatile int processing; if (processing) return; @@ -377,12 +377,12 @@ firepower_splraise(int ipl) { int old; - __asm __volatile("eieio; sync"); /* reorder protect */ + __asm volatile("eieio; sync"); /* reorder protect */ old = cpl; cpl |= ipl; - __asm __volatile("eieio; sync"); /* reorder protect */ + __asm volatile("eieio; sync"); /* reorder protect */ return (old); } @@ -391,7 +391,7 @@ firepower_spllower(int ipl) { int old = cpl; - __asm __volatile("eieio; sync"); /* reorder protect */ + __asm volatile("eieio; sync"); /* reorder protect */ splx(ipl); return (old); @@ -401,11 +401,11 @@ void firepower_splx(int new) { - __asm __volatile("eieio; sync"); /* reorder protect */ + __asm volatile("eieio; sync"); /* reorder protect */ cpl = new; if (ipending & ~new) do_pending_int(); - __asm __volatile("eieio; sync"); /* reorder protect */ + __asm volatile("eieio; sync"); /* reorder protect */ } void diff --git a/sys/arch/ofppc/ofppc/clock.c b/sys/arch/ofppc/ofppc/clock.c index 731fb669224..f56cd76da59 100644 --- a/sys/arch/ofppc/ofppc/clock.c +++ b/sys/arch/ofppc/ofppc/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.10 2005/11/23 13:00:51 nonaka Exp $ */ +/* $NetBSD: clock.c,v 1.11 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.10 2005/11/23 13:00:51 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.11 2005/12/24 20:07:24 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -112,14 +112,14 @@ cpu_initclocks() /* * Should check for correct CPU here? XXX */ - __asm __volatile ("mfmsr %0; andi. %1, %0, %2; mtmsr %1" + __asm volatile ("mfmsr %0; andi. %1, %0, %2; mtmsr %1" : "=r"(msr), "=r"(scratch) : "K"((u_short)~PSL_EE)); ns_per_tick = 1000000000 / cpu_timebase; ticks_per_intr = cpu_timebase / hz; - __asm __volatile ("mftb %0" : "=r"(lasttb)); - __asm __volatile ("mtdec %0" :: "r"(ticks_per_intr)); - __asm __volatile ("mtmsr %0" :: "r"(msr)); + __asm volatile ("mftb %0" : "=r"(lasttb)); + __asm volatile ("mtdec %0" :: "r"(ticks_per_intr)); + __asm volatile ("mtmsr %0" :: "r"(msr)); } /* diff --git a/sys/arch/ofppc/ofwgen/ofwgen_intr.c b/sys/arch/ofppc/ofwgen/ofwgen_intr.c index f37ef117192..c57f98c8417 100644 --- a/sys/arch/ofppc/ofwgen/ofwgen_intr.c +++ b/sys/arch/ofppc/ofwgen/ofwgen_intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofwgen_intr.c,v 1.8 2005/11/23 13:00:51 nonaka Exp $ */ +/* $NetBSD: ofwgen_intr.c,v 1.9 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (C) 1997 Wolfgang Solfrank. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofwgen_intr.c,v 1.8 2005/11/23 13:00:51 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofwgen_intr.c,v 1.9 2005/12/24 20:07:24 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -74,13 +74,13 @@ void ofwgen_intr_calculate_masks(void); int imask[NIPL]; /* Current interrupt priority level. */ -static __volatile int cpl; +static volatile int cpl; /* Number of clock interrupts pending. */ -static __volatile int clockpending; +static volatile int clockpending; /* Other interrupts pending. */ -static __volatile int ipending; +static volatile int ipending; void ofwgen_intr_init(void) diff --git a/sys/arch/ofppc/pci/pci_bus_io_chipdep.c b/sys/arch/ofppc/pci/pci_bus_io_chipdep.c index b8f76979c50..d1dd29343ed 100644 --- a/sys/arch/ofppc/pci/pci_bus_io_chipdep.c +++ b/sys/arch/ofppc/pci/pci_bus_io_chipdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_bus_io_chipdep.c,v 1.3 2005/12/11 12:18:30 christos Exp $ */ +/* $NetBSD: pci_bus_io_chipdep.c,v 1.4 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -83,7 +83,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: pci_bus_io_chipdep.c,v 1.3 2005/12/11 12:18:30 christos Exp $"); +__KERNEL_RCSID(1, "$NetBSD: pci_bus_io_chipdep.c,v 1.4 2005/12/24 20:07:24 perry Exp $"); #include <sys/extent.h> @@ -656,7 +656,7 @@ __C(CHIP,_io_barrier)(v, h, o, l, f) { /* XXX Double-check. */ - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } inline u_int8_t diff --git a/sys/arch/ofppc/pci/pci_bus_mem_chipdep.c b/sys/arch/ofppc/pci/pci_bus_mem_chipdep.c index 6c3004696fa..8af0e2e643e 100644 --- a/sys/arch/ofppc/pci/pci_bus_mem_chipdep.c +++ b/sys/arch/ofppc/pci/pci_bus_mem_chipdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_bus_mem_chipdep.c,v 1.3 2005/12/11 12:18:30 christos Exp $ */ +/* $NetBSD: pci_bus_mem_chipdep.c,v 1.4 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: pci_bus_mem_chipdep.c,v 1.3 2005/12/11 12:18:30 christos Exp $"); +__KERNEL_RCSID(1, "$NetBSD: pci_bus_mem_chipdep.c,v 1.4 2005/12/24 20:07:24 perry Exp $"); #include <sys/extent.h> @@ -684,7 +684,7 @@ __C(CHIP,_mem_barrier)(v, h, o, l, f) { /* XXX Double-check */ - __asm __volatile("eieio; sync"); + __asm volatile("eieio; sync"); } inline u_int8_t diff --git a/sys/arch/pc532/dev/ncr.c b/sys/arch/pc532/dev/ncr.c index 387a4090b97..2b6fa5c48ab 100644 --- a/sys/arch/pc532/dev/ncr.c +++ b/sys/arch/pc532/dev/ncr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr.c,v 1.52 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: ncr.c,v 1.53 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1996, 1997 Matthias Pfaller. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.52 2005/12/11 12:18:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.53 2005/12/24 20:07:24 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -217,7 +217,7 @@ ncr_intr(arg) #define TIMEOUT 1000000 -static __inline int +static inline int ncr_ready(sc) struct ncr5380_softc *sc; { @@ -237,7 +237,7 @@ ncr_ready(sc) } /* Return zero on success. */ -static __inline void ncr_wait_not_req(sc) +static inline void ncr_wait_not_req(sc) struct ncr5380_softc *sc; { int timo; diff --git a/sys/arch/pc532/dev/scn.c b/sys/arch/pc532/dev/scn.c index 0fbe07bc2a6..d0c564aa68d 100644 --- a/sys/arch/pc532/dev/scn.c +++ b/sys/arch/pc532/dev/scn.c @@ -1,4 +1,4 @@ -/* $NetBSD: scn.c,v 1.67 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: scn.c,v 1.68 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1991, 1992, 1993 @@ -85,7 +85,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.67 2005/12/11 12:18:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.68 2005/12/24 20:07:24 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -162,7 +162,7 @@ const struct cdevsw scn_cdevsw = { #endif #ifdef CPU30MHZ -#define RECOVER() __asm __volatile("bispsrw 0x800" : : : "cc") +#define RECOVER() __asm volatile("bispsrw 0x800" : : : "cc") #else #define RECOVER() #endif @@ -761,7 +761,7 @@ scnprobe(parent, cf, aux) * No need to make scn_rx{en,dis}able too efficient, * they're only called on setup, open & close! */ -static __inline void +static inline void scn_rxenable(sc) struct scn_softc *sc; { @@ -779,7 +779,7 @@ scn_rxenable(sc) dp->base[DU_OPCR] = dp->opcr; } -static __inline void +static inline void scn_rxdisable(sc) struct scn_softc *sc; { @@ -1310,7 +1310,7 @@ scntty(dev) } /* Worker routines for interrupt processing */ -static __inline void +static inline void dcd_int(sc, tp, new) struct scn_softc *sc; struct tty *tp; @@ -1460,7 +1460,7 @@ scnintr(arg) * THIS ROUTINE SHOULD BE KEPT AS CLEAN AS POSSIBLE!! * IT'S A CANDIDATE FOR RECODING IN ASSEMBLER!! */ -static __inline int +static inline int scn_rxintr(struct scn_softc *sc) { char sr; diff --git a/sys/arch/pc532/include/byte_swap.h b/sys/arch/pc532/include/byte_swap.h index eedb2a9d964..3e5d9c099f7 100644 --- a/sys/arch/pc532/include/byte_swap.h +++ b/sys/arch/pc532/include/byte_swap.h @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap.h,v 1.5 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: byte_swap.h,v 1.6 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1987, 1991 Regents of the University of California. @@ -34,7 +34,7 @@ #ifndef _PC532_BYTE_SWAP_H_ #define _PC532_BYTE_SWAP_H_ -static __inline unsigned int +static inline unsigned int __byte_swap_long_variable(unsigned int x) { @@ -42,7 +42,7 @@ __byte_swap_long_variable(unsigned int x) return (x); } -static __inline unsigned short +static inline unsigned short __byte_swap_word_variable(unsigned short x) { diff --git a/sys/arch/pc532/include/cpufunc.h b/sys/arch/pc532/include/cpufunc.h index d1996a5818e..d643df77007 100644 --- a/sys/arch/pc532/include/cpufunc.h +++ b/sys/arch/pc532/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.7 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: cpufunc.h,v 1.8 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1996 Matthias Pfaller. @@ -36,42 +36,42 @@ /* * Load a mmu register. */ -#define lmr(reg, src) __asm __volatile("lmr " #reg ",%0" : : "g" (src)) +#define lmr(reg, src) __asm volatile("lmr " #reg ",%0" : : "g" (src)) /* * Store a mmu register. */ -#define smr(reg, dst) __asm __volatile("smr " #reg ",%0" : "=g" (dst) :) +#define smr(reg, dst) __asm volatile("smr " #reg ",%0" : "=g" (dst) :) /* * Load the FPU status register. */ -#define lfsr(src) __asm __volatile("lfsr %0" : : "g" (src)) +#define lfsr(src) __asm volatile("lfsr %0" : : "g" (src)) /* * Store the FPU status register. */ -#define sfsr(src) __asm __volatile("sfsr %0" : "=g" (src) :) +#define sfsr(src) __asm volatile("sfsr %0" : "=g" (src) :) /* * Load a processor register. */ -#define lprd(reg, src) __asm __volatile("lprd " #reg ",%0" : : "g" (src)) -#define lprw(reg, src) __asm __volatile("lprw " #reg ",%0" : : "g" (src)) -#define lprb(reg, src) __asm __volatile("lprb " #reg ",%0" : : "g" (src)) +#define lprd(reg, src) __asm volatile("lprd " #reg ",%0" : : "g" (src)) +#define lprw(reg, src) __asm volatile("lprw " #reg ",%0" : : "g" (src)) +#define lprb(reg, src) __asm volatile("lprb " #reg ",%0" : : "g" (src)) /* * Store a processor register. */ -#define sprd(reg, dst) __asm __volatile("sprd " #reg ",%0" : "=g" (dst) :) -#define sprw(reg, dst) __asm __volatile("sprw " #reg ",%0" : "=g" ((short) (dst)) :) -#define sprb(reg, dst) __asm __volatile("sprb " #reg ",%0" : "=g" ((char) (dst)) :) +#define sprd(reg, dst) __asm volatile("sprd " #reg ",%0" : "=g" (dst) :) +#define sprw(reg, dst) __asm volatile("sprw " #reg ",%0" : "=g" ((short) (dst)) :) +#define sprb(reg, dst) __asm volatile("sprb " #reg ",%0" : "=g" ((char) (dst)) :) /* * Move data. This can be used to force * gcc to load a register variable. */ -#define movd(src, dst) __asm __volatile("movd %1,%0" : "=g" (dst) : "g" (src)) +#define movd(src, dst) __asm volatile("movd %1,%0" : "=g" (dst) : "g" (src)) /* * movs[bdw] for fast blockmoves. @@ -82,7 +82,7 @@ register int r0 __asm ("r0") = n; \ register void *r1 __asm("r1") = from; \ register void *r2 __asm("r2") = to; \ - __asm __volatile ("movs" type \ + __asm volatile ("movs" type \ : "+r" (r0), "+r" (r1), "+r" (r2) \ : \ : "memory" \ @@ -107,20 +107,20 @@ /* * Invalidate data and/or instruction cache lines. */ -#define cinv(mode, adr) __asm __volatile("cinv " #mode ",%0" : : "g" (adr)) +#define cinv(mode, adr) __asm volatile("cinv " #mode ",%0" : : "g" (adr)) /* * Load the ptb. This loads ptb0 and ptb1 to * avoid a cpu-bug when using dual address * space instructions. */ -#define load_ptb(src) __asm __volatile("lmr ptb0,%0; lmr ptb1,%0" : : "g" (src)) +#define load_ptb(src) __asm volatile("lmr ptb0,%0; lmr ptb1,%0" : : "g" (src)) /* * Flush tlb. Just to be save this flushes * kernelmode and usermode translations. */ -#define tlbflush() __asm __volatile("smr ptb0,r0; lmr ptb0,r0; lmr ptb1,r0" : : : "r0") +#define tlbflush() __asm volatile("smr ptb0,r0; lmr ptb0,r0; lmr ptb1,r0" : : : "r0") #define tlbflush_entry(p) do { \ lmr(ivar0, p); \ lmr(ivar1, p); \ @@ -129,7 +129,7 @@ /* * Trigger a T_BPT. */ -#define breakpoint() __asm __volatile("bpt") +#define breakpoint() __asm volatile("bpt") /* * Bits in the cfg register. diff --git a/sys/arch/pc532/include/icu.h b/sys/arch/pc532/include/icu.h index def0fd256db..14eb201bb37 100644 --- a/sys/arch/pc532/include/icu.h +++ b/sys/arch/pc532/include/icu.h @@ -1,4 +1,4 @@ -/* $NetBSD: icu.h,v 1.13 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: icu.h,v 1.14 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1993 Philip A. Nelson. @@ -119,7 +119,7 @@ enum {HIGH_LEVEL, LOW_LEVEL, RISING_EDGE, FALLING_EDGE} int_modes; /* * Select a SCSI controller. */ -static __inline int +static inline int scsi_select_ctlr(int ctlr) { int old; diff --git a/sys/arch/pc532/include/int_mwgwtypes.h b/sys/arch/pc532/include/int_mwgwtypes.h index 414b263b79b..6d443e2c53c 100644 --- a/sys/arch/pc532/include/int_mwgwtypes.h +++ b/sys/arch/pc532/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.4 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.5 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; @@ -63,7 +63,7 @@ typedef unsigned long long int uint_least64_t; /* 7.18.1.3 Fastest minimum-width integer types */ -typedef __signed char int_fast8_t; +typedef signed char int_fast8_t; typedef unsigned char uint_fast8_t; typedef short int int_fast16_t; typedef unsigned short int uint_fast16_t; diff --git a/sys/arch/pc532/include/int_types.h b/sys/arch/pc532/include/int_types.h index d8e5f30284e..d177f853d86 100644 --- a/sys/arch/pc532/include/int_types.h +++ b/sys/arch/pc532/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.8 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.9 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/pc532/include/intr.h b/sys/arch/pc532/include/intr.h index b8bd56fddb0..9aad96ebb7f 100644 --- a/sys/arch/pc532/include/intr.h +++ b/sys/arch/pc532/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.7 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: intr.h,v 1.8 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -94,7 +94,7 @@ extern unsigned int imask[], Cur_pl, sirpending, astpending; #if defined(NO_INLINE_SPLX) # define INTR_INLINE #else -# define INTR_INLINE __inline +# define INTR_INLINE inline #endif void intr_init __P((void)); @@ -109,8 +109,8 @@ INTR_STATIC INTR_INLINE int splx __P((unsigned int)); * Disable/Enable CPU-Interrupts */ #define di() /* Removing the nop will give you *BIG* trouble */ \ - __asm __volatile("bicpsrw 0x800 ; nop" : : : "cc") -#define ei() __asm __volatile("bispsrw 0x800" : : : "cc") + __asm volatile("bicpsrw 0x800 ; nop" : : : "cc") +#define ei() __asm volatile("bispsrw 0x800" : : : "cc") /* * Add a mask to Cur_pl, and return the old value of Cur_pl. diff --git a/sys/arch/pc532/include/lock.h b/sys/arch/pc532/include/lock.h index 8060602e444..edaece8be1d 100644 --- a/sys/arch/pc532/include/lock.h +++ b/sys/arch/pc532/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.6 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: lock.h,v 1.7 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -43,39 +43,39 @@ #ifndef _PC532_LOCK_H_ #define _PC532_LOCK_H_ -static __inline void __cpu_simple_lock_init __P((__cpu_simple_lock_t *)) +static inline void __cpu_simple_lock_init __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline void __cpu_simple_lock __P((__cpu_simple_lock_t *)) +static inline void __cpu_simple_lock __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline int __cpu_simple_lock_try __P((__cpu_simple_lock_t *)) +static inline int __cpu_simple_lock_try __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline void __cpu_simple_unlock __P((__cpu_simple_lock_t *)) +static inline void __cpu_simple_unlock __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { *alp = __SIMPLELOCK_UNLOCKED; } -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *alp) { - __asm __volatile( + __asm volatile( "1: sbitid %1, %0 \n" " bfs 1b \n" : "=m" (*alp) : "i" (__SIMPLELOCK_LOCKED)); } -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { int __rv = 1; - __asm __volatile( + __asm volatile( " sbitid %2, %0 \n" " bfc 1f \n" " movqd 0, %1 \n" @@ -86,7 +86,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *alp) return (__rv); } -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *alp) { diff --git a/sys/arch/pc532/include/pmap.h b/sys/arch/pc532/include/pmap.h index 5e357f37c71..2e72a56d14a 100644 --- a/sys/arch/pc532/include/pmap.h +++ b/sys/arch/pc532/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.41 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.42 2005/12/24 20:07:24 perry Exp $ */ /* * @@ -365,7 +365,7 @@ boolean_t pmap_zero_page_uncached __P((paddr_t)); * inline functions */ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ @@ -376,7 +376,7 @@ pmap_remove_all(struct pmap *pmap) * if hardware doesn't support one-page flushing) */ -__inline static void +inline static void pmap_update_pg(va) vaddr_t va; { @@ -387,7 +387,7 @@ pmap_update_pg(va) * pmap_update_2pg: flush two pages from the TLB */ -__inline static void +inline static void pmap_update_2pg(va, vb) vaddr_t va, vb; { @@ -404,7 +404,7 @@ pmap_update_2pg(va, vb) * unprotecting a page is done on-demand at fault time. */ -__inline static void +inline static void pmap_page_protect(pg, prot) struct vm_page *pg; vm_prot_t prot; @@ -426,7 +426,7 @@ pmap_page_protect(pg, prot) * unprotecting a page is done on-demand at fault time. */ -__inline static void +inline static void pmap_protect(pmap, sva, eva, prot) struct pmap *pmap; vaddr_t sva, eva; @@ -452,7 +452,7 @@ pmap_protect(pmap, sva, eva, prot) #include <lib/libkern/libkern.h> -static __inline pt_entry_t * +static inline pt_entry_t * vtopte(vaddr_t va) { @@ -461,7 +461,7 @@ vtopte(vaddr_t va) return (PTE_BASE + ns532_btop(va)); } -static __inline pt_entry_t * +static inline pt_entry_t * kvtopte(vaddr_t va) { diff --git a/sys/arch/pc532/include/profile.h b/sys/arch/pc532/include/profile.h index ed11f34e3f6..361580cd4a6 100644 --- a/sys/arch/pc532/include/profile.h +++ b/sys/arch/pc532/include/profile.h @@ -1,4 +1,4 @@ -/* $NetBSD: profile.h,v 1.10 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: profile.h,v 1.11 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -35,10 +35,10 @@ */ /* profiles ... */ -__inline void _mcount __P((u_long, u_long)); +inline void _mcount __P((u_long, u_long)); void mcount(void); -#define _MCOUNT_DECL __inline void _mcount +#define _MCOUNT_DECL inline void _mcount #define MCOUNT \ extern void mcount(void) __asm__("mcount") \ diff --git a/sys/arch/pc532/include/types.h b/sys/arch/pc532/include/types.h index 84c8a5e5fe9..8b5ece38631 100644 --- a/sys/arch/pc532/include/types.h +++ b/sys/arch/pc532/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.33 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: types.h,v 1.34 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -54,7 +54,7 @@ typedef unsigned long vsize_t; typedef int register_t; -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/pc532/pc532/in_cksum.c b/sys/arch/pc532/pc532/in_cksum.c index a7ecc4610d8..c177d1c2982 100644 --- a/sys/arch/pc532/pc532/in_cksum.c +++ b/sys/arch/pc532/pc532/in_cksum.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_cksum.c,v 1.12 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: in_cksum.c,v 1.13 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -69,7 +69,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.12 2005/12/11 12:18:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.13 2005/12/24 20:07:24 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -95,7 +95,7 @@ __KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.12 2005/12/11 12:18:31 christos Exp $ * Thanks to gcc we don't have to guess * which registers contain sum & w. */ -#define Asm __asm __volatile +#define Asm __asm volatile #define ADD(n) Asm("addd " #n "(%2),%0" : "=r" (sum) : "0" (sum), "r" (w)) #define ADC(n) Asm("addcd " #n "(%2),%0" : "=r" (sum) : "0" (sum), "r" (w)) #define MOP Asm("addcd 0,%0" : "=r" (sum) : "0" (sum)) diff --git a/sys/arch/pc532/pc532/machdep.c b/sys/arch/pc532/pc532/machdep.c index c6297f4bb58..2c6f3550499 100644 --- a/sys/arch/pc532/pc532/machdep.c +++ b/sys/arch/pc532/pc532/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.162 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.163 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.162 2005/12/11 12:18:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.163 2005/12/24 20:07:24 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -1015,7 +1015,7 @@ init532() #endif /* Jump to high memory */ - __asm __volatile("jump @1f; 1:"); + __asm volatile("jump @1f; 1:"); /* Initialize the pmap module. */ pmap_bootstrap(avail_start + KERNBASE); @@ -1090,7 +1090,7 @@ cpu_reset() tlbflush(); /* Jump to low memory. */ - __asm __volatile( + __asm volatile( "addr 1f(pc),r0;" "andd ~%0,r0;" "jump 0(r0);" @@ -1108,7 +1108,7 @@ cpu_reset() memcpy((void *)0, (void *)0x10000000, 0x1f00); /* Jump into ROM copy. */ - __asm __volatile("jump @0"); + __asm volatile("jump @0"); } /* diff --git a/sys/arch/pc532/pc532/pmap.c b/sys/arch/pc532/pc532/pmap.c index 028a7b78708..9d813e1609c 100644 --- a/sys/arch/pc532/pc532/pmap.c +++ b/sys/arch/pc532/pc532/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.78 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: pmap.c,v 1.79 2005/12/24 20:07:24 perry Exp $ */ /* * @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.78 2005/12/11 12:18:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.79 2005/12/24 20:07:24 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -387,7 +387,7 @@ static void pmap_unmap_ptes __P((struct pmap *)); * of course the kernel is always loaded */ -__inline static boolean_t +inline static boolean_t pmap_is_curpmap(pmap) struct pmap *pmap; { @@ -406,7 +406,7 @@ pmap_is_curpmap(pmap) * => returns with pmap_tmpptp_lock held */ -__inline static vaddr_t +inline static vaddr_t pmap_tmpmap_pa(pa) paddr_t pa; { @@ -425,7 +425,7 @@ pmap_tmpmap_pa(pa) * => we release pmap_tmpptp_lock */ -__inline static void +inline static void pmap_tmpunmap_pa() { #if defined(DIAGNOSTIC) @@ -444,7 +444,7 @@ pmap_tmpunmap_pa() * => we may grab pmap_tmpptp_lock and return with it held */ -__inline static pt_entry_t * +inline static pt_entry_t * pmap_tmpmap_pvepte(pve) struct pv_entry *pve; { @@ -467,7 +467,7 @@ pmap_tmpmap_pvepte(pve) * => we will release pmap_tmpptp_lock if we hold it */ -__inline static void +inline static void pmap_tmpunmap_pvepte(pve) struct pv_entry *pve; { @@ -485,7 +485,7 @@ pmap_tmpunmap_pvepte(pve) * => must be undone with pmap_unmap_ptes before returning */ -__inline static pt_entry_t * +inline static pt_entry_t * pmap_map_ptes(pmap) struct pmap *pmap; { @@ -525,7 +525,7 @@ pmap_map_ptes(pmap) * pmap_unmap_ptes: unlock the PTE mapping of "pmap" */ -__inline static void +inline static void pmap_unmap_ptes(pmap) struct pmap *pmap; { @@ -869,7 +869,7 @@ pmap_init() * "try" is for optional functions like pmap_copy(). */ -__inline static struct pv_entry * +inline static struct pv_entry * pmap_alloc_pv(pmap, mode) struct pmap *pmap; int mode; @@ -1016,7 +1016,7 @@ pmap_add_pvpage(pvp, need_entry) * => we must be holding pvalloc_lock */ -__inline static void +inline static void pmap_free_pv_doit(pv) struct pv_entry *pv; { @@ -1051,7 +1051,7 @@ pmap_free_pv_doit(pv) * => we gain the pvalloc_lock */ -__inline static void +inline static void pmap_free_pv(pmap, pv) struct pmap *pmap; struct pv_entry *pv; @@ -1076,7 +1076,7 @@ pmap_free_pv(pmap, pv) * => we gain the pvalloc_lock */ -__inline static void +inline static void pmap_free_pvs(pmap, pvs) struct pmap *pmap; struct pv_entry *pvs; @@ -1145,7 +1145,7 @@ pmap_free_pvpage() * => caller should adjust ptp's wire_count before calling */ -__inline static void +inline static void pmap_enter_pv(pvh, pve, pmap, va, ptp) struct pv_head *pvh; struct pv_entry *pve; /* preallocated pve for us to use */ @@ -1172,7 +1172,7 @@ pmap_enter_pv(pvh, pve, pmap, va, ptp) * => we return the removed pve */ -__inline static struct pv_entry * +inline static struct pv_entry * pmap_remove_pv(pvh, pmap, va) struct pv_head *pvh; struct pmap *pmap; @@ -1206,7 +1206,7 @@ pmap_remove_pv(pvh, pmap, va) * will ever leak onto the active/inactive queues) */ -__inline static struct vm_page * +inline static struct vm_page * pmap_alloc_ptp(pmap, pde_index) struct pmap *pmap; int pde_index; diff --git a/sys/arch/pc532/pc532/trap.c b/sys/arch/pc532/pc532/trap.c index 72614924d42..0046c1a9d6c 100644 --- a/sys/arch/pc532/pc532/trap.c +++ b/sys/arch/pc532/pc532/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.69 2005/12/11 12:18:31 christos Exp $ */ +/* $NetBSD: trap.c,v 1.70 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.69 2005/12/11 12:18:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.70 2005/12/24 20:07:24 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -132,13 +132,13 @@ int ieee_handler_disable = 0; void syscall __P((struct syscframe)) __CDECL__; void trap __P((struct trapframe)) __CDECL__; -static __inline void userret __P((struct lwp *, int, u_quad_t)); +static inline void userret __P((struct lwp *, int, u_quad_t)); /* * Define the code needed before returning to user mode, for * trap and syscall. */ -static __inline void +static inline void userret(l, pc, oticks) struct lwp *l; int pc; @@ -292,7 +292,7 @@ trap(frame) *(struct trapframe *)sp = *db_frame--; lprd(fp, &((struct trapframe *)sp)->tf_regs.r_fp); lprd(sp, sp); - __asm __volatile("jump 0(%0)" : : "g" (ret)); + __asm volatile("jump 0(%0)" : : "g" (ret)); } db_frame--; lprd(sp, sp); /* Frame should be intact */ diff --git a/sys/arch/pc532/stand/common/machdep.c b/sys/arch/pc532/stand/common/machdep.c index 5345bdc5cbf..74dc066269f 100644 --- a/sys/arch/pc532/stand/common/machdep.c +++ b/sys/arch/pc532/stand/common/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.6 2005/12/11 12:18:34 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.7 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 1994 Philip L. Budne. @@ -109,7 +109,7 @@ _rtt(void) memcpy((void *)0, (void *)0x10000000, 0x1f00); /* Jump into ROM copy. */ - __asm __volatile("jump @0"); + __asm volatile("jump @0"); while (1) ; diff --git a/sys/arch/pdp10/include/int_mwgwtypes.h b/sys/arch/pdp10/include/int_mwgwtypes.h index 0bd1980475c..3dd168ac245 100644 --- a/sys/arch/pdp10/include/int_mwgwtypes.h +++ b/sys/arch/pdp10/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.3 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ /* 7.18.1.2 Minimum-width integer types */ #ifdef __GNUC__ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; #else typedef signed char int_least8_t; #endif @@ -68,7 +68,7 @@ typedef unsigned long long int uint_least64_t; /* 7.18.1.3 Fastest minimum-width integer types */ #ifdef __GNUC__ -typedef __signed char int_fast8_t; +typedef signed char int_fast8_t; #else typedef signed char int_fast8_t; #endif diff --git a/sys/arch/pdp10/include/int_types.h b/sys/arch/pdp10/include/int_types.h index ae66359d579..097e0cf0c70 100644 --- a/sys/arch/pdp10/include/int_types.h +++ b/sys/arch/pdp10/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.3 2005/12/11 12:18:34 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.4 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -47,7 +47,7 @@ /* 7.18.1.1 Exact-width integer types */ #ifdef __GNUC__ -typedef __signed char __int8_t __attribute__ ((size (8))); +typedef signed char __int8_t __attribute__ ((size (8))); typedef unsigned char __uint8_t __attribute__ ((size (8))); typedef short int __int16_t __attribute__ ((size (16))); typedef unsigned short int __uint16_t __attribute__ ((size (16))); diff --git a/sys/arch/pdp10/include/io.h b/sys/arch/pdp10/include/io.h index 5666b0c5d02..2a85104010d 100644 --- a/sys/arch/pdp10/include/io.h +++ b/sys/arch/pdp10/include/io.h @@ -1,4 +1,4 @@ -/* $NetBSD: io.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ +/* $NetBSD: io.h,v 1.3 2005/12/24 20:07:24 perry Exp $ */ /* * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). * All rights reserved. @@ -33,21 +33,21 @@ #ifndef _LOCORE #ifdef __GNUC__ #define CONO(dev,val) \ - asm __volatile("xct %0" :: "r"(0700200000000 | ((dev) << 24) | (val))) + asm volatile("xct %0" :: "r"(0700200000000 | ((dev) << 24) | (val))) #define CONI(dev,val) \ - asm __volatile("xct %1 \n move %0,6 " \ + asm volatile("xct %1 \n move %0,6 " \ : "=r"(val) : "r"(0700240000006 | ((dev) << 24)) : "6") #define DATAO(dev,val) \ - asm __volatile("move 6,%1 \n xct %0" \ + asm volatile("move 6,%1 \n xct %0" \ : : "r"(0700140000006 | ((dev) << 24)), "r"(val) : "6") #define DATAI(dev,val) \ - asm __volatile("xct %1 \n move %0,6 " \ + asm volatile("xct %1 \n move %0,6 " \ : "=r"(val) : "r"(0700040000006 | ((dev) << 24)) : "6") #define BLKI(dev,val) \ - asm __volatile("xct %1 \n move %0,6 " \ + asm volatile("xct %1 \n move %0,6 " \ : "=r"(val) : "r"(0700000000006 | ((dev) << 24)) : "6") #define BLKO(dev,val) \ - asm __volatile("move 6,%1 \n xct %0" \ + asm volatile("move 6,%1 \n xct %0" \ : : "r"(0700100000006 | ((dev) << 24)), "r"(val) : "6") #endif /* __GNUC__ */ diff --git a/sys/arch/pdp10/include/types.h b/sys/arch/pdp10/include/types.h index c3d1987dea0..6c8097fde5a 100644 --- a/sys/arch/pdp10/include/types.h +++ b/sys/arch/pdp10/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.3 2005/12/11 12:18:34 christos Exp $ */ +/* $NetBSD: types.h,v 1.4 2005/12/24 20:07:24 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -61,7 +61,7 @@ typedef int register_t; typedef int pid_t; #define pid_t int -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/playstation2/ee/dmac.c b/sys/arch/playstation2/ee/dmac.c index 593ed64bde7..8aba6dd6f17 100644 --- a/sys/arch/playstation2/ee/dmac.c +++ b/sys/arch/playstation2/ee/dmac.c @@ -1,4 +1,4 @@ -/* $NetBSD: dmac.c,v 1.4 2005/12/11 12:18:36 christos Exp $ */ +/* $NetBSD: dmac.c,v 1.5 2005/12/24 20:07:25 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dmac.c,v 1.4 2005/12/11 12:18:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dmac.c,v 1.5 2005/12/24 20:07:25 perry Exp $"); #include "debug_playstation2.h" @@ -313,7 +313,7 @@ dmac_sync_buffer() { mips_dcache_wbinv_all(); - __asm__ __volatile("sync.l"); + __asm__ volatile("sync.l"); } /* diff --git a/sys/arch/pmax/dev/bt459.c b/sys/arch/pmax/dev/bt459.c index 9d01efaded2..059227ba07c 100644 --- a/sys/arch/pmax/dev/bt459.c +++ b/sys/arch/pmax/dev/bt459.c @@ -1,4 +1,4 @@ -/* $NetBSD: bt459.c,v 1.25 2005/12/11 12:18:36 christos Exp $ */ +/* $NetBSD: bt459.c,v 1.26 2005/12/24 20:07:25 perry Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bt459.c,v 1.25 2005/12/11 12:18:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bt459.c,v 1.26 2005/12/24 20:07:25 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -101,8 +101,8 @@ static void bt459_set_cursor_ram (struct fbinfo *, int, u_char); static void bt459_select_reg (bt459_regmap_t *, int); static void bt459_write_reg (bt459_regmap_t *, int, int); static u_char bt459_read_reg (bt459_regmap_t *, int); -static __inline void bt459_cursor_on(bt459_regmap_t *); -static __inline void bt459_cursor_off(bt459_regmap_t *); +static inline void bt459_cursor_on(bt459_regmap_t *); +static inline void bt459_cursor_off(bt459_regmap_t *); /* * Initialization @@ -204,7 +204,7 @@ static u_char cursor_RGB[6]; /* cursor color 2 & 3 */ /* * Enable the hardware cursor sprite. */ -static __inline void +static inline void bt459_cursor_on(btregs) bt459_regmap_t *btregs; { @@ -220,7 +220,7 @@ bt459_cursor_on(btregs) /* * Disable the hardware cursor sprite. */ -static __inline void +static inline void bt459_cursor_off(btregs) bt459_regmap_t *btregs; { diff --git a/sys/arch/pmax/dev/ims332.c b/sys/arch/pmax/dev/ims332.c index 875074c1cd2..c026c626e6d 100644 --- a/sys/arch/pmax/dev/ims332.c +++ b/sys/arch/pmax/dev/ims332.c @@ -1,4 +1,4 @@ -/* $NetBSD: ims332.c,v 1.18 2005/12/11 12:18:36 christos Exp $ */ +/* $NetBSD: ims332.c,v 1.19 2005/12/24 20:07:25 perry Exp $ */ /*- * Copyright (c) 1992, 1993, 1995 @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: ims332.c,v 1.18 2005/12/11 12:18:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ims332.c,v 1.19 2005/12/24 20:07:25 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -56,8 +56,8 @@ __KERNEL_RCSID(0, "$NetBSD: ims332.c,v 1.18 2005/12/11 12:18:36 christos Exp $") */ static u_int ims332_read_register (struct fbinfo *, int); static void ims332_write_register (struct fbinfo *, int, unsigned int); -static __inline void ims332_cursor_off(struct fbinfo *fi); -static __inline void ims332_cursor_on(struct fbinfo *fi); +static inline void ims332_cursor_off(struct fbinfo *fi); +static inline void ims332_cursor_on(struct fbinfo *fi); int @@ -162,7 +162,7 @@ ims332_write_register(fi, regno, val) /* * Turn off hardware cursor sprite. */ -static __inline void +static inline void ims332_cursor_off(fi) struct fbinfo *fi; { @@ -177,7 +177,7 @@ ims332_cursor_off(fi) /* * Turn on hardware cursor. */ -static __inline void +static inline void ims332_cursor_on(fi) struct fbinfo *fi; { diff --git a/sys/arch/pmax/include/bus.h b/sys/arch/pmax/include/bus.h index 2df0660aa42..8f0378e11b3 100644 --- a/sys/arch/pmax/include/bus.h +++ b/sys/arch/pmax/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.21 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: bus.h,v 1.22 2005/12/24 20:07:25 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -159,11 +159,11 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, */ #define __PMAX_bus_space_read_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_read_multi_,BYTES) \ +static inline void __CONCAT(bus_space_read_multi_,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t)); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_multi_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -197,11 +197,11 @@ __PMAX_bus_space_read_multi(4,32) */ #define __PMAX_bus_space_read_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_read_region_,BYTES) \ +static inline void __CONCAT(bus_space_read_region_,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t)); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_region_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -270,11 +270,11 @@ do { \ */ #define __PMAX_bus_space_write_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_write_multi_,BYTES) \ +static inline void __CONCAT(bus_space_write_multi_,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t)); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_multi_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -308,11 +308,11 @@ __PMAX_bus_space_write_multi(4,32) */ #define __PMAX_bus_space_write_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_write_region_,BYTES) \ +static inline void __CONCAT(bus_space_write_region_,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t)); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_region_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -348,11 +348,11 @@ __PMAX_bus_space_write_region(4,32) */ #define __PMAX_bus_space_set_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_set_multi_,BYTES) \ +static inline void __CONCAT(bus_space_set_multi_,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS), size_t)); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_multi_,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -386,11 +386,11 @@ __PMAX_bus_space_set_multi(4,32) */ #define __PMAX_bus_space_set_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_set_region_,BYTES) \ +static inline void __CONCAT(bus_space_set_region_,BYTES) \ __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS), size_t)); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_region_,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -427,13 +427,13 @@ __PMAX_bus_space_set_region(4,32) */ #define __PMAX_copy_region(BYTES) \ -static __inline void __CONCAT(bus_space_copy_region_,BYTES) \ +static inline void __CONCAT(bus_space_copy_region_,BYTES) \ __P((bus_space_tag_t, \ bus_space_handle_t bsh1, bus_size_t off1, \ bus_space_handle_t bsh2, bus_size_t off2, \ bus_size_t count)); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)(t, h1, o1, h2, o2, c) \ bus_space_tag_t t; \ bus_space_handle_t h1, h2; \ diff --git a/sys/arch/pmax/pmax/dec_3100.c b/sys/arch/pmax/pmax/dec_3100.c index a4242e84d63..47369a6d345 100644 --- a/sys/arch/pmax/pmax/dec_3100.c +++ b/sys/arch/pmax/pmax/dec_3100.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3100.c,v 1.40 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: dec_3100.c,v 1.41 2005/12/24 20:07:25 perry Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -105,7 +105,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.40 2005/12/11 12:18:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.41 2005/12/24 20:07:25 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -247,7 +247,7 @@ dec_3100_intr(status, cause, pc, ipending) if (ipending & MIPS_INT_MASK_3) { struct clockframe cf; - __asm __volatile("lbu $0,48(%0)" :: + __asm volatile("lbu $0,48(%0)" :: "r"(MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK))); cf.pc = pc; cf.sr = status; diff --git a/sys/arch/pmax/pmax/dec_3max.c b/sys/arch/pmax/pmax/dec_3max.c index 9a1771c8bd2..2f01847199a 100644 --- a/sys/arch/pmax/pmax/dec_3max.c +++ b/sys/arch/pmax/pmax/dec_3max.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3max.c,v 1.41 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: dec_3max.c,v 1.42 2005/12/24 20:07:25 perry Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -106,7 +106,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.41 2005/12/11 12:18:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.42 2005/12/24 20:07:25 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -315,7 +315,7 @@ dec_3max_intr(status, cause, pc, ipending) printf("WARNING: power supply is OK again\n"); } - __asm __volatile("lbu $0,48(%0)" :: + __asm volatile("lbu $0,48(%0)" :: "r"(MIPS_PHYS_TO_KSEG1(KN02_SYS_CLOCK))); cf.pc = pc; cf.sr = status; diff --git a/sys/arch/pmax/pmax/dec_3maxplus.c b/sys/arch/pmax/pmax/dec_3maxplus.c index 18283b1fe3e..c0ece6d54a5 100644 --- a/sys/arch/pmax/pmax/dec_3maxplus.c +++ b/sys/arch/pmax/pmax/dec_3maxplus.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3maxplus.c,v 1.52 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: dec_3maxplus.c,v 1.53 2005/12/24 20:07:25 perry Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -106,7 +106,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.52 2005/12/11 12:18:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.53 2005/12/24 20:07:25 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -347,7 +347,7 @@ dec_3maxplus_intr(status, cause, pc, ipending) if (ipending & MIPS_INT_MASK_1) { struct clockframe cf; - __asm __volatile("lbu $0,48(%0)" :: + __asm volatile("lbu $0,48(%0)" :: "r"(ioasic_base + IOASIC_SLOT_8_START)); latched_cycle_cnt = *(u_int32_t *)(ioasic_base + IOASIC_CTR); cf.pc = pc; @@ -463,7 +463,7 @@ static void kn03_wbflush() { /* read once IOASIC SLOT 0 */ - __asm __volatile("lw $0,%0" :: "i"(0xbf840000)); + __asm volatile("lw $0,%0" :: "i"(0xbf840000)); } /* diff --git a/sys/arch/pmax/pmax/dec_3min.c b/sys/arch/pmax/pmax/dec_3min.c index bcffe8e833f..777a2786265 100644 --- a/sys/arch/pmax/pmax/dec_3min.c +++ b/sys/arch/pmax/pmax/dec_3min.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3min.c,v 1.53 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: dec_3min.c,v 1.54 2005/12/24 20:07:25 perry Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -106,7 +106,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.53 2005/12/11 12:18:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.54 2005/12/24 20:07:25 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -420,7 +420,7 @@ dec_3min_intr(status, cause, pc, ipending) if (intr & KMIN_INTR_CLOCK) { struct clockframe cf; - __asm __volatile("lbu $0,48(%0)" :: + __asm volatile("lbu $0,48(%0)" :: "r"(ioasic_base + IOASIC_SLOT_8_START)); #ifdef MIPS3 if (CPUISMIPS3) { @@ -511,7 +511,7 @@ static void kn02ba_wbflush() { /* read twice IOASIC_IMSK */ - __asm __volatile("lw $0,%0; lw $0,%0" :: + __asm volatile("lw $0,%0; lw $0,%0" :: "i"(MIPS_PHYS_TO_KSEG1(KMIN_REG_IMSK))); } diff --git a/sys/arch/pmax/pmax/dec_5100.c b/sys/arch/pmax/pmax/dec_5100.c index 891e7476a2d..7af95bd4ecf 100644 --- a/sys/arch/pmax/pmax/dec_5100.c +++ b/sys/arch/pmax/pmax/dec_5100.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_5100.c,v 1.36 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: dec_5100.c,v 1.37 2005/12/24 20:07:25 perry Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_5100.c,v 1.36 2005/12/11 12:18:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_5100.c,v 1.37 2005/12/24 20:07:25 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -174,7 +174,7 @@ dec_5100_intr(status, cause, pc, ipending) if (ipending & MIPS_INT_MASK_2) { struct clockframe cf; - __asm __volatile("lbu $0,48(%0)" :: + __asm volatile("lbu $0,48(%0)" :: "r"(MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK))); cf.pc = pc; cf.sr = status; diff --git a/sys/arch/pmax/pmax/dec_maxine.c b/sys/arch/pmax/pmax/dec_maxine.c index e2e2a4141e8..4c7816f985a 100644 --- a/sys/arch/pmax/pmax/dec_maxine.c +++ b/sys/arch/pmax/pmax/dec_maxine.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_maxine.c,v 1.46 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: dec_maxine.c,v 1.47 2005/12/24 20:07:25 perry Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -106,7 +106,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.46 2005/12/11 12:18:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.47 2005/12/24 20:07:25 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -351,7 +351,7 @@ dec_maxine_intr(status, cause, pc, ipending) if (ipending & MIPS_INT_MASK_1) { struct clockframe cf; - __asm __volatile("lbu $0,48(%0)" :: + __asm volatile("lbu $0,48(%0)" :: "r"(ioasic_base + IOASIC_SLOT_8_START)); latched_cycle_cnt = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(XINE_REG_FCTR); @@ -426,7 +426,7 @@ static void kn02ca_wbflush() { /* read once IOASIC_IMSK */ - __asm __volatile("lw $0,%0" :: + __asm volatile("lw $0,%0" :: "i"(MIPS_PHYS_TO_KSEG1(XINE_REG_IMSK))); } diff --git a/sys/arch/pmppc/dev/ds17485.c b/sys/arch/pmppc/dev/ds17485.c index d7335ecf264..898b4a77886 100644 --- a/sys/arch/pmppc/dev/ds17485.c +++ b/sys/arch/pmppc/dev/ds17485.c @@ -1,4 +1,4 @@ -/* $NetBSD: ds17485.c,v 1.8 2005/12/11 12:18:41 christos Exp $ */ +/* $NetBSD: ds17485.c,v 1.9 2005/12/24 20:07:25 perry Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -157,7 +157,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ds17485.c,v 1.8 2005/12/11 12:18:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ds17485.c,v 1.9 2005/12/24 20:07:25 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -181,8 +181,8 @@ int hexdectodec(int); int dectohexdec(int); void rtc_print(void); -__inline u_int mc146818_read(void *, u_int); -__inline void mc146818_write(void *, u_int, u_int); +inline u_int mc146818_read(void *, u_int); +inline void mc146818_write(void *, u_int, u_int); #define SECMIN ((unsigned)60) /* seconds per minute */ #define SECHOUR ((unsigned)(60*SECMIN)) /* seconds per hour */ @@ -247,7 +247,7 @@ rtc_attach(struct device *parent, struct device *self, void *aux) #endif } -__inline u_int +inline u_int mc146818_read(void *vsc, u_int reg) { struct rtc_softc *sc = vsc; @@ -255,7 +255,7 @@ mc146818_read(void *vsc, u_int reg) return (bus_space_read_1(sc->sc_tag, sc->sc_handle, reg)); } -__inline void +inline void mc146818_write(void *vsc, u_int reg, u_int datum) { struct rtc_softc *sc = vsc; diff --git a/sys/arch/pmppc/include/intr.h b/sys/arch/pmppc/include/intr.h index a3a788afafd..2a8d3e31e65 100644 --- a/sys/arch/pmppc/include/intr.h +++ b/sys/arch/pmppc/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.6 2005/12/11 12:18:41 christos Exp $ */ +/* $NetBSD: intr.h,v 1.7 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -80,10 +80,10 @@ void do_pending_int(void); void *intr_establish(int, int, int, int (*)(void *), void *); void intr_disestablish(void *); -static __inline int splraise(int); -static __inline int spllower(int); -static __inline void splx(int); -static __inline void set_sint(int); +static inline int splraise(int); +static inline int spllower(int); +static inline void splx(int); +static inline void set_sint(int); void softnet(int); /* Defined in machdep.c, used in extintr.c */ @@ -95,7 +95,7 @@ extern long intrcnt[]; * Reorder protection in the following inline functions is * protected with the "eieio" instruction. */ -static __inline int +static inline int splraise(newcpl) int newcpl; { @@ -108,7 +108,7 @@ splraise(newcpl) return(oldcpl); } -static __inline void +static inline void splx(newcpl) int newcpl; { @@ -119,7 +119,7 @@ splx(newcpl) __asm__ volatile("sync; eieio\n"); /* reorder protect */ } -static __inline int +static inline int spllower(newcpl) int newcpl; { @@ -136,7 +136,7 @@ spllower(newcpl) /* Following code should be implemented with lwarx/stwcx to avoid * the disable/enable. i need to read the manual once more.... */ -static __inline void +static inline void set_sint(pending) int pending; { diff --git a/sys/arch/pmppc/include/kgdb.h b/sys/arch/pmppc/include/kgdb.h index 5ca7d499089..5e6969b9533 100644 --- a/sys/arch/pmppc/include/kgdb.h +++ b/sys/arch/pmppc/include/kgdb.h @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb.h,v 1.1 2002/05/30 08:51:24 augustss Exp $ */ +/* $NetBSD: kgdb.h,v 1.2 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -45,7 +45,7 @@ extern int kgdbregs[NREG]; extern char kgdbstep; /* Doesn't handle overlapping regions */ -__inline extern void +inline extern void kgdbcopy(s,d,n) void *s, *d; int n; @@ -56,7 +56,7 @@ kgdbcopy(s,d,n) *dp++ = *sp++; } -__inline extern void +inline extern void kgdbzero(d,n) void *d; int n; @@ -67,7 +67,7 @@ kgdbzero(d,n) *dp++ = 0; } -__inline extern int +inline extern int kgdbcmp(s,d,n) void *s, *d; { diff --git a/sys/arch/pmppc/pmppc/machdep.c b/sys/arch/pmppc/pmppc/machdep.c index 4da59123749..3f71fcbe8da 100644 --- a/sys/arch/pmppc/pmppc/machdep.c +++ b/sys/arch/pmppc/pmppc/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.20 2005/12/11 12:18:42 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.21 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 2005/12/11 12:18:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2005/12/24 20:07:28 perry Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -311,7 +311,7 @@ cpu_startup() /* * Now allow hardware interrupts. */ - __asm __volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" + __asm volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" : "=r"(msr) : "K"(PSL_EE)); #endif } diff --git a/sys/arch/powerpc/fpu/fpu_arith.h b/sys/arch/powerpc/fpu/fpu_arith.h index 74708c43120..6baa7689e1a 100644 --- a/sys/arch/powerpc/fpu/fpu_arith.h +++ b/sys/arch/powerpc/fpu/fpu_arith.h @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_arith.h,v 1.3 2005/12/11 12:18:42 christos Exp $ */ +/* $NetBSD: fpu_arith.h,v 1.4 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -129,22 +129,22 @@ * into carry; GET_CARRY sets its argument to 0 or 1. */ #define FPU_ADDC(r, x, y) \ - __asm __volatile("adde %0,%1,%2" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("adde %0,%1,%2" : "=r"(r) : "r"(x), "r"(y)) #define FPU_ADDS(r, x, y) \ - __asm __volatile("addc %0,%1,%2" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("addc %0,%1,%2" : "=r"(r) : "r"(x), "r"(y)) #define FPU_ADDCS(r, x, y) \ - __asm __volatile("adde %0,%1,%2" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("adde %0,%1,%2" : "=r"(r) : "r"(x), "r"(y)) #define FPU_SUBC(r, x, y) \ - __asm __volatile("subfe %0,%2,%1" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("subfe %0,%2,%1" : "=r"(r) : "r"(x), "r"(y)) #define FPU_SUBS(r, x, y) \ - __asm __volatile("subfc %0,%2,%1" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("subfc %0,%2,%1" : "=r"(r) : "r"(x), "r"(y)) #define FPU_SUBCS(r, x, y) \ - __asm __volatile("subfe %0,%2,%1" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("subfe %0,%2,%1" : "=r"(r) : "r"(x), "r"(y)) -#define FPU_GET_CARRY(r) __asm __volatile("li %0,0; addie %0,%0,0" : "=r"(r)) +#define FPU_GET_CARRY(r) __asm volatile("li %0,0; addie %0,%0,0" : "=r"(r)) /* This one needs to destroy a temp register. */ #define FPU_SET_CARRY(v) do { int __tmp; \ - __asm __volatile("addic %0,%0,-1" : "r"(__tmp) : "r"(v)); \ + __asm volatile("addic %0,%0,-1" : "r"(__tmp) : "r"(v)); \ } while (0) #define FPU_SHL1_BY_ADD /* shift left 1 faster by ADDC than (a<<1)|(b>>31) */ diff --git a/sys/arch/powerpc/ibm4xx/cpu.c b/sys/arch/powerpc/ibm4xx/cpu.c index a6a01712986..583dd8862a4 100644 --- a/sys/arch/powerpc/ibm4xx/cpu.c +++ b/sys/arch/powerpc/ibm4xx/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.20 2005/12/11 12:18:42 christos Exp $ */ +/* $NetBSD: cpu.c,v 1.21 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.20 2005/12/11 12:18:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.21 2005/12/24 20:07:28 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -163,7 +163,7 @@ cpu_probe_cache() * cache line size, or things like memset/memcpy may lose * badly. */ - __asm __volatile("mfpvr %0" : "=r" (pvr)); + __asm volatile("mfpvr %0" : "=r" (pvr)); switch (pvr & 0xffff0000) { case PVR_401A1: curcpu()->ci_ci.dcache_size = 1024; diff --git a/sys/arch/powerpc/ibm4xx/intr.c b/sys/arch/powerpc/ibm4xx/intr.c index 7fd0860a187..15fa931b573 100644 --- a/sys/arch/powerpc/ibm4xx/intr.c +++ b/sys/arch/powerpc/ibm4xx/intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.8 2005/12/11 12:18:42 christos Exp $ */ +/* $NetBSD: intr.c,v 1.9 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.8 2005/12/11 12:18:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.9 2005/12/24 20:07:28 perry Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -82,7 +82,7 @@ cntlzw(int x) { int a; - __asm __volatile ("cntlzw %0,%1" : "=r"(a) : "r"(x)); + __asm volatile ("cntlzw %0,%1" : "=r"(a) : "r"(x)); return a; } diff --git a/sys/arch/powerpc/ibm4xx/pmap.c b/sys/arch/powerpc/ibm4xx/pmap.c index 13e18a775e6..ba8ca7d57f5 100644 --- a/sys/arch/powerpc/ibm4xx/pmap.c +++ b/sys/arch/powerpc/ibm4xx/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.37 2005/12/11 12:18:42 christos Exp $ */ +/* $NetBSD: pmap.c,v 1.38 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.37 2005/12/11 12:18:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.38 2005/12/24 20:07:28 perry Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -681,7 +681,7 @@ pmap_zero_page(paddr_t pa) int i; for (i = PAGE_SIZE/CACHELINESIZE; i > 0; i--) { - __asm __volatile ("dcbz 0,%0" :: "r"(pa)); + __asm volatile ("dcbz 0,%0" :: "r"(pa)); pa += CACHELINESIZE; } #endif @@ -1156,7 +1156,7 @@ pmap_procwr(struct proc *p, vaddr_t va, size_t len) ctx_alloc(pm); ctx = pm->pm_ctx; } - __asm __volatile("mfmsr %0;" + __asm volatile("mfmsr %0;" "li %1, %7;" "andc %1,%0,%1;" "mtmsr %1;" diff --git a/sys/arch/powerpc/ibm4xx/trap.c b/sys/arch/powerpc/ibm4xx/trap.c index 55032d8f482..0bf9c335b61 100644 --- a/sys/arch/powerpc/ibm4xx/trap.c +++ b/sys/arch/powerpc/ibm4xx/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.27 2005/12/11 12:18:42 christos Exp $ */ +/* $NetBSD: trap.c,v 1.28 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.27 2005/12/11 12:18:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.28 2005/12/24 20:07:28 perry Exp $"); #include "opt_altivec.h" #include "opt_ddb.h" @@ -154,7 +154,7 @@ trap(struct trapframe *frame) { int srr2, srr3; - __asm __volatile("mfspr %0,0x3f0" : + __asm volatile("mfspr %0,0x3f0" : "=r" (rv), "=r" (srr2), "=r" (srr3) :); printf("debug reg is %x srr2 %x srr3 %x\n", rv, srr2, srr3); @@ -410,7 +410,7 @@ ctx_setup(int ctx, int srr1) * * XXX this is also used by jtag debuggers... */ - __asm __volatile("mfspr %0,0x3f2;" + __asm volatile("mfspr %0,0x3f2;" "or %0,%0,%1;" "mtspr 0x3f2,%0;" : "=&r" (dbreg) : "r" (mask)); @@ -634,15 +634,15 @@ badaddr_read(void *addr, size_t size, int *rptr) int x; /* Get rid of any stale machine checks that have been waiting. */ - __asm __volatile ("sync; isync"); + __asm volatile ("sync; isync"); if (setfault(&env)) { curpcb->pcb_onfault = 0; - __asm __volatile ("sync"); + __asm volatile ("sync"); return 1; } - __asm __volatile ("sync"); + __asm volatile ("sync"); switch (size) { case 1: @@ -659,10 +659,10 @@ badaddr_read(void *addr, size_t size, int *rptr) } /* Make sure we took the machine check, if we caused one. */ - __asm __volatile ("sync; isync"); + __asm volatile ("sync; isync"); curpcb->pcb_onfault = 0; - __asm __volatile ("sync"); /* To be sure. */ + __asm volatile ("sync"); /* To be sure. */ /* Use the value to avoid reorder. */ if (rptr) diff --git a/sys/arch/powerpc/include/atomic.h b/sys/arch/powerpc/include/atomic.h index 27433d52045..59909ebef14 100644 --- a/sys/arch/powerpc/include/atomic.h +++ b/sys/arch/powerpc/include/atomic.h @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.h,v 1.2 2002/11/25 01:36:35 thorpej Exp $ */ +/* $NetBSD: atomic.h,v 1.3 2005/12/24 20:07:28 perry Exp $ */ /*- */ @@ -15,12 +15,12 @@ * * Atomically set bits in a `unsigned long'. */ -static __inline void -atomic_setbits_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline void +atomic_setbits_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long tmp; - __asm __volatile( + __asm volatile( "# BEGIN atomic_setbits_ulong \n" "1: lwarx %0,0,%2 \n" " or %0,%1,%0 \n" @@ -38,12 +38,12 @@ atomic_setbits_ulong(__volatile unsigned long *ulp, unsigned long v) * * Atomically clear bits in a `unsigned long'. */ -static __inline void -atomic_clearbits_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline void +atomic_clearbits_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long tmp; - __asm __volatile( + __asm volatile( "# BEGIN atomic_clearbits_ulong \n" "1: lwarx %0,0,%2 \n" " and %0,%1,%0 \n" @@ -61,12 +61,12 @@ atomic_clearbits_ulong(__volatile unsigned long *ulp, unsigned long v) * * Atomically add a value to a `unsigned long'. */ -static __inline void -atomic_add_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline void +atomic_add_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long tmp; - __asm __volatile( + __asm volatile( "# BEGIN atomic_add_ulong \n" "1: lwarx %0,0,%2 \n" " add %0,%1,%0 \n" @@ -84,12 +84,12 @@ atomic_add_ulong(__volatile unsigned long *ulp, unsigned long v) * * Atomically subtract a value from a `unsigned long'. */ -static __inline void -atomic_sub_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline void +atomic_sub_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long tmp; - __asm __volatile( + __asm volatile( "# BEGIN atomic_sub_ulong \n" "1: lwarx %0,0,%2 \n" " sub %0,%0,%1 \n" @@ -107,12 +107,12 @@ atomic_sub_ulong(__volatile unsigned long *ulp, unsigned long v) * * Atomically load and latch a `unsigned long' value. */ -static __inline unsigned long -atomic_loadlatch_ulong(__volatile unsigned long *ulp, unsigned long v) +static inline unsigned long +atomic_loadlatch_ulong(volatile unsigned long *ulp, unsigned long v) { unsigned long tmp; - __asm __volatile( + __asm volatile( "# BEGIN atomic_loadlatch_ulong \n" "1: lwarx %0,0,%2 \n" " stwcx. %1,0,%2 \n" diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index ab9165a43ea..d9f9a7b070b 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.45 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.46 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (C) 1999 Wolfgang Solfrank. @@ -118,7 +118,7 @@ struct cpu_info { }; #ifdef MULTIPROCESSOR -static __inline int +static inline int cpu_number(void) { int pir; @@ -147,12 +147,12 @@ void cpu_boot_secondary_processors(void); extern struct cpu_info cpu_info[]; -static __inline struct cpu_info * +static inline struct cpu_info * curcpu(void) { struct cpu_info *ci; - __asm __volatile ("mfsprg %0,0" : "=r"(ci)); + __asm volatile ("mfsprg %0,0" : "=r"(ci)); return ci; } @@ -160,28 +160,28 @@ curcpu(void) #define curpcb (curcpu()->ci_curpcb) #define curpm (curcpu()->ci_curpm) -static __inline register_t +static inline register_t mfmsr(void) { register_t msr; - __asm __volatile ("mfmsr %0" : "=r"(msr)); + __asm volatile ("mfmsr %0" : "=r"(msr)); return msr; } -static __inline void +static inline void mtmsr(register_t msr) { - __asm __volatile ("mtmsr %0" : : "r"(msr)); + __asm volatile ("mtmsr %0" : : "r"(msr)); } -static __inline uint32_t +static inline uint32_t mftbl(void) { uint32_t tbl; - __asm __volatile ( + __asm volatile ( #ifdef PPC_IBM403 " mftblo %0 \n" #else @@ -192,17 +192,17 @@ mftbl(void) return tbl; } -static __inline uint64_t +static inline uint64_t mftb(void) { uint64_t tb; #ifdef _LP64 - __asm __volatile ("mftb %0" : "=r"(tb)); + __asm volatile ("mftb %0" : "=r"(tb)); #else int tmp; - __asm __volatile ( + __asm volatile ( #ifdef PPC_IBM403 "1: mftbhi %0 \n" " mftblo %0+1 \n" @@ -220,21 +220,21 @@ mftb(void) return tb; } -static __inline uint32_t +static inline uint32_t mfrtcl(void) { uint32_t rtcl; - __asm __volatile ("mfrtcl %0" : "=r"(rtcl)); + __asm volatile ("mfrtcl %0" : "=r"(rtcl)); return rtcl; } -static __inline void +static inline void mfrtc(uint32_t *rtcp) { uint32_t tmp; - __asm __volatile ( + __asm volatile ( "1: mfrtcu %0 \n" " mfrtcl %1 \n" " mfrtcu %2 \n" @@ -243,12 +243,12 @@ mfrtc(uint32_t *rtcp) : "=r"(*rtcp), "=r"(*(rtcp + 1)), "=r"(tmp) :: "cr0"); } -static __inline uint32_t +static inline uint32_t mfpvr(void) { uint32_t pvr; - __asm __volatile ("mfpvr %0" : "=r"(pvr)); + __asm volatile ("mfpvr %0" : "=r"(pvr)); return (pvr); } diff --git a/sys/arch/powerpc/include/cpu_counter.h b/sys/arch/powerpc/include/cpu_counter.h index 0b61a5ae75d..9d5f28cebc6 100644 --- a/sys/arch/powerpc/include/cpu_counter.h +++ b/sys/arch/powerpc/include/cpu_counter.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_counter.h,v 1.2 2003/03/11 10:40:17 hannken Exp $ */ +/* $NetBSD: cpu_counter.h,v 1.3 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -40,12 +40,12 @@ #define cpu_hascounter() (1) #define cpu_counter() cpu_counter32() -static __inline uint32_t +static inline uint32_t cpu_counter32(void) { uint32_t rv, rtcu, scratch; - __asm __volatile ( + __asm volatile ( "mfpvr %0 \n" "srwi %0,%0,16 \n" "cmpwi %0,%3 \n" @@ -72,7 +72,7 @@ cpu_counter32(void) } #if 0 /* XXX MI microtime() needs frequency of CPU counter. */ -static __inline uint64_t +static inline uint64_t cpu_frequency(struct cpu_info *ci) { } diff --git a/sys/arch/powerpc/include/ibm4xx/ibm4xx_intr.h b/sys/arch/powerpc/include/ibm4xx/ibm4xx_intr.h index bad6e5ba81c..f9f709e65b2 100644 --- a/sys/arch/powerpc/include/ibm4xx/ibm4xx_intr.h +++ b/sys/arch/powerpc/include/ibm4xx/ibm4xx_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: ibm4xx_intr.h,v 1.8 2005/11/27 14:01:45 yamt Exp $ */ +/* $NetBSD: ibm4xx_intr.h,v 1.9 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -89,10 +89,10 @@ void *intr_establish(int, int, int, int (*)(void *), void *); void intr_disestablish(void *); void intr_init(void); -static __inline int splraise(int); -static __inline int spllower(int); -static __inline void splx(int); -static __inline void set_sint(int); +static inline int splraise(int); +static inline int spllower(int); +static inline void splx(int); +static inline void set_sint(int); extern volatile int cpl, ipending, astpending; extern u_long imask[]; @@ -103,7 +103,7 @@ extern u_long intrcnt[]; * achived with the "eieio" instruction which the assembler * seems to detect and then doesn't move instructions past.... */ -static __inline int +static inline int splraise(newcpl) int newcpl; { @@ -116,7 +116,7 @@ splraise(newcpl) return(oldcpl); } -static __inline void +static inline void splx(newcpl) int newcpl; { @@ -127,7 +127,7 @@ splx(newcpl) __asm__ volatile("sync; eieio\n"); /* reorder protect */ } -static __inline int +static inline int spllower(newcpl) int newcpl; { @@ -144,7 +144,7 @@ spllower(newcpl) /* Following code should be implemented with lwarx/stwcx to avoid * the disable/enable. i need to read the manual once more.... */ -static __inline void +static inline void set_sint(pending) int pending; { diff --git a/sys/arch/powerpc/include/ibm4xx/pmap.h b/sys/arch/powerpc/include/ibm4xx/pmap.h index 5ed9ec33352..8c5b07d6508 100644 --- a/sys/arch/powerpc/include/ibm4xx/pmap.h +++ b/sys/arch/powerpc/include/ibm4xx/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.11 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.12 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -171,7 +171,7 @@ boolean_t pmap_check_attr(struct vm_page *, u_int, int); void pmap_real_memory(paddr_t *, psize_t *); int pmap_tlbmiss(vaddr_t va, int ctx); -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ @@ -193,9 +193,9 @@ void pmap_procwr(struct proc *, vaddr_t, size_t); #define PMAP_MAP_POOLPAGE(pa) (pa) #define PMAP_UNMAP_POOLPAGE(pa) (pa) -static __inline paddr_t vtophys(vaddr_t); +static inline paddr_t vtophys(vaddr_t); -static __inline paddr_t +static inline paddr_t vtophys(vaddr_t va) { paddr_t pa; diff --git a/sys/arch/powerpc/include/int_mwgwtypes.h b/sys/arch/powerpc/include/int_mwgwtypes.h index 55b23532074..edec9afa072 100644 --- a/sys/arch/powerpc/include/int_mwgwtypes.h +++ b/sys/arch/powerpc/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.3 2002/11/03 22:35:34 matt Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.4 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; diff --git a/sys/arch/powerpc/include/int_types.h b/sys/arch/powerpc/include/int_types.h index a9c46484c93..69de236a14b 100644 --- a/sys/arch/powerpc/include/int_types.h +++ b/sys/arch/powerpc/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.9 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.10 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/powerpc/include/ipkdb.h b/sys/arch/powerpc/include/ipkdb.h index 83834e9931b..0d03bf1e47f 100644 --- a/sys/arch/powerpc/include/ipkdb.h +++ b/sys/arch/powerpc/include/ipkdb.h @@ -1,4 +1,4 @@ -/* $NetBSD: ipkdb.h,v 1.2 1997/04/16 22:57:06 thorpej Exp $ */ +/* $NetBSD: ipkdb.h,v 1.3 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -50,7 +50,7 @@ extern int ipkdbregs[NREG]; /* Doesn't handle overlapping regions */ -__inline extern void +inline extern void ipkdbcopy(s,d,n) void *s, *d; int n; @@ -61,7 +61,7 @@ ipkdbcopy(s,d,n) *dp++ = *sp++; } -__inline extern void +inline extern void ipkdbzero(d,n) void *d; int n; @@ -72,7 +72,7 @@ ipkdbzero(d,n) *dp++ = 0; } -__inline extern int +inline extern int ipkdbcmp(s,d,n) void *s, *d; { diff --git a/sys/arch/powerpc/include/lock.h b/sys/arch/powerpc/include/lock.h index 94aa64667d4..b96f1870466 100644 --- a/sys/arch/powerpc/include/lock.h +++ b/sys/arch/powerpc/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.6 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: lock.h,v 1.7 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -43,19 +43,19 @@ #ifndef _POWERPC_LOCK_H_ #define _POWERPC_LOCK_H_ -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { *alp = __SIMPLELOCK_UNLOCKED; - __asm __volatile ("sync"); + __asm volatile ("sync"); } -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *alp) { int old; - __asm __volatile (" \ + __asm volatile (" \ \n\ 1: lwarx %0,0,%1 \n\ cmpwi %0,%2 \n\ @@ -73,12 +73,12 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) : "memory"); } -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { int old, dummy; - __asm __volatile (" \ + __asm volatile (" \ \n\ 1: lwarx %0,0,%1 \n\ cmpwi %0,%2 \n\ @@ -96,10 +96,10 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *alp) return (old == __SIMPLELOCK_UNLOCKED); } -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *alp) { - __asm __volatile ("sync"); + __asm volatile ("sync"); *alp = __SIMPLELOCK_UNLOCKED; } diff --git a/sys/arch/powerpc/include/oea/pmap.h b/sys/arch/powerpc/include/oea/pmap.h index 62b05c18b89..1e1ce155c51 100644 --- a/sys/arch/powerpc/include/oea/pmap.h +++ b/sys/arch/powerpc/include/oea/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.7 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.8 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -82,7 +82,7 @@ extern struct pmap kernel_pmap_; #define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count) /* ARGSUSED */ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ @@ -109,7 +109,7 @@ int pmap_pte_spill(struct pmap *, vaddr_t, boolean_t); #define PMAP_NC 0x1000 #define PMAP_STEAL_MEMORY -static __inline paddr_t vtophys (vaddr_t); +static inline paddr_t vtophys (vaddr_t); /* * Alternate mapping hooks for pool pages. Avoids thrashing the TLB. @@ -124,7 +124,7 @@ static __inline paddr_t vtophys (vaddr_t); #define POOL_VTOPHYS(va) vtophys((vaddr_t) va) #endif -static __inline paddr_t +static inline paddr_t vtophys(vaddr_t va) { paddr_t pa; diff --git a/sys/arch/powerpc/include/openpic.h b/sys/arch/powerpc/include/openpic.h index d5f8933cc5b..85897410292 100644 --- a/sys/arch/powerpc/include/openpic.h +++ b/sys/arch/powerpc/include/openpic.h @@ -1,4 +1,4 @@ -/* $NetBSD: openpic.h,v 1.3 2001/02/05 19:22:23 briggs Exp $ */ +/* $NetBSD: openpic.h,v 1.4 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -37,12 +37,12 @@ void openpic_set_priority __P((int, int)); extern volatile unsigned char *openpic_base; -static __inline u_int openpic_read __P((int)); -static __inline void openpic_write __P((int, u_int)); -static __inline int openpic_read_irq __P((int)); -static __inline void openpic_eoi __P((int)); +static inline u_int openpic_read __P((int)); +static inline void openpic_write __P((int, u_int)); +static inline int openpic_read_irq __P((int)); +static inline void openpic_eoi __P((int)); -static __inline u_int +static inline u_int openpic_read(reg) int reg; { @@ -51,7 +51,7 @@ openpic_read(reg) return in32rb(addr); } -static __inline void +static inline void openpic_write(reg, val) int reg; u_int val; @@ -61,14 +61,14 @@ openpic_write(reg, val) out32rb(addr, val); } -static __inline int +static inline int openpic_read_irq(cpu) int cpu; { return openpic_read(OPENPIC_IACK(cpu)) & OPENPIC_VECTOR_MASK; } -static __inline void +static inline void openpic_eoi(cpu) int cpu; { diff --git a/sys/arch/powerpc/include/pcb.h b/sys/arch/powerpc/include/pcb.h index c910acf8337..e7a1930c811 100644 --- a/sys/arch/powerpc/include/pcb.h +++ b/sys/arch/powerpc/include/pcb.h @@ -1,4 +1,4 @@ -/* $NetBSD: pcb.h,v 1.20 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: pcb.h,v 1.21 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -53,8 +53,8 @@ struct pcb { #define PCB_ALTIVEC 8 /* Process had AltiVec initialized */ #define PCB_FE1 PSL_FE1 /* 0x100 */ #define PCB_FE0 PSL_FE0 /* 0x800 */ - struct cpu_info * __volatile pcb_fpcpu; /* CPU with our FP state */ - struct cpu_info * __volatile pcb_veccpu;/* CPU with our VECTOR state */ + struct cpu_info * volatile pcb_fpcpu; /* CPU with our FP state */ + struct cpu_info * volatile pcb_veccpu;/* CPU with our VECTOR state */ struct faultbuf *pcb_onfault; /* For use during copyin/copyout */ vaddr_t pcb_kmapsr; /* where to map user segment in kernel */ vaddr_t pcb_umapsr; /* the user segment mapped in kernel */ diff --git a/sys/arch/powerpc/include/pio.h b/sys/arch/powerpc/include/pio.h index 106292a714d..f2a05bdb3e7 100644 --- a/sys/arch/powerpc/include/pio.h +++ b/sys/arch/powerpc/include/pio.h @@ -1,4 +1,4 @@ -/* $NetBSD: pio.h,v 1.2 2001/05/27 20:59:15 matt Exp $ */ +/* $NetBSD: pio.h,v 1.3 2005/12/24 20:07:28 perry Exp $ */ /* $OpenBSD: pio.h,v 1.1 1997/10/13 10:53:47 pefo Exp $ */ /* @@ -39,33 +39,33 @@ * I/O macros. */ -static __inline void __outb __P((volatile u_int8_t *a, u_int8_t v)); -static __inline void __outw __P((volatile u_int16_t *a, u_int16_t v)); -static __inline void __outl __P((volatile u_int32_t *a, u_int32_t v)); -static __inline void __outwrb __P((volatile u_int16_t *a, u_int16_t v)); -static __inline void __outlrb __P((volatile u_int32_t *a, u_int32_t v)); -static __inline u_int8_t __inb __P((volatile u_int8_t *a)); -static __inline u_int16_t __inw __P((volatile u_int16_t *a)); -static __inline u_int32_t __inl __P((volatile u_int32_t *a)); -static __inline u_int16_t __inwrb __P((volatile u_int16_t *a)); -static __inline u_int32_t __inlrb __P((volatile u_int32_t *a)); -static __inline void __outsb __P((volatile u_int8_t *, const u_int8_t *, +static inline void __outb __P((volatile u_int8_t *a, u_int8_t v)); +static inline void __outw __P((volatile u_int16_t *a, u_int16_t v)); +static inline void __outl __P((volatile u_int32_t *a, u_int32_t v)); +static inline void __outwrb __P((volatile u_int16_t *a, u_int16_t v)); +static inline void __outlrb __P((volatile u_int32_t *a, u_int32_t v)); +static inline u_int8_t __inb __P((volatile u_int8_t *a)); +static inline u_int16_t __inw __P((volatile u_int16_t *a)); +static inline u_int32_t __inl __P((volatile u_int32_t *a)); +static inline u_int16_t __inwrb __P((volatile u_int16_t *a)); +static inline u_int32_t __inlrb __P((volatile u_int32_t *a)); +static inline void __outsb __P((volatile u_int8_t *, const u_int8_t *, size_t)); -static __inline void __outsw __P((volatile u_int16_t *, const u_int16_t *, +static inline void __outsw __P((volatile u_int16_t *, const u_int16_t *, size_t)); -static __inline void __outsl __P((volatile u_int32_t *, const u_int32_t *, +static inline void __outsl __P((volatile u_int32_t *, const u_int32_t *, size_t)); -static __inline void __outswrb __P((volatile u_int16_t *, const u_int16_t *, +static inline void __outswrb __P((volatile u_int16_t *, const u_int16_t *, size_t)); -static __inline void __outslrb __P((volatile u_int32_t *, const u_int32_t *, +static inline void __outslrb __P((volatile u_int32_t *, const u_int32_t *, size_t)); -static __inline void __insb __P((volatile u_int8_t *, u_int8_t *, size_t)); -static __inline void __insw __P((volatile u_int16_t *, u_int16_t *, size_t)); -static __inline void __insl __P((volatile u_int32_t *, u_int32_t *, size_t)); -static __inline void __inswrb __P((volatile u_int16_t *, u_int16_t *, size_t)); -static __inline void __inslrb __P((volatile u_int32_t *, u_int32_t *, size_t)); +static inline void __insb __P((volatile u_int8_t *, u_int8_t *, size_t)); +static inline void __insw __P((volatile u_int16_t *, u_int16_t *, size_t)); +static inline void __insl __P((volatile u_int32_t *, u_int32_t *, size_t)); +static inline void __inswrb __P((volatile u_int16_t *, u_int16_t *, size_t)); +static inline void __inslrb __P((volatile u_int32_t *, u_int32_t *, size_t)); -static __inline void +static inline void __outb(a,v) volatile u_int8_t *a; u_int8_t v; @@ -74,7 +74,7 @@ __outb(a,v) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __outw(a,v) volatile u_int16_t *a; u_int16_t v; @@ -83,7 +83,7 @@ __outw(a,v) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __outl(a,v) volatile u_int32_t *a; u_int32_t v; @@ -92,7 +92,7 @@ __outl(a,v) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __outwrb(a,v) volatile u_int16_t *a; u_int16_t v; @@ -101,7 +101,7 @@ __outwrb(a,v) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __outlrb(a,v) volatile u_int32_t *a; u_int32_t v; @@ -110,7 +110,7 @@ __outlrb(a,v) __asm__ volatile("eieio; sync"); } -static __inline u_int8_t +static inline u_int8_t __inb(a) volatile u_int8_t *a; { @@ -121,7 +121,7 @@ __inb(a) return _v_; } -static __inline u_int16_t +static inline u_int16_t __inw(a) volatile u_int16_t *a; { @@ -132,7 +132,7 @@ __inw(a) return _v_; } -static __inline u_int32_t +static inline u_int32_t __inl(a) volatile u_int32_t *a; { @@ -143,7 +143,7 @@ __inl(a) return _v_; } -static __inline u_int16_t +static inline u_int16_t __inwrb(a) volatile u_int16_t *a; { @@ -154,7 +154,7 @@ __inwrb(a) return _v_; } -static __inline u_int32_t +static inline u_int32_t __inlrb(a) volatile u_int32_t *a; { @@ -190,7 +190,7 @@ __inlrb(a) #define in32rb(a) inlrb(a) -static __inline void +static inline void __outsb(a,s,c) volatile u_int8_t *a; const u_int8_t *s; @@ -201,7 +201,7 @@ __outsb(a,s,c) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __outsw(a,s,c) volatile u_int16_t *a; const u_int16_t *s; @@ -212,7 +212,7 @@ __outsw(a,s,c) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __outsl(a,s,c) volatile u_int32_t *a; const u_int32_t *s; @@ -223,7 +223,7 @@ __outsl(a,s,c) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __outswrb(a,s,c) volatile u_int16_t *a; const u_int16_t *s; @@ -234,7 +234,7 @@ __outswrb(a,s,c) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __outslrb(a,s,c) volatile u_int32_t *a; const u_int32_t *s; @@ -245,7 +245,7 @@ __outslrb(a,s,c) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __insb(a,d,c) volatile u_int8_t *a; u_int8_t *d; @@ -256,7 +256,7 @@ __insb(a,d,c) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __insw(a,d,c) volatile u_int16_t *a; u_int16_t *d; @@ -267,7 +267,7 @@ __insw(a,d,c) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __insl(a,d,c) volatile u_int32_t *a; u_int32_t *d; @@ -278,7 +278,7 @@ __insl(a,d,c) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __inswrb(a,d,c) volatile u_int16_t *a; u_int16_t *d; @@ -289,7 +289,7 @@ __inswrb(a,d,c) __asm__ volatile("eieio; sync"); } -static __inline void +static inline void __inslrb(a,d,c) volatile u_int32_t *a; u_int32_t *d; diff --git a/sys/arch/powerpc/include/spr.h b/sys/arch/powerpc/include/spr.h index fb60365b10b..5a2d133366c 100644 --- a/sys/arch/powerpc/include/spr.h +++ b/sys/arch/powerpc/include/spr.h @@ -1,15 +1,15 @@ -/* $NetBSD: spr.h,v 1.37 2005/11/15 18:26:49 matt Exp $ */ +/* $NetBSD: spr.h,v 1.38 2005/12/24 20:07:28 perry Exp $ */ #ifndef _POWERPC_SPR_H_ #define _POWERPC_SPR_H_ #ifndef _LOCORE #define mtspr(reg, val) \ - __asm __volatile("mtspr %0,%1" : : "K"(reg), "r"(val)) + __asm volatile("mtspr %0,%1" : : "K"(reg), "r"(val)) #ifdef __GNUC__ #define mfspr(reg) \ ( { register_t val; \ - __asm __volatile("mfspr %0,%1" : "=r"(val) : "K"(reg)); \ + __asm volatile("mfspr %0,%1" : "=r"(val) : "K"(reg)); \ val; } ) #endif #endif /* _LOCORE */ diff --git a/sys/arch/powerpc/include/types.h b/sys/arch/powerpc/include/types.h index 81e4f17f66a..2c68e795cf6 100644 --- a/sys/arch/powerpc/include/types.h +++ b/sys/arch/powerpc/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.25 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: types.h,v 1.26 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (C) 1995 Wolfgang Solfrank. @@ -60,7 +60,7 @@ typedef struct label_t { } label_t; #endif -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/powerpc/include/userret.h b/sys/arch/powerpc/include/userret.h index c8143a7ad33..d6e53938ed3 100644 --- a/sys/arch/powerpc/include/userret.h +++ b/sys/arch/powerpc/include/userret.h @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.11 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: userret.h,v 1.12 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -41,7 +41,7 @@ * Define the code needed before returning to user mode, for * trap and syscall. */ -static __inline void +static inline void userret(struct lwp *l, struct trapframe *frame) { struct cpu_info * const ci = curcpu(); @@ -84,7 +84,7 @@ userret(struct lwp *l, struct trapframe *frame) * it will be a different address space). */ if (ci->ci_veclwp != NULL && ci->ci_veclwp != l) { - __asm __volatile("dssall;sync"); + __asm volatile("dssall;sync"); } #endif diff --git a/sys/arch/powerpc/marvell/bus_dma.c b/sys/arch/powerpc/marvell/bus_dma.c index ae65159a8fb..11fc5d72a3d 100644 --- a/sys/arch/powerpc/marvell/bus_dma.c +++ b/sys/arch/powerpc/marvell/bus_dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.10 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.11 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.10 2005/12/11 12:18:43 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.11 2005/12/24 20:07:28 perry Exp $"); #define DEBUG 1 @@ -73,16 +73,16 @@ invaldcache(vaddr_t va, bus_size_t sz) DPRINTF(("invaldcache: %#lx %ld\n", va, (long) sz)); KASSERT(sz != 0); - __asm __volatile("eieio;"); + __asm volatile("eieio;"); off = (u_int)va & (CACHELINESIZE - 1); sz += off; va -= off; while ((int)sz > 0) { - __asm __volatile("dcbi 0, %0;" :: "r"(va)); + __asm volatile("dcbi 0, %0;" :: "r"(va)); va += CACHELINESIZE; sz -= CACHELINESIZE; } - __asm __volatile("sync;"); + __asm volatile("sync;"); } static inline void @@ -93,12 +93,12 @@ flushdcache(vaddr_t va, bus_size_t sz) DPRINTF(("flushdcache: %#lx %ld\n", va, (long) sz)); KASSERT(sz != 0); - __asm __volatile("eieio;"); + __asm volatile("eieio;"); off = (u_int)va & (CACHELINESIZE - 1); sz += off; va -= off; while ((int)sz > CACHELINESIZE) { - __asm __volatile("dcbf 0, %0;" :: "r"(va)); + __asm volatile("dcbf 0, %0;" :: "r"(va)); va += CACHELINESIZE; sz -= CACHELINESIZE; } @@ -108,8 +108,8 @@ flushdcache(vaddr_t va, bus_size_t sz) * read-after-write ensures last cache line * (and therefore all cache lines) made it to memory */ - __asm __volatile("eieio; dcbf 0, %0;" :: "r"(va)); - __asm __volatile("lwz %0,0(%0); sync;" : "+r"(va)); + __asm volatile("eieio; dcbf 0, %0;" :: "r"(va)); + __asm volatile("lwz %0,0(%0); sync;" : "+r"(va)); } static inline void @@ -120,16 +120,16 @@ storedcache(vaddr_t va, bus_size_t sz) DPRINTF(("storedcache: %#lx %ld\n", va, (long) sz)); KASSERT(sz != 0); - __asm __volatile("eieio;"); + __asm volatile("eieio;"); off = (u_int)va & (CACHELINESIZE - 1); sz += off; va -= off; while ((int)sz > 0) { - __asm __volatile("dcbst 0, %0;" :: "r"(va)); + __asm volatile("dcbst 0, %0;" :: "r"(va)); va += CACHELINESIZE; sz -= CACHELINESIZE; } - __asm __volatile("sync;"); + __asm volatile("sync;"); } int _bus_dmamap_load_buffer __P((bus_dma_tag_t, bus_dmamap_t, void *, diff --git a/sys/arch/powerpc/marvell/extintr.c b/sys/arch/powerpc/marvell/extintr.c index 4981078d4ba..7d7291810d5 100644 --- a/sys/arch/powerpc/marvell/extintr.c +++ b/sys/arch/powerpc/marvell/extintr.c @@ -1,4 +1,4 @@ -/* $NetBSD: extintr.c,v 1.14 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: extintr.c,v 1.15 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.14 2005/12/11 12:18:43 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.15 2005/12/24 20:07:28 perry Exp $"); #include "opt_marvell.h" #include "opt_kgdb.h" @@ -247,7 +247,7 @@ STATIC int ext_intr_cause(volatile imask_t *, volatile imask_t *, const imask_t *); STATIC int cause_irq(const imask_t *, const imask_t *); -static __inline void +static inline void imask_print(char *str, volatile imask_t *imp) { DPRINTF(("%s: %#10x %#10x %#10x %#10x\n", @@ -261,12 +261,12 @@ imask_print(char *str, volatile imask_t *imp) /* * Count leading zeros. */ -static __inline int +static inline int cntlzw(int x) { int a; - __asm __volatile ("cntlzw %0,%1" : "=r"(a) : "r"(x)); + __asm volatile ("cntlzw %0,%1" : "=r"(a) : "r"(x)); return a; } @@ -826,7 +826,7 @@ _mftb() u_long scratch; u_int64_t tb; - __asm __volatile ("1: mftbu %0; mftb %0+1; mftbu %1; cmpw 0,%0,%1; bne 1b" + __asm volatile ("1: mftbu %0; mftb %0+1; mftbu %1; cmpw 0,%0,%1; bne 1b" : "=r"(tb), "=r"(scratch)); return tb; } @@ -1175,11 +1175,11 @@ spl_stats_log(int ipl, int cc) if (cc == 0) { /* log our calling address */ - __asm __volatile ("mflr %0;" : "=r"(pc)); + __asm volatile ("mflr %0;" : "=r"(pc)); pc--; } else { /* log our caller's calling address */ - __asm __volatile ("mr %0,1;" : "=r"(fp)); + __asm volatile ("mr %0,1;" : "=r"(fp)); fp = (register_t *)*fp; pc = (register_t *)(fp[1] - sizeof(register_t)); } diff --git a/sys/arch/powerpc/marvell/marvell_intr.h b/sys/arch/powerpc/marvell/marvell_intr.h index 56903cf0dda..bc4deb75cdc 100644 --- a/sys/arch/powerpc/marvell/marvell_intr.h +++ b/sys/arch/powerpc/marvell/marvell_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: marvell_intr.h,v 1.8 2005/11/27 14:01:45 yamt Exp $ */ +/* $NetBSD: marvell_intr.h,v 1.9 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -108,21 +108,21 @@ typedef struct { u_int32_t bits[4]; } imask_t __attribute__ ((aligned(16))); -static __inline void imask_zero(imask_t *); -static __inline void imask_zero_v(volatile imask_t *); -static __inline void imask_dup_v(imask_t *, const volatile imask_t *); -static __inline void imask_and(imask_t *, const imask_t *); -static __inline void imask_andnot_v(volatile imask_t *, const imask_t *); -static __inline void imask_andnot_icu_vv(volatile imask_t *, const volatile imask_t *); -static __inline int imask_empty(const imask_t *); -static __inline void imask_orbit(imask_t *, int); -static __inline void imask_orbit_v(volatile imask_t *, int); -static __inline void imask_clrbit(imask_t *, int); -static __inline void imask_clrbit_v(volatile imask_t *, int); -static __inline u_int32_t imask_andbit_v(const volatile imask_t *, int); -static __inline int imask_test_v(const volatile imask_t *, const imask_t *); - -static __inline void +static inline void imask_zero(imask_t *); +static inline void imask_zero_v(volatile imask_t *); +static inline void imask_dup_v(imask_t *, const volatile imask_t *); +static inline void imask_and(imask_t *, const imask_t *); +static inline void imask_andnot_v(volatile imask_t *, const imask_t *); +static inline void imask_andnot_icu_vv(volatile imask_t *, const volatile imask_t *); +static inline int imask_empty(const imask_t *); +static inline void imask_orbit(imask_t *, int); +static inline void imask_orbit_v(volatile imask_t *, int); +static inline void imask_clrbit(imask_t *, int); +static inline void imask_clrbit_v(volatile imask_t *, int); +static inline u_int32_t imask_andbit_v(const volatile imask_t *, int); +static inline int imask_test_v(const volatile imask_t *, const imask_t *); + +static inline void imask_zero(imask_t *idp) { idp->bits[IMASK_ICU_LO] = 0; @@ -131,7 +131,7 @@ imask_zero(imask_t *idp) idp->bits[IMASK_SOFTINT] = 0; } -static __inline void +static inline void imask_zero_v(volatile imask_t *idp) { idp->bits[IMASK_ICU_LO] = 0; @@ -140,13 +140,13 @@ imask_zero_v(volatile imask_t *idp) idp->bits[IMASK_SOFTINT] = 0; } -static __inline void +static inline void imask_dup_v(imask_t *idp, const volatile imask_t *isp) { *idp = *isp; } -static __inline void +static inline void imask_and(imask_t *idp, const imask_t *isp) { idp->bits[IMASK_ICU_LO] &= isp->bits[IMASK_ICU_LO]; @@ -155,7 +155,7 @@ imask_and(imask_t *idp, const imask_t *isp) idp->bits[IMASK_SOFTINT] &= isp->bits[IMASK_SOFTINT]; } -static __inline void +static inline void imask_andnot_v(volatile imask_t *idp, const imask_t *isp) { idp->bits[IMASK_ICU_LO] &= ~isp->bits[IMASK_ICU_LO]; @@ -164,7 +164,7 @@ imask_andnot_v(volatile imask_t *idp, const imask_t *isp) idp->bits[IMASK_SOFTINT] &= ~isp->bits[IMASK_SOFTINT]; } -static __inline void +static inline void imask_andnot_icu_vv(volatile imask_t *idp, const volatile imask_t *isp) { idp->bits[IMASK_ICU_LO] &= ~isp->bits[IMASK_ICU_LO]; @@ -172,44 +172,44 @@ imask_andnot_icu_vv(volatile imask_t *idp, const volatile imask_t *isp) idp->bits[IMASK_ICU_GPP] &= ~isp->bits[IMASK_ICU_GPP]; } -static __inline int +static inline int imask_empty(const imask_t *isp) { return (! (isp->bits[IMASK_ICU_LO] | isp->bits[IMASK_ICU_HI] | isp->bits[IMASK_ICU_GPP]| isp->bits[IMASK_SOFTINT])); } -static __inline void +static inline void imask_orbit(imask_t *idp, int bitno) { idp->bits[bitno>>IMASK_WORDSHIFT] |= (1 << (bitno&IMASK_BITMASK)); } -static __inline void +static inline void imask_orbit_v(volatile imask_t *idp, int bitno) { idp->bits[bitno>>IMASK_WORDSHIFT] |= (1 << (bitno&IMASK_BITMASK)); } -static __inline void +static inline void imask_clrbit(imask_t *idp, int bitno) { idp->bits[bitno>>IMASK_WORDSHIFT] &= ~(1 << (bitno&IMASK_BITMASK)); } -static __inline void +static inline void imask_clrbit_v(volatile imask_t *idp, int bitno) { idp->bits[bitno>>IMASK_WORDSHIFT] &= ~(1 << (bitno&IMASK_BITMASK)); } -static __inline u_int32_t +static inline u_int32_t imask_andbit_v(const volatile imask_t *idp, int bitno) { return idp->bits[bitno>>IMASK_WORDSHIFT] & (1 << (bitno&IMASK_BITMASK)); } -static __inline int +static inline int imask_test_v(const volatile imask_t *idp, const imask_t *isp) { return ((idp->bits[IMASK_ICU_LO] & isp->bits[IMASK_ICU_LO]) || @@ -317,9 +317,9 @@ void clearsoftnet __P((void)); void intr_dispatch __P((void)); #ifdef SPL_INLINE -static __inline int splraise __P((int)); -static __inline int spllower __P((int)); -static __inline void splx __P((int)); +static inline int splraise __P((int)); +static inline int spllower __P((int)); +static inline void splx __P((int)); #else extern int splraise __P((int)); extern int spllower __P((int)); @@ -334,38 +334,38 @@ extern imask_t imask[]; /* * inlines for manipulating PSL_EE */ -static __inline void +static inline void extintr_restore(register_t omsr) { - __asm __volatile ("sync; mtmsr %0;" :: "r"(omsr)); + __asm volatile ("sync; mtmsr %0;" :: "r"(omsr)); } -static __inline register_t +static inline register_t extintr_enable(void) { register_t omsr; - __asm __volatile("sync;"); - __asm __volatile("mfmsr %0;" : "=r"(omsr)); - __asm __volatile("mtmsr %0;" :: "r"(omsr | PSL_EE)); + __asm volatile("sync;"); + __asm volatile("mfmsr %0;" : "=r"(omsr)); + __asm volatile("mtmsr %0;" :: "r"(omsr | PSL_EE)); return omsr; } -static __inline register_t +static inline register_t extintr_disable(void) { register_t omsr; - __asm __volatile("mfmsr %0;" : "=r"(omsr)); - __asm __volatile("mtmsr %0;" :: "r"(omsr & ~PSL_EE)); - __asm __volatile("isync;"); + __asm volatile("mfmsr %0;" : "=r"(omsr)); + __asm volatile("mtmsr %0;" :: "r"(omsr & ~PSL_EE)); + __asm volatile("isync;"); return omsr; } #ifdef SPL_INLINE -static __inline int +static inline int splraise(int ncpl) { int ocpl; @@ -385,7 +385,7 @@ splraise(int ncpl) return (ocpl); } -static __inline void +static inline void splx(int xcpl) { imask_t *ncplp; @@ -406,7 +406,7 @@ splx(int xcpl) extintr_restore(omsr); } -static __inline int +static inline int spllower(int ncpl) { int ocpl; diff --git a/sys/arch/powerpc/oea/altivec.c b/sys/arch/powerpc/oea/altivec.c index 5971374ef77..429dcb41415 100644 --- a/sys/arch/powerpc/oea/altivec.c +++ b/sys/arch/powerpc/oea/altivec.c @@ -1,4 +1,4 @@ -/* $NetBSD: altivec.c,v 1.10 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: altivec.c,v 1.11 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (C) 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.10 2005/12/11 12:18:43 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.11 2005/12/24 20:07:28 perry Exp $"); #include "opt_multiprocessor.h" @@ -69,7 +69,7 @@ enable_vec(void) */ msr = mfmsr(); mtmsr((msr & ~PSL_EE) | PSL_VEC); - __asm __volatile ("isync"); + __asm volatile ("isync"); if (ci->ci_veclwp) { save_vec_cpu(); } @@ -80,7 +80,7 @@ enable_vec(void) * (this needs to done before loading the user's vector registers * since we need to use a scratch vector register) */ - __asm __volatile("vxor %2,%2,%2; lvewx %2,%0,%1; mtvscr %2" \ + __asm volatile("vxor %2,%2,%2; lvewx %2,%0,%1; mtvscr %2" \ :: "b"(vr), "r"(offsetof(struct vreg, vscr)), "n"(0)); /* @@ -88,7 +88,7 @@ enable_vec(void) */ tf->tf_xtra[TF_VRSAVE] = vr->vrsave; -#define LVX(n,vr) __asm /*__volatile*/("lvx %2,%0,%1" \ +#define LVX(n,vr) __asm /*volatile*/("lvx %2,%0,%1" \ :: "b"(vr), "r"(offsetof(struct vreg, vreg[n])), "n"(n)); /* @@ -103,7 +103,7 @@ enable_vec(void) LVX(20,vr); LVX(21,vr); LVX(22,vr); LVX(23,vr); LVX(24,vr); LVX(25,vr); LVX(26,vr); LVX(27,vr); LVX(28,vr); LVX(29,vr); LVX(30,vr); LVX(31,vr); - __asm __volatile ("isync"); + __asm volatile ("isync"); /* * Enable AltiVec when we return to user-mode. @@ -112,7 +112,7 @@ enable_vec(void) curcpu()->ci_veclwp = l; pcb->pcb_veccpu = curcpu(); pcb->pcb_flags |= PCB_OWNALTIVEC; - __asm __volatile ("sync"); + __asm volatile ("sync"); /* * Restore MSR (turn off AltiVec) @@ -135,7 +135,7 @@ save_vec_cpu(void) */ msr = mfmsr(); mtmsr((msr & ~PSL_EE) | PSL_VEC); - __asm __volatile ("isync"); + __asm volatile ("isync"); l = ci->ci_veclwp; if (l == NULL) goto out; @@ -143,7 +143,7 @@ save_vec_cpu(void) vr = &pcb->pcb_vr; tf = trapframe(l); -#define STVX(n,vr) __asm /*__volatile*/("stvx %2,%0,%1" \ +#define STVX(n,vr) __asm /*volatile*/("stvx %2,%0,%1" \ :: "b"(vr), "r"(offsetof(struct vreg, vreg[n])), "n"(n)); /* @@ -163,7 +163,7 @@ save_vec_cpu(void) * Save VSCR (this needs to be done after save the vector registers * since we need to use one as scratch). */ - __asm __volatile("mfvscr %2; stvewx %2,%0,%1" \ + __asm volatile("mfvscr %2; stvewx %2,%0,%1" \ :: "b"(vr), "r"(offsetof(struct vreg, vscr)), "n"(0)); /* @@ -177,7 +177,7 @@ save_vec_cpu(void) */ pcb->pcb_veccpu = NULL; ci->ci_veclwp = NULL; - __asm __volatile ("dssall; sync"); + __asm volatile ("dssall; sync"); out: @@ -248,13 +248,13 @@ vzeropage(paddr_t pa) uint32_t vec[7], *vp = (void *) roundup((uintptr_t) vec, 16); register_t omsr, msr; - __asm __volatile("mfmsr %0" : "=r"(omsr) :); + __asm volatile("mfmsr %0" : "=r"(omsr) :); /* * Turn on AltiVec, turn off interrupts. */ msr = (omsr & ~PSL_EE) | PSL_VEC; - __asm __volatile("sync; mtmsr %0; isync" :: "r"(msr)); + __asm volatile("sync; mtmsr %0; isync" :: "r"(msr)); /* * Save the VEC register we are going to use before we disable @@ -266,7 +266,7 @@ vzeropage(paddr_t pa) /* * Zero the page using a single cache line. */ - __asm __volatile( + __asm volatile( " sync ;" " mfmsr %[msr];" " rlwinm %[msr],%[msr],0,28,26;" /* Clear PSL_DR */ @@ -295,7 +295,7 @@ vzeropage(paddr_t pa) /* * Restore old MSR (AltiVec OFF). */ - __asm __volatile("sync; mtmsr %0; isync" :: "r"(omsr)); + __asm volatile("sync; mtmsr %0; isync" :: "r"(omsr)); } #define LO_VEC 16 @@ -308,13 +308,13 @@ vcopypage(paddr_t dst, paddr_t src) uint32_t vec[11], *vp = (void *) roundup((uintptr_t) vec, 16); register_t omsr, msr; - __asm __volatile("mfmsr %0" : "=r"(omsr) :); + __asm volatile("mfmsr %0" : "=r"(omsr) :); /* * Turn on AltiVec, turn off interrupts. */ msr = (omsr & ~PSL_EE) | PSL_VEC; - __asm __volatile("sync; mtmsr %0; isync" :: "r"(msr)); + __asm volatile("sync; mtmsr %0; isync" :: "r"(msr)); /* * Save the VEC registers we will be using before we disable @@ -328,7 +328,7 @@ vcopypage(paddr_t dst, paddr_t src) * disabled. On most PPCs, two vector registers occupy one * cache line. */ - __asm __volatile( + __asm volatile( " sync ;" " mfmsr %[msr];" " rlwinm %[msr],%[msr],0,28,26;" /* Clear PSL_DR */ @@ -359,5 +359,5 @@ vcopypage(paddr_t dst, paddr_t src) /* * Restore old MSR (AltiVec OFF). */ - __asm __volatile("sync; mtmsr %0; isync" :: "r"(omsr)); + __asm volatile("sync; mtmsr %0; isync" :: "r"(omsr)); } diff --git a/sys/arch/powerpc/oea/cpu_subr.c b/sys/arch/powerpc/oea/cpu_subr.c index 9c35461d3a2..e102ac00a0d 100644 --- a/sys/arch/powerpc/oea/cpu_subr.c +++ b/sys/arch/powerpc/oea/cpu_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_subr.c,v 1.25 2005/12/11 12:18:43 christos Exp $ */ +/* $NetBSD: cpu_subr.c,v 1.26 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 2001 Matt Thomas. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.25 2005/12/11 12:18:43 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.26 2005/12/24 20:07:28 perry Exp $"); #include "opt_ppcparam.h" #include "opt_multiprocessor.h" @@ -234,7 +234,7 @@ cpu_idlespin(void) if (powersave <= 0) return; - __asm __volatile( + __asm volatile( "sync;" "mfmsr %0;" "oris %0,%0,%1@h;" /* enter power saving mode */ @@ -462,7 +462,7 @@ cpu_setup(self, ci) } mtspr(SPR_HID0, hid0); - __asm __volatile("sync;isync"); + __asm volatile("sync;isync"); switch (vers) { case MPC601: @@ -654,11 +654,11 @@ cpu_enable_l2cr(register_t l2cr) mtmsr(msr & ~PSL_EE); #ifdef ALTIVEC if (cpu_altivec) - __asm __volatile("dssall"); + __asm volatile("dssall"); #endif - __asm __volatile("sync"); + __asm volatile("sync"); mtspr(SPR_L2CR, l2cr & ~L2CR_L2E); - __asm __volatile("sync"); + __asm volatile("sync"); /* Wait for L2 clock to be stable (640 L2 clocks). */ delay(100); @@ -699,7 +699,7 @@ cpu_enable_l3cr(register_t l3cr) mtspr(SPR_L3CR, l3cr); /* 4/5: Perform a global cache invalidate (ref section 3.7.3.6) */ - __asm __volatile("dssall;sync"); + __asm volatile("dssall;sync"); /* L3 cache is already disabled, no need to clear L3E */ mtspr(SPR_L3CR, l3cr|L3CR_L3I); do { @@ -711,7 +711,7 @@ cpu_enable_l3cr(register_t l3cr) mtspr(SPR_L3CR, l3cr); /* 7: Perform a 'sync' and wait at least 100 CPU cycles */ - __asm __volatile("sync"); + __asm volatile("sync"); delay(100); /* 8: Set L3E and L3CLKEN */ @@ -719,7 +719,7 @@ cpu_enable_l3cr(register_t l3cr) mtspr(SPR_L3CR, l3cr); /* 9: Perform a 'sync' and wait at least 100 CPU cycles */ - __asm __volatile("sync"); + __asm volatile("sync"); delay(100); } diff --git a/sys/arch/powerpc/oea/oea_machdep.c b/sys/arch/powerpc/oea/oea_machdep.c index 45eff6b9854..88d55148642 100644 --- a/sys/arch/powerpc/oea/oea_machdep.c +++ b/sys/arch/powerpc/oea/oea_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: oea_machdep.c,v 1.23 2005/12/11 12:18:44 christos Exp $ */ +/* $NetBSD: oea_machdep.c,v 1.24 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (C) 2002 Matt Thomas @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.23 2005/12/11 12:18:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.24 2005/12/24 20:07:28 perry Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -271,7 +271,7 @@ oea_init(void (*handler)(void)) * Try to set the VEC bit in the MSR. If it doesn't get set, we are * not on a AltiVec capable processor. */ - __asm __volatile ( + __asm volatile ( "mfmsr %0; oris %1,%0,%2@h; mtmsr %1; isync; " "mfmsr %1; mtmsr %0; isync" : "=r"(msr), "=r"(scratch) @@ -371,7 +371,7 @@ oea_init(void (*handler)(void)) /* * Now enable translation (and machine checks/recoverable interrupts). */ - __asm __volatile ("sync; mfmsr %0; ori %0,%0,%1; mtmsr %0; isync" + __asm volatile ("sync; mfmsr %0; ori %0,%0,%1; mtmsr %0; isync" : "=r"(scratch) : "K"(PSL_IR|PSL_DR|PSL_ME|PSL_RI)); @@ -391,7 +391,7 @@ mpc601_ioseg_add(paddr_t pa, register_t len) * in pmap_bootstrap(). */ iosrtable[i] = SR601(SR601_Ks, SR601_BUID_MEMFORCED, 0, i); - __asm __volatile ("mtsrin %0,%1" + __asm volatile ("mtsrin %0,%1" :: "r"(iosrtable[i]), "r"(pa)); } @@ -409,19 +409,19 @@ oea_iobat_add(paddr_t pa, register_t len) */ switch (n) { case 1: - __asm __volatile ("mtdbatl 1,%0; mtdbatu 1,%1;" + __asm volatile ("mtdbatl 1,%0; mtdbatu 1,%1;" :: "r"(battable[i].batl), "r"(battable[i].batu)); n = 2; break; case 2: - __asm __volatile ("mtdbatl 2,%0; mtdbatu 2,%1;" + __asm volatile ("mtdbatl 2,%0; mtdbatu 2,%1;" :: "r"(battable[i].batl), "r"(battable[i].batu)); n = 3; break; case 3: - __asm __volatile ("mtdbatl 3,%0; mtdbatu 3,%1;" + __asm volatile ("mtdbatl 3,%0; mtdbatu 3,%1;" :: "r"(battable[i].batl), "r"(battable[i].batu)); n = 4; @@ -444,8 +444,8 @@ oea_iobat_remove(paddr_t pa) battable[n].batl = 0; battable[n].batu = 0; #define BAT_RESET(n) \ - __asm __volatile("mtdbatu %0,%1; mtdbatl %0,%1" :: "n"(n), "r"(0)) -#define BATU_GET(n, r) __asm __volatile("mfdbatu %0,%1" : "=r"(r) : "n"(n)) + __asm volatile("mtdbatu %0,%1; mtdbatl %0,%1" :: "n"(n), "r"(0)) +#define BATU_GET(n, r) __asm volatile("mfdbatu %0,%1" : "=r"(r) : "n"(n)) for (i=1 ; i<4 ; i++) { switch (i) { @@ -498,19 +498,19 @@ oea_batinit(paddr_t pa, ...) */ if ((msr & (PSL_IR|PSL_DR)) == 0) { if (cpuvers == MPC601) { - __asm __volatile ("mtibatl 0,%0" :: "r"(0)); - __asm __volatile ("mtibatl 1,%0" :: "r"(0)); - __asm __volatile ("mtibatl 2,%0" :: "r"(0)); - __asm __volatile ("mtibatl 3,%0" :: "r"(0)); + __asm volatile ("mtibatl 0,%0" :: "r"(0)); + __asm volatile ("mtibatl 1,%0" :: "r"(0)); + __asm volatile ("mtibatl 2,%0" :: "r"(0)); + __asm volatile ("mtibatl 3,%0" :: "r"(0)); } else { - __asm __volatile ("mtibatu 0,%0" :: "r"(0)); - __asm __volatile ("mtibatu 1,%0" :: "r"(0)); - __asm __volatile ("mtibatu 2,%0" :: "r"(0)); - __asm __volatile ("mtibatu 3,%0" :: "r"(0)); - __asm __volatile ("mtdbatu 0,%0" :: "r"(0)); - __asm __volatile ("mtdbatu 1,%0" :: "r"(0)); - __asm __volatile ("mtdbatu 2,%0" :: "r"(0)); - __asm __volatile ("mtdbatu 3,%0" :: "r"(0)); + __asm volatile ("mtibatu 0,%0" :: "r"(0)); + __asm volatile ("mtibatu 1,%0" :: "r"(0)); + __asm volatile ("mtibatu 2,%0" :: "r"(0)); + __asm volatile ("mtibatu 3,%0" :: "r"(0)); + __asm volatile ("mtdbatu 0,%0" :: "r"(0)); + __asm volatile ("mtdbatu 1,%0" :: "r"(0)); + __asm volatile ("mtdbatu 2,%0" :: "r"(0)); + __asm volatile ("mtdbatu 3,%0" :: "r"(0)); } } @@ -529,16 +529,16 @@ oea_batinit(paddr_t pa, ...) battable[i].batu = BATU601(i << 23, BAT601_M, BAT601_Ku, BAT601_PP_NONE); } - __asm __volatile ("mtibatu 0,%1; mtibatl 0,%0" + __asm volatile ("mtibatu 0,%1; mtibatl 0,%0" :: "r"(battable[0x00000000 >> 23].batl), "r"(battable[0x00000000 >> 23].batu)); - __asm __volatile ("mtibatu 1,%1; mtibatl 1,%0" + __asm volatile ("mtibatu 1,%1; mtibatl 1,%0" :: "r"(battable[0x00800000 >> 23].batl), "r"(battable[0x00800000 >> 23].batu)); - __asm __volatile ("mtibatu 2,%1; mtibatl 2,%0" + __asm volatile ("mtibatu 2,%1; mtibatl 2,%0" :: "r"(battable[0x01000000 >> 23].batl), "r"(battable[0x01000000 >> 23].batu)); - __asm __volatile ("mtibatu 3,%1; mtibatl 3,%0" + __asm volatile ("mtibatu 3,%1; mtibatl 3,%0" :: "r"(battable[0x01800000 >> 23].batl), "r"(battable[0x01800000 >> 23].batu)); } else { @@ -548,7 +548,7 @@ oea_batinit(paddr_t pa, ...) battable[0].batl = BATL(0x00000000, BAT_M, BAT_PP_RW); battable[0].batu = BATU(0x00000000, BAT_BL_256M, BAT_Vs); - __asm __volatile ("mtibatl 0,%0; mtibatu 0,%1;" + __asm volatile ("mtibatl 0,%0; mtibatu 0,%1;" "mtdbatl 0,%0; mtdbatu 0,%1;" :: "r"(battable[0].batl), "r"(battable[0].batu)); } @@ -633,14 +633,14 @@ oea_install_extint(void (*handler)(void)) panic("install_extint: %p too far away (%#lx)", handler, (unsigned long) offset); #endif - __asm __volatile ("mfmsr %0; andi. %1,%0,%2; mtmsr %1" + __asm volatile ("mfmsr %0; andi. %1,%0,%2; mtmsr %1" : "=r" (omsr), "=r" (msr) : "K" ((u_short)~PSL_EE)); extint_call[0] = (extint_call[0] & 0xfc000003) | offset; memcpy((void *)EXC_EXI, extint, (size_t)extsize); __syncicache((void *)extint_call, sizeof extint_call[0]); __syncicache((void *)EXC_EXI, (int)extsize); - __asm __volatile ("mtmsr %0" :: "r"(omsr)); + __asm volatile ("mtmsr %0" :: "r"(omsr)); } /* diff --git a/sys/arch/powerpc/oea/pmap.c b/sys/arch/powerpc/oea/pmap.c index c41170f6f48..cf5f9bd7622 100644 --- a/sys/arch/powerpc/oea/pmap.c +++ b/sys/arch/powerpc/oea/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.34 2005/12/08 22:41:44 yamt Exp $ */ +/* $NetBSD: pmap.c,v 1.35 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.34 2005/12/08 22:41:44 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.35 2005/12/24 20:07:28 perry Exp $"); #include "opt_ppcarch.h" #include "opt_altivec.h" @@ -470,10 +470,10 @@ EVCNT_ATTACH_STATIC(pmap_evcnt_pvos_failed); #define PMAPCOUNT2(ev) ((void) 0) #endif -#define TLBIE(va) __asm __volatile("tlbie %0" :: "r"(va)) -#define TLBSYNC() __asm __volatile("tlbsync") -#define SYNC() __asm __volatile("sync") -#define EIEIO() __asm __volatile("eieio") +#define TLBIE(va) __asm volatile("tlbie %0" :: "r"(va)) +#define TLBSYNC() __asm volatile("tlbsync") +#define SYNC() __asm volatile("sync") +#define EIEIO() __asm volatile("eieio") #define MFMSR() mfmsr() #define MTMSR(psl) mtmsr(psl) #define MFPVR() mfpvr() @@ -481,16 +481,16 @@ EVCNT_ATTACH_STATIC(pmap_evcnt_pvos_failed); #define MFTB() mfrtcltbl() #ifndef PPC_OEA64 -static __inline register_t +static inline register_t mfsrin(vaddr_t va) { register_t sr; - __asm __volatile ("mfsrin %0,%1" : "=r"(sr) : "r"(va)); + __asm volatile ("mfsrin %0,%1" : "=r"(sr) : "r"(va)); return sr; } #endif /* PPC_OEA64 */ -static __inline register_t +static inline register_t pmap_interrupts_off(void) { register_t msr = MFMSR(); @@ -506,7 +506,7 @@ pmap_interrupts_restore(register_t msr) MTMSR(msr); } -static __inline u_int32_t +static inline u_int32_t mfrtcltbl(void) { @@ -542,7 +542,7 @@ tlbia(void) SYNC(); } -static __inline register_t +static inline register_t va_to_vsid(const struct pmap *pm, vaddr_t addr) { #ifdef PPC_OEA64 @@ -586,7 +586,7 @@ va_to_vsid(const struct pmap *pm, vaddr_t addr) #endif } -static __inline register_t +static inline register_t va_to_pteg(const struct pmap *pm, vaddr_t addr) { register_t hash; @@ -631,7 +631,7 @@ pmap_pte_to_va(volatile const struct pte *pt) } #endif -static __inline struct pvo_head * +static inline struct pvo_head * pa_to_pvoh(paddr_t pa, struct vm_page **pg_p) { #ifdef __HAVE_VM_PAGE_MD @@ -656,7 +656,7 @@ pa_to_pvoh(paddr_t pa, struct vm_page **pg_p) #endif } -static __inline struct pvo_head * +static inline struct pvo_head * vm_page_to_pvoh(struct vm_page *pg) { #ifdef __HAVE_VM_PAGE_MD @@ -669,7 +669,7 @@ vm_page_to_pvoh(struct vm_page *pg) #ifdef __HAVE_PMAP_PHYSSEG -static __inline char * +static inline char * pa_to_attr(paddr_t pa) { int bank, pg; @@ -681,7 +681,7 @@ pa_to_attr(paddr_t pa) } #endif -static __inline void +static inline void pmap_attr_clear(struct vm_page *pg, int ptebit) { #ifdef __HAVE_PMAP_PHYSSEG @@ -692,7 +692,7 @@ pmap_attr_clear(struct vm_page *pg, int ptebit) #endif } -static __inline int +static inline int pmap_attr_fetch(struct vm_page *pg) { #ifdef __HAVE_PMAP_PHYSSEG @@ -703,7 +703,7 @@ pmap_attr_fetch(struct vm_page *pg) #endif } -static __inline void +static inline void pmap_attr_save(struct vm_page *pg, int ptebit) { #ifdef __HAVE_PMAP_PHYSSEG @@ -714,7 +714,7 @@ pmap_attr_save(struct vm_page *pg, int ptebit) #endif } -static __inline int +static inline int pmap_pte_compare(const volatile struct pte *pt, const struct pte *pvo_pt) { if (pt->pte_hi == pvo_pt->pte_hi @@ -727,7 +727,7 @@ pmap_pte_compare(const volatile struct pte *pt, const struct pte *pvo_pt) return 0; } -static __inline void +static inline void pmap_pte_create(struct pte *pt, const struct pmap *pm, vaddr_t va, register_t pte_lo) { /* @@ -741,13 +741,13 @@ pmap_pte_create(struct pte *pt, const struct pmap *pm, vaddr_t va, register_t pt pt->pte_lo = pte_lo; } -static __inline void +static inline void pmap_pte_synch(volatile struct pte *pt, struct pte *pvo_pt) { pvo_pt->pte_lo |= pt->pte_lo & (PTE_REF|PTE_CHG); } -static __inline void +static inline void pmap_pte_clear(volatile struct pte *pt, vaddr_t va, int ptebit) { /* @@ -761,7 +761,7 @@ pmap_pte_clear(volatile struct pte *pt, vaddr_t va, int ptebit) SYNC(); } -static __inline void +static inline void pmap_pte_set(volatile struct pte *pt, struct pte *pvo_pt) { #if defined(DIAGNOSTIC) || defined(DEBUG) || defined(PMAPCHECK) @@ -781,7 +781,7 @@ pmap_pte_set(volatile struct pte *pt, struct pte *pvo_pt) pmap_pte_valid++; } -static __inline void +static inline void pmap_pte_unset(volatile struct pte *pt, struct pte *pvo_pt, vaddr_t va) { #if defined(DIAGNOSTIC) || defined(DEBUG) || defined(PMAPCHECK) @@ -813,7 +813,7 @@ pmap_pte_unset(volatile struct pte *pt, struct pte *pvo_pt, vaddr_t va) pmap_pte_valid--; } -static __inline void +static inline void pmap_pte_change(volatile struct pte *pt, struct pte *pvo_pt, vaddr_t va) { /* @@ -1296,7 +1296,7 @@ pmap_collect(pmap_t pm) PMAPCOUNT(collects); } -static __inline int +static inline int pmap_pvo_pte_index(const struct pvo_entry *pvo, int ptegidx) { int pteidx; @@ -2528,7 +2528,7 @@ pmap_print_mmuregs(void) register_t sdr1; cpuvers = MFPVR() >> 16; - __asm __volatile ("mfsdr1 %0" : "=r"(sdr1)); + __asm volatile ("mfsdr1 %0" : "=r"(sdr1)); #ifndef PPC_OEA64 addr = 0; for (i = 0; i < 16; i++) { @@ -2538,26 +2538,26 @@ pmap_print_mmuregs(void) #endif /* read iBAT (601: uBAT) registers */ - __asm __volatile ("mfibatu %0,0" : "=r"(soft_ibat[0].batu)); - __asm __volatile ("mfibatl %0,0" : "=r"(soft_ibat[0].batl)); - __asm __volatile ("mfibatu %0,1" : "=r"(soft_ibat[1].batu)); - __asm __volatile ("mfibatl %0,1" : "=r"(soft_ibat[1].batl)); - __asm __volatile ("mfibatu %0,2" : "=r"(soft_ibat[2].batu)); - __asm __volatile ("mfibatl %0,2" : "=r"(soft_ibat[2].batl)); - __asm __volatile ("mfibatu %0,3" : "=r"(soft_ibat[3].batu)); - __asm __volatile ("mfibatl %0,3" : "=r"(soft_ibat[3].batl)); + __asm volatile ("mfibatu %0,0" : "=r"(soft_ibat[0].batu)); + __asm volatile ("mfibatl %0,0" : "=r"(soft_ibat[0].batl)); + __asm volatile ("mfibatu %0,1" : "=r"(soft_ibat[1].batu)); + __asm volatile ("mfibatl %0,1" : "=r"(soft_ibat[1].batl)); + __asm volatile ("mfibatu %0,2" : "=r"(soft_ibat[2].batu)); + __asm volatile ("mfibatl %0,2" : "=r"(soft_ibat[2].batl)); + __asm volatile ("mfibatu %0,3" : "=r"(soft_ibat[3].batu)); + __asm volatile ("mfibatl %0,3" : "=r"(soft_ibat[3].batl)); if (cpuvers != MPC601) { /* read dBAT registers */ - __asm __volatile ("mfdbatu %0,0" : "=r"(soft_dbat[0].batu)); - __asm __volatile ("mfdbatl %0,0" : "=r"(soft_dbat[0].batl)); - __asm __volatile ("mfdbatu %0,1" : "=r"(soft_dbat[1].batu)); - __asm __volatile ("mfdbatl %0,1" : "=r"(soft_dbat[1].batl)); - __asm __volatile ("mfdbatu %0,2" : "=r"(soft_dbat[2].batu)); - __asm __volatile ("mfdbatl %0,2" : "=r"(soft_dbat[2].batl)); - __asm __volatile ("mfdbatu %0,3" : "=r"(soft_dbat[3].batu)); - __asm __volatile ("mfdbatl %0,3" : "=r"(soft_dbat[3].batl)); + __asm volatile ("mfdbatu %0,0" : "=r"(soft_dbat[0].batu)); + __asm volatile ("mfdbatl %0,0" : "=r"(soft_dbat[0].batl)); + __asm volatile ("mfdbatu %0,1" : "=r"(soft_dbat[1].batu)); + __asm volatile ("mfdbatl %0,1" : "=r"(soft_dbat[1].batl)); + __asm volatile ("mfdbatu %0,2" : "=r"(soft_dbat[2].batu)); + __asm volatile ("mfdbatl %0,2" : "=r"(soft_dbat[2].batl)); + __asm volatile ("mfdbatu %0,3" : "=r"(soft_dbat[3].batu)); + __asm volatile ("mfdbatl %0,3" : "=r"(soft_dbat[3].batl)); } printf("SDR1:\t0x%lx\n", (long) sdr1); @@ -3199,28 +3199,28 @@ pmap_bootstrap(paddr_t kernelstart, paddr_t kernelend) #ifndef PPC_OEA64 for (i = 0; i < 16; i++) { pmap_kernel()->pm_sr[i] = EMPTY_SEGMENT; - __asm __volatile ("mtsrin %0,%1" + __asm volatile ("mtsrin %0,%1" :: "r"(EMPTY_SEGMENT), "r"(i << ADDR_SR_SHFT)); } pmap_kernel()->pm_sr[KERNEL_SR] = KERNEL_SEGMENT|SR_SUKEY|SR_PRKEY; - __asm __volatile ("mtsr %0,%1" + __asm volatile ("mtsr %0,%1" :: "n"(KERNEL_SR), "r"(KERNEL_SEGMENT)); #ifdef KERNEL2_SR pmap_kernel()->pm_sr[KERNEL2_SR] = KERNEL2_SEGMENT|SR_SUKEY|SR_PRKEY; - __asm __volatile ("mtsr %0,%1" + __asm volatile ("mtsr %0,%1" :: "n"(KERNEL2_SR), "r"(KERNEL2_SEGMENT)); #endif for (i = 0; i < 16; i++) { if (iosrtable[i] & SR601_T) { pmap_kernel()->pm_sr[i] = iosrtable[i]; - __asm __volatile ("mtsrin %0,%1" + __asm volatile ("mtsrin %0,%1" :: "r"(iosrtable[i]), "r"(i << ADDR_SR_SHFT)); } } #endif /* !PPC_OEA64 */ - __asm __volatile ("sync; mtsdr1 %0; isync" + __asm volatile ("sync; mtsdr1 %0; isync" :: "r"((uintptr_t)pmap_pteg_table | (pmap_pteg_mask >> 10))); tlbia(); diff --git a/sys/arch/powerpc/powerpc/bus_dma.c b/sys/arch/powerpc/powerpc/bus_dma.c index 5a4b13c5cc4..476075d5125 100644 --- a/sys/arch/powerpc/powerpc/bus_dma.c +++ b/sys/arch/powerpc/powerpc/bus_dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.24 2005/12/11 12:18:46 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.25 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.24 2005/12/11 12:18:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.25 2005/12/24 20:07:28 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -57,28 +57,28 @@ __KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.24 2005/12/11 12:18:46 christos Exp $" int _bus_dmamap_load_buffer (bus_dma_tag_t, bus_dmamap_t, void *, bus_size_t, struct proc *, int, paddr_t *, int *, int); -static __inline void +static inline void dcbst(paddr_t pa, long len, int dcache_line_size) { paddr_t epa; for (epa = pa + len; pa < epa; pa += dcache_line_size) - __asm __volatile("dcbst 0,%0" :: "r"(pa)); + __asm volatile("dcbst 0,%0" :: "r"(pa)); } -static __inline void +static inline void dcbi(paddr_t pa, long len, int dcache_line_size) { paddr_t epa; for (epa = pa + len; pa < epa; pa += dcache_line_size) - __asm __volatile("dcbi 0,%0" :: "r"(pa)); + __asm volatile("dcbi 0,%0" :: "r"(pa)); } -static __inline void +static inline void dcbf(paddr_t pa, long len, int dcache_line_size) { paddr_t epa; for (epa = pa + len; pa < epa; pa += dcache_line_size) - __asm __volatile("dcbf 0,%0" :: "r"(pa)); + __asm volatile("dcbf 0,%0" :: "r"(pa)); } /* @@ -485,7 +485,7 @@ _bus_dmamap_sync(t, map, offset, len, ops) offset -= ds->ds_len; ds++; } - __asm __volatile("eieio"); + __asm volatile("eieio"); for (; len > 0; ds++, offset = 0) { bus_size_t seglen = ds->ds_len - offset; bus_addr_t addr = ds->ds_addr + offset; @@ -545,7 +545,7 @@ _bus_dmamap_sync(t, map, offset, len, ops) */ seglen &= ~(dcache_line_size - 1); } - __asm __volatile("sync; eieio"); /* is this needed? */ + __asm volatile("sync; eieio"); /* is this needed? */ /* FALLTHROUGH */ case BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE: case BUS_DMASYNC_POSTREAD: @@ -572,7 +572,7 @@ _bus_dmamap_sync(t, map, offset, len, ops) break; } } - __asm __volatile("sync"); + __asm volatile("sync"); } /* diff --git a/sys/arch/powerpc/powerpc/fpu.c b/sys/arch/powerpc/powerpc/fpu.c index faf9ebf1a7f..fe97fd3eaa0 100644 --- a/sys/arch/powerpc/powerpc/fpu.c +++ b/sys/arch/powerpc/powerpc/fpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: fpu.c,v 1.18 2005/12/11 12:18:46 christos Exp $ */ +/* $NetBSD: fpu.c,v 1.19 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (C) 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.18 2005/12/11 12:18:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.19 2005/12/24 20:07:28 perry Exp $"); #include "opt_multiprocessor.h" @@ -68,12 +68,12 @@ enable_fpu(void) } msr = mfmsr(); mtmsr((msr & ~PSL_EE) | PSL_FP); - __asm __volatile ("isync"); + __asm volatile ("isync"); if (ci->ci_fpulwp) { save_fpu_cpu(); } KASSERT(ci->ci_fpulwp == NULL); - __asm __volatile ( + __asm volatile ( "lfd 0,0(%0)\n" "mtfsf 0xff,0\n" :: "b"(&pcb->pcb_fpu.fpscr)); @@ -111,12 +111,12 @@ enable_fpu(void) "lfd 30,240(%0)\n" "lfd 31,248(%0)\n" :: "b"(&pcb->pcb_fpu.fpreg[0])); - __asm __volatile ("isync"); + __asm volatile ("isync"); tf->srr1 |= PSL_FP | (pcb->pcb_flags & (PCB_FE0|PCB_FE1)); ci->ci_fpulwp = l; pcb->pcb_fpcpu = ci; pcb->pcb_flags |= PCB_OWNFPU; - __asm __volatile ("sync"); + __asm volatile ("sync"); mtmsr(msr); } @@ -133,7 +133,7 @@ save_fpu_cpu(void) msr = mfmsr(); mtmsr((msr & ~PSL_EE) | PSL_FP); - __asm __volatile ("isync"); + __asm volatile ("isync"); l = ci->ci_fpulwp; if (l == NULL) { goto out; @@ -173,15 +173,15 @@ save_fpu_cpu(void) "stfd 30,240(%0)\n" "stfd 31,248(%0)\n" :: "b"(&pcb->pcb_fpu.fpreg[0])); - __asm __volatile ( + __asm volatile ( "mffs 0\n" "stfd 0,0(%0)\n" :: "b"(&pcb->pcb_fpu.fpscr)); - __asm __volatile ("sync"); + __asm volatile ("sync"); pcb->pcb_fpcpu = NULL; ci->ci_fpulwp = NULL; ci->ci_ev_fpusw.ev_count++; - __asm __volatile ("sync"); + __asm volatile ("sync"); out: mtmsr(msr); } @@ -260,8 +260,8 @@ get_fpu_fault_code(void) KASSERT(ci->ci_fpulwp == curlwp); msr = mfmsr(); mtmsr((msr & ~PSL_EE) | PSL_FP); - __asm __volatile ("isync"); - __asm __volatile ( + __asm volatile ("isync"); + __asm volatile ( "stfd 0,0(%0)\n" /* save f0 */ "mffs 0\n" /* get FPSCR */ "stfd 0,0(%2)\n" /* store a temp copy */ @@ -276,7 +276,7 @@ get_fpu_fault_code(void) "lfd 0,0(%0)\n" /* restore f0 */ :: "b"(&tmp), "b"(&pcb->pcb_fpu.fpscr), "b"(&fpscr64)); mtmsr(msr); - __asm __volatile ("isync"); + __asm volatile ("isync"); /* * Now determine the fault type. First we test to see if any of sticky * bits correspond to the enabled exceptions. If so, we only test diff --git a/sys/arch/powerpc/powerpc/in_cksum.c b/sys/arch/powerpc/powerpc/in_cksum.c index b46add39e81..369533d75ac 100644 --- a/sys/arch/powerpc/powerpc/in_cksum.c +++ b/sys/arch/powerpc/powerpc/in_cksum.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_cksum.c,v 1.8 2005/12/11 12:18:46 christos Exp $ */ +/* $NetBSD: in_cksum.c,v 1.9 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.8 2005/12/11 12:18:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.9 2005/12/24 20:07:28 perry Exp $"); #include <sys/param.h> #include <sys/mbuf.h> @@ -119,7 +119,7 @@ in_cksum_internal(struct mbuf *m, int off, int len, u_int sum) * Since the `sum' may contain full 32 bit * value, we can't simply add any value. */ - __asm __volatile( + __asm volatile( "lhz 7,0(%1);" /* load current data half word */ "addc %0,%0,7;" /* add to sum */ @@ -134,7 +134,7 @@ in_cksum_internal(struct mbuf *m, int off, int len, u_int sum) if (mlen >= 64) { n = mlen >> 6; - __asm __volatile( + __asm volatile( "addic 0,0,0;" /* clear carry */ "mtctr %1;" /* load loop count */ "1:" @@ -183,7 +183,7 @@ in_cksum_internal(struct mbuf *m, int off, int len, u_int sum) if (mlen >= 8) { n = mlen >> 3; - __asm __volatile( + __asm volatile( "addic 0,0,0;" /* clear carry */ "mtctr %1;" /* load loop count */ "1:" diff --git a/sys/arch/powerpc/powerpc/pmap_subr.c b/sys/arch/powerpc/powerpc/pmap_subr.c index 681b19e8bae..25471fff2d3 100644 --- a/sys/arch/powerpc/powerpc/pmap_subr.c +++ b/sys/arch/powerpc/powerpc/pmap_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_subr.c,v 1.12 2005/12/11 12:18:46 christos Exp $ */ +/* $NetBSD: pmap_subr.c,v 1.13 2005/12/24 20:07:28 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap_subr.c,v 1.12 2005/12/11 12:18:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_subr.c,v 1.13 2005/12/24 20:07:28 perry Exp $"); #include "opt_multiprocessor.h" #include "opt_altivec.h" @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_subr.c,v 1.12 2005/12/11 12:18:46 christos Exp #include <powerpc/psl.h> #define MFMSR() mfmsr() -#define MTMSR(psl) __asm __volatile("sync; mtmsr %0; isync" :: "r"(psl)) +#define MTMSR(psl) __asm volatile("sync; mtmsr %0; isync" :: "r"(psl)) #ifdef PMAPCOUNTERS struct evcnt pmap_evcnt_zeroed_pages = @@ -287,7 +287,7 @@ pmap_syncicache(paddr_t pa, psize_t len) /* * Wait for it to finish */ - __asm __volatile("sync"); + __asm volatile("sync"); /* * Now invalidate the instruction cache. diff --git a/sys/arch/powerpc/powerpc/softintr.c b/sys/arch/powerpc/powerpc/softintr.c index 4a160356215..cbc6e9dc308 100644 --- a/sys/arch/powerpc/powerpc/softintr.c +++ b/sys/arch/powerpc/powerpc/softintr.c @@ -34,7 +34,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.3 2005/12/11 12:18:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.4 2005/12/24 20:07:28 perry Exp $"); #include <sys/param.h> #include <lib/libkern/libkern.h> @@ -63,7 +63,7 @@ static struct softintr_qh struct pool softintr_pool; struct softintr *softnet_handlers[32]; -static __inline struct softintr_qh * +static inline struct softintr_qh * softintr_queue(int ipl) { switch (ipl) { diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index be76cb76973..cd56f5d3347 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.108 2005/12/11 12:18:46 christos Exp $ */ +/* $NetBSD: trap.c,v 1.109 2005/12/24 20:07:28 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.108 2005/12/11 12:18:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.109 2005/12/24 20:07:28 perry Exp $"); #include "opt_altivec.h" #include "opt_ddb.h" @@ -66,8 +66,8 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.108 2005/12/11 12:18:46 christos Exp $"); static int emulated_opcode(struct lwp *, struct trapframe *); static int fix_unaligned(struct lwp *, struct trapframe *); -static __inline vaddr_t setusr(vaddr_t, size_t *); -static __inline void unsetusr(void); +static inline vaddr_t setusr(vaddr_t, size_t *); +static inline void unsetusr(void); void trap(struct trapframe *); /* Called from locore / trap_subr */ /* Why are these not defined in a header? */ @@ -548,7 +548,7 @@ setusr(vaddr_t uva, size_t *len_p) pcb->pcb_umapsr = uva >> ADDR_SR_SHFT; *len_p = SEGMENT_LENGTH - (uva & ~SEGMENT_MASK); p = (USER_SR << ADDR_SR_SHFT) + (uva & ~SEGMENT_MASK); - __asm __volatile ("isync; mtsr %0,%1; isync" + __asm volatile ("isync; mtsr %0,%1; isync" :: "n"(USER_SR), "r"(pcb->pcb_pm->pm_sr[pcb->pcb_umapsr])); return p; } @@ -557,7 +557,7 @@ static void unsetusr(void) { curpcb->pcb_kmapsr = 0; - __asm __volatile ("isync; mtsr %0,%1; isync" + __asm volatile ("isync; mtsr %0,%1; isync" :: "n"(USER_SR), "r"(EMPTY_SEGMENT)); } #endif @@ -660,15 +660,15 @@ badaddr_read(void *addr, size_t size, int *rptr) int x; /* Get rid of any stale machine checks that have been waiting. */ - __asm __volatile ("sync; isync"); + __asm volatile ("sync; isync"); if (setfault(&env)) { curpcb->pcb_onfault = 0; - __asm __volatile ("sync"); + __asm volatile ("sync"); return 1; } - __asm __volatile ("sync"); + __asm volatile ("sync"); switch (size) { case 1: @@ -685,10 +685,10 @@ badaddr_read(void *addr, size_t size, int *rptr) } /* Make sure we took the machine check, if we caused one. */ - __asm __volatile ("sync; isync"); + __asm volatile ("sync; isync"); curpcb->pcb_onfault = 0; - __asm __volatile ("sync"); /* To be sure. */ + __asm volatile ("sync"); /* To be sure. */ /* Use the value to avoid reorder. */ if (rptr) diff --git a/sys/arch/prep/include/intr.h b/sys/arch/prep/include/intr.h index 936db504535..6a6430a1a1c 100644 --- a/sys/arch/prep/include/intr.h +++ b/sys/arch/prep/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.20 2005/12/11 12:18:47 christos Exp $ */ +/* $NetBSD: intr.h,v 1.21 2005/12/24 20:07:31 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -94,9 +94,9 @@ void isa_intr_mask(int); void isa_intr_clr(int); void isa_setirqstat(int, int, int); -static __inline int splraise(int); -static __inline void spllower(int); -static __inline void set_sint(int); +static inline int splraise(int); +static inline void spllower(int); +static inline void set_sint(int); extern volatile int cpl, ipending, astpending, tickspending; extern int imen; @@ -112,7 +112,7 @@ extern vaddr_t prep_intr_reg; * achieved with the "eieio" instruction which the assembler * seems to detect and then doesn't move instructions past.... */ -static __inline int +static inline int splraise(int newcpl) { int oldcpl; @@ -124,7 +124,7 @@ splraise(int newcpl) return(oldcpl); } -static __inline void +static inline void spllower(int newcpl) { @@ -137,7 +137,7 @@ spllower(int newcpl) /* Following code should be implemented with lwarx/stwcx to avoid * the disable/enable. i need to read the manual once more.... */ -static __inline void +static inline void set_sint(int pending) { int msrsave; diff --git a/sys/arch/prep/include/kgdb.h b/sys/arch/prep/include/kgdb.h index dc61b5e6e7a..07845511108 100644 --- a/sys/arch/prep/include/kgdb.h +++ b/sys/arch/prep/include/kgdb.h @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb.h,v 1.1 2000/02/29 15:21:30 nonaka Exp $ */ +/* $NetBSD: kgdb.h,v 1.2 2005/12/24 20:07:31 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -45,7 +45,7 @@ extern int kgdbregs[NREG]; extern char kgdbstep; /* Doesn't handle overlapping regions */ -__inline extern void +inline extern void kgdbcopy(s,d,n) void *s, *d; int n; @@ -56,7 +56,7 @@ kgdbcopy(s,d,n) *dp++ = *sp++; } -__inline extern void +inline extern void kgdbzero(d,n) void *d; int n; @@ -67,7 +67,7 @@ kgdbzero(d,n) *dp++ = 0; } -__inline extern int +inline extern int kgdbcmp(s,d,n) void *s, *d; { diff --git a/sys/arch/prep/prep/machdep.c b/sys/arch/prep/prep/machdep.c index 61fa6a61698..a8e0c959213 100644 --- a/sys/arch/prep/prep/machdep.c +++ b/sys/arch/prep/prep/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.53 2005/12/11 12:18:48 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.54 2005/12/24 20:07:31 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.53 2005/12/11 12:18:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.54 2005/12/24 20:07:31 perry Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -266,7 +266,7 @@ cpu_startup() int msr; splraise(-1); - __asm __volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" + __asm volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" : "=r"(msr) : "K"(PSL_EE)); } diff --git a/sys/arch/prep/prep/mot_ulmb60xa.c b/sys/arch/prep/prep/mot_ulmb60xa.c index 289fb5744b4..33c42f7a5ab 100644 --- a/sys/arch/prep/prep/mot_ulmb60xa.c +++ b/sys/arch/prep/prep/mot_ulmb60xa.c @@ -1,4 +1,4 @@ -/* $NetBSD: mot_ulmb60xa.c,v 1.9 2005/12/11 12:18:48 christos Exp $ */ +/* $NetBSD: mot_ulmb60xa.c,v 1.10 2005/12/24 20:07:31 perry Exp $ */ /*- * Copyright (c) 2002, 2005 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mot_ulmb60xa.c,v 1.9 2005/12/11 12:18:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mot_ulmb60xa.c,v 1.10 2005/12/24 20:07:31 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -99,7 +99,7 @@ mot_ulmb60xa_match(struct platform *p) return 0; /* Should possibly match against the FirmwareSupplier as well. */ cputype = *(volatile uint8_t *)MOT_CPUTYPE_REG; - __asm __volatile ("eieio; sync"); + __asm volatile ("eieio; sync"); if (MOT_CPUTYPE_BOARDID(cputype) != MOT_CPUTYPE_BOARDID_ULTRA) return 0; diff --git a/sys/arch/prep/stand/boot/boot.c b/sys/arch/prep/stand/boot/boot.c index bec430c94a9..6a67c62280a 100644 --- a/sys/arch/prep/stand/boot/boot.c +++ b/sys/arch/prep/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.10 2005/12/11 12:18:48 christos Exp $ */ +/* $NetBSD: boot.c,v 1.11 2005/12/24 20:07:31 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -115,7 +115,7 @@ boot(resp, loadaddr) /* * clock */ - __asm __volatile ("mfpvr %0" : "=r"(cpuvers)); + __asm volatile ("mfpvr %0" : "=r"(cpuvers)); cpuvers >>= 16; btinfo_clock.common.next = 0; btinfo_clock.common.type = BTINFO_CLOCK; diff --git a/sys/arch/prep/stand/boot/clock.c b/sys/arch/prep/stand/boot/clock.c index 4cc4e975d00..1b2d6442800 100644 --- a/sys/arch/prep/stand/boot/clock.c +++ b/sys/arch/prep/stand/boot/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.6 2005/12/11 12:18:48 christos Exp $ */ +/* $NetBSD: clock.c,v 1.7 2005/12/24 20:07:31 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -61,7 +61,7 @@ mfrtc(up, lp) { u_long scratch; - __asm __volatile ("1: mfspr %0,%3; mfspr %1,%4; mfspr %2,%3;" + __asm volatile ("1: mfspr %0,%3; mfspr %1,%4; mfspr %2,%3;" "cmpw %0,%2; bne 1b" : "=r"(*up), "=r"(*lp), "=r"(scratch) : "n"(SPR_RTCU_R), "n"(SPR_RTCL_R)); @@ -78,7 +78,7 @@ delay(n) u_long tbh, tbl, scratch; unsigned int cpuvers; - __asm __volatile ("mfpvr %0" : "=r"(cpuvers)); + __asm volatile ("mfpvr %0" : "=r"(cpuvers)); cpuvers >>= 16; if (cpuvers == MPC601) { @@ -92,7 +92,7 @@ delay(n) tbh++; tbl -= 1000000000; } - __asm __volatile ("1: mfspr %0,%3; cmplw %0,%1; blt 1b; bgt 2f;" + __asm volatile ("1: mfspr %0,%3; cmplw %0,%1; blt 1b; bgt 2f;" "mfspr %0,%4; cmplw %0,%2; blt 1b; 2:" : "=&r"(scratch) : "r"(tbh), "r"(tbl), "n"(SPR_RTCU_R), "n"(SPR_RTCL_R)); @@ -101,7 +101,7 @@ delay(n) tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick; tbh = tb >> 32; tbl = tb; - __asm __volatile ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f;" + __asm volatile ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f;" "mftb %0; cmpw %0,%2; blt 1b; 2:" : "=&r"(scratch) : "r"(tbh), "r"(tbl)); diff --git a/sys/arch/sandpoint/include/intr.h b/sys/arch/sandpoint/include/intr.h index fe9ab6b4671..d83e707d451 100644 --- a/sys/arch/sandpoint/include/intr.h +++ b/sys/arch/sandpoint/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.7 2005/12/11 12:18:51 christos Exp $ */ +/* $NetBSD: intr.h,v 1.8 2005/12/24 20:07:31 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -111,10 +111,10 @@ void do_pending_int(void); void *intr_establish(int, int, int, int (*)(void *), void *); void intr_disestablish(void *); -static __inline int splraise(int); -static __inline int spllower(int); -static __inline void splx(int); -static __inline void set_sint(int); +static inline int splraise(int); +static inline int spllower(int); +static inline void splx(int); +static inline void set_sint(int); extern volatile int cpl, ipending, astpending, tickspending; extern int imask[]; @@ -124,7 +124,7 @@ extern long intrcnt[]; * Reorder protection in the following inline functions is * protected with the "eieio" instruction. */ -static __inline int +static inline int splraise(newcpl) int newcpl; { @@ -137,7 +137,7 @@ splraise(newcpl) return(oldcpl); } -static __inline void +static inline void splx(newcpl) int newcpl; { @@ -148,7 +148,7 @@ splx(newcpl) __asm__ volatile("sync; eieio\n"); /* reorder protect */ } -static __inline int +static inline int spllower(newcpl) int newcpl; { @@ -165,7 +165,7 @@ spllower(newcpl) /* Following code should be implemented with lwarx/stwcx to avoid * the disable/enable. i need to read the manual once more.... */ -static __inline void +static inline void set_sint(pending) int pending; { diff --git a/sys/arch/sandpoint/include/kgdb.h b/sys/arch/sandpoint/include/kgdb.h index c72dfc3d2f1..07845511108 100644 --- a/sys/arch/sandpoint/include/kgdb.h +++ b/sys/arch/sandpoint/include/kgdb.h @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb.h,v 1.1 2001/02/04 18:32:13 briggs Exp $ */ +/* $NetBSD: kgdb.h,v 1.2 2005/12/24 20:07:31 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -45,7 +45,7 @@ extern int kgdbregs[NREG]; extern char kgdbstep; /* Doesn't handle overlapping regions */ -__inline extern void +inline extern void kgdbcopy(s,d,n) void *s, *d; int n; @@ -56,7 +56,7 @@ kgdbcopy(s,d,n) *dp++ = *sp++; } -__inline extern void +inline extern void kgdbzero(d,n) void *d; int n; @@ -67,7 +67,7 @@ kgdbzero(d,n) *dp++ = 0; } -__inline extern int +inline extern int kgdbcmp(s,d,n) void *s, *d; { diff --git a/sys/arch/sandpoint/isa/isaclock.c b/sys/arch/sandpoint/isa/isaclock.c index 911020d7ee4..68cb293d58a 100644 --- a/sys/arch/sandpoint/isa/isaclock.c +++ b/sys/arch/sandpoint/isa/isaclock.c @@ -1,4 +1,4 @@ -/* $NetBSD: isaclock.c,v 1.6 2005/12/11 12:18:51 christos Exp $ */ +/* $NetBSD: isaclock.c,v 1.7 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -121,7 +121,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.6 2005/12/11 12:18:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.7 2005/12/24 20:07:32 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -153,15 +153,15 @@ static int yeartoday __P((int)); int hexdectodec __P((int)); int dectohexdec __P((int)); -__inline u_int mc146818_read __P((void *, u_int)); -__inline void mc146818_write __P((void *, u_int, u_int)); +inline u_int mc146818_read __P((void *, u_int)); +inline void mc146818_write __P((void *, u_int, u_int)); #define SECMIN ((unsigned)60) /* seconds per minute */ #define SECHOUR ((unsigned)(60*SECMIN)) /* seconds per hour */ #define SECDAY ((unsigned)(24*SECHOUR)) /* seconds per day */ #define SECYR ((unsigned)(365*SECDAY)) /* seconds per common year */ -__inline u_int +inline u_int mc146818_read(sc, reg) void *sc; /* XXX use it? */ u_int reg; @@ -171,7 +171,7 @@ mc146818_read(sc, reg) return (isa_inb(IO_RTC+1)); } -__inline void +inline void mc146818_write(sc, reg, datum) void *sc; /* XXX use it? */ u_int reg, datum; diff --git a/sys/arch/sandpoint/sandpoint/machdep.c b/sys/arch/sandpoint/sandpoint/machdep.c index 5d9ae321757..102a6b3d80e 100644 --- a/sys/arch/sandpoint/sandpoint/machdep.c +++ b/sys/arch/sandpoint/sandpoint/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.32 2005/12/11 12:18:51 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.33 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.32 2005/12/11 12:18:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.33 2005/12/24 20:07:32 perry Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -259,7 +259,7 @@ cpu_startup(void) * Now allow hardware interrupts. */ splhigh(); - __asm __volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" + __asm volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0" : "=r"(msr) : "K"(PSL_EE)); } diff --git a/sys/arch/sgimips/include/bus.h b/sys/arch/sgimips/include/bus.h index 3e34fea502a..7851d6a2eb2 100644 --- a/sys/arch/sgimips/include/bus.h +++ b/sys/arch/sgimips/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.15 2005/12/11 12:18:53 christos Exp $ */ +/* $NetBSD: bus.h,v 1.16 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -160,11 +160,11 @@ u_int64_t bus_space_read_8(bus_space_tag_t, bus_space_handle_t, bus_size_t); */ #define __SGIMIPS_bus_space_read_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_read_multi_,BYTES) \ +static inline void __CONCAT(bus_space_read_multi_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_multi_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -198,11 +198,11 @@ __SGIMIPS_bus_space_read_multi(4,32) */ #define __SGIMIPS_bus_space_read_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_read_region_,BYTES) \ +static inline void __CONCAT(bus_space_read_region_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_read_region_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -255,11 +255,11 @@ void bus_space_write_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, */ #define __SGIMIPS_bus_space_write_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_write_multi_,BYTES) \ +static inline void __CONCAT(bus_space_write_multi_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ const __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_multi_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -293,11 +293,11 @@ __SGIMIPS_bus_space_write_multi(4,32) */ #define __SGIMIPS_bus_space_write_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_write_region_,BYTES) \ +static inline void __CONCAT(bus_space_write_region_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ const __PB_TYPENAME(BITS) *, size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_write_region_,BYTES)(t, h, o, a, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -333,11 +333,11 @@ __SGIMIPS_bus_space_write_region(4,32) */ #define __SGIMIPS_bus_space_set_multi(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_set_multi_,BYTES) \ +static inline void __CONCAT(bus_space_set_multi_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS), size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_multi_,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -371,11 +371,11 @@ __SGIMIPS_bus_space_set_multi(4,32) */ #define __SGIMIPS_bus_space_set_region(BYTES,BITS) \ -static __inline void __CONCAT(bus_space_set_region_,BYTES) \ +static inline void __CONCAT(bus_space_set_region_,BYTES) \ (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ __PB_TYPENAME(BITS), size_t); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_set_region_,BYTES)(t, h, o, v, c) \ bus_space_tag_t t; \ bus_space_handle_t h; \ @@ -412,13 +412,13 @@ __SGIMIPS_bus_space_set_region(4,32) */ #define __SGIMIPS_copy_region(BYTES) \ -static __inline void __CONCAT(bus_space_copy_region_,BYTES) \ +static inline void __CONCAT(bus_space_copy_region_,BYTES) \ (bus_space_tag_t, \ bus_space_handle_t bsh1, bus_size_t off1, \ bus_space_handle_t bsh2, bus_size_t off2, \ bus_size_t count); \ \ -static __inline void \ +static inline void \ __CONCAT(bus_space_copy_region_,BYTES)(t, h1, o1, h2, o2, c) \ bus_space_tag_t t; \ bus_space_handle_t h1, h2; \ diff --git a/sys/arch/sgimips/include/param.h b/sys/arch/sgimips/include/param.h index 03fe9d75b9c..35ef6207dea 100644 --- a/sys/arch/sgimips/include/param.h +++ b/sys/arch/sgimips/include/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.6 2005/12/11 12:18:53 christos Exp $ */ +/* $NetBSD: param.h,v 1.7 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -112,7 +112,7 @@ #ifdef _KERNEL #ifndef _LOCORE -__inline extern void delay(unsigned long); +inline extern void delay(unsigned long); #define DELAY(n) delay(n) #include <machine/intr.h> diff --git a/sys/arch/sh3/dev/shpcic.c b/sys/arch/sh3/dev/shpcic.c index 90982882ea2..89151def25c 100644 --- a/sys/arch/sh3/dev/shpcic.c +++ b/sys/arch/sh3/dev/shpcic.c @@ -1,4 +1,4 @@ -/* $NetBSD: shpcic.c,v 1.9 2005/12/11 12:18:58 christos Exp $ */ +/* $NetBSD: shpcic.c,v 1.10 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 2005 NONAKA Kimihiro @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: shpcic.c,v 1.9 2005/12/11 12:18:58 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: shpcic.c,v 1.10 2005/12/24 20:07:32 perry Exp $"); #include "opt_pci.h" @@ -445,20 +445,20 @@ shpcic_iomem_free(void *v, bus_space_handle_t bsh, bus_size_t size) * shpcic bus space io/mem read/write */ /* read */ -static __inline uint8_t __shpcic_io_read_1(bus_space_handle_t bsh, +static inline uint8_t __shpcic_io_read_1(bus_space_handle_t bsh, bus_size_t offset); -static __inline uint16_t __shpcic_io_read_2(bus_space_handle_t bsh, +static inline uint16_t __shpcic_io_read_2(bus_space_handle_t bsh, bus_size_t offset); -static __inline uint32_t __shpcic_io_read_4(bus_space_handle_t bsh, +static inline uint32_t __shpcic_io_read_4(bus_space_handle_t bsh, bus_size_t offset); -static __inline uint8_t __shpcic_mem_read_1(bus_space_handle_t bsh, +static inline uint8_t __shpcic_mem_read_1(bus_space_handle_t bsh, bus_size_t offset); -static __inline uint16_t __shpcic_mem_read_2(bus_space_handle_t bsh, +static inline uint16_t __shpcic_mem_read_2(bus_space_handle_t bsh, bus_size_t offset); -static __inline uint32_t __shpcic_mem_read_4(bus_space_handle_t bsh, +static inline uint32_t __shpcic_mem_read_4(bus_space_handle_t bsh, bus_size_t offset); -static __inline uint8_t +static inline uint8_t __shpcic_io_read_1(bus_space_handle_t bsh, bus_size_t offset) { u_long adr = (u_long)(bsh + offset) & SH4_PCIC_IO_MASK; @@ -466,7 +466,7 @@ __shpcic_io_read_1(bus_space_handle_t bsh, bus_size_t offset) return *(volatile uint8_t *)(SH4_PCIC_IO + adr); } -static __inline uint16_t +static inline uint16_t __shpcic_io_read_2(bus_space_handle_t bsh, bus_size_t offset) { u_long adr = (u_long)(bsh + offset) & SH4_PCIC_IO_MASK; @@ -474,7 +474,7 @@ __shpcic_io_read_2(bus_space_handle_t bsh, bus_size_t offset) return *(volatile uint16_t *)(SH4_PCIC_IO + adr); } -static __inline uint32_t +static inline uint32_t __shpcic_io_read_4(bus_space_handle_t bsh, bus_size_t offset) { u_long adr = (u_long)(bsh + offset) & SH4_PCIC_IO_MASK; @@ -482,7 +482,7 @@ __shpcic_io_read_4(bus_space_handle_t bsh, bus_size_t offset) return *(volatile uint32_t *)(SH4_PCIC_IO + adr); } -static __inline uint8_t +static inline uint8_t __shpcic_mem_read_1(bus_space_handle_t bsh, bus_size_t offset) { u_long adr = (u_long)(bsh + offset) & SH4_PCIC_MEM_MASK; @@ -490,7 +490,7 @@ __shpcic_mem_read_1(bus_space_handle_t bsh, bus_size_t offset) return *(volatile uint8_t *)(SH4_PCIC_MEM + adr); } -static __inline uint16_t +static inline uint16_t __shpcic_mem_read_2(bus_space_handle_t bsh, bus_size_t offset) { u_long adr = (u_long)(bsh + offset) & SH4_PCIC_MEM_MASK; @@ -498,7 +498,7 @@ __shpcic_mem_read_2(bus_space_handle_t bsh, bus_size_t offset) return *(volatile uint16_t *)(SH4_PCIC_MEM + adr); } -static __inline uint32_t +static inline uint32_t __shpcic_mem_read_4(bus_space_handle_t bsh, bus_size_t offset) { u_long adr = (u_long)(bsh + offset) & SH4_PCIC_MEM_MASK; @@ -703,20 +703,20 @@ shpcic_mem_read_region_4(void *v, bus_space_handle_t bsh, } /* write */ -static __inline void __shpcic_io_write_1(bus_space_handle_t bsh, +static inline void __shpcic_io_write_1(bus_space_handle_t bsh, bus_size_t offset, uint8_t value); -static __inline void __shpcic_io_write_2(bus_space_handle_t bsh, +static inline void __shpcic_io_write_2(bus_space_handle_t bsh, bus_size_t offset, uint16_t value); -static __inline void __shpcic_io_write_4(bus_space_handle_t bsh, +static inline void __shpcic_io_write_4(bus_space_handle_t bsh, bus_size_t offset, uint32_t value); -static __inline void __shpcic_mem_write_1(bus_space_handle_t bsh, +static inline void __shpcic_mem_write_1(bus_space_handle_t bsh, bus_size_t offset, uint8_t value); -static __inline void __shpcic_mem_write_2(bus_space_handle_t bsh, +static inline void __shpcic_mem_write_2(bus_space_handle_t bsh, bus_size_t offset, uint16_t value); -static __inline void __shpcic_mem_write_4(bus_space_handle_t bsh, +static inline void __shpcic_mem_write_4(bus_space_handle_t bsh, bus_size_t offset, uint32_t value); -static __inline void +static inline void __shpcic_io_write_1(bus_space_handle_t bsh, bus_size_t offset, uint8_t value) { @@ -725,7 +725,7 @@ __shpcic_io_write_1(bus_space_handle_t bsh, bus_size_t offset, *(volatile uint8_t *)(SH4_PCIC_IO + adr) = value; } -static __inline void +static inline void __shpcic_io_write_2(bus_space_handle_t bsh, bus_size_t offset, uint16_t value) { @@ -734,7 +734,7 @@ __shpcic_io_write_2(bus_space_handle_t bsh, bus_size_t offset, *(volatile uint16_t *)(SH4_PCIC_IO + adr) = value; } -static __inline void +static inline void __shpcic_io_write_4(bus_space_handle_t bsh, bus_size_t offset, uint32_t value) { @@ -743,7 +743,7 @@ __shpcic_io_write_4(bus_space_handle_t bsh, bus_size_t offset, *(volatile uint32_t *)(SH4_PCIC_IO + adr) = value; } -static __inline void +static inline void __shpcic_mem_write_1(bus_space_handle_t bsh, bus_size_t offset, uint8_t value) { @@ -752,7 +752,7 @@ __shpcic_mem_write_1(bus_space_handle_t bsh, bus_size_t offset, *(volatile uint8_t *)(SH4_PCIC_MEM + adr) = value; } -static __inline void +static inline void __shpcic_mem_write_2(bus_space_handle_t bsh, bus_size_t offset, uint16_t value) { @@ -761,7 +761,7 @@ __shpcic_mem_write_2(bus_space_handle_t bsh, bus_size_t offset, *(volatile uint16_t *)(SH4_PCIC_MEM + adr) = value; } -static __inline void +static inline void __shpcic_mem_write_4(bus_space_handle_t bsh, bus_size_t offset, uint32_t value) { diff --git a/sys/arch/sh3/include/bswap.h b/sys/arch/sh3/include/bswap.h index 27bc554a9e4..12ccd4f7860 100644 --- a/sys/arch/sh3/include/bswap.h +++ b/sys/arch/sh3/include/bswap.h @@ -1,4 +1,4 @@ -/* $NetBSD: bswap.h,v 1.4 2002/04/28 17:10:33 uch Exp $ */ +/* $NetBSD: bswap.h,v 1.5 2005/12/24 20:07:32 perry Exp $ */ /* Written by Manuel Bouyer. Public domain */ @@ -18,27 +18,27 @@ __END_DECLS #else /* _KERNEL */ __BEGIN_DECLS -static __inline u_int16_t bswap16(u_int16_t); -static __inline u_int32_t bswap32(u_int32_t); +static inline u_int16_t bswap16(u_int16_t); +static inline u_int32_t bswap32(u_int32_t); u_int64_t bswap64(u_int64_t); __END_DECLS -static __inline u_int16_t +static inline u_int16_t bswap16(u_int16_t x) { u_int16_t rval; - __asm __volatile ("swap.b %1,%0" : "=r"(rval) : "r"(x)); + __asm volatile ("swap.b %1,%0" : "=r"(rval) : "r"(x)); return (rval); } -static __inline u_int32_t +static inline u_int32_t bswap32(u_int32_t x) { u_int32_t rval; - __asm __volatile ("swap.b %1,%0; swap.w %0,%0; swap.b %0,%0" + __asm volatile ("swap.b %1,%0; swap.w %0,%0; swap.b %0,%0" : "=r"(rval) : "r"(x)); return (rval); diff --git a/sys/arch/sh3/include/bus.h b/sys/arch/sh3/include/bus.h index 942c0edc89e..6e0cc68c460 100644 --- a/sys/arch/sh3/include/bus.h +++ b/sys/arch/sh3/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.12 2005/12/11 12:18:58 christos Exp $ */ +/* $NetBSD: bus.h,v 1.13 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -138,11 +138,11 @@ int shpcmcia_memio_subregion(bus_space_tag_t, bus_space_handle_t, * Read a 1, 2, 4, or 8 byte quantity from bus space * described by tag/handle/offset. */ -static __inline u_int8_t bus_space_read_1 +static inline u_int8_t bus_space_read_1 (bus_space_tag_t, bus_space_handle_t, bus_size_t); -static __inline u_int16_t bus_space_read_2 +static inline u_int16_t bus_space_read_2 (bus_space_tag_t, bus_space_handle_t, bus_size_t); -static __inline u_int32_t bus_space_read_4 +static inline u_int32_t bus_space_read_4 (bus_space_tag_t, bus_space_handle_t, bus_size_t); u_int8_t @@ -169,10 +169,10 @@ bus_space_read_4(bus_space_tag_t tag, bus_space_handle_t bsh, return bswap32(*(volatile u_int32_t *)(bsh + offset)); } -static __inline u_int16_t bus_space_read_stream_2 +static inline u_int16_t bus_space_read_stream_2 (bus_space_tag_t, bus_space_handle_t, bus_size_t); -static __inline u_int32_t bus_space_read_stream_4 +static inline u_int32_t bus_space_read_stream_4 (bus_space_tag_t, bus_space_handle_t, bus_size_t); u_int16_t @@ -199,11 +199,11 @@ bus_space_read_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle/offset and copy into buffer provided. */ -static __inline void bus_space_read_multi_1(bus_space_tag_t, +static inline void bus_space_read_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, bus_size_t); -static __inline void bus_space_read_multi_2(bus_space_tag_t, +static inline void bus_space_read_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_read_multi_4(bus_space_tag_t, +static inline void bus_space_read_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); void @@ -233,9 +233,9 @@ bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, *addr++ = bus_space_read_4(tag, bsh, offset); } -static __inline void bus_space_read_multi_stream_2(bus_space_tag_t, +static inline void bus_space_read_multi_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_read_multi_stream_4(bus_space_tag_t, +static inline void bus_space_read_multi_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); void @@ -314,11 +314,11 @@ int sh_memio_subregion(bus_space_tag_t, bus_space_handle_t, * described by tag/handle and starting at `offset' and copy into * buffer provided. */ -static __inline void bus_space_read_region_1(bus_space_tag_t, +static inline void bus_space_read_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, bus_size_t); -static __inline void bus_space_read_region_2(bus_space_tag_t, +static inline void bus_space_read_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_read_region_4(bus_space_tag_t, +static inline void bus_space_read_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); void @@ -360,11 +360,11 @@ bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, * described by tag/handle and starting at `offset' and copy into * buffer provided. */ -static __inline void bus_space_read_region_stream_1(bus_space_tag_t, +static inline void bus_space_read_region_stream_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, bus_size_t); -static __inline void bus_space_read_region_stream_2(bus_space_tag_t, +static inline void bus_space_read_region_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_read_region_stream_4(bus_space_tag_t, +static inline void bus_space_read_region_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); void @@ -405,11 +405,11 @@ bus_space_read_region_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided * to bus space described by tag/handle starting at `offset'. */ -static __inline void bus_space_write_region_1(bus_space_tag_t, +static inline void bus_space_write_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int8_t *, bus_size_t); -static __inline void bus_space_write_region_2(bus_space_tag_t, +static inline void bus_space_write_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int16_t *, bus_size_t); -static __inline void bus_space_write_region_4(bus_space_tag_t, +static inline void bus_space_write_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int32_t *, bus_size_t); void @@ -450,11 +450,11 @@ bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided * to bus space described by tag/handle starting at `offset'. */ -static __inline void bus_space_write_region_stream_1(bus_space_tag_t, +static inline void bus_space_write_region_stream_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int8_t *, bus_size_t); -static __inline void bus_space_write_region_stream_2(bus_space_tag_t, +static inline void bus_space_write_region_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int16_t *, bus_size_t); -static __inline void bus_space_write_region_stream_4(bus_space_tag_t, +static inline void bus_space_write_region_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int32_t *, bus_size_t); void @@ -495,11 +495,11 @@ bus_space_write_region_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, * Write the 1, 2, 4, or 8 byte value `value' to bus space * described by tag/handle/offset. */ -static __inline void bus_space_write_1(bus_space_tag_t, +static inline void bus_space_write_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t); -static __inline void bus_space_write_2(bus_space_tag_t, +static inline void bus_space_write_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t); -static __inline void bus_space_write_4(bus_space_tag_t, +static inline void bus_space_write_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t); void @@ -526,9 +526,9 @@ bus_space_write_4(bus_space_tag_t tag, bus_space_handle_t bsh, *(volatile u_int32_t *)(bsh + offset) = bswap32(value); } -static __inline void bus_space_write_stream_2(bus_space_tag_t, +static inline void bus_space_write_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t); -static __inline void bus_space_write_stream_4(bus_space_tag_t, +static inline void bus_space_write_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t); void @@ -555,11 +555,11 @@ bus_space_write_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, * Write `count' 1, 2, 4, or 8 byte quantities from the buffer * provided to bus space described by tag/handle/offset. */ -static __inline void bus_space_write_multi_1(bus_space_tag_t, +static inline void bus_space_write_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, bus_size_t); -static __inline void bus_space_write_multi_2(bus_space_tag_t, +static inline void bus_space_write_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_write_multi_4(bus_space_tag_t, +static inline void bus_space_write_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); void @@ -589,9 +589,9 @@ bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_4(tag, bsh, offset, *addr++); } -static __inline void bus_space_write_multi_stream_2(bus_space_tag_t, +static inline void bus_space_write_multi_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_write_multi_stream_4(bus_space_tag_t, +static inline void bus_space_write_multi_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); void @@ -620,11 +620,11 @@ bus_space_write_multi_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, * Write the 1, 2, 4, or 8 byte value `val' to bus space described * by tag/handle/offset `count' times. */ -static __inline void bus_space_set_multi_1(bus_space_tag_t, +static inline void bus_space_set_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, bus_size_t); -static __inline void bus_space_set_multi_2(bus_space_tag_t, +static inline void bus_space_set_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, bus_size_t); -static __inline void bus_space_set_multi_4(bus_space_tag_t, +static inline void bus_space_set_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, bus_size_t); void @@ -662,11 +662,11 @@ bus_space_set_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described * by tag/handle starting at `offset'. */ -static __inline void bus_space_set_region_1(bus_space_tag_t, +static inline void bus_space_set_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, bus_size_t); -static __inline void bus_space_set_region_2(bus_space_tag_t, +static inline void bus_space_set_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, bus_size_t); -static __inline void bus_space_set_region_4(bus_space_tag_t, +static inline void bus_space_set_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, bus_size_t); void @@ -709,11 +709,11 @@ bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described * by tag/handle starting at `offset'. */ -static __inline void bus_space_set_region_stream_1(bus_space_tag_t, +static inline void bus_space_set_region_stream_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, bus_size_t); -static __inline void bus_space_set_region_stream_2(bus_space_tag_t, +static inline void bus_space_set_region_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, bus_size_t); -static __inline void bus_space_set_region_stream_4(bus_space_tag_t, +static inline void bus_space_set_region_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, bus_size_t); void @@ -755,13 +755,13 @@ bus_space_set_region_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, * Copy `count' 1, 2, 4, or 8 byte values from bus space starting * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. */ -static __inline void bus_space_copy_region_1(bus_space_tag_t, +static inline void bus_space_copy_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); -static __inline void bus_space_copy_region_2(bus_space_tag_t, +static inline void bus_space_copy_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); -static __inline void bus_space_copy_region_4(bus_space_tag_t, +static inline void bus_space_copy_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); diff --git a/sys/arch/sh3/include/int_mwgwtypes.h b/sys/arch/sh3/include/int_mwgwtypes.h index 78efce7fc07..8ed3de3082c 100644 --- a/sys/arch/sh3/include/int_mwgwtypes.h +++ b/sys/arch/sh3/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.3 2002/04/28 17:10:35 uch Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.4 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; diff --git a/sys/arch/sh3/include/int_types.h b/sys/arch/sh3/include/int_types.h index f6ba346d2cc..a94f9ae948a 100644 --- a/sys/arch/sh3/include/int_types.h +++ b/sys/arch/sh3/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.7 2005/12/11 12:18:58 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.8 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/sh3/include/lock.h b/sys/arch/sh3/include/lock.h index fb2b9b6a354..130e1127e28 100644 --- a/sys/arch/sh3/include/lock.h +++ b/sys/arch/sh3/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.7 2005/12/11 12:18:58 christos Exp $ */ +/* $NetBSD: lock.h,v 1.8 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -43,38 +43,38 @@ #ifndef _SH3_LOCK_H_ #define _SH3_LOCK_H_ -static __inline void __cpu_simple_lock_init __P((__cpu_simple_lock_t *)) +static inline void __cpu_simple_lock_init __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline void __cpu_simple_lock __P((__cpu_simple_lock_t *)) +static inline void __cpu_simple_lock __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline int __cpu_simple_lock_try __P((__cpu_simple_lock_t *)) +static inline int __cpu_simple_lock_try __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline void __cpu_simple_unlock __P((__cpu_simple_lock_t *)) +static inline void __cpu_simple_unlock __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { *alp = __SIMPLELOCK_UNLOCKED; } -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *alp) { - __asm __volatile( + __asm volatile( "1: tas.b %0 \n" " bf 1b \n" : "=m" (*alp)); } -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { int __rv; - __asm __volatile( + __asm volatile( " tas.b %0 \n" " mov #0, %1 \n" " rotcl %1 \n" @@ -83,7 +83,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *alp) return (__rv); } -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *alp) { diff --git a/sys/arch/sh3/include/pmap.h b/sys/arch/sh3/include/pmap.h index d815394f320..ba498755767 100644 --- a/sys/arch/sh3/include/pmap.h +++ b/sys/arch/sh3/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.25 2002/09/22 07:53:48 chs Exp $ */ +/* $NetBSD: pmap.h,v 1.26 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ void pmap_procwr(struct proc *, vaddr_t, size_t); #define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count) #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/sh3/include/userret.h b/sys/arch/sh3/include/userret.h index 017104dbbb8..6ca9fd7fc08 100644 --- a/sys/arch/sh3/include/userret.h +++ b/sys/arch/sh3/include/userret.h @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.7 2005/12/11 12:18:58 christos Exp $ */ +/* $NetBSD: userret.h,v 1.8 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -81,7 +81,7 @@ #include <sys/userret.h> -static __inline void +static inline void userret(struct lwp *l) { diff --git a/sys/arch/sh3/sh3/process_machdep.c b/sys/arch/sh3/sh3/process_machdep.c index 46cf70393aa..01be87cc2d8 100644 --- a/sys/arch/sh3/sh3/process_machdep.c +++ b/sys/arch/sh3/sh3/process_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: process_machdep.c,v 1.10 2005/12/11 12:19:00 christos Exp $ */ +/* $NetBSD: process_machdep.c,v 1.11 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1993 The Regents of the University of California. @@ -99,7 +99,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.10 2005/12/11 12:19:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.11 2005/12/24 20:07:32 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -113,7 +113,7 @@ __KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.10 2005/12/11 12:19:00 christo #include <machine/psl.h> #include <machine/reg.h> -static __inline struct trapframe * +static inline struct trapframe * process_frame(struct lwp *l) { diff --git a/sys/arch/sh5/dev/dmac.c b/sys/arch/sh5/dev/dmac.c index 1f9097c34fb..b9bdacc0d57 100644 --- a/sys/arch/sh5/dev/dmac.c +++ b/sys/arch/sh5/dev/dmac.c @@ -1,4 +1,4 @@ -/* $NetBSD: dmac.c,v 1.2 2005/12/11 12:19:00 christos Exp $ */ +/* $NetBSD: dmac.c,v 1.3 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dmac.c,v 1.2 2005/12/11 12:19:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dmac.c,v 1.3 2005/12/24 20:07:32 perry Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -189,7 +189,7 @@ error: aprint_error("%s: Failed to allocate zero page (%d)\n", } #ifdef DMAC_PMAP_CHANNEL -static __inline void +static inline void dmac_page_copy_zero(const struct dmac_softc *sc, paddr_t src, paddr_t dst) { u_int64_t reg; diff --git a/sys/arch/sh5/include/bus.h b/sys/arch/sh5/include/bus.h index 2a2d90801ff..d3a644dce97 100644 --- a/sys/arch/sh5/include/bus.h +++ b/sys/arch/sh5/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.8 2005/12/11 12:19:00 christos Exp $ */ +/* $NetBSD: bus.h,v 1.9 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -314,16 +314,16 @@ struct sh5_bus_space_tag { * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle/offset and copy into buffer provided. */ -static __inline void bus_space_read_multi_1(bus_space_tag_t, +static inline void bus_space_read_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, bus_size_t); -static __inline void bus_space_read_multi_2(bus_space_tag_t, +static inline void bus_space_read_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_read_multi_4(bus_space_tag_t, +static inline void bus_space_read_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); -static __inline void bus_space_read_multi_8(bus_space_tag_t, +static inline void bus_space_read_multi_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int64_t *, bus_size_t); -static __inline void +static inline void bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t *addr, bus_size_t count) { @@ -332,7 +332,7 @@ bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, *addr++ = bus_space_read_1(tag, bsh, offset); } -static __inline void +static inline void bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, bus_size_t count) { @@ -341,7 +341,7 @@ bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, *addr++ = bus_space_read_2(tag, bsh, offset); } -static __inline void +static inline void bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, bus_size_t count) { @@ -350,7 +350,7 @@ bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, *addr++ = bus_space_read_4(tag, bsh, offset); } -static __inline void +static inline void bus_space_read_multi_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int64_t *addr, bus_size_t count) { @@ -359,14 +359,14 @@ bus_space_read_multi_8(bus_space_tag_t tag, bus_space_handle_t bsh, *addr++ = bus_space_read_8(tag, bsh, offset); } -static __inline void bus_space_read_multi_stream_2(bus_space_tag_t, +static inline void bus_space_read_multi_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_read_multi_stream_4(bus_space_tag_t, +static inline void bus_space_read_multi_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); -static __inline void bus_space_read_multi_stream_8(bus_space_tag_t, +static inline void bus_space_read_multi_stream_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int64_t *, bus_size_t); -static __inline void +static inline void bus_space_read_multi_stream_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, bus_size_t count) { @@ -375,7 +375,7 @@ bus_space_read_multi_stream_2(bus_space_tag_t tag, bus_space_handle_t bsh, *addr++ = bus_space_read_stream_2(tag, bsh, offset); } -static __inline void +static inline void bus_space_read_multi_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, bus_size_t count) { @@ -384,7 +384,7 @@ bus_space_read_multi_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, *addr++ = bus_space_read_stream_4(tag, bsh, offset); } -static __inline void +static inline void bus_space_read_multi_stream_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int64_t *addr, bus_size_t count) { @@ -402,16 +402,16 @@ bus_space_read_multi_stream_8(bus_space_tag_t tag, bus_space_handle_t bsh, * described by tag/handle and starting at `offset' and copy into * buffer provided. */ -static __inline void bus_space_read_region_1(bus_space_tag_t, +static inline void bus_space_read_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, bus_size_t); -static __inline void bus_space_read_region_2(bus_space_tag_t, +static inline void bus_space_read_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_read_region_4(bus_space_tag_t, +static inline void bus_space_read_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); -static __inline void bus_space_read_region_8(bus_space_tag_t, +static inline void bus_space_read_region_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int64_t *, bus_size_t); -static __inline void +static inline void bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t *addr, bus_size_t count) { @@ -419,7 +419,7 @@ bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, *addr++ = bus_space_read_1(tag, bsh, offset++); } -static __inline void +static inline void bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, bus_size_t count) { @@ -429,7 +429,7 @@ bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, } } -static __inline void +static inline void bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, bus_size_t count) { @@ -439,7 +439,7 @@ bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, } } -static __inline void +static inline void bus_space_read_region_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int64_t *addr, bus_size_t count) { @@ -457,16 +457,16 @@ bus_space_read_region_8(bus_space_tag_t tag, bus_space_handle_t bsh, * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided * to bus space described by tag/handle starting at `offset'. */ -static __inline void bus_space_write_region_1(bus_space_tag_t, +static inline void bus_space_write_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int8_t *, bus_size_t); -static __inline void bus_space_write_region_2(bus_space_tag_t, +static inline void bus_space_write_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int16_t *, bus_size_t); -static __inline void bus_space_write_region_4(bus_space_tag_t, +static inline void bus_space_write_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int32_t *, bus_size_t); -static __inline void bus_space_write_region_8(bus_space_tag_t, +static inline void bus_space_write_region_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int64_t *, bus_size_t); -static __inline void +static inline void bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int8_t *addr, bus_size_t count) { @@ -474,7 +474,7 @@ bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_1(tag, bsh, offset++, *addr++); } -static __inline void +static inline void bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int16_t *addr, bus_size_t count) { @@ -484,7 +484,7 @@ bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, } } -static __inline void +static inline void bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int32_t *addr, bus_size_t count) { @@ -494,7 +494,7 @@ bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, } } -static __inline void +static inline void bus_space_write_region_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int64_t *addr, bus_size_t count) { @@ -528,16 +528,16 @@ bus_space_write_region_8(bus_space_tag_t tag, bus_space_handle_t bsh, * Write `count' 1, 2, 4, or 8 byte quantities from the buffer * provided to bus space described by tag/handle/offset. */ -static __inline void bus_space_write_multi_1(bus_space_tag_t, +static inline void bus_space_write_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, bus_size_t); -static __inline void bus_space_write_multi_2(bus_space_tag_t, +static inline void bus_space_write_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_write_multi_4(bus_space_tag_t, +static inline void bus_space_write_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); -static __inline void bus_space_write_multi_8(bus_space_tag_t, +static inline void bus_space_write_multi_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int64_t *, bus_size_t); -static __inline void +static inline void bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t *addr, bus_size_t count) { @@ -546,7 +546,7 @@ bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_1(tag, bsh, offset, *addr++); } -static __inline void +static inline void bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, bus_size_t count) { @@ -555,7 +555,7 @@ bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_2(tag, bsh, offset, *addr++); } -static __inline void +static inline void bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, bus_size_t count) { @@ -564,7 +564,7 @@ bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_4(tag, bsh, offset, *addr++); } -static __inline void +static inline void bus_space_write_multi_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int64_t *addr, bus_size_t count) { @@ -573,14 +573,14 @@ bus_space_write_multi_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_8(tag, bsh, offset, *addr++); } -static __inline void bus_space_write_multi_stream_2(bus_space_tag_t, +static inline void bus_space_write_multi_stream_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, bus_size_t); -static __inline void bus_space_write_multi_stream_4(bus_space_tag_t, +static inline void bus_space_write_multi_stream_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, bus_size_t); -static __inline void bus_space_write_multi_stream_8(bus_space_tag_t, +static inline void bus_space_write_multi_stream_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int64_t *, bus_size_t); -static __inline void +static inline void bus_space_write_multi_stream_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, bus_size_t count) { @@ -589,7 +589,7 @@ bus_space_write_multi_stream_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_stream_2(tag, bsh, offset, *addr++); } -static __inline void +static inline void bus_space_write_multi_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, bus_size_t count) { @@ -598,7 +598,7 @@ bus_space_write_multi_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_stream_4(tag, bsh, offset, *addr++); } -static __inline void +static inline void bus_space_write_multi_stream_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int64_t *addr, bus_size_t count) { @@ -615,16 +615,16 @@ bus_space_write_multi_stream_8(bus_space_tag_t tag, bus_space_handle_t bsh, * Write the 1, 2, 4, or 8 byte value `val' to bus space described * by tag/handle/offset `count' times. */ -static __inline void bus_space_set_multi_1(bus_space_tag_t, +static inline void bus_space_set_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, bus_size_t); -static __inline void bus_space_set_multi_2(bus_space_tag_t, +static inline void bus_space_set_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, bus_size_t); -static __inline void bus_space_set_multi_4(bus_space_tag_t, +static inline void bus_space_set_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, bus_size_t); -static __inline void bus_space_set_multi_8(bus_space_tag_t, +static inline void bus_space_set_multi_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int64_t, bus_size_t); -static __inline void +static inline void bus_space_set_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t val, bus_size_t count) { @@ -633,7 +633,7 @@ bus_space_set_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_1(tag, bsh, offset, val); } -static __inline void +static inline void bus_space_set_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t val, bus_size_t count) { @@ -642,7 +642,7 @@ bus_space_set_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_2(tag, bsh, offset, val); } -static __inline void +static inline void bus_space_set_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t val, bus_size_t count) { @@ -651,7 +651,7 @@ bus_space_set_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_4(tag, bsh, offset, val); } -static __inline void +static inline void bus_space_set_multi_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int64_t val, bus_size_t count) { @@ -668,16 +668,16 @@ bus_space_set_multi_8(bus_space_tag_t tag, bus_space_handle_t bsh, * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described * by tag/handle starting at `offset'. */ -static __inline void bus_space_set_region_1(bus_space_tag_t, +static inline void bus_space_set_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, bus_size_t); -static __inline void bus_space_set_region_2(bus_space_tag_t, +static inline void bus_space_set_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, bus_size_t); -static __inline void bus_space_set_region_4(bus_space_tag_t, +static inline void bus_space_set_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, bus_size_t); -static __inline void bus_space_set_region_8(bus_space_tag_t, +static inline void bus_space_set_region_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int64_t, bus_size_t); -static __inline void +static inline void bus_space_set_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t val, bus_size_t count) { @@ -685,7 +685,7 @@ bus_space_set_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_space_write_1(tag, bsh, offset++, val); } -static __inline void +static inline void bus_space_set_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t val, bus_size_t count) { @@ -695,7 +695,7 @@ bus_space_set_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, } } -static __inline void +static inline void bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t val, bus_size_t count) { @@ -705,7 +705,7 @@ bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, } } -static __inline void +static inline void bus_space_set_region_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int64_t val, bus_size_t count) { @@ -724,20 +724,20 @@ bus_space_set_region_8(bus_space_tag_t tag, bus_space_handle_t bsh, * Copy `count' 1, 2, 4, or 8 byte values from bus space starting * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. */ -static __inline void bus_space_copy_region_1(bus_space_tag_t, +static inline void bus_space_copy_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); -static __inline void bus_space_copy_region_2(bus_space_tag_t, +static inline void bus_space_copy_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); -static __inline void bus_space_copy_region_4(bus_space_tag_t, +static inline void bus_space_copy_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); -static __inline void bus_space_copy_region_8(bus_space_tag_t, +static inline void bus_space_copy_region_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); -static __inline void +static inline void bus_space_copy_region_1(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { @@ -755,7 +755,7 @@ bus_space_copy_region_1(bus_space_tag_t t, bus_space_handle_t h1, } } -static __inline void +static inline void bus_space_copy_region_2(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { @@ -779,7 +779,7 @@ bus_space_copy_region_2(bus_space_tag_t t, bus_space_handle_t h1, } } -static __inline void +static inline void bus_space_copy_region_4(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { @@ -803,7 +803,7 @@ bus_space_copy_region_4(bus_space_tag_t t, bus_space_handle_t h1, } } -static __inline void +static inline void bus_space_copy_region_8(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { @@ -834,15 +834,15 @@ bus_space_copy_region_8(bus_space_tag_t t, bus_space_handle_t h1, * bus_space_handle_t bsh, bus_size_t offset, * bus_size_t len, int flags); */ -static __inline void bus_space_barrier(bus_space_tag_t, bus_space_handle_t, +static inline void bus_space_barrier(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, int); /*ARGSUSED*/ -static __inline void +static inline void bus_space_barrier(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, bus_size_t l, int f) { - __asm __volatile("synco"); + __asm volatile("synco"); } #define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ #define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ diff --git a/sys/arch/sh5/include/byte_swap.h b/sys/arch/sh5/include/byte_swap.h index a41b069efc3..b2775c6038c 100644 --- a/sys/arch/sh5/include/byte_swap.h +++ b/sys/arch/sh5/include/byte_swap.h @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap.h,v 1.2 2003/03/26 12:00:41 scw Exp $ */ +/* $NetBSD: byte_swap.h,v 1.3 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -40,35 +40,35 @@ #include <sys/types.h> -static __inline u_int16_t _sh5_bswap16(u_int16_t); -static __inline u_int32_t _sh5_bswap32(u_int32_t); -static __inline u_int64_t _sh5_bswap64(u_int64_t); +static inline u_int16_t _sh5_bswap16(u_int16_t); +static inline u_int32_t _sh5_bswap32(u_int32_t); +static inline u_int64_t _sh5_bswap64(u_int64_t); -static __inline u_int16_t +static inline u_int16_t _sh5_bswap16(u_int16_t x) { - __asm __volatile("byterev %0, %0; shlri %0, 32, %0; shlri.l %0, 16, %0" + __asm volatile("byterev %0, %0; shlri %0, 32, %0; shlri.l %0, 16, %0" : "+r"(x)); return (x); } -static __inline u_int32_t +static inline u_int32_t _sh5_bswap32(u_int32_t x) { - __asm __volatile("byterev %0, %0; shlri %0, 32, %0; add.l %0, r63, %0" + __asm volatile("byterev %0, %0; shlri %0, 32, %0; add.l %0, r63, %0" : "+r"(x)); return (x); } -static __inline u_int64_t +static inline u_int64_t _sh5_bswap64(u_int64_t x) { - __asm __volatile("byterev %0, %0" : "+r"(x)); + __asm volatile("byterev %0, %0" : "+r"(x)); return (x); } diff --git a/sys/arch/sh5/include/conreg.h b/sys/arch/sh5/include/conreg.h index 7c15a033070..fffdd56524a 100644 --- a/sys/arch/sh5/include/conreg.h +++ b/sys/arch/sh5/include/conreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: conreg.h,v 1.3 2002/09/12 12:35:00 scw Exp $ */ +/* $NetBSD: conreg.h,v 1.4 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -98,12 +98,12 @@ #define SH5_FP_IS_DIRTY(usr,r) ((usr & (1 << (8+((r)/8)))) != 0) #if defined(_KERNEL) && !defined(_LOCORE) -static __inline u_int +static inline u_int sh5_getctc(void) { u_int64_t rv; - __asm __volatile("getcon ctc, %0" : "=r"(rv)); + __asm volatile("getcon ctc, %0" : "=r"(rv)); return ((u_int)rv); } diff --git a/sys/arch/sh5/include/cpu.h b/sys/arch/sh5/include/cpu.h index 83d6501a641..9b885ccc01e 100644 --- a/sys/arch/sh5/include/cpu.h +++ b/sys/arch/sh5/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.16 2005/12/11 12:19:00 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.17 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -139,11 +139,11 @@ struct cpu_info { struct tlb_scratch_frame ci_tscratch; /* TLB miss scratch area */ }; -static __inline struct cpu_info * +static inline struct cpu_info * curcpu(void) { struct cpu_info *ci; - __asm __volatile("getcon kcr0, %0" : "=r"(ci)); + __asm volatile("getcon kcr0, %0" : "=r"(ci)); return (ci); } diff --git a/sys/arch/sh5/include/int_mwgwtypes.h b/sys/arch/sh5/include/int_mwgwtypes.h index 01e967b7496..cd0466aa9c1 100644 --- a/sys/arch/sh5/include/int_mwgwtypes.h +++ b/sys/arch/sh5/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.2 2002/10/10 09:47:17 scw Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.3 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; diff --git a/sys/arch/sh5/include/int_types.h b/sys/arch/sh5/include/int_types.h index 6e4971bff04..e80e03fe999 100644 --- a/sys/arch/sh5/include/int_types.h +++ b/sys/arch/sh5/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.5 2005/12/11 12:19:00 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.6 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/sh5/include/lock.h b/sys/arch/sh5/include/lock.h index a01f3166846..563cca92803 100644 --- a/sys/arch/sh5/include/lock.h +++ b/sys/arch/sh5/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.4 2005/12/11 12:19:00 christos Exp $ */ +/* $NetBSD: lock.h,v 1.5 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -43,35 +43,35 @@ #ifndef _SH5_LOCK_H_ #define _SH5_LOCK_H_ -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { *alp = __SIMPLELOCK_UNLOCKED; } -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *alp) { register_t l; do { - __asm __volatile("movi 1, %0; swap.q %1, r63, %0" : + __asm volatile("movi 1, %0; swap.q %1, r63, %0" : "=r"(l) : "r"(alp)); } while (l == __SIMPLELOCK_LOCKED); } -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { register_t l; - __asm __volatile("movi 1, %0; swap.q %1, r63, %0" : "=r"(l) : "r"(alp)); + __asm volatile("movi 1, %0; swap.q %1, r63, %0" : "=r"(l) : "r"(alp)); return (__SIMPLELOCK_LOCKED - (int)l); } -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *alp) { diff --git a/sys/arch/sh5/include/pmap.h b/sys/arch/sh5/include/pmap.h index 6e6232e4b1d..5acbd40b02b 100644 --- a/sys/arch/sh5/include/pmap.h +++ b/sys/arch/sh5/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.20 2005/12/11 12:19:00 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.21 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -98,7 +98,7 @@ extern paddr_t pmap_unmap_poolpage(vaddr_t); #define pmap_phys_address(x) (x) -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/sh5/include/types.h b/sys/arch/sh5/include/types.h index 74de74ea419..fe476dac8fe 100644 --- a/sys/arch/sh5/include/types.h +++ b/sys/arch/sh5/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.11 2005/12/11 12:19:00 christos Exp $ */ +/* $NetBSD: types.h,v 1.12 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -71,7 +71,7 @@ typedef struct label_t { } label_t; #endif -typedef __volatile __int64_t __cpu_simple_lock_t; +typedef volatile __int64_t __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/sh5/sh5/db_interface.c b/sys/arch/sh5/sh5/db_interface.c index a0981dfc38c..757b3c615a3 100644 --- a/sys/arch/sh5/sh5/db_interface.c +++ b/sys/arch/sh5/sh5/db_interface.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.14 2005/12/11 12:19:02 christos Exp $ */ +/* $NetBSD: db_interface.c,v 1.15 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.14 2005/12/11 12:19:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.15 2005/12/24 20:07:32 perry Exp $"); #include "opt_ddb.h" @@ -180,12 +180,12 @@ db_var_reg(const struct db_variable *varp, db_expr_t *valp, int op) if (op == DB_VAR_GET) if (ep == ®_kcr0) { register_t kcr0; - __asm __volatile("getcon kcr0, %0" : "=r"(kcr0)); + __asm volatile("getcon kcr0, %0" : "=r"(kcr0)); *valp = kcr0; } else if (ep == ®_kcr1) { register_t kcr1; - __asm __volatile("getcon kcr1, %0" : "=r"(kcr1)); + __asm volatile("getcon kcr1, %0" : "=r"(kcr1)); *valp = kcr1; } else *valp = *ep; @@ -196,11 +196,11 @@ db_var_reg(const struct db_variable *varp, db_expr_t *valp, int op) if (ep == ®_kcr0) { register_t kcr0 = *valp; - __asm __volatile("putcon %0, kcr0" :: "r"(kcr0)); + __asm volatile("putcon %0, kcr0" :: "r"(kcr0)); } else if (ep == ®_kcr1) { register_t kcr1 = *valp; - __asm __volatile("putcon %0, kcr1" :: "r"(kcr1)); + __asm volatile("putcon %0, kcr1" :: "r"(kcr1)); } else { *ep = *valp; diff --git a/sys/arch/sh5/sh5/interrupt.c b/sys/arch/sh5/sh5/interrupt.c index ad83b850ed2..76c30d5755c 100644 --- a/sys/arch/sh5/sh5/interrupt.c +++ b/sys/arch/sh5/sh5/interrupt.c @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.9 2005/12/11 12:19:02 christos Exp $ */ +/* $NetBSD: interrupt.c,v 1.10 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.9 2005/12/11 12:19:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.10 2005/12/24 20:07:32 perry Exp $"); #include <sys/param.h> #include <sys/pool.h> @@ -239,7 +239,7 @@ sh5_intr_dispatch(struct intrframe *fr) if ((ih = intrhand[idx]) == NULL) { int level; - __asm __volatile("getcon sr, %0" : "=r"(level)); + __asm volatile("getcon sr, %0" : "=r"(level)); printf( "sh5_intr_dispatch: spurious level %d irq: intevt 0x%lx\n", (level >> SH5_CONREG_SR_IMASK_SHIFT) & diff --git a/sys/arch/sh5/sh5/pmap.c b/sys/arch/sh5/sh5/pmap.c index 01469c543bb..2273fce110d 100644 --- a/sys/arch/sh5/sh5/pmap.c +++ b/sys/arch/sh5/sh5/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.41 2005/12/08 22:41:44 yamt Exp $ */ +/* $NetBSD: pmap.c,v 1.42 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -103,7 +103,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.41 2005/12/08 22:41:44 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.42 2005/12/24 20:07:32 perry Exp $"); #include "opt_ddb.h" #include "opt_kernel_ipt.h" @@ -439,7 +439,7 @@ int pmap_pvo_remove_depth; /* * Returns non-zero if the given pmap is `current'. */ -static __inline int +static inline int pmap_is_curpmap(pmap_t pm) { if ((curlwp->l_proc && curlwp->l_proc->p_vmspace->vm_map.pmap == pm) || @@ -453,7 +453,7 @@ pmap_is_curpmap(pmap_t pm) * Given a Kernel Virtual Address in KSEG1, return the * corresponding index into pmap_kernel_ipt[]. */ -static __inline int +static inline int kva_to_iptidx(vaddr_t kva) { int idx; @@ -474,7 +474,7 @@ kva_to_iptidx(vaddr_t kva) * * XXX: This hack generates *much* better code than the compiler. */ -static __inline ptel_t +static inline ptel_t pmap_kernel_ipt_get_ptel(kpte_t *kpte) { ptel_t ptel; @@ -484,25 +484,25 @@ pmap_kernel_ipt_get_ptel(kpte_t *kpte) * XXX: Need to revisit for big-endian */ #if SH5_NEFF_BITS == 32 - __asm __volatile("ldlo.l %3, 0, %1; ldhi.l %3, 3, %2; or %1, %2, %0": + __asm volatile("ldlo.l %3, 0, %1; ldhi.l %3, 3, %2; or %1, %2, %0": "=r"(ptel), "=r"(r1), "=r"(r2): "r"(kpte)); #else - __asm __volatile("ldlo.q %3, 0, %1; ldhi.q %3, 7, %2; or %1, %2, %0": + __asm volatile("ldlo.q %3, 0, %1; ldhi.q %3, 7, %2; or %1, %2, %0": "=r"(ptel), "=r"(r1), "=r"(r2): "r"(kpte)); #endif return (ptel); } -static __inline void +static inline void pmap_kernel_ipt_set_ptel(kpte_t *kpte, ptel_t ptel) { #if SH5_NEFF_BITS == 32 - __asm __volatile("stlo.l %0, 0, %1; sthi.l %0, 3, %r1":: + __asm volatile("stlo.l %0, 0, %1; sthi.l %0, 3, %r1":: "r"(kpte), "r"(ptel)); #else - __asm __volatile("stlo.q %0, 0, %1; sthi.q %0, 7, %r1":: + __asm volatile("stlo.q %0, 0, %1; sthi.q %0, 7, %r1":: "r"(kpte), "r"(ptel)); #endif } @@ -511,7 +511,7 @@ pmap_kernel_ipt_set_ptel(kpte_t *kpte, ptel_t ptel) * Given a pointer to an element of the pmap_kernel_ipt array, * return the tlbcookie. */ -static __inline tlbcookie_t +static inline tlbcookie_t pmap_kernel_ipt_get_tlbcookie(kpte_t *kpte) { volatile u_int16_t *kpp = (volatile u_int16_t *)&kpte->tlbcookie; @@ -519,7 +519,7 @@ pmap_kernel_ipt_get_tlbcookie(kpte_t *kpte) return ((tlbcookie_t)*kpp); } -static __inline void +static inline void pmap_kernel_ipt_set_tlbcookie(kpte_t *kpte, tlbcookie_t tlbcookie) { volatile u_int16_t *kpp = (volatile u_int16_t *)&kpte->tlbcookie; @@ -531,7 +531,7 @@ pmap_kernel_ipt_set_tlbcookie(kpte_t *kpte, tlbcookie_t tlbcookie) * Given a user virtual address, return the corresponding * index of the PTE group which is likely to contain the mapping. */ -static __inline u_int +static inline u_int va_to_pteg(vsid_t vsid, vaddr_t va) { @@ -542,7 +542,7 @@ va_to_pteg(vsid_t vsid, vaddr_t va) * Given a physical address, return a pointer to the head of the * list of virtual address which map to that physical address. */ -static __inline struct pvo_head * +static inline struct pvo_head * pa_to_pvoh(paddr_t pa, struct vm_page **pg_p) { struct vm_page *pg; @@ -562,7 +562,7 @@ pa_to_pvoh(paddr_t pa, struct vm_page **pg_p) * Given a vm_page, return a pointer to the head of the list * of virtual addresses which map to that page. */ -static __inline struct pvo_head * +static inline struct pvo_head * vm_page_to_pvoh(struct vm_page *pg) { @@ -572,7 +572,7 @@ vm_page_to_pvoh(struct vm_page *pg) /* * Clear the specified bits in the cached attributes of a physical page. */ -static __inline void +static inline void pmap_attr_clear(struct vm_page *pg, int ptebit) { @@ -582,7 +582,7 @@ pmap_attr_clear(struct vm_page *pg, int ptebit) /* * Return the cached attributes of a physical page */ -static __inline int +static inline int pmap_attr_fetch(struct vm_page *pg) { @@ -592,7 +592,7 @@ pmap_attr_fetch(struct vm_page *pg) /* * Cache the specified attributes for the physical page "pg" */ -static __inline void +static inline void pmap_attr_save(struct vm_page *pg, ptel_t ptebit) { @@ -606,7 +606,7 @@ pmap_attr_save(struct vm_page *pg, ptel_t ptebit) * That is, the mapping decribed by `pvo' is exactly the same * as described by `vsid' and `va'. */ -static __inline int +static inline int pmap_pteh_match(struct pvo_entry *pvo, vsid_t vsid, vaddr_t va) { @@ -620,7 +620,7 @@ pmap_pteh_match(struct pvo_entry *pvo, vsid_t vsid, vaddr_t va) * Recover the Referenced/Modified bits from the specified PTEL value * and cache them temporarily in the PVO. */ -static __inline void +static inline void pmap_pteg_synch(ptel_t ptel, struct pvo_entry *pvo) { @@ -832,7 +832,7 @@ pmap_kpte_clear_bit(int idx, struct pvo_entry *pvo, ptel_t ptebit) * hence not in the cache either. Therefore neither need to be * synchronised. */ -static __inline void +static inline void pmap_pteg_set(volatile pte_t *pt, struct pvo_entry *pvo) { @@ -889,7 +889,7 @@ pmap_pteg_unset(volatile pte_t *pt, struct pvo_entry *pvo) * had its attributes modified in some way. For example, it may have * been a read-only mapping but is now read/write. */ -static __inline void +static inline void pmap_pteg_change(volatile pte_t *pt, struct pvo_entry *pvo) { @@ -1126,7 +1126,7 @@ pmap_bootstrap(vaddr_t avail, paddr_t kseg0base, struct mem_region *mr) /* * It should now be safe to take TLB miss exceptions. */ - __asm __volatile("putcon %0, sr" :: "r"(SH5_CONREG_SR_IMASK_ALL)); + __asm volatile("putcon %0, sr" :: "r"(SH5_CONREG_SR_IMASK_ALL)); /* * Tell UVM about physical memory diff --git a/sys/arch/sh5/sh5/trap.c b/sys/arch/sh5/sh5/trap.c index aa96a9ee390..3d37a3b1122 100644 --- a/sys/arch/sh5/sh5/trap.c +++ b/sys/arch/sh5/sh5/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.35 2005/12/11 12:19:02 christos Exp $ */ +/* $NetBSD: trap.c,v 1.36 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -111,7 +111,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.35 2005/12/11 12:19:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.36 2005/12/24 20:07:32 perry Exp $"); #include "opt_ddb.h" @@ -193,9 +193,9 @@ trap(struct lwp *l, struct trapframe *tf) register_t sr; /* Make sure the FPU is enabled */ - __asm __volatile("getcon sr, %0" : "=r"(sr)); + __asm volatile("getcon sr, %0" : "=r"(sr)); sr &= ~SH5_CONREG_SR_FD; - __asm __volatile("putcon %0, sr" :: "r"(sr)); + __asm volatile("putcon %0, sr" :: "r"(sr)); } printf("\ntrap: %s in %s mode\n", trap_type(traptype), USERMODE(tf) ? "user" : "kernel"); @@ -580,9 +580,9 @@ panic_trap(struct trapframe *tf, register_t ssr, register_t spc, register_t sr; /* Make sure the FPU is enabled */ - __asm __volatile("getcon sr, %0" : "=r"(sr)); + __asm volatile("getcon sr, %0" : "=r"(sr)); sr &= ~SH5_CONREG_SR_FD; - __asm __volatile("putcon %0, sr" :: "r"(sr)); + __asm volatile("putcon %0, sr" :: "r"(sr)); } /* diff --git a/sys/arch/shark/isa/clock.c b/sys/arch/shark/isa/clock.c index 3815ebbc2d0..9f91f21a414 100644 --- a/sys/arch/shark/isa/clock.c +++ b/sys/arch/shark/isa/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.9 2005/12/11 12:19:02 christos Exp $ */ +/* $NetBSD: clock.c,v 1.10 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright 1997 @@ -154,7 +154,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.9 2005/12/11 12:19:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.10 2005/12/24 20:07:32 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -188,15 +188,15 @@ static int gettick(void); void startrtclock(void); -__inline u_int mc146818_read(void *, u_int); -__inline void mc146818_write(void *, u_int, u_int); +inline u_int mc146818_read(void *, u_int); +inline void mc146818_write(void *, u_int, u_int); #define SECMIN ((unsigned)60) /* seconds per minute */ #define SECHOUR ((unsigned)(60*SECMIN)) /* seconds per hour */ #define SECDAY ((unsigned)(24*SECHOUR)) /* seconds per day */ #define SECYR ((unsigned)(365*SECDAY)) /* seconds per common year */ -__inline u_int +inline u_int mc146818_read(sc, reg) void *sc; /* XXX use it? */ u_int reg; @@ -206,7 +206,7 @@ mc146818_read(sc, reg) return (inb(IO_RTC+1)); } -__inline void +inline void mc146818_write(sc, reg, datum) void *sc; /* XXX use it? */ u_int reg, datum; diff --git a/sys/arch/shark/shark/ipkdb_step.c b/sys/arch/shark/shark/ipkdb_step.c index 33c0d38284a..3da2d841c9f 100644 --- a/sys/arch/shark/shark/ipkdb_step.c +++ b/sys/arch/shark/shark/ipkdb_step.c @@ -1,4 +1,4 @@ -/* $NetBSD: ipkdb_step.c,v 1.3 2005/12/11 12:19:05 christos Exp $ */ +/* $NetBSD: ipkdb_step.c,v 1.4 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (C) 1994 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ipkdb_step.c,v 1.3 2005/12/11 12:19:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipkdb_step.c,v 1.4 2005/12/24 20:07:32 perry Exp $"); #include <sys/param.h> @@ -61,7 +61,7 @@ fetchinst(pc) return inst; } -static __inline void +static inline void execute(inst, args, regs) int inst; int *args; @@ -83,7 +83,7 @@ execute(inst, args, regs) */ } -static __inline int +static inline int condition(inst, args, regs) int inst; int *args; @@ -95,7 +95,7 @@ condition(inst, args, regs) return args[0]; } -static __inline int +static inline int immediate(inst) int inst; { @@ -106,7 +106,7 @@ immediate(inst) return (imm >> rot)|(imm << (32 - rot)); } -static __inline int +static inline int getreg(reg, ahead, regs) int reg; int ahead; @@ -117,7 +117,7 @@ getreg(reg, ahead, regs) return regs[reg]; } -static __inline void +static inline void setreg(reg, val, regs) int reg; int val; diff --git a/sys/arch/sparc/dev/sbusvar.h b/sys/arch/sparc/dev/sbusvar.h index 0d4e3f8af5a..3ce17f50917 100644 --- a/sys/arch/sparc/dev/sbusvar.h +++ b/sys/arch/sparc/dev/sbusvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: sbusvar.h,v 1.16 2005/12/11 12:19:05 christos Exp $ */ +/* $NetBSD: sbusvar.h,v 1.17 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -99,7 +99,7 @@ struct sbus_softc { */ #define sbus_promaddr_to_handle(tag, promaddr, hp) sparc_promaddr_to_handle(tag, promaddr, hp) -static __inline void +static inline void sparc_promaddr_to_handle(bus_space_tag_t tag, u_int promaddr, bus_space_handle_t *hp) { *(hp) = (bus_space_handle_t)(promaddr); diff --git a/sys/arch/sparc/fpu/fpu_arith.h b/sys/arch/sparc/fpu/fpu_arith.h index 3056e8cdb1c..e8f5b3ca725 100644 --- a/sys/arch/sparc/fpu/fpu_arith.h +++ b/sys/arch/sparc/fpu/fpu_arith.h @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_arith.h,v 1.5 2005/12/11 12:19:05 christos Exp $ */ +/* $NetBSD: fpu_arith.h,v 1.6 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -74,19 +74,19 @@ * into carry; GET_CARRY sets its argument to 0 or 1. */ #define FPU_ADDC(r, x, y) \ - __asm __volatile("addx %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("addx %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) #define FPU_ADDS(r, x, y) \ - __asm __volatile("addcc %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("addcc %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) #define FPU_ADDCS(r, x, y) \ - __asm __volatile("addxcc %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("addxcc %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) #define FPU_SUBC(r, x, y) \ - __asm __volatile("subx %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("subx %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) #define FPU_SUBS(r, x, y) \ - __asm __volatile("subcc %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("subcc %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) #define FPU_SUBCS(r, x, y) \ - __asm __volatile("subxcc %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) + __asm volatile("subxcc %1,%2,%0" : "=r"(r) : "r"(x), "r"(y)) -#define FPU_GET_CARRY(r) __asm __volatile("addx %%g0,%%g0,%0" : "=r"(r)) -#define FPU_SET_CARRY(v) __asm __volatile("addcc %0,-1,%%g0" : : "r"(v)) +#define FPU_GET_CARRY(r) __asm volatile("addx %%g0,%%g0,%0" : "=r"(r)) +#define FPU_SET_CARRY(v) __asm volatile("addcc %0,-1,%%g0" : : "r"(v)) #define FPU_SHL1_BY_ADD /* shift left 1 faster by ADDC than (a<<1)|(b>>31) */ diff --git a/sys/arch/sparc/include/bus.h b/sys/arch/sparc/include/bus.h index f9deb1ad504..6d522318e0f 100644 --- a/sys/arch/sparc/include/bus.h +++ b/sys/arch/sparc/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.46 2005/12/11 12:19:05 christos Exp $ */ +/* $NetBSD: bus.h,v 1.47 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -1288,7 +1288,7 @@ static void bus_space_read_region_stream_8 __P((bus_space_tag_t, u_int64_t *, bus_size_t)); -static __inline void +static inline void bus_space_read_region_stream_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1298,7 +1298,7 @@ bus_space_read_region_stream_1(t, h, o, a, c) for (; c; a++, c--, o++) *a = bus_space_read_stream_1(t, h, o); } -static __inline void +static inline void bus_space_read_region_stream_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1308,7 +1308,7 @@ bus_space_read_region_stream_2(t, h, o, a, c) for (; c; a++, c--, o+=2) *a = bus_space_read_stream_2(t, h, o); } -static __inline void +static inline void bus_space_read_region_stream_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1318,7 +1318,7 @@ bus_space_read_region_stream_4(t, h, o, a, c) for (; c; a++, c--, o+=4) *a = bus_space_read_stream_4(t, h, o); } -static __inline void +static inline void bus_space_read_region_stream_8(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1355,7 +1355,7 @@ static void bus_space_write_region_stream_8 __P((bus_space_tag_t, bus_size_t, const u_int64_t *, bus_size_t)); -static __inline void +static inline void bus_space_write_region_stream_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1366,7 +1366,7 @@ bus_space_write_region_stream_1(t, h, o, a, c) bus_space_write_stream_1(t, h, o, *a); } -static __inline void +static inline void bus_space_write_region_stream_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1377,7 +1377,7 @@ bus_space_write_region_stream_2(t, h, o, a, c) bus_space_write_stream_2(t, h, o, *a); } -static __inline void +static inline void bus_space_write_region_stream_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1388,7 +1388,7 @@ bus_space_write_region_stream_4(t, h, o, a, c) bus_space_write_stream_4(t, h, o, *a); } -static __inline void +static inline void bus_space_write_region_stream_8(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1427,7 +1427,7 @@ static void bus_space_set_region_stream_8 __P((bus_space_tag_t, const u_int64_t, bus_size_t)); -static __inline void +static inline void bus_space_set_region_stream_1(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1438,7 +1438,7 @@ bus_space_set_region_stream_1(t, h, o, v, c) bus_space_write_stream_1(t, h, o, v); } -static __inline void +static inline void bus_space_set_region_stream_2(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1449,7 +1449,7 @@ bus_space_set_region_stream_2(t, h, o, v, c) bus_space_write_stream_2(t, h, o, v); } -static __inline void +static inline void bus_space_set_region_stream_4(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1460,7 +1460,7 @@ bus_space_set_region_stream_4(t, h, o, v, c) bus_space_write_stream_4(t, h, o, v); } -static __inline void +static inline void bus_space_set_region_stream_8(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1507,7 +1507,7 @@ static void bus_space_copy_region_stream_8 __P((bus_space_tag_t, bus_size_t)); -static __inline void +static inline void bus_space_copy_region_stream_1(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -1518,7 +1518,7 @@ bus_space_copy_region_stream_1(t, h1, o1, h2, o2, c) bus_space_write_stream_1(t, h1, o1, bus_space_read_stream_1(t, h2, o2)); } -static __inline void +static inline void bus_space_copy_region_stream_2(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -1529,7 +1529,7 @@ bus_space_copy_region_stream_2(t, h1, o1, h2, o2, c) bus_space_write_stream_2(t, h1, o1, bus_space_read_stream_2(t, h2, o2)); } -static __inline void +static inline void bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -1540,7 +1540,7 @@ bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) bus_space_write_stream_4(t, h1, o1, bus_space_read_stream_4(t, h2, o2)); } -static __inline void +static inline void bus_space_copy_region_stream_8(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; diff --git a/sys/arch/sparc/include/int_mwgwtypes.h b/sys/arch/sparc/include/int_mwgwtypes.h index 8dafbc0b9b8..8dcb37ea732 100644 --- a/sys/arch/sparc/include/int_mwgwtypes.h +++ b/sys/arch/sparc/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.4 2001/10/15 19:49:16 kleink Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.5 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; diff --git a/sys/arch/sparc/include/int_types.h b/sys/arch/sparc/include/int_types.h index dd99ab8ed46..c8758444e57 100644 --- a/sys/arch/sparc/include/int_types.h +++ b/sys/arch/sparc/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.9 2005/12/11 12:19:05 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.10 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -51,7 +51,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/sparc/include/lock.h b/sys/arch/sparc/include/lock.h index b0be5830569..2ced5a7f7c3 100644 --- a/sys/arch/sparc/include/lock.h +++ b/sys/arch/sparc/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.19 2005/12/11 12:19:05 christos Exp $ */ +/* $NetBSD: lock.h,v 1.20 2005/12/24 20:07:32 perry Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ static __inline__ int __ldstub(__cpu_simple_lock_t *addr) { int v; - __asm __volatile("ldstub [%1],%0" + __asm volatile("ldstub [%1],%0" : "=&r" (v) : "r" (addr) : "memory"); @@ -65,20 +65,20 @@ static __inline__ int __ldstub(__cpu_simple_lock_t *addr) } #endif /* __lint__ */ -static __inline void __cpu_simple_lock_init __P((__cpu_simple_lock_t *)) +static inline void __cpu_simple_lock_init __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline int __cpu_simple_lock_try __P((__cpu_simple_lock_t *)) +static inline int __cpu_simple_lock_try __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); -static __inline void __cpu_simple_unlock __P((__cpu_simple_lock_t *)) +static inline void __cpu_simple_unlock __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); #ifndef __CPU_SIMPLE_LOCK_NOINLINE -static __inline void __cpu_simple_lock __P((__cpu_simple_lock_t *)) +static inline void __cpu_simple_lock __P((__cpu_simple_lock_t *)) __attribute__((__unused__)); #else extern void __cpu_simple_lock __P((__cpu_simple_lock_t *)); #endif -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { @@ -86,7 +86,7 @@ __cpu_simple_lock_init(__cpu_simple_lock_t *alp) } #ifndef __CPU_SIMPLE_LOCK_NOINLINE -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *alp) { @@ -104,14 +104,14 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) } #endif /* __CPU_SIMPLE_LOCK_NOINLINE */ -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { return (__ldstub(alp) == __SIMPLELOCK_UNLOCKED); } -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *alp) { diff --git a/sys/arch/sparc/include/psl.h b/sys/arch/sparc/include/psl.h index a71a6a2547b..ab5f92b0f24 100644 --- a/sys/arch/sparc/include/psl.h +++ b/sys/arch/sparc/include/psl.h @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.37 2005/12/11 12:19:06 christos Exp $ */ +/* $NetBSD: psl.h,v 1.38 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -231,32 +231,32 @@ /* * GCC pseudo-functions for manipulating PSR (primarily PIL field). */ -static __inline int +static inline int getpsr(void) { int psr; - __asm __volatile("rd %%psr,%0" : "=r" (psr)); + __asm volatile("rd %%psr,%0" : "=r" (psr)); return (psr); } -static __inline int +static inline int getmid(void) { int mid; - __asm __volatile("rd %%tbr,%0" : "=r" (mid)); + __asm volatile("rd %%tbr,%0" : "=r" (mid)); return ((mid >> 20) & 0x3); } -static __inline void +static inline void setpsr(int newpsr) { - __asm __volatile("wr %0,0,%%psr" : : "r" (newpsr)); - __asm __volatile("nop; nop; nop"); + __asm volatile("wr %0,0,%%psr" : : "r" (newpsr)); + __asm volatile("nop; nop; nop"); } -static __inline void +static inline void spl0(void) { int psr, oldipl; @@ -266,15 +266,15 @@ spl0(void) * which gives us the same value as the old psr but with all * the old PIL bits turned off. */ - __asm __volatile("rd %%psr,%0" : "=r" (psr)); + __asm volatile("rd %%psr,%0" : "=r" (psr)); oldipl = psr & PSR_PIL; - __asm __volatile("wr %0,%1,%%psr" : : "r" (psr), "r" (oldipl)); + __asm volatile("wr %0,%1,%%psr" : : "r" (psr), "r" (oldipl)); /* * Three instructions must execute before we can depend * on the bits to be changed. */ - __asm __volatile("nop; nop; nop"); + __asm volatile("nop; nop; nop"); } /* @@ -283,27 +283,27 @@ spl0(void) * into the ipl field.) */ #define _SPLSET(name, newipl) \ -static __inline void name(void) \ +static inline void name(void) \ { \ int psr, oldipl; \ - __asm __volatile("rd %%psr,%0" : "=r" (psr)); \ + __asm volatile("rd %%psr,%0" : "=r" (psr)); \ oldipl = psr & PSR_PIL; \ psr &= ~oldipl; \ - __asm __volatile("wr %0,%1,%%psr" : : \ + __asm volatile("wr %0,%1,%%psr" : : \ "r" (psr), "n" ((newipl) << 8)); \ - __asm __volatile("nop; nop; nop"); \ + __asm volatile("nop; nop; nop"); \ } _SPLSET(spllowersoftclock, IPL_SOFTCLOCK) _SPLSET(spllowerschedclock, IPL_SCHED) /* Raise IPL and return previous value */ -static __inline int +static inline int splraise(int newipl) { int psr, oldipl; - __asm __volatile("rd %%psr,%0" : "=r" (psr)); + __asm volatile("rd %%psr,%0" : "=r" (psr)); oldipl = psr & PSR_PIL; newipl <<= 8; @@ -312,8 +312,8 @@ splraise(int newipl) psr = (psr & ~oldipl) | newipl; - __asm __volatile("wr %0,0,%%psr" : : "r" (psr)); - __asm __volatile("nop; nop; nop"); + __asm volatile("wr %0,0,%%psr" : : "r" (psr)); + __asm volatile("nop; nop; nop"); return (oldipl); } @@ -347,14 +347,14 @@ splraise(int newipl) #define splstatclock() splraise(IPL_STATCLOCK) -static __inline int +static inline int splhigh(void) { int psr, oldipl; - __asm __volatile("rd %%psr,%0" : "=r" (psr)); - __asm __volatile("wr %0,0,%%psr" : : "r" (psr | PSR_PIL)); - __asm __volatile("and %1,%2,%0; nop; nop" : "=r" (oldipl) : \ + __asm volatile("rd %%psr,%0" : "=r" (psr)); + __asm volatile("wr %0,0,%%psr" : : "r" (psr | PSR_PIL)); + __asm volatile("and %1,%2,%0; nop; nop" : "=r" (oldipl) : \ "r" (psr), "n" (PSR_PIL)); return (oldipl); } @@ -362,15 +362,15 @@ splhigh(void) #define spllock() splhigh() /* splx does not have a return value */ -static __inline void +static inline void splx(int newipl) { int psr; - __asm __volatile("rd %%psr,%0" : "=r" (psr)); - __asm __volatile("wr %0,%1,%%psr" : : \ + __asm volatile("rd %%psr,%0" : "=r" (psr)); + __asm volatile("wr %0,%1,%%psr" : : \ "r" (psr & ~PSR_PIL), "rn" (newipl)); - __asm __volatile("nop; nop; nop"); + __asm volatile("nop; nop; nop"); } #endif /* KERNEL && !_LOCORE */ diff --git a/sys/arch/sparc/include/pte.h b/sys/arch/sparc/include/pte.h index 27125ff5fdb..4bf331169cf 100644 --- a/sys/arch/sparc/include/pte.h +++ b/sys/arch/sparc/include/pte.h @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.29 2005/12/11 12:19:06 christos Exp $ */ +/* $NetBSD: pte.h,v 1.30 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1996 @@ -322,7 +322,7 @@ struct srmmu_pte { /* %%%: Fix above and below for 4m? */ -/* static __inline int PG_VALID(void *va) { +/* static inline int PG_VALID(void *va) { register int t = va; t >>= PG_VSHIFT; return (t == 0 || t == -1); } */ diff --git a/sys/arch/sparc/include/types.h b/sys/arch/sparc/include/types.h index a6c9f8a20bf..7c335199b45 100644 --- a/sys/arch/sparc/include/types.h +++ b/sys/arch/sparc/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.40 2005/12/11 12:19:06 christos Exp $ */ +/* $NetBSD: types.h,v 1.41 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -92,7 +92,7 @@ typedef paddr_t psize_t; * `lock_data' given its address (and the fact that SPARC is big-endian). */ -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 0xff000000 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/sparc/include/userret.h b/sys/arch/sparc/include/userret.h index 1e4cb7a5967..f0a1b570ef0 100644 --- a/sys/arch/sparc/include/userret.h +++ b/sys/arch/sparc/include/userret.h @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.2 2005/12/11 12:19:06 christos Exp $ */ +/* $NetBSD: userret.h,v 1.3 2005/12/24 20:07:32 perry Exp $ */ /* * Copyright (c) 1996 @@ -50,15 +50,15 @@ #include <sys/userret.h> -static __inline void userret(struct lwp *, int, u_quad_t); -static __inline void share_fpu(struct lwp *, struct trapframe *); +static inline void userret(struct lwp *, int, u_quad_t); +static inline void share_fpu(struct lwp *, struct trapframe *); /* * Define the code needed before returning to user mode, for * trap, mem_access_fault, and syscall. */ -static __inline void +static inline void userret(struct lwp *l, int pc, u_quad_t oticks) { struct proc *p = l->l_proc; @@ -96,7 +96,7 @@ userret(struct lwp *l, int pc, u_quad_t oticks) * the ktrsysret() in syscall(). Actually, it is likely that the * ktrsysret should occur before the call to userret. */ -static __inline void share_fpu(struct lwp *l, struct trapframe *tf) +static inline void share_fpu(struct lwp *l, struct trapframe *tf) { if ((tf->tf_psr & PSR_EF) != 0 && cpuinfo.fplwp != l) tf->tf_psr &= ~PSR_EF; diff --git a/sys/arch/sparc/sparc/asm.h b/sys/arch/sparc/sparc/asm.h index 8a34b58dab6..50ce0420b26 100644 --- a/sys/arch/sparc/sparc/asm.h +++ b/sys/arch/sparc/sparc/asm.h @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.10 2005/12/11 12:19:08 christos Exp $ */ +/* $NetBSD: asm.h,v 1.11 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -60,7 +60,7 @@ /* load byte from alternate address space */ #define lduba(loc, asi) ({ \ register int _lduba_v; \ - __asm __volatile("lduba [%1]%2,%0" : "=r" (_lduba_v) : \ + __asm volatile("lduba [%1]%2,%0" : "=r" (_lduba_v) : \ "r" ((int)(loc)), "n" (asi)); \ _lduba_v; \ }) @@ -68,7 +68,7 @@ /* load half-word from alternate address space */ #define lduha(loc, asi) ({ \ register int _lduha_v; \ - __asm __volatile("lduha [%1]%2,%0" : "=r" (_lduha_v) : \ + __asm volatile("lduha [%1]%2,%0" : "=r" (_lduha_v) : \ "r" ((int)(loc)), "n" (asi)); \ _lduha_v; \ }) @@ -76,52 +76,52 @@ /* load int from alternate address space */ #define lda(loc, asi) ({ \ register int _lda_v; \ - __asm __volatile("lda [%1]%2,%0" : "=r" (_lda_v) : \ + __asm volatile("lda [%1]%2,%0" : "=r" (_lda_v) : \ "r" ((int)(loc)), "n" (asi)); \ _lda_v; \ }) /* store byte to alternate address space */ #define stba(loc, asi, value) ({ \ - __asm __volatile("stba %0,[%1]%2" : : \ + __asm volatile("stba %0,[%1]%2" : : \ "r" ((int)(value)), "r" ((int)(loc)), "n" (asi)); \ }) /* store half-word to alternate address space */ #define stha(loc, asi, value) ({ \ - __asm __volatile("stha %0,[%1]%2" : : \ + __asm volatile("stha %0,[%1]%2" : : \ "r" ((int)(value)), "r" ((int)(loc)), "n" (asi)); \ }) /* store int to alternate address space */ #define sta(loc, asi, value) ({ \ - __asm __volatile("sta %0,[%1]%2" : : \ + __asm volatile("sta %0,[%1]%2" : : \ "r" ((int)(value)), "r" ((int)(loc)), "n" (asi)); \ }) /* load 64-bit int from alternate address space */ #define ldda(loc, asi) ({ \ register long long _lda_v; \ - __asm __volatile("ldda [%1]%2,%0" : "=r" (_lda_v) : \ + __asm volatile("ldda [%1]%2,%0" : "=r" (_lda_v) : \ "r" ((int)(loc)), "n" (asi)); \ _lda_v; \ }) /* store 64-bit int to alternate address space */ #define stda(loc, asi, value) ({ \ - __asm __volatile("stda %0,[%1]%2" : : \ + __asm volatile("stda %0,[%1]%2" : : \ "r" ((long long)(value)), "r" ((int)(loc)), "n" (asi)); \ }) /* atomic swap of a word between a register and memory */ #define swap(loc, val) ({ \ - __asm __volatile("swap [%2],%0" : "=&r" (val) : "0" (val), "r" (loc)); \ + __asm volatile("swap [%2],%0" : "=&r" (val) : "0" (val), "r" (loc)); \ }) /* atomic load/store of a byte in memory */ #define ldstub(loc) ({ \ int _v; \ - __asm __volatile("ldstub [%1],%0" : "=r" (_v) : "r" (loc) : "memory"); \ + __asm volatile("ldstub [%1],%0" : "=r" (_v) : "r" (loc) : "memory"); \ _v; \ }) @@ -129,12 +129,12 @@ #define rdasr(asr) _rdasr(asr) #define _rdasr(asr) ({ \ register int _rdasr_v; \ - __asm __volatile("rd %%asr" #asr ",%0" : "=r" (_rdasr_v)); \ + __asm volatile("rd %%asr" #asr ",%0" : "=r" (_rdasr_v)); \ _rdasr_v; \ }) /* write ancillary state register */ #define wrasr(value, asr) _wrasr(value, asr) #define _wrasr(value, asr) ({ \ - __asm __volatile("wr %0,%%asr" #asr : : "r" ((int)(value))); \ + __asm volatile("wr %0,%%asr" #asr : : "r" ((int)(value))); \ }) diff --git a/sys/arch/sparc/sparc/cpuvar.h b/sys/arch/sparc/sparc/cpuvar.h index 1eaf561de3e..b7c04393215 100644 --- a/sys/arch/sparc/sparc/cpuvar.h +++ b/sys/arch/sparc/sparc/cpuvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpuvar.h,v 1.67 2005/12/11 12:19:08 christos Exp $ */ +/* $NetBSD: cpuvar.h,v 1.68 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -98,12 +98,12 @@ struct module_info { * Message structure for Inter Processor Communication in MP systems */ struct xpmsg { - __volatile int tag; + volatile int tag; #define XPMSG15_PAUSECPU 1 #define XPMSG_FUNC 4 #define XPMSG_FTRP 5 - __volatile union { + volatile union { /* * Cross call: ask to run (*func)(arg0,arg1,arg2) * or (*trap)(arg0,arg1,arg2). `trap' should be the @@ -119,8 +119,8 @@ struct xpmsg { int retval; } xpmsg_func; } u; - __volatile int received; - __volatile int complete; + volatile int received; + volatile int complete; }; /* @@ -156,7 +156,7 @@ struct cpu_info { * self-reference the global VA so that we can return it * in the curcpu() macro. */ - struct cpu_info * __volatile ci_self; + struct cpu_info * volatile ci_self; /* Primary Inter-processor message area */ struct xpmsg msg; @@ -171,13 +171,13 @@ struct cpu_info { struct cacheinfo cacheinfo; /* see cache.h */ /* various flags to workaround anomalies in chips */ - __volatile int flags; /* see CPUFLG_xxx, below */ + volatile int flags; /* see CPUFLG_xxx, below */ /* Per processor counter register (sun4m only) */ - __volatile struct counter_4m *counterreg_4m; + volatile struct counter_4m *counterreg_4m; /* Per processor interrupt mask register (sun4m only) */ - __volatile struct icr_pi *intreg_4m; + volatile struct icr_pi *intreg_4m; /* * Send a IPI to (cpi). For Ross cpus we need to read * the pending register to avoid a hardware bug. @@ -303,7 +303,7 @@ struct cpu_info { char fpu_namebuf[32];/* Buffer for FPU name, if necessary */ /* XXX */ - __volatile void *ci_ddb_regs; /* DDB regs */ + volatile void *ci_ddb_regs; /* DDB regs */ /* * The following are function pointers to do interesting CPU-dependent diff --git a/sys/arch/sparc/sparc/emul.c b/sys/arch/sparc/sparc/emul.c index fc61ebb141a..057fd419b99 100644 --- a/sys/arch/sparc/sparc/emul.c +++ b/sys/arch/sparc/sparc/emul.c @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.12 2005/11/16 03:00:23 uwe Exp $ */ +/* $NetBSD: emul.c,v 1.13 2005/12/24 20:07:37 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.12 2005/11/16 03:00:23 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.13 2005/12/24 20:07:37 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -58,18 +58,18 @@ __KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.12 2005/11/16 03:00:23 uwe Exp $"); #define IPR(tf, i) ((int32_t *) tf->tf_out[6])[i - 16] #define FPR(l, i) ((int32_t) l->l_md.md_fpstate->fs_regs[i]) -static __inline int readgpreg(struct trapframe *, int, void *); -static __inline int readfpreg(struct lwp *, int, void *); -static __inline int writegpreg(struct trapframe *, int, const void *); -static __inline int writefpreg(struct lwp *, int, const void *); -static __inline int decodeaddr(struct trapframe *, union instr *, void *); +static inline int readgpreg(struct trapframe *, int, void *); +static inline int readfpreg(struct lwp *, int, void *); +static inline int writegpreg(struct trapframe *, int, const void *); +static inline int writefpreg(struct lwp *, int, const void *); +static inline int decodeaddr(struct trapframe *, union instr *, void *); static int muldiv(struct trapframe *, union instr *, int32_t *, int32_t *, int32_t *); #define REGNAME(i) "goli"[i >> 3], i & 7 -static __inline int +static inline int readgpreg(struct trapframe *tf, int i, void *val) { int error = 0; @@ -84,7 +84,7 @@ readgpreg(struct trapframe *tf, int i, void *val) } -static __inline int +static inline int writegpreg(struct trapframe *tf, int i, const void *val) { int error = 0; @@ -100,7 +100,7 @@ writegpreg(struct trapframe *tf, int i, const void *val) } -static __inline int +static inline int readfpreg(struct lwp *l, int i, void *val) { @@ -109,7 +109,7 @@ readfpreg(struct lwp *l, int i, void *val) } -static __inline int +static inline int writefpreg(struct lwp *l, int i, const void *val) { @@ -117,7 +117,7 @@ writefpreg(struct lwp *l, int i, const void *val) return 0; } -static __inline int +static inline int decodeaddr(struct trapframe *tf, union instr *code, void *val) { diff --git a/sys/arch/sparc/sparc/in_cksum.c b/sys/arch/sparc/sparc/in_cksum.c index e73dcaf9f66..99ed775aee6 100644 --- a/sys/arch/sparc/sparc/in_cksum.c +++ b/sys/arch/sparc/sparc/in_cksum.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_cksum.c,v 1.17 2005/11/16 03:00:23 uwe Exp $ */ +/* $NetBSD: in_cksum.c,v 1.18 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1995 Matthew R. Green. @@ -78,7 +78,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.17 2005/11/16 03:00:23 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.18 2005/12/24 20:07:37 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -119,7 +119,7 @@ __KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.17 2005/11/16 03:00:23 uwe Exp $"); * Zubin Dittia (zubin@dworkin.wustl.edu) */ -#define Asm __asm __volatile +#define Asm __asm volatile #define ADD64 Asm(" ld [%4+ 0],%1; ld [%4+ 4],%2; \ addcc %0,%1,%0; addxcc %0,%2,%0; \ ld [%4+ 8],%1; ld [%4+12],%2; \ diff --git a/sys/arch/sparc/sparc/kgdb_machdep.c b/sys/arch/sparc/sparc/kgdb_machdep.c index f6bc0cc0a6b..d52ef0b2e5a 100644 --- a/sys/arch/sparc/sparc/kgdb_machdep.c +++ b/sys/arch/sparc/sparc/kgdb_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_machdep.c,v 1.16 2005/11/14 03:30:49 uwe Exp $ */ +/* $NetBSD: kgdb_machdep.c,v 1.17 2005/12/24 20:07:37 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. * All rights reserved. @@ -126,7 +126,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.16 2005/11/14 03:30:49 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.17 2005/12/24 20:07:37 perry Exp $"); #include "opt_kgdb.h" #include "opt_multiprocessor.h" @@ -147,13 +147,13 @@ __KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.16 2005/11/14 03:30:49 uwe Exp $" #include <sparc/sparc/asm.h> -static __inline void kgdb_copy(char *, char *, int); -static __inline void kgdb_zero(char *, int); +static inline void kgdb_copy(char *, char *, int); +static inline void kgdb_zero(char *, int); /* * This little routine exists simply so that bcopy() can be debugged. */ -static __inline void +static inline void kgdb_copy(register char *src, register char *dst, register int len) { @@ -162,7 +162,7 @@ kgdb_copy(register char *src, register char *dst, register int len) } /* ditto for bzero */ -static __inline void +static inline void kgdb_zero(register char *ptr, register int len) { diff --git a/sys/arch/sparc/sparc/openfirm.c b/sys/arch/sparc/sparc/openfirm.c index a0669298b10..526621dc4a8 100644 --- a/sys/arch/sparc/sparc/openfirm.c +++ b/sys/arch/sparc/sparc/openfirm.c @@ -1,4 +1,4 @@ -/* $NetBSD: openfirm.c,v 1.12 2005/11/14 19:11:24 uwe Exp $ */ +/* $NetBSD: openfirm.c,v 1.13 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: openfirm.c,v 1.12 2005/11/14 19:11:24 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: openfirm.c,v 1.13 2005/12/24 20:07:37 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -757,7 +757,7 @@ OF_sym2val(void *cells) db_expr_t value; /* Set data segment pointer */ - __asm __volatile("clr %%g4" : :); + __asm volatile("clr %%g4" : :); /* No args? Nothing to do. */ if (args->nargs == 0 || args->nreturns == 0) @@ -795,7 +795,7 @@ OF_val2sym(void *cells) db_expr_t offset; /* Set data segment pointer */ - __asm __volatile("clr %%g4" : :); + __asm volatile("clr %%g4" : :); if (obp_symbol_debug) prom_printf("OF_val2sym: nargs %lx nreturns %lx\n", diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index 6e0e770e21e..929879eee8c 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.305 2005/11/16 21:42:51 uwe Exp $ */ +/* $NetBSD: pmap.c,v 1.306 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1996 @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.305 2005/11/16 21:42:51 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.306 2005/12/24 20:07:37 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -860,14 +860,14 @@ updatepte4m(vaddr_t va, int *pte, int bic, int bis, int ctx, u_int cpuset) return (oldval); } -__inline void +inline void setpgt4m(int *ptep, int pte) { swap(ptep, pte); } -__inline void +inline void setpgt4m_va(vaddr_t va, int *ptep, int pte, int pageflush, int ctx, u_int cpuset) { diff --git a/sys/arch/sparc/sparc/syscall.c b/sys/arch/sparc/sparc/syscall.c index 3951681fa3c..f137bb54c3b 100644 --- a/sys/arch/sparc/sparc/syscall.c +++ b/sys/arch/sparc/sparc/syscall.c @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.4 2005/12/11 12:19:08 christos Exp $ */ +/* $NetBSD: syscall.c,v 1.5 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1996 @@ -49,7 +49,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.4 2005/12/11 12:19:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.5 2005/12/24 20:07:37 perry Exp $"); #include "opt_syscall_debug.h" #include "opt_ktrace.h" @@ -96,16 +96,16 @@ struct args { register_t i[MAXARGS]; }; -static __inline int handle_new(struct trapframe *, register_t *); -static __inline int getargs(struct proc *p, struct trapframe *, +static inline int handle_new(struct trapframe *, register_t *); +static inline int getargs(struct proc *p, struct trapframe *, register_t *, const struct sysent **, struct args *); #ifdef FPU_DEBUG -static __inline void save_fpu(struct trapframe *); +static inline void save_fpu(struct trapframe *); #endif void syscall_plain(register_t, struct trapframe *, register_t); void syscall_fancy(register_t, struct trapframe *, register_t); -static __inline int +static inline int handle_new(struct trapframe *tf, register_t *code) { int new = *code & (SYSCALL_G7RFLAG | SYSCALL_G2RFLAG); @@ -124,7 +124,7 @@ handle_new(struct trapframe *tf, register_t *code) * of ``easy'' arguments as appropriate; we will copy the hard * ones later as needed. */ -static __inline int +static inline int getargs(struct proc *p, struct trapframe *tf, register_t *code, const struct sysent **callp, struct args *args) { @@ -168,7 +168,7 @@ getargs(struct proc *p, struct trapframe *tf, register_t *code, } #ifdef FPU_DEBUG -static __inline void +static inline void save_fpu(struct trapframe *tf) { struct lwp *l = curlwp; diff --git a/sys/arch/sparc/sparc/timervar.h b/sys/arch/sparc/sparc/timervar.h index a25b4c15783..09a0e0c8074 100644 --- a/sys/arch/sparc/sparc/timervar.h +++ b/sys/arch/sparc/sparc/timervar.h @@ -1,4 +1,4 @@ -/* $NetBSD: timervar.h,v 1.6 2005/11/16 03:00:23 uwe Exp $ */ +/* $NetBSD: timervar.h,v 1.7 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -66,7 +66,7 @@ extern void (*timer_init)(void); void timerattach(volatile int *, volatile int *); void *sched_cookie; /* for schedclock() interrupts */ -static __inline u_long __attribute__((__unused__)) +static inline u_long __attribute__((__unused__)) new_interval(void) { u_long newint, r, var; diff --git a/sys/arch/sparc64/include/bus.h b/sys/arch/sparc64/include/bus.h index 53237dbceff..07dfc3058f0 100644 --- a/sys/arch/sparc64/include/bus.h +++ b/sys/arch/sparc64/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.50 2005/12/11 12:19:10 christos Exp $ */ +/* $NetBSD: bus.h,v 1.51 2005/12/24 20:07:37 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -185,7 +185,7 @@ int bus_space_translate_address_generic(struct openprom_range *, #define PROTO_bus_space_xxx __P((bus_space_tag_t t, ...)) #define RETURNTYPE_bus_space_xxx void * #define BUSFUN(name, returntype, t, args...) \ - static __inline RETURNTYPE_##name \ + static inline RETURNTYPE_##name \ bus_##name PROTO_##name \ { \ while (t->sparc_##name == NULL) \ @@ -255,7 +255,7 @@ static void *bus_intr_establish __P(( t = t->parent; \ return (*(t)->f) -static __inline int +static inline int bus_space_alloc(t, rs, re, s, a, b, f, ap, hp) bus_space_tag_t t; bus_addr_t rs; @@ -270,7 +270,7 @@ bus_space_alloc(t, rs, re, s, a, b, f, ap, hp) _BS_CALL(t, sparc_bus_alloc)(t, rs, re, s, a, b, f, ap, hp); } -static __inline void +static inline void bus_space_free(t, h, s) bus_space_tag_t t; bus_space_handle_t h; @@ -279,7 +279,7 @@ bus_space_free(t, h, s) _BS_CALL(t, sparc_bus_free)(t, h, s); } -static __inline int +static inline int bus_space_map(t, a, s, f, hp) bus_space_tag_t t; bus_addr_t a; @@ -290,7 +290,7 @@ bus_space_map(t, a, s, f, hp) _BS_CALL(t, sparc_bus_map)(t, a, s, f, 0, hp); } -static __inline int +static inline int bus_space_unmap(t, h, s) bus_space_tag_t t; bus_space_handle_t h; @@ -299,7 +299,7 @@ bus_space_unmap(t, h, s) _BS_CALL(t, sparc_bus_unmap)(t, h, s); } -static __inline int +static inline int bus_space_subregion(t, h, o, s, hp) bus_space_tag_t t; bus_space_handle_t h; @@ -310,7 +310,7 @@ bus_space_subregion(t, h, o, s, hp) _BS_CALL(t, sparc_bus_subregion)(t, h, o, s, hp); } -static __inline paddr_t +static inline paddr_t bus_space_mmap(t, a, o, p, f) bus_space_tag_t t; bus_addr_t a; @@ -321,7 +321,7 @@ bus_space_mmap(t, a, o, p, f) _BS_CALL(t, sparc_bus_mmap)(t, a, o, p, f); } -static __inline void * +static inline void * bus_intr_establish(t, p, l, h, a) bus_space_tag_t t; int p; @@ -351,7 +351,7 @@ bus_intr_establish(t, p, l, h, a) #define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ #define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ -static __inline void +static inline void bus_space_barrier(t, h, o, s, f) bus_space_tag_t t; bus_space_handle_t h; @@ -367,13 +367,13 @@ bus_space_barrier(t, h, o, s, f) */ if (f == BUS_SPACE_BARRIER_READ) /* A load followed by a load to the same location? */ - __asm __volatile("membar #Lookaside"); + __asm volatile("membar #Lookaside"); else if (f == BUS_SPACE_BARRIER_WRITE) /* A store followed by a store? */ - __asm __volatile("membar #StoreStore"); + __asm volatile("membar #StoreStore"); else /* A store followed by a load? */ - __asm __volatile("membar #StoreLoad|#MemIssue|#Lookaside"); + __asm volatile("membar #StoreLoad|#MemIssue|#Lookaside"); } /* @@ -441,20 +441,20 @@ bus_space_barrier(t, h, o, s, f) * described by tag/handle/offset and copy into buffer provided. */ -static __inline void +static inline void bus_space_read_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, size_t); -static __inline void +static inline void bus_space_read_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, size_t); -static __inline void +static inline void bus_space_read_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, size_t); -static __inline void +static inline void bus_space_read_multi_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int64_t *, size_t); -static __inline void +static inline void bus_space_read_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t * a, size_t c) { @@ -462,7 +462,7 @@ bus_space_read_multi_1(bus_space_tag_t t, bus_space_handle_t h, *a++ = bus_space_read_1(t, h, o); } -static __inline void +static inline void bus_space_read_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t * a, size_t c) { @@ -470,7 +470,7 @@ bus_space_read_multi_2(bus_space_tag_t t, bus_space_handle_t h, *a++ = bus_space_read_2(t, h, o); } -static __inline void +static inline void bus_space_read_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t * a, size_t c) { @@ -478,7 +478,7 @@ bus_space_read_multi_4(bus_space_tag_t t, bus_space_handle_t h, *a++ = bus_space_read_4(t, h, o); } -static __inline void +static inline void bus_space_read_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t * a, size_t c) { @@ -544,24 +544,24 @@ bus_space_read_multi_8(bus_space_tag_t t, bus_space_handle_t h, * provided to bus space described by tag/handle/offset. */ -static __inline void +static inline void bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int8_t *addr, size_t count); -static __inline void +static inline void bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int16_t *addr, size_t count); -static __inline void +static inline void bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int32_t *addr, size_t count); -static __inline void +static inline void bus_space_write_multi_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int64_t *addr, size_t count); -static __inline void +static inline void bus_space_write_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int8_t *a, size_t c) @@ -570,7 +570,7 @@ bus_space_write_multi_1(bus_space_tag_t t, bus_space_write_1(t, h, o, *a++); } -static __inline void +static inline void bus_space_write_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, size_t c) @@ -579,7 +579,7 @@ bus_space_write_multi_2(bus_space_tag_t t, bus_space_write_2(t, h, o, *a++); } -static __inline void +static inline void bus_space_write_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, size_t c) @@ -588,7 +588,7 @@ bus_space_write_multi_4(bus_space_tag_t t, bus_space_write_4(t, h, o, *a++); } -static __inline void +static inline void bus_space_write_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int64_t *a, size_t c) @@ -606,24 +606,24 @@ bus_space_write_multi_8(bus_space_tag_t t, * by tag/handle/offset `count' times. */ -static __inline void +static inline void bus_space_set_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t v, size_t c); -static __inline void +static inline void bus_space_set_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v, size_t c); -static __inline void +static inline void bus_space_set_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v, size_t c); -static __inline void +static inline void bus_space_set_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t v, size_t c); -static __inline void +static inline void bus_space_set_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t v, size_t c) @@ -632,7 +632,7 @@ bus_space_set_multi_1(bus_space_tag_t t, bus_space_write_1(t, h, o, v); } -static __inline void +static inline void bus_space_set_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v, size_t c) @@ -641,7 +641,7 @@ bus_space_set_multi_2(bus_space_tag_t t, bus_space_write_2(t, h, o, v); } -static __inline void +static inline void bus_space_set_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v, size_t c) @@ -650,7 +650,7 @@ bus_space_set_multi_4(bus_space_tag_t t, bus_space_write_4(t, h, o, v); } -static __inline void +static inline void bus_space_set_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t v, size_t c) @@ -686,7 +686,7 @@ static void bus_space_read_region_8 __P((bus_space_tag_t, u_int64_t *, bus_size_t)); -static __inline void +static inline void bus_space_read_region_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -696,7 +696,7 @@ bus_space_read_region_1(t, h, o, a, c) for (; c; a++, c--, o++) *a = bus_space_read_1(t, h, o); } -static __inline void +static inline void bus_space_read_region_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -706,7 +706,7 @@ bus_space_read_region_2(t, h, o, a, c) for (; c; a++, c--, o+=2) *a = bus_space_read_2(t, h, o); } -static __inline void +static inline void bus_space_read_region_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -716,7 +716,7 @@ bus_space_read_region_4(t, h, o, a, c) for (; c; a++, c--, o+=4) *a = bus_space_read_4(t, h, o); } -static __inline void +static inline void bus_space_read_region_8(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -753,7 +753,7 @@ static void bus_space_write_region_8 __P((bus_space_tag_t, bus_size_t, const u_int64_t *, bus_size_t)); -static __inline void +static inline void bus_space_write_region_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -764,7 +764,7 @@ bus_space_write_region_1(t, h, o, a, c) bus_space_write_1(t, h, o, *a); } -static __inline void +static inline void bus_space_write_region_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -775,7 +775,7 @@ bus_space_write_region_2(t, h, o, a, c) bus_space_write_2(t, h, o, *a); } -static __inline void +static inline void bus_space_write_region_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -786,7 +786,7 @@ bus_space_write_region_4(t, h, o, a, c) bus_space_write_4(t, h, o, *a); } -static __inline void +static inline void bus_space_write_region_8(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -825,7 +825,7 @@ static void bus_space_set_region_8 __P((bus_space_tag_t, const u_int64_t, bus_size_t)); -static __inline void +static inline void bus_space_set_region_1(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -836,7 +836,7 @@ bus_space_set_region_1(t, h, o, v, c) bus_space_write_1(t, h, o, v); } -static __inline void +static inline void bus_space_set_region_2(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -847,7 +847,7 @@ bus_space_set_region_2(t, h, o, v, c) bus_space_write_2(t, h, o, v); } -static __inline void +static inline void bus_space_set_region_4(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -858,7 +858,7 @@ bus_space_set_region_4(t, h, o, v, c) bus_space_write_4(t, h, o, v); } -static __inline void +static inline void bus_space_set_region_8(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -905,7 +905,7 @@ static void bus_space_copy_region_8 __P((bus_space_tag_t, bus_size_t)); -static __inline void +static inline void bus_space_copy_region_1(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -916,7 +916,7 @@ bus_space_copy_region_1(t, h1, o1, h2, o2, c) bus_space_write_1(t, h1, o1, bus_space_read_1(t, h2, o2)); } -static __inline void +static inline void bus_space_copy_region_2(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -927,7 +927,7 @@ bus_space_copy_region_2(t, h1, o1, h2, o2, c) bus_space_write_2(t, h1, o1, bus_space_read_2(t, h2, o2)); } -static __inline void +static inline void bus_space_copy_region_4(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -938,7 +938,7 @@ bus_space_copy_region_4(t, h1, o1, h2, o2, c) bus_space_write_4(t, h1, o1, bus_space_read_4(t, h2, o2)); } -static __inline void +static inline void bus_space_copy_region_8(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -1014,24 +1014,24 @@ bus_space_copy_region_8(t, h1, o1, h2, o2, c) * described by tag/handle/offset and copy into buffer provided. */ -static __inline void +static inline void bus_space_read_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t *a, size_t c); -static __inline void +static inline void bus_space_read_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t *a, size_t c); -static __inline void +static inline void bus_space_read_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t *a, size_t c); -static __inline void +static inline void bus_space_read_multi_stream_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t *a, size_t c); -static __inline void +static inline void bus_space_read_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t *a, size_t c) @@ -1040,7 +1040,7 @@ bus_space_read_multi_stream_1(bus_space_tag_t t, *a++ = bus_space_read_stream_1(t, h, o); } -static __inline void +static inline void bus_space_read_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t *a, size_t c) @@ -1049,7 +1049,7 @@ bus_space_read_multi_stream_2(bus_space_tag_t t, *a++ = bus_space_read_stream_2(t, h, o); } -static __inline void +static inline void bus_space_read_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t *a, size_t c) @@ -1058,7 +1058,7 @@ bus_space_read_multi_stream_4(bus_space_tag_t t, *a++ = bus_space_read_stream_4(t, h, o); } -static __inline void +static inline void bus_space_read_multi_stream_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t *a, size_t c) @@ -1125,24 +1125,24 @@ bus_space_read_multi_stream_8(bus_space_tag_t t, * provided to bus space described by tag/handle/offset. */ -static __inline void +static inline void bus_space_write_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int8_t *a, size_t c); -static __inline void +static inline void bus_space_write_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, size_t c); -static __inline void +static inline void bus_space_write_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, size_t c); -static __inline void +static inline void bus_space_write_multi_stream_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int64_t *a, size_t c); -static __inline void +static inline void bus_space_write_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int8_t *a, size_t c) @@ -1151,7 +1151,7 @@ bus_space_write_multi_stream_1(bus_space_tag_t t, bus_space_write_stream_1(t, h, o, *a++); } -static __inline void +static inline void bus_space_write_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, size_t c) @@ -1160,7 +1160,7 @@ bus_space_write_multi_stream_2(bus_space_tag_t t, bus_space_write_stream_2(t, h, o, *a++); } -static __inline void +static inline void bus_space_write_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, size_t c) @@ -1169,7 +1169,7 @@ bus_space_write_multi_stream_4(bus_space_tag_t t, bus_space_write_stream_4(t, h, o, *a++); } -static __inline void +static inline void bus_space_write_multi_stream_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, const u_int64_t *a, size_t c) @@ -1187,24 +1187,24 @@ bus_space_write_multi_stream_8(bus_space_tag_t t, * by tag/handle/offset `count' times. */ -static __inline void +static inline void bus_space_set_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t v, size_t c); -static __inline void +static inline void bus_space_set_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v, size_t c); -static __inline void +static inline void bus_space_set_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v, size_t c); -static __inline void +static inline void bus_space_set_multi_stream_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t v, size_t c); -static __inline void +static inline void bus_space_set_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t v, size_t c) @@ -1213,7 +1213,7 @@ bus_space_set_multi_stream_1(bus_space_tag_t t, bus_space_write_stream_1(t, h, o, v); } -static __inline void +static inline void bus_space_set_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v, size_t c) @@ -1222,7 +1222,7 @@ bus_space_set_multi_stream_2(bus_space_tag_t t, bus_space_write_stream_2(t, h, o, v); } -static __inline void +static inline void bus_space_set_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v, size_t c) @@ -1231,7 +1231,7 @@ bus_space_set_multi_stream_4(bus_space_tag_t t, bus_space_write_stream_4(t, h, o, v); } -static __inline void +static inline void bus_space_set_multi_stream_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t v, size_t c) @@ -1267,7 +1267,7 @@ static void bus_space_read_region_stream_8 __P((bus_space_tag_t, u_int64_t *, bus_size_t)); -static __inline void +static inline void bus_space_read_region_stream_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1277,7 +1277,7 @@ bus_space_read_region_stream_1(t, h, o, a, c) for (; c; a++, c--, o++) *a = bus_space_read_stream_1(t, h, o); } -static __inline void +static inline void bus_space_read_region_stream_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1287,7 +1287,7 @@ bus_space_read_region_stream_2(t, h, o, a, c) for (; c; a++, c--, o+=2) *a = bus_space_read_stream_2(t, h, o); } -static __inline void +static inline void bus_space_read_region_stream_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1297,7 +1297,7 @@ bus_space_read_region_stream_4(t, h, o, a, c) for (; c; a++, c--, o+=4) *a = bus_space_read_stream_4(t, h, o); } -static __inline void +static inline void bus_space_read_region_stream_8(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1334,7 +1334,7 @@ static void bus_space_write_region_stream_8 __P((bus_space_tag_t, bus_size_t, const u_int64_t *, bus_size_t)); -static __inline void +static inline void bus_space_write_region_stream_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1345,7 +1345,7 @@ bus_space_write_region_stream_1(t, h, o, a, c) bus_space_write_stream_1(t, h, o, *a); } -static __inline void +static inline void bus_space_write_region_stream_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1356,7 +1356,7 @@ bus_space_write_region_stream_2(t, h, o, a, c) bus_space_write_stream_2(t, h, o, *a); } -static __inline void +static inline void bus_space_write_region_stream_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1367,7 +1367,7 @@ bus_space_write_region_stream_4(t, h, o, a, c) bus_space_write_stream_4(t, h, o, *a); } -static __inline void +static inline void bus_space_write_region_stream_8(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1406,7 +1406,7 @@ static void bus_space_set_region_stream_8 __P((bus_space_tag_t, const u_int64_t, bus_size_t)); -static __inline void +static inline void bus_space_set_region_stream_1(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1417,7 +1417,7 @@ bus_space_set_region_stream_1(t, h, o, v, c) bus_space_write_stream_1(t, h, o, v); } -static __inline void +static inline void bus_space_set_region_stream_2(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1428,7 +1428,7 @@ bus_space_set_region_stream_2(t, h, o, v, c) bus_space_write_stream_2(t, h, o, v); } -static __inline void +static inline void bus_space_set_region_stream_4(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1439,7 +1439,7 @@ bus_space_set_region_stream_4(t, h, o, v, c) bus_space_write_stream_4(t, h, o, v); } -static __inline void +static inline void bus_space_set_region_stream_8(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -1486,7 +1486,7 @@ static void bus_space_copy_region_stream_8 __P((bus_space_tag_t, bus_size_t)); -static __inline void +static inline void bus_space_copy_region_stream_1(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -1497,7 +1497,7 @@ bus_space_copy_region_stream_1(t, h1, o1, h2, o2, c) bus_space_write_stream_1(t, h1, o1, bus_space_read_stream_1(t, h2, o2)); } -static __inline void +static inline void bus_space_copy_region_stream_2(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -1508,7 +1508,7 @@ bus_space_copy_region_stream_2(t, h1, o1, h2, o2, c) bus_space_write_stream_2(t, h1, o1, bus_space_read_stream_2(t, h2, o2)); } -static __inline void +static inline void bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; @@ -1519,7 +1519,7 @@ bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) bus_space_write_stream_4(t, h1, o1, bus_space_read_stream_4(t, h2, o2)); } -static __inline void +static inline void bus_space_copy_region_stream_8(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1, h2; diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h index 84d43216e98..7480a2e53e4 100644 --- a/sys/arch/sparc64/include/cpu.h +++ b/sys/arch/sparc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.49 2005/12/11 12:19:10 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.50 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -105,7 +105,7 @@ struct cpu_info { * self-reference the global VA so that we can return it * in the curcpu() macro. */ - struct cpu_info * __volatile ci_self; + struct cpu_info * volatile ci_self; /* Most important fields first */ struct lwp *ci_curlwp; @@ -146,7 +146,7 @@ struct cpu_info { */ struct cpu_bootargs { u_int cb_node; /* PROM CPU node */ - __volatile int cb_flags; + volatile int cb_flags; vaddr_t cb_ktext; paddr_t cb_ktextp; @@ -318,8 +318,8 @@ void loadfpstate __P((struct fpstate64 *)); u_int64_t probeget __P((paddr_t, int, int)); int probeset __P((paddr_t, int, int, u_int64_t)); -#define write_all_windows() __asm __volatile("flushw" : : ) -#define write_user_windows() __asm __volatile("flushw" : : ) +#define write_all_windows() __asm volatile("flushw" : : ) +#define write_user_windows() __asm volatile("flushw" : : ) void proc_trampoline __P((void)); struct pcb; diff --git a/sys/arch/sparc64/include/cpu_counter.h b/sys/arch/sparc64/include/cpu_counter.h index c17cc1f02aa..f0b7da6d9c6 100644 --- a/sys/arch/sparc64/include/cpu_counter.h +++ b/sys/arch/sparc64/include/cpu_counter.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 12:06:52 nakayama Exp $ */ +/* $NetBSD: cpu_counter.h,v 1.2 2005/12/24 20:07:37 perry Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -50,21 +50,21 @@ #define cpu_hascounter() (1) -static __inline uint64_t +static inline uint64_t cpu_counter(void) { return (tick()); } -static __inline uint32_t +static inline uint32_t cpu_counter32(void) { return (tick() & 0xffffffffUL); } -static __inline uint64_t +static inline uint64_t cpu_frequency(struct cpu_info *ci) { diff --git a/sys/arch/sparc64/include/cpuset.h b/sys/arch/sparc64/include/cpuset.h index 52706b7b982..6b3e759fd5e 100644 --- a/sys/arch/sparc64/include/cpuset.h +++ b/sys/arch/sparc64/include/cpuset.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpuset.h,v 1.3 2005/12/11 12:19:10 christos Exp $ */ +/* $NetBSD: cpuset.h,v 1.4 2005/12/24 20:07:37 perry Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #define _SPARC64_CPUSET_H_ typedef uint64_t cpuset_t; -extern __volatile cpuset_t cpus_active; +extern volatile cpuset_t cpus_active; #define CPUSET_SINGLE(cpu) ((cpuset_t)1 << (cpu)) diff --git a/sys/arch/sparc64/include/ctlreg.h b/sys/arch/sparc64/include/ctlreg.h index f106b016ea8..8273bf637f2 100644 --- a/sys/arch/sparc64/include/ctlreg.h +++ b/sys/arch/sparc64/include/ctlreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: ctlreg.h,v 1.37 2005/12/11 12:19:10 christos Exp $ */ +/* $NetBSD: ctlreg.h,v 1.38 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -474,7 +474,7 @@ lduba(paddr_t loc, int asi) { register unsigned int _lduba_v; - __asm __volatile( + __asm volatile( "wr %2, %%g0, %%asi; " "lduba [%1]%%asi, %0 " : "=r" (_lduba_v) @@ -489,7 +489,7 @@ lduba(paddr_t loc, int asi) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "sllx %3,32,%0; " "rdpr %%pstate,%1; " @@ -503,7 +503,7 @@ lduba(paddr_t loc, int asi) : "=&r" (_lduba_v), "=&r" (_pstate) : "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi)); } else { - __asm __volatile( + __asm volatile( "wr %3,%%g0,%%asi; " "sllx %2,32,%0; " "or %0,%1,%0; " @@ -523,7 +523,7 @@ lduha(paddr_t loc, int asi) { register unsigned int _lduha_v; - __asm __volatile( + __asm volatile( "wr %2, %%g0, %%asi; " "lduha [%1]%%asi, %0 " : "=r" (_lduha_v) @@ -539,7 +539,7 @@ lduha(paddr_t loc, int asi) { _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "sllx %3,32,%0; " "rdpr %%pstate,%1; " @@ -553,7 +553,7 @@ lduha(paddr_t loc, int asi) { : "=&r" (_lduha_v), "=&r" (_pstate) : "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi)); } else { - __asm __volatile( + __asm volatile( "wr %3,%%g0,%%asi; " "sllx %2,32,%0; " "or %0,%1,%0; " @@ -574,7 +574,7 @@ lda(paddr_t loc, int asi) { register unsigned int _lda_v; - __asm __volatile( + __asm volatile( "wr %2,%%g0,%%asi; " "lda [%1]%%asi,%0 " : "=r" (_lda_v) @@ -588,7 +588,7 @@ ldswa(paddr_t loc, int asi) { register int _lda_v; - __asm __volatile( + __asm volatile( "wr %2,%%g0,%%asi; " "ldswa [%1]%%asi,%0; " : "=r" (_lda_v) @@ -604,7 +604,7 @@ lda(paddr_t loc, int asi) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "rdpr %%pstate,%1; " "sllx %3,32,%0; " @@ -618,7 +618,7 @@ lda(paddr_t loc, int asi) : "=&r" (_lda_v), "=&r" (_pstate) : "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi)); } else { - __asm __volatile( + __asm volatile( "wr %3,%%g0,%%asi; " "sllx %2,32,%0; " "or %0,%1,%0; " @@ -638,7 +638,7 @@ ldswa(paddr_t loc, int asi) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "rdpr %%pstate,%1; " "wrpr %1,8,%%pstate; " @@ -652,7 +652,7 @@ ldswa(paddr_t loc, int asi) : "=&r" (_lda_v), "=&r" (_pstate) : "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi)); } else { - __asm __volatile( + __asm volatile( "wr %3,%%g0,%%asi; " "sllx %2,32,%0; " "or %0,%1,%0; " @@ -672,7 +672,7 @@ ldda(paddr_t loc, int asi) { register long long _lda_v; - __asm __volatile( + __asm volatile( "wr %2,%%g0,%%asi; " "ldda [%1]%%asi,%0 " : "=r" (_lda_v) @@ -688,7 +688,7 @@ ldda(paddr_t loc, int asi) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "rdpr %%pstate,%1; " "wrpr %1,8,%%pstate; " @@ -702,7 +702,7 @@ ldda(paddr_t loc, int asi) : "=&r" (_lda_v), "=&r" (_pstate) : "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi)); } else { - __asm __volatile( + __asm volatile( "wr %3,%%g0,%%asi; " "sllx %2,32,%0; " " or %0,%1,%0; " @@ -723,7 +723,7 @@ ldxa(paddr_t loc, int asi) { register unsigned long _lda_v; - __asm __volatile( + __asm volatile( "wr %2,%%g0,%%asi; " "ldxa [%1]%%asi,%0 " : "=r" (_lda_v) @@ -739,7 +739,7 @@ ldxa(paddr_t loc, int asi) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "rdpr %%pstate,%1; " "sllx %3,32,%0; " @@ -755,7 +755,7 @@ ldxa(paddr_t loc, int asi) : "=&r" (_ldxa_lo), "=&r" (_ldxa_hi) : "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi)); } else { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "sllx %3,32,%0; " "or %0,%2,%0; " @@ -775,7 +775,7 @@ ldxa(paddr_t loc, int asi) static __inline__ void stba(paddr_t loc, int asi, u_char value) { - __asm __volatile( + __asm volatile( "wr %2, %%g0, %%asi; " "stba %0, [%1]%%asi " : : "r" ((int)(value)), "r" ((unsigned long)(loc)), "r" (asi)); @@ -788,7 +788,7 @@ stba(paddr_t loc, int asi, u_char value) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %5,%%g0,%%asi; " "sllx %4,32,%0; " "rdpr %%pstate,%1; " @@ -801,7 +801,7 @@ stba(paddr_t loc, int asi, u_char value) : "=&r" (_loc_hi), "=&r" (_pstate) : "r" ((int)(value)), "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi)); } else { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "sllx %3,32,%0; " "or %2,%0,%0; " @@ -818,7 +818,7 @@ stba(paddr_t loc, int asi, u_char value) static __inline__ void stha(paddr_t loc, int asi, u_short value) { - __asm __volatile( + __asm volatile( "wr %2,%%g0,%%asi; " "stha %0,[%1]%%asi " : : "r" ((int)(value)), "r" ((unsigned long)(loc)), @@ -832,7 +832,7 @@ stha(paddr_t loc, int asi, u_short value) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %5,%%g0,%%asi; " "sllx %4,32,%0; " "rdpr %%pstate,%1; " @@ -846,7 +846,7 @@ stha(paddr_t loc, int asi, u_short value) : "r" ((int)(value)), "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi) : "memory"); } else { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "sllx %3,32,%0; " "or %2,%0,%0; " @@ -865,7 +865,7 @@ stha(paddr_t loc, int asi, u_short value) static __inline__ void sta(paddr_t loc, int asi, u_int value) { - __asm __volatile( + __asm volatile( "wr %2,%%g0,%%asi; " "sta %0,[%1]%%asi " : : "r" ((int)(value)), "r" ((unsigned long)(loc)), @@ -879,7 +879,7 @@ sta(paddr_t loc, int asi, u_int value) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %5,%%g0,%%asi; " "sllx %4,32,%0; " "rdpr %%pstate,%1; " @@ -893,7 +893,7 @@ sta(paddr_t loc, int asi, u_int value) : "r" ((int)(value)), "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi) : "memory"); } else { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "sllx %3,32,%0; " "or %2,%0,%0; " @@ -911,7 +911,7 @@ sta(paddr_t loc, int asi, u_int value) static __inline__ void stda(paddr_t loc, int asi, u_int64_t value) { - __asm __volatile( + __asm volatile( "wr %2,%%g0,%%asi; " "stda %0,[%1]%%asi " : : "r" ((long long)(value)), "r" ((unsigned long)(loc)), "r" (asi) @@ -925,7 +925,7 @@ stda(paddr_t loc, int asi, u_int64_t value) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %5,%%g0,%%asi; " "sllx %4,32,%0; " "rdpr %%pstate,%1; " @@ -940,7 +940,7 @@ stda(paddr_t loc, int asi, u_int64_t value) "r" (_loc_hi), "r" (asi) : "memory"); } else { - __asm __volatile( + __asm volatile( "wr %4,%%g0,%%asi; " "sllx %3,32,%0; " "or %2,%0,%0; " @@ -959,7 +959,7 @@ stda(paddr_t loc, int asi, u_int64_t value) static __inline__ void stxa(paddr_t loc, int asi, u_int64_t value) { - __asm __volatile( + __asm volatile( "wr %2,%%g0,%%asi; " "stxa %0,[%1]%%asi " : : "r" ((unsigned long)(value)), @@ -978,7 +978,7 @@ stxa(paddr_t loc, int asi, u_int64_t value) _loc_hi = (((u_int64_t)loc)>>32); if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %7,%%g0,%%asi; " "sllx %4,32,%1; " "sllx %6,32,%0; " @@ -995,7 +995,7 @@ stxa(paddr_t loc, int asi, u_int64_t value) "r" ((unsigned long)(loc)), "r" (_loc_hi), "r" (asi) : "memory"); } else { - __asm __volatile( + __asm volatile( "wr %6,%%g0,%%asi; " "sllx %3,32,%1; " "sllx %5,32,%0; " @@ -1016,7 +1016,7 @@ stxa(paddr_t loc, int asi, u_int64_t value) static __inline__ u_int32_t casa(paddr_t loc, int asi, u_int32_t value, u_int32_t oldvalue) { - __asm __volatile( + __asm volatile( "wr %3,%%g0,%%asi; " "casa [%1]%%asi,%2,%0 " : "+r" (value) @@ -1028,7 +1028,7 @@ casa(paddr_t loc, int asi, u_int32_t value, u_int32_t oldvalue) static __inline__ u_int64_t casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue) { - __asm __volatile( + __asm volatile( "wr %3,%%g0,%%asi; " "casxa [%1]%%asi,%2,%0 " : "+r" (value) @@ -1054,7 +1054,7 @@ casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue) * gcc cannot handle this since it thinks it has >10 asm operands. */ if (PHYS_ASI(asi)) { - __asm __volatile( + __asm volatile( "wr %6,%%g0,%%asi; " "sllx %1,32,%1; " "rdpr %%pstate,%2; " @@ -1076,7 +1076,7 @@ casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue) "r" (asi) : "memory"); } else { - __asm __volatile( + __asm volatile( "wr %7,%%g0,%%asi; " "sllx %1,32,%1; " "sllx %5,32,%0; " @@ -1102,7 +1102,7 @@ casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue) /* flush address from data cache */ #define flush(loc) ({ \ - __asm __volatile("flush %0" : : \ + __asm volatile("flush %0" : : \ "r" ((unsigned long)(loc))); \ }) @@ -1117,12 +1117,12 @@ casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue) /* The following two enable or disable the dcache in the LSU control register */ #define dcenable() ({ \ int res; \ - __asm __volatile("ldxa [%%g0] %1,%0; or %0,%2,%0; stxa %0,[%%g0] %1; membar #Sync" \ + __asm volatile("ldxa [%%g0] %1,%0; or %0,%2,%0; stxa %0,[%%g0] %1; membar #Sync" \ : "r" (res) : "n" (ASI_MCCR), "n" (MCCR_DCACHE_EN)); \ }) #define dcdisable() ({ \ int res; \ - __asm __volatile("ldxa [%%g0] %1,%0; andn %0,%2,%0; stxa %0,[%%g0] %1; membar #Sync" \ + __asm volatile("ldxa [%%g0] %1,%0; andn %0,%2,%0; stxa %0,[%%g0] %1; membar #Sync" \ : "r" (res) : "n" (ASI_MCCR), "n" (MCCR_DCACHE_EN)); \ }) @@ -1130,35 +1130,35 @@ casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue) * SPARC V9 memory barrier instructions. */ /* Make all stores complete before next store */ -#define membar_storestore() __asm __volatile("membar #StoreStore" : :) +#define membar_storestore() __asm volatile("membar #StoreStore" : :) /* Make all loads complete before next store */ -#define membar_loadstore() __asm __volatile("membar #LoadStore" : :) +#define membar_loadstore() __asm volatile("membar #LoadStore" : :) /* Make all stores complete before next load */ -#define membar_storeload() __asm __volatile("membar #StoreLoad" : :) +#define membar_storeload() __asm volatile("membar #StoreLoad" : :) /* Make all loads complete before next load */ -#define membar_loadload() __asm __volatile("membar #LoadLoad" : :) +#define membar_loadload() __asm volatile("membar #LoadLoad" : :) /* Complete all outstanding memory operations and exceptions */ -#define membar_sync() __asm __volatile("membar #Sync" : :) +#define membar_sync() __asm volatile("membar #Sync" : :) /* Complete all outstanding memory operations */ -#define membar_memissue() __asm __volatile("membar #MemIssue" : :) +#define membar_memissue() __asm volatile("membar #MemIssue" : :) /* Complete all outstanding stores before any new loads */ -#define membar_lookaside() __asm __volatile("membar #Lookaside" : :) +#define membar_lookaside() __asm volatile("membar #Lookaside" : :) -#define membar_load() __asm __volatile("membar #LoadLoad | #LoadStore" : :) -#define membar_store() __asm __volatile("membar #LoadStore | #StoreStore" : :) +#define membar_load() __asm volatile("membar #LoadLoad | #LoadStore" : :) +#define membar_store() __asm volatile("membar #LoadStore | #StoreStore" : :) #ifdef __arch64__ /* read 64-bit %tick register */ #define tick() ({ \ register u_long _tick_tmp; \ - __asm __volatile("rdpr %%tick, %0" : "=r" (_tick_tmp) :); \ + __asm volatile("rdpr %%tick, %0" : "=r" (_tick_tmp) :); \ _tick_tmp; \ }) #else /* read 64-bit %tick register on 32-bit system */ #define tick() ({ \ register u_int _tick_hi = 0, _tick_lo = 0; \ - __asm __volatile("rdpr %%tick, %0; srl %0,0,%1; srlx %0,32,%0 " \ + __asm volatile("rdpr %%tick, %0; srl %0,0,%1; srlx %0,32,%0 " \ : "=r" (_tick_hi), "=r" (_tick_lo) : ); \ (((u_int64_t)_tick_hi)<<32)|((u_int64_t)_tick_lo); \ }) diff --git a/sys/arch/sparc64/include/psl.h b/sys/arch/sparc64/include/psl.h index 04cc26e29da..4647d40f132 100644 --- a/sys/arch/sparc64/include/psl.h +++ b/sys/arch/sparc64/include/psl.h @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.29 2005/12/11 12:19:10 christos Exp $ */ +/* $NetBSD: psl.h,v 1.30 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -250,46 +250,46 @@ /* * Inlines for manipulating privileged registers */ -static __inline int +static inline int getpstate(void) { int pstate; - __asm __volatile("rdpr %%pstate,%0" : "=r" (pstate)); + __asm volatile("rdpr %%pstate,%0" : "=r" (pstate)); return (pstate); } -static __inline void +static inline void setpstate(int newpstate) { - __asm __volatile("wrpr %0,0,%%pstate" : : "r" (newpstate)); + __asm volatile("wrpr %0,0,%%pstate" : : "r" (newpstate)); } -static __inline int +static inline int getcwp(void) { int cwp; - __asm __volatile("rdpr %%cwp,%0" : "=r" (cwp)); + __asm volatile("rdpr %%cwp,%0" : "=r" (cwp)); return (cwp); } -static __inline void +static inline void setcwp(int newcwp) { - __asm __volatile("wrpr %0,0,%%cwp" : : "r" (newcwp)); + __asm volatile("wrpr %0,0,%%cwp" : : "r" (newcwp)); } -static __inline uint64_t +static inline uint64_t getver(void) { uint64_t ver; - __asm __volatile("rdpr %%ver,%0" : "=r" (ver)); + __asm volatile("rdpr %%ver,%0" : "=r" (ver)); return (ver); } -static __inline int +static inline int intr_disable(void) { int pstate = getpstate(); @@ -298,7 +298,7 @@ intr_disable(void) return (pstate); } -static __inline void +static inline void intr_restore(int pstate) { setpstate(pstate); @@ -321,46 +321,46 @@ extern int printspl; } \ } #define SPL(name, newpil) \ -static __inline int name##X(const char* file, int line) \ +static inline int name##X(const char* file, int line) \ { \ int oldpil; \ - __asm __volatile("rdpr %%pil,%0" : "=r" (oldpil)); \ + __asm volatile("rdpr %%pil,%0" : "=r" (oldpil)); \ SPLPRINT(("{%s:%d %d=>%d}", file, line, oldpil, newpil)); \ - __asm __volatile("wrpr %%g0,%0,%%pil" : : "n" (newpil)); \ + __asm volatile("wrpr %%g0,%0,%%pil" : : "n" (newpil)); \ return (oldpil); \ } /* A non-priority-decreasing version of SPL */ #define SPLHOLD(name, newpil) \ -static __inline int name##X(const char* file, int line) \ +static inline int name##X(const char* file, int line) \ { \ int oldpil; \ - __asm __volatile("rdpr %%pil,%0" : "=r" (oldpil)); \ + __asm volatile("rdpr %%pil,%0" : "=r" (oldpil)); \ if (newpil <= oldpil) \ return oldpil; \ SPLPRINT(("{%s:%d %d->!d}", file, line, oldpil, newpil)); \ - __asm __volatile("wrpr %%g0,%0,%%pil" : : "n" (newpil)); \ + __asm volatile("wrpr %%g0,%0,%%pil" : : "n" (newpil)); \ return (oldpil); \ } #else #define SPLPRINT(x) #define SPL(name, newpil) \ -static __inline int name(void) \ +static inline int name(void) \ { \ int oldpil; \ - __asm __volatile("rdpr %%pil,%0" : "=r" (oldpil)); \ - __asm __volatile("wrpr %%g0,%0,%%pil" : : "n" (newpil)); \ + __asm volatile("rdpr %%pil,%0" : "=r" (oldpil)); \ + __asm volatile("wrpr %%g0,%0,%%pil" : : "n" (newpil)); \ return (oldpil); \ } /* A non-priority-decreasing version of SPL */ #define SPLHOLD(name, newpil) \ -static __inline int name(void) \ +static inline int name(void) \ { \ int oldpil; \ - __asm __volatile("rdpr %%pil,%0" : "=r" (oldpil)); \ + __asm volatile("rdpr %%pil,%0" : "=r" (oldpil)); \ if (newpil <= oldpil) \ return oldpil; \ - __asm __volatile("wrpr %%g0,%0,%%pil" : : "n" (newpil)); \ + __asm volatile("wrpr %%g0,%0,%%pil" : : "n" (newpil)); \ return (oldpil); \ } #endif @@ -445,18 +445,18 @@ SPLHOLD(splhigh, PIL_HIGH) #define splx(x) splxX((x),__FILE__, __LINE__) #define splipi() splhighX(__FILE__, __LINE__) -static __inline void splxX(int newpil, const char *file, int line) +static inline void splxX(int newpil, const char *file, int line) #else -static __inline void splx(int newpil) +static inline void splx(int newpil) #endif { #ifdef SPLDEBUG int pil; - __asm __volatile("rdpr %%pil,%0" : "=r" (pil)); + __asm volatile("rdpr %%pil,%0" : "=r" (pil)); SPLPRINT(("{%d->%d}", pil, newpil)); #endif - __asm __volatile("wrpr %%g0,%0,%%pil" : : "rn" (newpil)); + __asm volatile("wrpr %%g0,%0,%%pil" : : "rn" (newpil)); } #endif /* KERNEL && !_LOCORE */ diff --git a/sys/arch/sparc64/include/userret.h b/sys/arch/sparc64/include/userret.h index 37370f93aba..a40cc1d60df 100644 --- a/sys/arch/sparc64/include/userret.h +++ b/sys/arch/sparc64/include/userret.h @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.2 2005/12/11 12:19:10 christos Exp $ */ +/* $NetBSD: userret.h,v 1.3 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -51,12 +51,12 @@ #include <sys/userret.h> -static __inline void userret __P((struct lwp *, int, u_quad_t)); +static inline void userret __P((struct lwp *, int, u_quad_t)); /* * Define the code needed before returning to user mode, for * trap, mem_access_fault, and syscall. */ -static __inline void +static inline void userret(struct lwp *l, int pc, u_quad_t oticks) { struct proc *p = l->l_proc; @@ -80,7 +80,7 @@ userret(struct lwp *l, int pc, u_quad_t oticks) curcpu()->ci_schedstate.spc_curpriority = l->l_priority = l->l_usrpri; } -static __inline void share_fpu __P((struct lwp *, struct trapframe64 *)); +static inline void share_fpu __P((struct lwp *, struct trapframe64 *)); /* * If someone stole the FPU while we were away, do not enable it * on return. This is not done in userret() above as it must follow @@ -89,7 +89,7 @@ static __inline void share_fpu __P((struct lwp *, struct trapframe64 *)); * * Oh, and don't touch the FPU bit if we're returning to the kernel. */ -static __inline void +static inline void share_fpu(struct lwp *l, struct trapframe64 *tf) { if (!(tf->tf_tstate & (PSTATE_PRIV << TSTATE_PSTATE_SHIFT)) && diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 311396f62cd..8dacc0ef2e9 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.105 2005/12/11 12:19:14 christos Exp $ */ +/* $NetBSD: autoconf.c,v 1.106 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.105 2005/12/11 12:19:14 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.106 2005/12/24 20:07:37 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -781,7 +781,7 @@ romgetcursoraddr(rowp, colp) void callrom() { - __asm __volatile("wrpr %%g0, 0, %%tl" : ); + __asm volatile("wrpr %%g0, 0, %%tl" : ); OF_enter(); } #endif diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c index 33fa0178f5c..6b31a811d03 100644 --- a/sys/arch/sparc64/sparc64/clock.c +++ b/sys/arch/sparc64/sparc64/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.75 2005/12/11 12:19:14 christos Exp $ */ +/* $NetBSD: clock.c,v 1.76 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1992, 1993 @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.75 2005/12/11 12:19:14 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.76 2005/12/24 20:07:37 perry Exp $"); #include "opt_multiprocessor.h" @@ -585,11 +585,11 @@ cpu_initclocks() /* Initialize the %tick register */ #ifdef __arch64__ - __asm __volatile("wrpr %0, 0, %%tick" : : "r" (start_time)); + __asm volatile("wrpr %0, 0, %%tick" : : "r" (start_time)); #else { int start_hi = (start_time>>32), start_lo = start_time; - __asm __volatile("sllx %1,32,%0; or %0,%2,%0; wrpr %0, 0, %%tick" + __asm volatile("sllx %1,32,%0; or %0,%2,%0; wrpr %0, 0, %%tick" : "=&r" (start_hi) /* scratch register */ : "r" ((int)(start_hi)), "r" ((int)(start_lo))); } diff --git a/sys/arch/sparc64/sparc64/cpu.c b/sys/arch/sparc64/sparc64/cpu.c index 73145182087..a7b61bd4e77 100644 --- a/sys/arch/sparc64/sparc64/cpu.c +++ b/sys/arch/sparc64/sparc64/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.42 2005/12/11 12:19:14 christos Exp $ */ +/* $NetBSD: cpu.c,v 1.43 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1996 @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.42 2005/12/11 12:19:14 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.43 2005/12/24 20:07:37 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -78,7 +78,7 @@ struct cacheinfo cacheinfo; int sparc_ncpus = 0; struct cpu_info *cpus = NULL; -__volatile cpuset_t cpus_active;/* set of active cpus */ +volatile cpuset_t cpus_active;/* set of active cpus */ struct cpu_bootargs *cpu_args; /* allocated very early in pmap_bootstrap. */ static struct cpu_info *alloc_cpuinfo(u_int); diff --git a/sys/arch/sparc64/sparc64/emul.c b/sys/arch/sparc64/sparc64/emul.c index c92227e88dc..bffeadd190c 100644 --- a/sys/arch/sparc64/sparc64/emul.c +++ b/sys/arch/sparc64/sparc64/emul.c @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.14 2005/12/11 12:19:14 christos Exp $ */ +/* $NetBSD: emul.c,v 1.15 2005/12/24 20:07:37 perry Exp $ */ /*- * Copyright (c) 1997, 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.14 2005/12/11 12:19:14 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.15 2005/12/24 20:07:37 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -59,18 +59,18 @@ __KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.14 2005/12/11 12:19:14 christos Exp $"); #define IPR(tf, i) ((int32_t *)(u_long)tf->tf_out[6])[i - 16] #define FPR(l, i) ((int32_t) l->l_md.md_fpstate->fs_regs[i]) -static __inline int readgpreg __P((struct trapframe64 *, int, void *)); -static __inline int readfpreg __P((struct lwp *, int, void *)); -static __inline int writegpreg __P((struct trapframe64 *, int, const void *)); -static __inline int writefpreg __P((struct lwp *, int, const void *)); -static __inline int decodeaddr __P((struct trapframe64 *, union instr *, void *)); +static inline int readgpreg __P((struct trapframe64 *, int, void *)); +static inline int readfpreg __P((struct lwp *, int, void *)); +static inline int writegpreg __P((struct trapframe64 *, int, const void *)); +static inline int writefpreg __P((struct lwp *, int, const void *)); +static inline int decodeaddr __P((struct trapframe64 *, union instr *, void *)); static int muldiv __P((struct trapframe64 *, union instr *, int32_t *, int32_t *, int32_t *)); #define REGNAME(i) "goli"[i >> 3], i & 7 -static __inline int +static inline int readgpreg(tf, i, val) struct trapframe64 *tf; int i; @@ -88,7 +88,7 @@ readgpreg(tf, i, val) } -static __inline int +static inline int writegpreg(tf, i, val) struct trapframe64 *tf; int i; @@ -108,7 +108,7 @@ writegpreg(tf, i, val) } -static __inline int +static inline int readfpreg(l, i, val) struct lwp *l; int i; @@ -119,7 +119,7 @@ readfpreg(l, i, val) } -static __inline int +static inline int writefpreg(l, i, val) struct lwp *l; int i; @@ -129,7 +129,7 @@ writefpreg(l, i, val) return 0; } -static __inline int +static inline int decodeaddr(tf, code, val) struct trapframe64 *tf; union instr *code; diff --git a/sys/arch/sparc64/sparc64/in4_cksum.c b/sys/arch/sparc64/sparc64/in4_cksum.c index 7343fd0b369..135fe1bdce5 100644 --- a/sys/arch/sparc64/sparc64/in4_cksum.c +++ b/sys/arch/sparc64/sparc64/in4_cksum.c @@ -1,4 +1,4 @@ -/* $NetBSD: in4_cksum.c,v 1.6 2005/12/11 12:19:14 christos Exp $ */ +/* $NetBSD: in4_cksum.c,v 1.7 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1995 Matthew R. Green. @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in4_cksum.c,v 1.6 2005/12/11 12:19:14 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in4_cksum.c,v 1.7 2005/12/24 20:07:37 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -118,7 +118,7 @@ in4_cksum(m, nxt, off, len) w = (u_char *)&ipov; /* assumes sizeof(ipov) == 20 */ #ifdef __arch64__ - __asm __volatile(" lduw [%5 + 0], %1; " + __asm volatile(" lduw [%5 + 0], %1; " " lduw [%5 + 4], %2; " " lduw [%5 + 8], %3; add %0, %1, %0; " " lduw [%5 + 12], %1; add %0, %2, %0; " @@ -136,7 +136,7 @@ in4_cksum(m, nxt, off, len) * upper 32-bits of the registers, we use addxcc which cannot * be grouped with any other instructions. */ - __asm __volatile(" lduw [%5 + 0], %1; " + __asm volatile(" lduw [%5 + 0], %1; " " lduw [%5 + 4], %2; " " lduw [%5 + 8], %3; addcc %0, %1, %0; " " lduw [%5 + 12], %1; " diff --git a/sys/arch/sparc64/sparc64/ipifuncs.c b/sys/arch/sparc64/sparc64/ipifuncs.c index c478f41077b..4e83532cf72 100644 --- a/sys/arch/sparc64/sparc64/ipifuncs.c +++ b/sys/arch/sparc64/sparc64/ipifuncs.c @@ -1,4 +1,4 @@ -/* $NetBSD: ipifuncs.c,v 1.2 2005/12/11 12:19:14 christos Exp $ */ +/* $NetBSD: ipifuncs.c,v 1.3 2005/12/24 20:07:37 perry Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.2 2005/12/11 12:19:14 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.3 2005/12/24 20:07:37 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -59,16 +59,16 @@ extern int db_active; typedef void (* ipifunc_t)(void *); /* CPU sets containing halted, paused and resumed cpus */ -static __volatile cpuset_t cpus_halted; -static __volatile cpuset_t cpus_paused; -static __volatile cpuset_t cpus_resumed; +static volatile cpuset_t cpus_halted; +static volatile cpuset_t cpus_paused; +static volatile cpuset_t cpus_resumed; -__volatile struct ipi_tlb_args ipi_tlb_args; +volatile struct ipi_tlb_args ipi_tlb_args; /* IPI handlers. */ static int sparc64_ipi_halt(void *); static int sparc64_ipi_pause(void *); -static int sparc64_ipi_wait(cpuset_t __volatile *, cpuset_t); +static int sparc64_ipi_wait(cpuset_t volatile *, cpuset_t); static void sparc64_ipi_error(const char *, cpuset_t, cpuset_t); void sparc64_ipi_flush_pte(void *); @@ -255,7 +255,7 @@ sparc64_send_ipi(upaid, ipimask) */ int sparc64_ipi_wait(cpus_watchset, cpus_mask) - cpuset_t __volatile *cpus_watchset; + cpuset_t volatile *cpus_watchset; cpuset_t cpus_mask; { int i; diff --git a/sys/arch/sparc64/sparc64/kgdb_machdep.c b/sys/arch/sparc64/sparc64/kgdb_machdep.c index ffafe2a685b..0500f230ceb 100644 --- a/sys/arch/sparc64/sparc64/kgdb_machdep.c +++ b/sys/arch/sparc64/sparc64/kgdb_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_machdep.c,v 1.5 2005/12/11 12:19:14 christos Exp $ */ +/* $NetBSD: kgdb_machdep.c,v 1.6 2005/12/24 20:07:37 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. * All rights reserved. @@ -128,7 +128,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.5 2005/12/11 12:19:14 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.6 2005/12/24 20:07:37 perry Exp $"); #include "opt_kgdb.h" #include "opt_multiprocessor.h" @@ -151,13 +151,13 @@ __KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.5 2005/12/11 12:19:14 christos Ex extern int64_t pseg_get __P((struct pmap *, vaddr_t)); -static __inline void kgdb_copy __P((char *, char *, int)); -static __inline void kgdb_zero __P((char *, int)); +static inline void kgdb_copy __P((char *, char *, int)); +static inline void kgdb_zero __P((char *, int)); /* * This little routine exists simply so that bcopy() can be debugged. */ -static __inline void +static inline void kgdb_copy(src, dst, len) register char *src, *dst; register int len; @@ -168,7 +168,7 @@ kgdb_copy(src, dst, len) } /* ditto for bzero */ -static __inline void +static inline void kgdb_zero(ptr, len) register char *ptr; register int len; diff --git a/sys/arch/sparc64/sparc64/netbsd32_machdep.c b/sys/arch/sparc64/sparc64/netbsd32_machdep.c index d4fbad57a9c..19a43207c8b 100644 --- a/sys/arch/sparc64/sparc64/netbsd32_machdep.c +++ b/sys/arch/sparc64/sparc64/netbsd32_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.55 2005/12/11 12:19:15 christos Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.56 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.55 2005/12/11 12:19:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.56 2005/12/24 20:07:37 perry Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -1043,23 +1043,23 @@ struct netbsd32_opiocdesc { #endif /* prototypes for the converters */ -static __inline void netbsd32_to_fbcmap(struct netbsd32_fbcmap *, +static inline void netbsd32_to_fbcmap(struct netbsd32_fbcmap *, struct fbcmap *, u_long); -static __inline void netbsd32_to_fbcursor(struct netbsd32_fbcursor *, +static inline void netbsd32_to_fbcursor(struct netbsd32_fbcursor *, struct fbcursor *, u_long); -static __inline void netbsd32_to_opiocdesc(struct netbsd32_opiocdesc *, +static inline void netbsd32_to_opiocdesc(struct netbsd32_opiocdesc *, struct opiocdesc *, u_long); -static __inline void netbsd32_from_fbcmap(struct fbcmap *, +static inline void netbsd32_from_fbcmap(struct fbcmap *, struct netbsd32_fbcmap *, u_long); -static __inline void netbsd32_from_fbcursor(struct fbcursor *, +static inline void netbsd32_from_fbcursor(struct fbcursor *, struct netbsd32_fbcursor *, u_long); -static __inline void netbsd32_from_opiocdesc(struct opiocdesc *, +static inline void netbsd32_from_opiocdesc(struct opiocdesc *, struct netbsd32_opiocdesc *, u_long); /* convert to/from different structures */ -static __inline void +static inline void netbsd32_to_fbcmap(s32p, p, cmd) struct netbsd32_fbcmap *s32p; struct fbcmap *p; @@ -1073,7 +1073,7 @@ netbsd32_to_fbcmap(s32p, p, cmd) p->blue = (u_char *)(u_long)s32p->blue; } -static __inline void +static inline void netbsd32_to_fbcursor(s32p, p, cmd) struct netbsd32_fbcursor *s32p; struct fbcursor *p; @@ -1090,7 +1090,7 @@ netbsd32_to_fbcursor(s32p, p, cmd) p->mask = (char *)(u_long)s32p->mask; } -static __inline void +static inline void netbsd32_to_opiocdesc(s32p, p, cmd) struct netbsd32_opiocdesc *s32p; struct opiocdesc *p; @@ -1104,7 +1104,7 @@ netbsd32_to_opiocdesc(s32p, p, cmd) p->op_buf = (char *)(u_long)s32p->op_buf; } -static __inline void +static inline void netbsd32_from_fbcmap(p, s32p, cmd) struct fbcmap *p; struct netbsd32_fbcmap *s32p; @@ -1121,7 +1121,7 @@ netbsd32_from_fbcmap(p, s32p, cmd) #endif } -static __inline void +static inline void netbsd32_from_fbcursor(p, s32p, cmd) struct fbcursor *p; struct netbsd32_fbcursor *s32p; @@ -1141,7 +1141,7 @@ netbsd32_from_fbcursor(p, s32p, cmd) #endif } -static __inline void +static inline void netbsd32_from_opiocdesc(p, s32p, cmd) struct opiocdesc *p; struct netbsd32_opiocdesc *s32p; diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index f0b4c93d129..c345fa5e802 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.165 2005/12/11 12:19:15 christos Exp $ */ +/* $NetBSD: pmap.c,v 1.166 2005/12/24 20:07:37 perry Exp $ */ /* * * Copyright (C) 1996-1999 Eduardo Horvath. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.165 2005/12/11 12:19:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.166 2005/12/24 20:07:37 perry Exp $"); #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ #define HWREF @@ -174,13 +174,13 @@ paddr_t avail_start, avail_end; /* These are used by ps & family */ static int ptelookup_va __P((vaddr_t va)); -static __inline void +static inline void clrx(void *addr) { - __asm __volatile("clrx [%0]" : : "r" (addr) : "memory"); + __asm volatile("clrx [%0]" : : "r" (addr) : "memory"); } -static __inline void +static inline void tsb_invalidate(int ctx, vaddr_t va) { int i; @@ -1989,12 +1989,12 @@ pmap_enter(pm, va, pa, prot, flags) } if (flags & (VM_PROT_READ | VM_PROT_WRITE)) { tsb_dmmu[i].tag = tte.tag; - __asm __volatile("" : : : "memory"); + __asm volatile("" : : : "memory"); tsb_dmmu[i].data = tte.data; } if (flags & VM_PROT_EXECUTE) { tsb_immu[i].tag = tte.tag; - __asm __volatile("" : : : "memory"); + __asm volatile("" : : : "memory"); tsb_immu[i].data = tte.data; } diff --git a/sys/arch/sparc64/sparc64/syscall.c b/sys/arch/sparc64/sparc64/syscall.c index 9a90f280d2a..5370ff63e65 100644 --- a/sys/arch/sparc64/sparc64/syscall.c +++ b/sys/arch/sparc64/sparc64/syscall.c @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.10 2005/12/11 12:19:15 christos Exp $ */ +/* $NetBSD: syscall.c,v 1.11 2005/12/24 20:07:37 perry Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.10 2005/12/11 12:19:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.11 2005/12/24 20:07:37 perry Exp $"); #define NEW_FPSTATE @@ -133,8 +133,8 @@ union args { register_t r[MAXARGS]; }; -static __inline int handle_old(struct trapframe64 *, register_t *); -static __inline int getargs(struct proc *, struct trapframe64 *, +static inline int handle_old(struct trapframe64 *, register_t *); +static inline int getargs(struct proc *, struct trapframe64 *, register_t *, const struct sysent **, union args *, int *); void syscall_plain(struct trapframe64 *, register_t, register_t); void syscall_fancy(struct trapframe64 *, register_t, register_t); @@ -142,7 +142,7 @@ void syscall_fancy(struct trapframe64 *, register_t, register_t); /* * Handle old style system calls. */ -static __inline int +static inline int handle_old(struct trapframe64 *tf, register_t *code) { int new = *code & (SYSCALL_G7RFLAG | SYSCALL_G2RFLAG); @@ -166,7 +166,7 @@ handle_old(struct trapframe64 *tf, register_t *code) * of ``easy'' arguments as appropriate; we will copy the hard * ones later as needed. */ -static __inline int +static inline int getargs(struct proc *p, struct trapframe64 *tf, register_t *code, const struct sysent **callp, union args *args, int *s64) { diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index a525847d8d2..fc01054fbeb 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.123 2005/12/11 12:19:15 christos Exp $ */ +/* $NetBSD: trap.c,v 1.124 2005/12/24 20:07:37 perry Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.123 2005/12/11 12:19:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.124 2005/12/24 20:07:37 perry Exp $"); #define NEW_FPSTATE @@ -109,7 +109,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.123 2005/12/11 12:19:15 christos Exp $"); /* What trap level are we running? */ #define tl() ({ \ int _l; \ - __asm __volatile("rdpr %%tl, %0" : "=r" (_l) :); \ + __asm volatile("rdpr %%tl, %0" : "=r" (_l) :); \ _l; \ }) #endif @@ -158,7 +158,7 @@ int rwindow_debug = RW_ERR; #define TDB_STOPCPIO 0x400 #define TDB_SYSTOP 0x800 int trapdebug = 0/*|TDB_SYSCALL|TDB_STOPSIG|TDB_STOPCPIO|TDB_ADDFLT|TDB_FOLLOW*/; -/* #define __inline */ +/* #define inline */ #endif #ifdef DDB diff --git a/sys/arch/sun2/include/pmap.h b/sys/arch/sun2/include/pmap.h index e5f02d5c329..c2a46a37c5b 100644 --- a/sys/arch/sun2/include/pmap.h +++ b/sys/arch/sun2/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.16 2005/12/11 12:19:16 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.17 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -93,7 +93,7 @@ extern vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int); /* Extract the PMEG for a given physical address. */ extern int _pmap_extract_pmeg(pmap_t, vaddr_t); -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/sun2/sun2/machdep.c b/sys/arch/sun2/sun2/machdep.c index 441490b5ca6..615949f8f09 100644 --- a/sys/arch/sun2/sun2/machdep.c +++ b/sys/arch/sun2/sun2/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.40 2005/12/11 12:19:16 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.41 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -160,7 +160,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2005/12/11 12:19:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2005/12/24 20:07:41 perry Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -259,7 +259,7 @@ vaddr_t vmmap; int safepri = PSL_LOWIPL; /* Soft copy of the enable register. */ -__volatile u_short enable_reg_soft = ENABLE_REG_SOFT_UNDEF; +volatile u_short enable_reg_soft = ENABLE_REG_SOFT_UNDEF; /* * Our no-fault fault handler. diff --git a/sys/arch/sun3/dev/fd.c b/sys/arch/sun3/dev/fd.c index 83ca3697631..2a38803ae71 100644 --- a/sys/arch/sun3/dev/fd.c +++ b/sys/arch/sun3/dev/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.45 2005/12/11 12:19:20 christos Exp $ */ +/* $NetBSD: fd.c,v 1.46 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.45 2005/12/11 12:19:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.46 2005/12/24 20:07:41 perry Exp $"); #include "opt_ddb.h" @@ -190,7 +190,7 @@ CFATTACH_DECL(fdc, sizeof(struct fdc_softc), extern struct cfdriver fdc_cd; -__inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t); +inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t); /* * Floppies come in various flavors, e.g., 1.2MB vs 1.44MB; here is how @@ -604,7 +604,7 @@ fdattach(struct device *parent, struct device *self, void *aux) fd->sc_sdhook = shutdownhook_establish(fd_motor_off, fd); } -__inline struct fd_type * +inline struct fd_type * fd_dev_to_type(struct fd_softc *fd, dev_t dev) { int type = FDTYPE(dev); diff --git a/sys/arch/sun3/dev/if_le.c b/sys/arch/sun3/dev/if_le.c index f2a73899659..92c414b467a 100644 --- a/sys/arch/sun3/dev/if_le.c +++ b/sys/arch/sun3/dev/if_le.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le.c,v 1.48 2005/12/11 12:19:20 christos Exp $ */ +/* $NetBSD: if_le.c,v 1.49 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.48 2005/12/11 12:19:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.49 2005/12/24 20:07:41 perry Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -103,7 +103,7 @@ CFATTACH_DECL(le, sizeof(struct le_softc), #define integrate #define hide #else -#define integrate static __inline +#define integrate static inline #define hide static #endif diff --git a/sys/arch/sun3/include/intr.h b/sys/arch/sun3/include/intr.h index 87e04668720..54734513b6f 100644 --- a/sys/arch/sun3/include/intr.h +++ b/sys/arch/sun3/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.4 2005/12/11 12:19:21 christos Exp $ */ +/* $NetBSD: intr.h,v 1.5 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -65,15 +65,15 @@ * (See the GCC extensions info document.) */ -static __inline int _getsr(void); +static inline int _getsr(void); /* Get current sr value. */ -static __inline int +static inline int _getsr(void) { int rv; - __asm __volatile ("clrl %0; movew %%sr,%0" : "=&d" (rv)); + __asm volatile ("clrl %0; movew %%sr,%0" : "=&d" (rv)); return (rv); } diff --git a/sys/arch/sun3/include/pmap3.h b/sys/arch/sun3/include/pmap3.h index 9f2adb32522..e1a7289c96d 100644 --- a/sys/arch/sun3/include/pmap3.h +++ b/sys/arch/sun3/include/pmap3.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap3.h,v 1.39 2005/12/11 12:19:21 christos Exp $ */ +/* $NetBSD: pmap3.h,v 1.40 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -81,7 +81,7 @@ extern segsz_t pmap_wired_pages(pmap_t); /* Map a given physical region to a virtual region */ extern vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int); -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/sun3/include/pmap3x.h b/sys/arch/sun3/include/pmap3x.h index 7d401c036b8..b58003a337c 100644 --- a/sys/arch/sun3/include/pmap3x.h +++ b/sys/arch/sun3/include/pmap3x.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap3x.h,v 1.20 2005/12/11 12:19:21 christos Exp $ */ +/* $NetBSD: pmap3x.h,v 1.21 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ segsz_t pmap_count(pmap_t, int); /* Map a given physical region to a virtual region */ vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int); -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/sun3/sun3/cache.c b/sys/arch/sun3/sun3/cache.c index 069d4531fe7..6da48cbbcc6 100644 --- a/sys/arch/sun3/sun3/cache.c +++ b/sys/arch/sun3/sun3/cache.c @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.18 2005/12/11 12:19:27 christos Exp $ */ +/* $NetBSD: cache.c,v 1.19 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.18 2005/12/11 12:19:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.19 2005/12/24 20:07:41 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -80,9 +80,9 @@ cache_flush_page(vaddr_t pgva) pgva |= VAC_FLUSH_BASE; /* Set up for writes to control space. */ - __asm __volatile ("movc %%dfc, %0" : "=d" (old_dfc)); + __asm volatile ("movc %%dfc, %0" : "=d" (old_dfc)); ctl_dfc = FC_CONTROL; - __asm __volatile ("movc %0, %%dfc" : : "d" (ctl_dfc)); + __asm volatile ("movc %0, %%dfc" : : "d" (ctl_dfc)); /* Write to control space for each cache line. */ va = (char *) pgva; @@ -90,12 +90,12 @@ cache_flush_page(vaddr_t pgva) data = VAC_FLUSH_PAGE; do { - __asm __volatile ("movsl %0, %1@" : : "d" (data), "a" (va)); + __asm volatile ("movsl %0, %1@" : : "d" (data), "a" (va)); va += VAC_FLUSH_INCR; } while (va < endva); /* Restore destination function code. */ - __asm __volatile ("movc %0, %%dfc" : : "d" (old_dfc)); + __asm volatile ("movc %0, %%dfc" : : "d" (old_dfc)); } void @@ -109,9 +109,9 @@ cache_flush_segment(vaddr_t sgva) sgva |= VAC_FLUSH_BASE; /* Set up for writes to control space. */ - __asm __volatile ("movc %%dfc, %0" : "=d" (old_dfc)); + __asm volatile ("movc %%dfc, %0" : "=d" (old_dfc)); ctl_dfc = FC_CONTROL; - __asm __volatile ("movc %0, %%dfc" : : "d" (ctl_dfc)); + __asm volatile ("movc %0, %%dfc" : : "d" (ctl_dfc)); /* Write to control space for each cache line. */ va = (char *) sgva; @@ -119,12 +119,12 @@ cache_flush_segment(vaddr_t sgva) data = VAC_FLUSH_SEGMENT; do { - __asm __volatile ("movsl %0, %1@" : : "d" (data), "a" (va)); + __asm volatile ("movsl %0, %1@" : : "d" (data), "a" (va)); va += VAC_FLUSH_INCR; } while (va < endva); /* Restore destination function code. */ - __asm __volatile ("movc %0, %%dfc" : : "d" (old_dfc)); + __asm volatile ("movc %0, %%dfc" : : "d" (old_dfc)); } void @@ -135,9 +135,9 @@ cache_flush_context(void) int data; /* Set up for writes to control space. */ - __asm __volatile ("movc %%dfc, %0" : "=d" (old_dfc)); + __asm volatile ("movc %%dfc, %0" : "=d" (old_dfc)); ctl_dfc = FC_CONTROL; - __asm __volatile ("movc %0, %%dfc" : : "d" (ctl_dfc)); + __asm volatile ("movc %0, %%dfc" : : "d" (ctl_dfc)); /* Write to control space for each cache line. */ va = (char *) VAC_FLUSH_BASE; @@ -145,12 +145,12 @@ cache_flush_context(void) data = VAC_FLUSH_CONTEXT; do { - __asm __volatile ("movsl %0, %1@" : : "d" (data), "a" (va)); + __asm volatile ("movsl %0, %1@" : : "d" (data), "a" (va)); va += VAC_FLUSH_INCR; } while (va < endva); /* Restore destination function code. */ - __asm __volatile ("movc %0, %%dfc" : : "d" (old_dfc)); + __asm volatile ("movc %0, %%dfc" : : "d" (old_dfc)); } static void @@ -161,9 +161,9 @@ cache_clear_tags(void) int data; /* Set up for writes to control space. */ - __asm __volatile ("movc %%dfc, %0" : "=d" (old_dfc)); + __asm volatile ("movc %%dfc, %0" : "=d" (old_dfc)); ctl_dfc = FC_CONTROL; - __asm __volatile ("movc %0, %%dfc" : : "d" (ctl_dfc)); + __asm volatile ("movc %0, %%dfc" : : "d" (ctl_dfc)); /* Write to control space for each cache line. */ va = (char *) VAC_CACHE_TAGS; @@ -171,12 +171,12 @@ cache_clear_tags(void) data = 0; /* invalid tags */ do { - __asm __volatile ("movsl %0, %1@" : : "d" (data), "a" (va)); + __asm volatile ("movsl %0, %1@" : : "d" (data), "a" (va)); va += CACHE_LINE; } while (va < endva); /* Restore destination function code. */ - __asm __volatile ("movc %0, %%dfc" : : "d" (old_dfc)); + __asm volatile ("movc %0, %%dfc" : : "d" (old_dfc)); } void diff --git a/sys/arch/sun68k/include/intr.h b/sys/arch/sun68k/include/intr.h index a6b7986e63b..5a594bafd04 100644 --- a/sys/arch/sun68k/include/intr.h +++ b/sys/arch/sun68k/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.4 2005/12/11 12:19:29 christos Exp $ */ +/* $NetBSD: intr.h,v 1.5 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 2001 Matt Fredette. @@ -74,7 +74,7 @@ extern void softintr_init(void); extern void *softintr_establish(int, void (*)(void *), void *); extern void softintr_disestablish(void *); -static __inline void +static inline void softintr_schedule(void *arg) { struct softintr_handler * const sh = arg; @@ -99,15 +99,15 @@ extern void isr_add_custom(int, void *); * (See the GCC extensions info document.) */ -static __inline int _getsr(void); +static inline int _getsr(void); /* Get current sr value. */ -static __inline int +static inline int _getsr(void) { int rv; - __asm __volatile ("clrl %0; movew %%sr,%0" : "=&d" (rv)); + __asm volatile ("clrl %0; movew %%sr,%0" : "=&d" (rv)); return (rv); } diff --git a/sys/arch/sun68k/stand/libsa/SRT1.c b/sys/arch/sun68k/stand/libsa/SRT1.c index 9d05334a5b0..dc86a6fb927 100644 --- a/sys/arch/sun68k/stand/libsa/SRT1.c +++ b/sys/arch/sun68k/stand/libsa/SRT1.c @@ -1,4 +1,4 @@ -/* $NetBSD: SRT1.c,v 1.4 2005/12/11 12:19:29 christos Exp $ */ +/* $NetBSD: SRT1.c,v 1.5 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -109,7 +109,7 @@ _start(void) void breakpoint(void) { - __asm __volatile ("trap #14"); + __asm volatile ("trap #14"); } void diff --git a/sys/arch/sun68k/stand/libsa/sun3x.c b/sys/arch/sun68k/stand/libsa/sun3x.c index e194e80c249..a9ddd124367 100644 --- a/sys/arch/sun68k/stand/libsa/sun3x.c +++ b/sys/arch/sun68k/stand/libsa/sun3x.c @@ -1,4 +1,4 @@ -/* $NetBSD: sun3x.c,v 1.8 2005/12/11 12:19:29 christos Exp $ */ +/* $NetBSD: sun3x.c,v 1.9 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -290,7 +290,7 @@ void mmu_atc_flush(vaddr_t va) { - __asm __volatile ("pflush #0,#0,%0@" : : "a" (va)); + __asm volatile ("pflush #0,#0,%0@" : : "a" (va)); } void diff --git a/sys/arch/vax/boot/boot/boot.c b/sys/arch/vax/boot/boot/boot.c index 8302fade263..ac5031d3cd9 100644 --- a/sys/arch/vax/boot/boot/boot.c +++ b/sys/arch/vax/boot/boot/boot.c @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.24 2005/12/11 12:19:30 christos Exp $ */ +/* $NetBSD: boot.c,v 1.25 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. @@ -258,7 +258,7 @@ load: #define extzv(one, two, three,four) \ ({ \ - asm __volatile ("extzv %0,%3,%1,%2" \ + asm volatile ("extzv %0,%3,%1,%2" \ : \ : "g"(one),"m"(two),"mo>"(three),"g"(four)); \ }) diff --git a/sys/arch/vax/include/bus.h b/sys/arch/vax/include/bus.h index a0e7bd08f26..9e48a83a247 100644 --- a/sys/arch/vax/include/bus.h +++ b/sys/arch/vax/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.24 2005/12/11 12:19:34 christos Exp $ */ +/* $NetBSD: bus.h,v 1.25 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -231,11 +231,11 @@ struct vax_bus_space { * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle/offset and copy into buffer provided. */ -static __inline void vax_mem_read_multi_1 __P((bus_space_tag_t, +static inline void vax_mem_read_multi_1 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, size_t)); -static __inline void vax_mem_read_multi_2 __P((bus_space_tag_t, +static inline void vax_mem_read_multi_2 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, size_t)); -static __inline void vax_mem_read_multi_4 __P((bus_space_tag_t, +static inline void vax_mem_read_multi_4 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, size_t)); #define bus_space_read_multi_1(t, h, o, a, c) \ @@ -259,7 +259,7 @@ do { \ #define bus_space_read_multi_8 !!! bus_space_read_multi_8 unimplemented !!! #endif -static __inline void +static inline void vax_mem_read_multi_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -273,7 +273,7 @@ vax_mem_read_multi_1(t, h, o, a, c) *a = *(volatile u_int8_t *)(addr); } -static __inline void +static inline void vax_mem_read_multi_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -287,7 +287,7 @@ vax_mem_read_multi_2(t, h, o, a, c) *a = *(volatile u_int16_t *)(addr); } -static __inline void +static inline void vax_mem_read_multi_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -311,11 +311,11 @@ vax_mem_read_multi_4(t, h, o, a, c) * buffer provided. */ -static __inline void vax_mem_read_region_1 __P((bus_space_tag_t, +static inline void vax_mem_read_region_1 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t *, size_t)); -static __inline void vax_mem_read_region_2 __P((bus_space_tag_t, +static inline void vax_mem_read_region_2 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t *, size_t)); -static __inline void vax_mem_read_region_4 __P((bus_space_tag_t, +static inline void vax_mem_read_region_4 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t *, size_t)); #define bus_space_read_region_1(t, h, o, a, c) \ @@ -342,7 +342,7 @@ do { \ !!! bus_space_read_region_8 unimplemented !!! #endif -static __inline void +static inline void vax_mem_read_region_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -356,7 +356,7 @@ vax_mem_read_region_1(t, h, o, a, c) *a = *(volatile u_int8_t *)(addr); } -static __inline void +static inline void vax_mem_read_region_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -370,7 +370,7 @@ vax_mem_read_region_2(t, h, o, a, c) *a = *(volatile u_int16_t *)(addr); } -static __inline void +static inline void vax_mem_read_region_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -422,11 +422,11 @@ do { \ * Write `count' 1, 2, 4, or 8 byte quantities from the buffer * provided to bus space described by tag/handle/offset. */ -static __inline void vax_mem_write_multi_1 __P((bus_space_tag_t, +static inline void vax_mem_write_multi_1 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int8_t *, size_t)); -static __inline void vax_mem_write_multi_2 __P((bus_space_tag_t, +static inline void vax_mem_write_multi_2 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int16_t *, size_t)); -static __inline void vax_mem_write_multi_4 __P((bus_space_tag_t, +static inline void vax_mem_write_multi_4 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int32_t *, size_t)); #define bus_space_write_multi_1(t, h, o, a, c) \ @@ -453,7 +453,7 @@ do { \ !!! bus_space_write_multi_8 unimplemented !!! #endif -static __inline void +static inline void vax_mem_write_multi_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -467,7 +467,7 @@ vax_mem_write_multi_1(t, h, o, a, c) *(volatile u_int8_t *)(addr) = *a; } -static __inline void +static inline void vax_mem_write_multi_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -481,7 +481,7 @@ vax_mem_write_multi_2(t, h, o, a, c) *(volatile u_int16_t *)(addr) = *a; } -static __inline void +static inline void vax_mem_write_multi_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -503,11 +503,11 @@ vax_mem_write_multi_4(t, h, o, a, c) * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided * to bus space described by tag/handle starting at `offset'. */ -static __inline void vax_mem_write_region_1 __P((bus_space_tag_t, +static inline void vax_mem_write_region_1 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int8_t *, size_t)); -static __inline void vax_mem_write_region_2 __P((bus_space_tag_t, +static inline void vax_mem_write_region_2 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int16_t *, size_t)); -static __inline void vax_mem_write_region_4 __P((bus_space_tag_t, +static inline void vax_mem_write_region_4 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, const u_int32_t *, size_t)); #define bus_space_write_region_1(t, h, o, a, c) \ @@ -532,7 +532,7 @@ do { \ !!! bus_space_write_region_8 unimplemented !!! #endif -static __inline void +static inline void vax_mem_write_region_1(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -546,7 +546,7 @@ vax_mem_write_region_1(t, h, o, a, c) *(volatile u_int8_t *)(addr) = *a; } -static __inline void +static inline void vax_mem_write_region_2(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -560,7 +560,7 @@ vax_mem_write_region_2(t, h, o, a, c) *(volatile u_int16_t *)(addr) = *a; } -static __inline void +static inline void vax_mem_write_region_4(t, h, o, a, c) bus_space_tag_t t; bus_space_handle_t h; @@ -583,11 +583,11 @@ vax_mem_write_region_4(t, h, o, a, c) * by tag/handle/offset `count' times. */ -static __inline void vax_mem_set_multi_1 __P((bus_space_tag_t, +static inline void vax_mem_set_multi_1 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, size_t)); -static __inline void vax_mem_set_multi_2 __P((bus_space_tag_t, +static inline void vax_mem_set_multi_2 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, size_t)); -static __inline void vax_mem_set_multi_4 __P((bus_space_tag_t, +static inline void vax_mem_set_multi_4 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, size_t)); #define bus_space_set_multi_1(t, h, o, v, c) \ @@ -605,7 +605,7 @@ do { \ vax_mem_set_multi_4((t), (h), (o), (v), (c)); \ } while (0) -static __inline void +static inline void vax_mem_set_multi_1(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -619,7 +619,7 @@ vax_mem_set_multi_1(t, h, o, v, c) *(volatile u_int8_t *)(addr) = v; } -static __inline void +static inline void vax_mem_set_multi_2(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -633,7 +633,7 @@ vax_mem_set_multi_2(t, h, o, v, c) *(volatile u_int16_t *)(addr) = v; } -static __inline void +static inline void vax_mem_set_multi_4(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -660,11 +660,11 @@ vax_mem_set_multi_4(t, h, o, v, c) * by tag/handle starting at `offset'. */ -static __inline void vax_mem_set_region_1 __P((bus_space_tag_t, +static inline void vax_mem_set_region_1 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, size_t)); -static __inline void vax_mem_set_region_2 __P((bus_space_tag_t, +static inline void vax_mem_set_region_2 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, size_t)); -static __inline void vax_mem_set_region_4 __P((bus_space_tag_t, +static inline void vax_mem_set_region_4 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, size_t)); #define bus_space_set_region_1(t, h, o, v, c) \ @@ -682,7 +682,7 @@ do { \ vax_mem_set_region_4((t), (h), (o), (v), (c)); \ } while (0) -static __inline void +static inline void vax_mem_set_region_1(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -696,7 +696,7 @@ vax_mem_set_region_1(t, h, o, v, c) *(volatile u_int8_t *)(addr) = v; } -static __inline void +static inline void vax_mem_set_region_2(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -710,7 +710,7 @@ vax_mem_set_region_2(t, h, o, v, c) *(volatile u_int16_t *)(addr) = v; } -static __inline void +static inline void vax_mem_set_region_4(t, h, o, v, c) bus_space_tag_t t; bus_space_handle_t h; @@ -738,13 +738,13 @@ vax_mem_set_region_4(t, h, o, v, c) * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. */ -static __inline void vax_mem_copy_region_1 __P((bus_space_tag_t, +static inline void vax_mem_copy_region_1 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, size_t)); -static __inline void vax_mem_copy_region_2 __P((bus_space_tag_t, +static inline void vax_mem_copy_region_2 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, size_t)); -static __inline void vax_mem_copy_region_4 __P((bus_space_tag_t, +static inline void vax_mem_copy_region_4 __P((bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, size_t)); @@ -765,7 +765,7 @@ do { \ vax_mem_copy_region_4((t), (h1), (o1), (h2), (o2), (c)); \ } while (0) -static __inline void +static inline void vax_mem_copy_region_1(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1; @@ -791,7 +791,7 @@ vax_mem_copy_region_1(t, h1, o1, h2, o2, c) } } -static __inline void +static inline void vax_mem_copy_region_2(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1; @@ -817,7 +817,7 @@ vax_mem_copy_region_2(t, h1, o1, h2, o2, c) } } -static __inline void +static inline void vax_mem_copy_region_4(t, h1, o1, h2, o2, c) bus_space_tag_t t; bus_space_handle_t h1; diff --git a/sys/arch/vax/include/byte_swap.h b/sys/arch/vax/include/byte_swap.h index c04b6e41ef5..69cb1bb880c 100644 --- a/sys/arch/vax/include/byte_swap.h +++ b/sys/arch/vax/include/byte_swap.h @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap.h,v 1.7 2005/12/11 12:19:34 christos Exp $ */ +/* $NetBSD: byte_swap.h,v 1.8 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1987, 1991 Regents of the University of California. @@ -36,12 +36,12 @@ #include <sys/types.h> -static __inline uint32_t __attribute__((__unused__)) +static inline uint32_t __attribute__((__unused__)) __byte_swap_long_variable(uint32_t x) { uint32_t y; - __asm __volatile( + __asm volatile( "rotl $-8, %1, %0 \n" "insv %0, $16, $8, %0 \n" "rotl $8, %1, %%r1 \n" @@ -53,7 +53,7 @@ __byte_swap_long_variable(uint32_t x) return (y); } -static __inline uint16_t __attribute__((__unused__)) +static inline uint16_t __attribute__((__unused__)) __byte_swap_word_variable(uint16_t x) { diff --git a/sys/arch/vax/include/int_mwgwtypes.h b/sys/arch/vax/include/int_mwgwtypes.h index 1a3ede70721..ab26c066721 100644 --- a/sys/arch/vax/include/int_mwgwtypes.h +++ b/sys/arch/vax/include/int_mwgwtypes.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.2 2001/04/26 16:25:27 kleink Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.3 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ /* 7.18.1.2 Minimum-width integer types */ -typedef __signed char int_least8_t; +typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; @@ -63,7 +63,7 @@ typedef unsigned long long int uint_least64_t; /* 7.18.1.3 Fastest minimum-width integer types */ -typedef __signed char int_fast8_t; +typedef signed char int_fast8_t; typedef unsigned char uint_fast8_t; typedef short int int_fast16_t; typedef unsigned short int uint_fast16_t; diff --git a/sys/arch/vax/include/int_types.h b/sys/arch/vax/include/int_types.h index e735d06ffef..af9afc8f9d6 100644 --- a/sys/arch/vax/include/int_types.h +++ b/sys/arch/vax/include/int_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.9 2005/12/11 12:19:34 christos Exp $ */ +/* $NetBSD: int_types.h,v 1.10 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ /* 7.18.1.1 Exact-width integer types */ -typedef __signed char __int8_t; +typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; diff --git a/sys/arch/vax/include/intr.h b/sys/arch/vax/include/intr.h index a301d022c7f..c760dc5bf96 100644 --- a/sys/arch/vax/include/intr.h +++ b/sys/arch/vax/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.18 2005/12/04 19:26:34 christos Exp $ */ +/* $NetBSD: intr.h,v 1.19 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1998 Matt Thomas. @@ -80,7 +80,7 @@ #define splx(reg) \ ({ \ register int __val; \ - __asm __volatile ("mfpr $0x12,%0;mtpr %1,$0x12" \ + __asm volatile ("mfpr $0x12,%0;mtpr %1,$0x12" \ : "=&g" (__val) \ : "g" (reg)); \ __val; \ @@ -88,7 +88,7 @@ #define _splset(reg) \ ((void)({ \ - __asm __volatile ("mtpr %0,$0x12" \ + __asm volatile ("mtpr %0,$0x12" \ : \ : "g" (reg)); \ })) @@ -96,7 +96,7 @@ #define splraiseipl(reg) \ ({ \ register int __val; \ - __asm __volatile ("mfpr $0x12,%0" \ + __asm volatile ("mfpr $0x12,%0" \ : "=&g" (__val) \ : ); \ if ((reg) > __val) { \ @@ -107,7 +107,7 @@ #define _setsirr(reg) \ do { \ - __asm __volatile ("mtpr %0,$0x14" \ + __asm volatile ("mtpr %0,$0x14" \ : \ : "g" (reg)); \ } while (0) @@ -152,7 +152,7 @@ struct softintr_handler { extern void *softintr_establish(int, void (*)(void *), void *); extern void softintr_disestablish(void *); -static __inline void +static inline void softintr_schedule(void *arg) { struct softintr_handler * const sh = arg; diff --git a/sys/arch/vax/include/lock.h b/sys/arch/vax/include/lock.h index 6cff8fd100b..4ad2bfe6ee8 100644 --- a/sys/arch/vax/include/lock.h +++ b/sys/arch/vax/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.18 2005/12/11 12:19:34 christos Exp $ */ +/* $NetBSD: lock.h,v 1.19 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. @@ -41,34 +41,34 @@ #include <machine/cpu.h> #endif -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *alp) { #ifdef _KERNEL - __asm__ __volatile ("movl %0,%%r1;jsb Sunlock" + __asm__ volatile ("movl %0,%%r1;jsb Sunlock" : /* No output */ : "g"(alp) : "r1","cc","memory"); #else - __asm__ __volatile ("bbcci $0,%0,1f;1:" + __asm__ volatile ("bbcci $0,%0,1f;1:" : /* No output */ : "m"(*alp) : "cc"); #endif } -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *alp) { int ret; #ifdef _KERNEL - __asm__ __volatile ("movl %1,%%r1;jsb Slocktry;movl %%r0,%0" + __asm__ volatile ("movl %1,%%r1;jsb Slocktry;movl %%r0,%0" : "=&r"(ret) : "g"(alp) : "r0","r1","cc","memory"); #else - __asm__ __volatile ("clrl %0;bbssi $0,%1,1f;incl %0;1:" + __asm__ volatile ("clrl %0;bbssi $0,%1,1f;incl %0;1:" : "=&r"(ret) : "m"(*alp) : "cc"); @@ -94,10 +94,10 @@ do { \ } \ } while (0) #else -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *alp) { - __asm__ __volatile ("1:bbssi $0,%0,1b" + __asm__ volatile ("1:bbssi $0,%0,1b" : /* No outputs */ : "m"(*alp) : "cc"); @@ -105,7 +105,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) #endif /* _KERNEL */ #if 0 -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *alp) { struct cpu_info *ci = curcpu(); @@ -121,29 +121,29 @@ __cpu_simple_lock(__cpu_simple_lock_t *alp) } #if 0 - __asm__ __volatile ("movl %0,%%r1;jsb Slock" + __asm__ volatile ("movl %0,%%r1;jsb Slock" : /* No output */ : "g"(alp) : "r0","r1","cc","memory"); #endif #if 0 - __asm__ __volatile ("1:;bbssi $0, %0, 1b" + __asm__ volatile ("1:;bbssi $0, %0, 1b" : /* No output */ : "m"(*alp)); #endif } #endif -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *alp) { #ifdef _KERNEL - __asm__ __volatile ("movl %0,%%r1;jsb Sunlock" + __asm__ volatile ("movl %0,%%r1;jsb Sunlock" : /* No output */ : "g"(alp) : "r1","cc","memory"); #else - __asm__ __volatile ("bbcci $0,%0,1f;1:" + __asm__ volatile ("bbcci $0,%0,1f;1:" : /* No output */ : "m"(*alp) : "cc"); diff --git a/sys/arch/vax/include/macros.h b/sys/arch/vax/include/macros.h index 270ddf60361..1c4b722246c 100644 --- a/sys/arch/vax/include/macros.h +++ b/sys/arch/vax/include/macros.h @@ -1,4 +1,4 @@ -/* $NetBSD: macros.h,v 1.33 2005/12/11 12:19:34 christos Exp $ */ +/* $NetBSD: macros.h,v 1.34 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1994, 1998, 2000 Ludd, University of Lule}, Sweden. @@ -45,7 +45,7 @@ ffs(int reg) { register int val; - __asm__ __volatile ("ffs $0,$32,%1,%0;" + __asm__ volatile ("ffs $0,$32,%1,%0;" "bneq 1f;" "mnegl $1,%0;" "1:;" @@ -58,7 +58,7 @@ ffs(int reg) static __inline__ void __attribute__((__unused__)) _remque(void *p) { - __asm__ __volatile ("remque (%0),%0;clrl 4(%0)" + __asm__ volatile ("remque (%0),%0;clrl 4(%0)" : : "r" (p) : "memory" ); @@ -67,7 +67,7 @@ _remque(void *p) static __inline__ void __attribute__((__unused__)) _insque(void *p, void *q) { - __asm__ __volatile ("insque (%0),(%1)" + __asm__ volatile ("insque (%0),(%1)" : : "r" (p),"r" (q) : "memory" ); @@ -79,7 +79,7 @@ memcpy(void *to, const void *from, size_t len) if (len > 65535) { __blkcpy(from, to, len); } else { - __asm__ __volatile ("movc3 %0,%1,%2" + __asm__ volatile ("movc3 %0,%1,%2" : : "g" (len), "m" (*(const char *)from), "m" (*(char *)to) :"r0","r1","r2","r3","r4","r5","memory","cc"); @@ -92,7 +92,7 @@ memmove(void *to, const void *from, size_t len) if (len > 65535) { __blkcpy(from, to, len); } else { - __asm__ __volatile ("movc3 %0,%1,%2" + __asm__ volatile ("movc3 %0,%1,%2" : : "g" (len), "m" (*(const char *)from), "m" (*(char *)to) :"r0","r1","r2","r3","r4","r5","memory","cc"); @@ -104,7 +104,7 @@ memmove(void *to, const void *from, size_t len) static __inline__ void __attribute__((__unused__)) bcopy(const void *from, void *to, size_t len) { - __asm__ __volatile ("movc3 %0,%1,%2" + __asm__ volatile ("movc3 %0,%1,%2" : : "g" (len), "m" (*(char *)from), "m" (*(char *)to) :"r0","r1","r2","r3","r4","r5","memory","cc"); @@ -117,7 +117,7 @@ memset(void *block, int c, size_t len) if (len > 65535) { __blkset(block, c, len); } else { - __asm__ __volatile ("movc5 $0,(%%sp),%2,%1,%0" + __asm__ volatile ("movc5 $0,(%%sp),%2,%1,%0" : : "m" (*(char *)block), "g" (len), "g" (c) :"r0","r1","r2","r3","r4","r5","memory","cc"); @@ -132,7 +132,7 @@ bzero(void *block, size_t len) if (len > 65535) __blkset(block, 0, len); else { - __asm__ __volatile ("movc5 $0,(%%sp),$0,%1,%0" + __asm__ volatile ("movc5 $0,(%%sp),$0,%1,%0" : : "m" (*(char *)block), "g" (len) :"r0","r1","r2","r3","r4","r5","memory","cc"); @@ -147,7 +147,7 @@ memcmp(const void *b1, const void *b2, size_t len) { register int ret; - __asm__ __volatile("cmpc3 %3,(%1),(%2);" + __asm__ volatile("cmpc3 %3,(%1),(%2);" "movl %%r0,%0" : "=r" (ret) : "r" (b1), "r" (b2), "r" (len) @@ -160,7 +160,7 @@ bcmp(const void *b1, const void *b2, size_t len) { register int ret; - __asm__ __volatile("cmpc3 %3,(%1),(%2);" + __asm__ volatile("cmpc3 %3,(%1),(%2);" "movl %%r0,%0" : "=r" (ret) : "r" (b1), "r" (b2), "r" (len) @@ -174,7 +174,7 @@ strlen(const char *cp) { register size_t ret; - __asm__ __volatile("locc $0,$65535,(%1);" + __asm__ volatile("locc $0,$65535,(%1);" "subl3 %%r0,$65535,%0" : "=r" (ret) : "r" (cp) @@ -185,7 +185,7 @@ strlen(const char *cp) static __inline__ char * __attribute__((__unused__)) strcat(char *cp, const char *c2) { - __asm__ __volatile("locc $0,$65535,(%1);" + __asm__ volatile("locc $0,$65535,(%1);" "subl3 %%r0,$65535,%%r2;" "incl %%r2;" "locc $0,$65535,(%0);" @@ -199,7 +199,7 @@ strcat(char *cp, const char *c2) static __inline__ char * __attribute__((__unused__)) strncat(char *cp, const char *c2, size_t count) { - __asm__ __volatile("locc $0,%2,(%1);" + __asm__ volatile("locc $0,%2,(%1);" "subl3 %%r0,%2,%%r2;" "locc $0,$65535,(%0);" "movc3 %%r2,(%1),(%%r1);" @@ -213,7 +213,7 @@ strncat(char *cp, const char *c2, size_t count) static __inline__ char * __attribute__((__unused__)) strcpy(char *cp, const char *c2) { - __asm__ __volatile("locc $0,$65535,(%1);" + __asm__ volatile("locc $0,$65535,(%1);" "subl3 %%r0,$65535,%%r2;" "movc3 %%r2,(%1),(%0);" "movb $0,(%%r3)" @@ -226,7 +226,7 @@ strcpy(char *cp, const char *c2) static __inline__ char * __attribute__((__unused__)) strncpy(char *cp, const char *c2, size_t len) { - __asm__ __volatile("movl %2,%%r2;" + __asm__ volatile("movl %2,%%r2;" "locc $0,%%r2,(%1);" "beql 1f;" "subl3 %%r0,%2,%%r2;" @@ -243,7 +243,7 @@ static __inline__ void * __attribute__((__unused__)) memchr(const void *cp, int c, size_t len) { void *ret; - __asm__ __volatile("locc %2,%3,(%1);" + __asm__ volatile("locc %2,%3,(%1);" "bneq 1f;" "clrl %%r1;" "1:;" @@ -258,7 +258,7 @@ static __inline__ int __attribute__((__unused__)) strcmp(const char *cp, const char *c2) { register int ret; - __asm__ __volatile("locc $0,$65535,(%1);" + __asm__ volatile("locc $0,$65535,(%1);" "subl3 %%r0,$65535,%%r0;" "incl %%r0;" "cmpc3 %%r0,(%1),(%2);" @@ -281,7 +281,7 @@ static __inline__ int __attribute__((__unused__)) locc(int mask, char *cp, size_t size){ register ret; - __asm__ __volatile("locc %1,%2,(%3);" + __asm__ volatile("locc %1,%2,(%3);" "movl %%r0,%0" : "=r" (ret) : "r" (mask),"r"(size),"r"(cp) @@ -295,7 +295,7 @@ scanc(u_int size, const u_char *cp, const u_char *table, int mask) { register int ret; - __asm__ __volatile("scanc %1,(%2),(%3),%4;" + __asm__ volatile("scanc %1,(%2),(%3),%4;" "movl %%r0,%0" : "=g"(ret) : "r"(size),"r"(cp),"r"(table),"r"(mask) @@ -308,7 +308,7 @@ skpc(int mask, size_t size, u_char *cp) { register int ret; - __asm__ __volatile("skpc %1,%2,(%3);" + __asm__ volatile("skpc %1,%2,(%3);" "movl %%r0,%0" : "=g"(ret) : "r"(mask),"r"(size),"r"(cp) @@ -325,7 +325,7 @@ bbssi(int bitnr, long *addr) { register int ret; - __asm__ __volatile("clrl %%r0;" + __asm__ volatile("clrl %%r0;" "bbssi %1,%2,1f;" "incl %%r0;" "1:;" @@ -341,7 +341,7 @@ bbcci(int bitnr, long *addr) { register int ret; - __asm__ __volatile("clrl %%r0;" + __asm__ volatile("clrl %%r0;" "bbcci %1,%2,1f;" "incl %%r0;" "1:;" @@ -353,19 +353,19 @@ bbcci(int bitnr, long *addr) } #define setrunqueue(p) \ - __asm__ __volatile("movl %0,%%r0;jsb Setrq" :: "g"(p):"r0","r1","r2") + __asm__ volatile("movl %0,%%r0;jsb Setrq" :: "g"(p):"r0","r1","r2") #define remrunqueue(p) \ - __asm__ __volatile("movl %0,%%r0;jsb Remrq" :: "g"(p):"r0","r1","r2") + __asm__ volatile("movl %0,%%r0;jsb Remrq" :: "g"(p):"r0","r1","r2") #define cpu_switch(p, newp) ({ \ register int ret; \ - __asm__ __volatile("movpsl -(%%sp);jsb Swtch; movl %%r0,%0" \ + __asm__ volatile("movpsl -(%%sp);jsb Swtch; movl %%r0,%0" \ : "=g"(ret) ::"r0","r1","r2","r3","r4","r5"); \ ret; }) #define cpu_switchto(p, newp) \ - __asm __volatile("movpsl -(%%sp); movl %0,%%r2; jsb Swtchto" \ + __asm volatile("movpsl -(%%sp); movl %0,%%r2; jsb Swtchto" \ :: "g" (newp) : "r0", "r1", "r2", "r3", "r4", "r5") /* @@ -381,7 +381,7 @@ static __inline__ int __attribute__((__unused__)) insqti(void *entry, void *header) { register int ret; - __asm__ __volatile( + __asm__ volatile( " mnegl $1,%0;" " insqti (%1),(%2);" " bcs 1f;" /* failed insert */ @@ -406,7 +406,7 @@ static __inline__ void * __attribute__((__unused__)) remqhi(void *header) { register void *ret; - __asm__ __volatile( + __asm__ volatile( " remqhi (%1),%0;" " bcs 1f;" /* failed interlock */ " bvs 2f;" /* nothing was removed */ diff --git a/sys/arch/vax/include/mtpr.h b/sys/arch/vax/include/mtpr.h index 22889b0cf62..b57d63b7066 100644 --- a/sys/arch/vax/include/mtpr.h +++ b/sys/arch/vax/include/mtpr.h @@ -1,4 +1,4 @@ -/* $NetBSD: mtpr.h,v 1.17 2005/12/11 12:19:34 christos Exp $ */ +/* $NetBSD: mtpr.h,v 1.18 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -168,7 +168,7 @@ #define mtpr(val,reg) \ { \ - __asm__ __volatile ("mtpr %0,%1" \ + __asm__ volatile ("mtpr %0,%1" \ : /* No output */ \ : "g" ((long)(val)), "g" (reg)); \ } @@ -176,7 +176,7 @@ #define mfpr(reg) \ ({ \ register int __val; \ - __asm__ __volatile ("mfpr %1,%0" \ + __asm__ volatile ("mfpr %1,%0" \ : "=g" (__val) \ : "g" (reg)); \ __val; \ diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index 8f453a886f8..c5dc343be7a 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.61 2005/12/11 12:19:34 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.62 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1991 Regents of the University of California. @@ -161,7 +161,7 @@ extern struct pmap kernel_pmap_store; /* * This is the by far most used pmap routine. Make it inline. */ -__inline static boolean_t +inline static boolean_t pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap) { paddr_t pa = 0; @@ -200,7 +200,7 @@ boolean_t pmap_is_modified_long(struct pv_entry *); void pmap_page_protect_long(struct pv_entry *, vm_prot_t); void pmap_protect_long(pmap_t, vaddr_t, vaddr_t, vm_prot_t); -__inline static boolean_t +inline static boolean_t pmap_clear_reference(struct vm_page *pg) { struct pv_entry *pv = pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); @@ -212,7 +212,7 @@ pmap_clear_reference(struct vm_page *pg) return rv; } -__inline static boolean_t +inline static boolean_t pmap_clear_modify(struct vm_page *pg) { struct pv_entry *pv = pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); @@ -224,7 +224,7 @@ pmap_clear_modify(struct vm_page *pg) return rv; } -__inline static boolean_t +inline static boolean_t pmap_is_modified(struct vm_page *pg) { struct pv_entry *pv = pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); @@ -234,7 +234,7 @@ pmap_is_modified(struct vm_page *pg) return pmap_is_modified_long(pv); } -__inline static void +inline static void pmap_page_protect(struct vm_page *pg, vm_prot_t prot) { struct pv_entry *pv = pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); @@ -243,7 +243,7 @@ pmap_page_protect(struct vm_page *pg, vm_prot_t prot) pmap_page_protect_long(pv, prot); } -__inline static void +inline static void pmap_protect(pmap_t pmap, vaddr_t start, vaddr_t end, vm_prot_t prot) { if (pmap->pm_p0lr != 0 || pmap->pm_p1lr != 0x200000 || @@ -251,7 +251,7 @@ pmap_protect(pmap_t pmap, vaddr_t start, vaddr_t end, vm_prot_t prot) pmap_protect_long(pmap, start, end, prot); } -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ diff --git a/sys/arch/vax/include/types.h b/sys/arch/vax/include/types.h index d2a2b75477e..7311f98fabc 100644 --- a/sys/arch/vax/include/types.h +++ b/sys/arch/vax/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.29 2005/12/11 12:19:34 christos Exp $ */ +/* $NetBSD: types.h,v 1.30 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -54,7 +54,7 @@ typedef unsigned long vsize_t; typedef int register_t; -typedef __volatile int __cpu_simple_lock_t; +typedef volatile int __cpu_simple_lock_t; #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 diff --git a/sys/arch/vax/vax/in4_cksum.c b/sys/arch/vax/vax/in4_cksum.c index 8e080719650..3969f2a208a 100644 --- a/sys/arch/vax/vax/in4_cksum.c +++ b/sys/arch/vax/vax/in4_cksum.c @@ -1,4 +1,4 @@ -/* $NetBSD: in4_cksum.c,v 1.9 2005/12/11 12:19:36 christos Exp $ */ +/* $NetBSD: in4_cksum.c,v 1.10 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (C) 1999 WIDE Project. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in4_cksum.c,v 1.9 2005/12/11 12:19:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in4_cksum.c,v 1.10 2005/12/24 20:07:41 perry Exp $"); #include <sys/param.h> #include <sys/mbuf.h> @@ -98,7 +98,7 @@ int in4_cksum_md_debug(struct mbuf *m, u_int8_t nxt, int off, int len); #define ADVANCE(n) {w += n; mlen -= n;} #define SWAP {sum <<= 8;} /* depends on recent REDUCE */ -#define Asm __asm __volatile +#define Asm __asm volatile #define ADDL Asm("addl2 (%2)+,%0" : "=r" (sum) : "0" (sum), "r" (w)) #define ADWC Asm("adwc (%2)+,%0" : "=r" (sum) : "0" (sum), "r" (w)) #define ADDC Asm("adwc $0,%0" : "=r" (sum) : "0" (sum)) @@ -125,7 +125,7 @@ in4_cksum(struct mbuf *m, u_int8_t nxt, int off, int len) panic("in4_cksum: bad mbuf chain"); #endif - __asm __volatile( + __asm volatile( "movzwl 16(%%ap),%0;" /* mov len to sum */ "addb2 8(%%ap),%0;" /* add proto to sum */ "rotl $8,%0,%0;" /* htons, carry is preserved */ diff --git a/sys/arch/vax/vax/in_cksum.c b/sys/arch/vax/vax/in_cksum.c index d51d170cb6c..ae461d1f7c3 100644 --- a/sys/arch/vax/vax/in_cksum.c +++ b/sys/arch/vax/vax/in_cksum.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_cksum.c,v 1.8 2005/12/11 12:19:36 christos Exp $ */ +/* $NetBSD: in_cksum.c,v 1.9 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1988, 1992, 1993 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.8 2005/12/11 12:19:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.9 2005/12/24 20:07:41 perry Exp $"); #include <sys/param.h> #include <sys/mbuf.h> @@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.8 2005/12/11 12:19:36 christos Exp $" #define ADVANCE(n) {w += n; mlen -= n;} #define SWAP {sum <<= 8;} /* depends on recent REDUCE */ -#define Asm __asm __volatile +#define Asm __asm volatile #define ADDL Asm("addl2 (%2)+,%0" : "=r" (sum) : "0" (sum), "r" (w)) #define ADWC Asm("adwc (%2)+,%0" : "=r" (sum) : "0" (sum), "r" (w)) #define ADDC Asm("adwc $0,%0" : "=r" (sum) : "0" (sum)) diff --git a/sys/arch/vax/vax/ka820.c b/sys/arch/vax/vax/ka820.c index 0ef3e791629..e5df532a458 100644 --- a/sys/arch/vax/vax/ka820.c +++ b/sys/arch/vax/vax/ka820.c @@ -1,4 +1,4 @@ -/* $NetBSD: ka820.c,v 1.43 2005/12/11 12:19:36 christos Exp $ */ +/* $NetBSD: ka820.c,v 1.44 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.43 2005/12/11 12:19:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.44 2005/12/24 20:07:41 perry Exp $"); #include "opt_multiprocessor.h" @@ -590,7 +590,7 @@ ka820_sendchr(int chr) * It seems like mtpr to TXCD sets the V flag if it fails. * Cannot check that flag in C... */ - asm __volatile("1:;mtpr %0,$92;bvs 1b" :: "g"(chr)); + asm volatile("1:;mtpr %0,$92;bvs 1b" :: "g"(chr)); } void diff --git a/sys/arch/vax/vax/trap.c b/sys/arch/vax/vax/trap.c index 904e5e57101..c41528ec18f 100644 --- a/sys/arch/vax/vax/trap.c +++ b/sys/arch/vax/vax/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.97 2005/12/11 12:19:36 christos Exp $ */ +/* $NetBSD: trap.c,v 1.98 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -33,7 +33,7 @@ /* All bugs are subject to removal without further notice */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.97 2005/12/11 12:19:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.98 2005/12/24 20:07:41 perry Exp $"); #include "opt_ddb.h" #include "opt_ktrace.h" @@ -78,7 +78,7 @@ volatile int startsysc = 0, faultdebug = 0; int cpu_printfataltraps = 0; -static __inline void userret (struct lwp *, struct trapframe *, u_quad_t); +static inline void userret (struct lwp *, struct trapframe *, u_quad_t); void trap (struct trapframe *); void syscall (struct trapframe *); @@ -121,7 +121,7 @@ int no_traps = 18; * Common code used by various execption handlers to * return to usermode. */ -static __inline void +static inline void userret(struct lwp *l, struct trapframe *frame, u_quad_t oticks) { int sig; diff --git a/sys/arch/vax/vax/yyyin_cksum.c b/sys/arch/vax/vax/yyyin_cksum.c index 0cd4ff63396..1518c7c10f8 100644 --- a/sys/arch/vax/vax/yyyin_cksum.c +++ b/sys/arch/vax/vax/yyyin_cksum.c @@ -1,4 +1,4 @@ -/* $NetBSD: yyyin_cksum.c,v 1.7 2005/12/11 12:19:36 christos Exp $ */ +/* $NetBSD: yyyin_cksum.c,v 1.8 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1988, 1992, 1993 @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: yyyin_cksum.c,v 1.7 2005/12/11 12:19:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: yyyin_cksum.c,v 1.8 2005/12/24 20:07:41 perry Exp $"); #include <sys/param.h> #include <sys/mbuf.h> @@ -55,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: yyyin_cksum.c,v 1.7 2005/12/11 12:19:36 christos Exp #define ADVANCE(n) {w += n; mlen -= n;} #define SWAP {sum <<= 8;} /* depends on recent REDUCE */ -#define Asm __asm __volatile +#define Asm __asm volatile #define ADDL Asm("addl2 (%2)+,%0" : "=r" (sum) : "0" (sum), "r" (w)) #define ADWC Asm("adwc (%2)+,%0" : "=r" (sum) : "0" (sum), "r" (w)) #define ADDC Asm("adwc $0,%0" : "=r" (sum) : "0" (sum)) diff --git a/sys/arch/x68k/dev/fd.c b/sys/arch/x68k/dev/fd.c index 413bda0ff58..2b8f36b3887 100644 --- a/sys/arch/x68k/dev/fd.c +++ b/sys/arch/x68k/dev/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.66 2005/12/11 12:19:37 christos Exp $ */ +/* $NetBSD: fd.c,v 1.67 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.66 2005/12/11 12:19:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.67 2005/12/24 20:07:41 perry Exp $"); #include "rnd.h" #include "opt_ddb.h" @@ -294,7 +294,7 @@ void fdctimeout(void *); void fdcpseudointr(void *); void fdcretry(struct fdc_softc *); void fdfinish(struct fd_softc *, struct buf *); -__inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t); +inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t); static int fdcpoll(struct fdc_softc *); static int fdgetdisklabel(struct fd_softc *, dev_t); static void fd_do_eject(struct fdc_softc *, int); @@ -302,11 +302,11 @@ static void fd_do_eject(struct fdc_softc *, int); void fd_mountroot_hook(struct device *); /* DMA transfer routines */ -__inline static void fdc_dmastart(struct fdc_softc *, int, caddr_t, vsize_t); +inline static void fdc_dmastart(struct fdc_softc *, int, caddr_t, vsize_t); static int fdcdmaintr(void *); static int fdcdmaerrintr(void *); -__inline static void +inline static void fdc_dmastart(struct fdc_softc *fdc, int read, caddr_t addr, vsize_t count) { int error; @@ -613,7 +613,7 @@ fdattach(struct device *parent, struct device *self, void *aux) #endif } -__inline struct fd_type * +inline struct fd_type * fd_dev_to_type(struct fd_softc *fd, dev_t dev) { int type = FDTYPE(dev); diff --git a/sys/arch/x68k/dev/ite.c b/sys/arch/x68k/dev/ite.c index 23bcb4362fa..c010174b6f3 100644 --- a/sys/arch/x68k/dev/ite.c +++ b/sys/arch/x68k/dev/ite.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite.c,v 1.42 2005/12/11 12:19:37 christos Exp $ */ +/* $NetBSD: ite.c,v 1.43 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -83,7 +83,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.42 2005/12/11 12:19:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.43 2005/12/24 20:07:41 perry Exp $"); #include "ite.h" #if NITE > 0 @@ -127,30 +127,30 @@ void opm_bell(void); struct consdev; -__inline static void itesendch(int); -__inline static void alignment_display(struct ite_softc *); -__inline static void snap_cury(struct ite_softc *); -__inline static void ite_dnchar(struct ite_softc *, int); +inline static void itesendch(int); +inline static void alignment_display(struct ite_softc *); +inline static void snap_cury(struct ite_softc *); +inline static void ite_dnchar(struct ite_softc *, int); static void ite_inchar(struct ite_softc *, int); -__inline static void ite_clrtoeol(struct ite_softc *); -__inline static void ite_clrtobol(struct ite_softc *); -__inline static void ite_clrline(struct ite_softc *); -__inline static void ite_clrtoeos(struct ite_softc *); -__inline static void ite_clrtobos(struct ite_softc *); -__inline static void ite_clrscreen(struct ite_softc *); -__inline static void ite_dnline(struct ite_softc *, int); -__inline static void ite_inline(struct ite_softc *, int); -__inline static void ite_index(struct ite_softc *); -__inline static void ite_lf(struct ite_softc *); -__inline static void ite_crlf(struct ite_softc *); -__inline static void ite_cr(struct ite_softc *); -__inline static void ite_rlf(struct ite_softc *); +inline static void ite_clrtoeol(struct ite_softc *); +inline static void ite_clrtobol(struct ite_softc *); +inline static void ite_clrline(struct ite_softc *); +inline static void ite_clrtoeos(struct ite_softc *); +inline static void ite_clrtobos(struct ite_softc *); +inline static void ite_clrscreen(struct ite_softc *); +inline static void ite_dnline(struct ite_softc *, int); +inline static void ite_inline(struct ite_softc *, int); +inline static void ite_index(struct ite_softc *); +inline static void ite_lf(struct ite_softc *); +inline static void ite_crlf(struct ite_softc *); +inline static void ite_cr(struct ite_softc *); +inline static void ite_rlf(struct ite_softc *); static void iteprecheckwrap(struct ite_softc *); static void itecheckwrap(struct ite_softc *); static int ite_argnum(struct ite_softc *); static int ite_zargnum(struct ite_softc *); static void ite_sendstr(struct ite_softc *, const char *); -__inline static int atoi(const char *); +inline static int atoi(const char *); void ite_reset(struct ite_softc *); struct ite_softc *getitesp(dev_t); int iteon(dev_t, int); @@ -744,7 +744,7 @@ ite_cnfilter(c) } /* And now the old stuff. */ -__inline static void +inline static void itesendch(int ch) { (*kbd_tty->t_linesw->l_rint)(ch, kbd_tty); @@ -940,14 +940,14 @@ ite_filter(c) } /* helper functions, makes the code below more readable */ -__inline static void +inline static void ite_sendstr(struct ite_softc *ip, const char *str) { while (*str) itesendch (*str++); } -__inline static void +inline static void alignment_display(struct ite_softc *ip) { int i, j; @@ -958,7 +958,7 @@ alignment_display(struct ite_softc *ip) attrclr(ip, 0, 0, ip->rows, ip->cols); } -__inline static void +inline static void snap_cury(struct ite_softc *ip) { if (ip->inside_margins) { @@ -969,7 +969,7 @@ snap_cury(struct ite_softc *ip) } } -__inline static void +inline static void ite_dnchar(struct ite_softc *ip, int n) { n = min(n, ip->cols - ip->curx); @@ -1000,7 +1000,7 @@ ite_inchar(struct ite_softc *ip, int n) ip->save_char = c; } -__inline static void +inline static void ite_clrtoeol(struct ite_softc *ip) { int y = ip->cury, x = ip->curx; @@ -1010,7 +1010,7 @@ ite_clrtoeol(struct ite_softc *ip) } } -__inline static void +inline static void ite_clrtobol(struct ite_softc *ip) { int y = ip->cury, x = min(ip->curx + 1, ip->cols); @@ -1018,7 +1018,7 @@ ite_clrtobol(struct ite_softc *ip) attrclr(ip, y, 0, 1, x); } -__inline static void +inline static void ite_clrline(struct ite_softc *ip) { int y = ip->cury; @@ -1026,7 +1026,7 @@ ite_clrline(struct ite_softc *ip) attrclr(ip, y, 0, 1, ip->cols); } -__inline static void +inline static void ite_clrtoeos(struct ite_softc *ip) { ite_clrtoeol(ip); @@ -1036,7 +1036,7 @@ ite_clrtoeos(struct ite_softc *ip) } } -__inline static void +inline static void ite_clrtobos(struct ite_softc *ip) { ite_clrtobol(ip); @@ -1046,7 +1046,7 @@ ite_clrtobos(struct ite_softc *ip) } } -__inline static void +inline static void ite_clrscreen(struct ite_softc *ip) { SUBR_CLEAR(ip, 0, 0, ip->rows, ip->cols); @@ -1055,7 +1055,7 @@ ite_clrscreen(struct ite_softc *ip) -__inline static void +inline static void ite_dnline(struct ite_softc *ip, int n) { /* @@ -1075,7 +1075,7 @@ ite_dnline(struct ite_softc *ip, int n) attrclr(ip, ip->bottom_margin - n + 1, 0, n, ip->cols); } -__inline static void +inline static void ite_inline(struct ite_softc *ip, int n) { /* @@ -1098,7 +1098,7 @@ ite_inline(struct ite_softc *ip, int n) ip->curx = 0; } -__inline static void +inline static void ite_index(struct ite_softc *ip) { ++ip->cury; @@ -1110,7 +1110,7 @@ ite_index(struct ite_softc *ip) /*clr_attr(ip, ATTR_INV);*/ } -__inline static void +inline static void ite_lf(struct ite_softc *ip) { ++ip->cury; @@ -1132,14 +1132,14 @@ ite_lf(struct ite_softc *ip) ip->save_char = 0; } -__inline static void +inline static void ite_crlf(struct ite_softc *ip) { ip->curx = 0; ite_lf (ip); } -__inline static void +inline static void ite_cr(struct ite_softc *ip) { if (ip->curx) { @@ -1147,7 +1147,7 @@ ite_cr(struct ite_softc *ip) } } -__inline static void +inline static void ite_rlf(struct ite_softc *ip) { ip->cury--; @@ -1159,7 +1159,7 @@ ite_rlf(struct ite_softc *ip) clr_attr(ip, ATTR_INV); } -__inline static int +inline static int atoi(const char *cp) { int n; @@ -1169,7 +1169,7 @@ atoi(const char *cp) return n; } -__inline static int +inline static int ite_argnum(struct ite_softc *ip) { char ch; @@ -1186,7 +1186,7 @@ ite_argnum(struct ite_softc *ip) return n; } -__inline static int +inline static int ite_zargnum(struct ite_softc *ip) { char ch; diff --git a/sys/arch/x68k/dev/ite_tv.c b/sys/arch/x68k/dev/ite_tv.c index d6a10a75584..96e08faea69 100644 --- a/sys/arch/x68k/dev/ite_tv.c +++ b/sys/arch/x68k/dev/ite_tv.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite_tv.c,v 1.13 2005/12/11 12:19:37 christos Exp $ */ +/* $NetBSD: ite_tv.c,v 1.14 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1997 Masaru Oki. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ite_tv.c,v 1.13 2005/12/11 12:19:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ite_tv.c,v 1.14 2005/12/24 20:07:41 perry Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -72,7 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: ite_tv.c,v 1.13 2005/12/11 12:19:37 christos Exp $") u_int tv_top; u_char *tv_row[PLANELINES]; char *tv_font[256]; -__volatile char *tv_kfont[0x7f]; +volatile char *tv_kfont[0x7f]; u_char kern_font[256 * FONTHEIGHT]; @@ -91,10 +91,10 @@ void tv_cursor(struct ite_softc *, int); void tv_clear(struct ite_softc *, int, int, int, int); void tv_scroll(struct ite_softc *, int, int, int, int); -__inline static int expbits(int); -__inline static void txrascpy(u_char, u_char, short, signed short); +inline static int expbits(int); +inline static void txrascpy(u_char, u_char, short, signed short); -static __inline void +static inline void txrascpy(u_char src, u_char dst, short size, short mode) { /*int s;*/ @@ -365,7 +365,7 @@ tv_putc_bd(struct ite_softc *ip, int ch, char *p) } } -__inline static int +inline static int expbits(int data) { int i, nd = 0; diff --git a/sys/arch/x68k/dev/opm.c b/sys/arch/x68k/dev/opm.c index ef587040e51..9b863adf62a 100644 --- a/sys/arch/x68k/dev/opm.c +++ b/sys/arch/x68k/dev/opm.c @@ -1,4 +1,4 @@ -/* $NetBSD: opm.c,v 1.14 2005/12/11 12:19:37 christos Exp $ */ +/* $NetBSD: opm.c,v 1.15 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1995 Masanobu Saitoh, Takuya Harakawa. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opm.c,v 1.14 2005/12/11 12:19:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opm.c,v 1.15 2005/12/24 20:07:41 perry Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -119,14 +119,14 @@ void opm_set_volume(int, int); void opm_set_key(int, int); void opm_set_voice(int, struct opm_voice *); void opm_set_voice_sub(int, struct opm_operator *); -__inline static void writeopm(int, int); -__inline static int readopm(int); +inline static void writeopm(int, int); +inline static int readopm(int); void opm_key_on(u_char); void opm_key_off(u_char); int opmopen(dev_t, int, int); int opmclose(dev_t); -__inline static void +inline static void writeopm(int reg, int dat) { while (bus_space_read_1 (opm0->sc_bst, opm0->sc_bht, OPM_DATA) & 0x80); @@ -136,7 +136,7 @@ writeopm(int reg, int dat) opm0->sc_regs[reg] = dat; } -__inline static int +inline static int readopm(int reg) { return opm0->sc_regs[reg]; diff --git a/sys/arch/x68k/stand/common/exec_sub.c b/sys/arch/x68k/stand/common/exec_sub.c index 8559f447abe..dcefce9ce6a 100644 --- a/sys/arch/x68k/stand/common/exec_sub.c +++ b/sys/arch/x68k/stand/common/exec_sub.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec_sub.c,v 1.2 2002/12/10 17:14:24 thorpej Exp $ */ +/* $NetBSD: exec_sub.c,v 1.3 2005/12/24 20:07:41 perry Exp $ */ #include <sys/cdefs.h> @@ -10,7 +10,7 @@ void B_PRINT __P((const unsigned char *p)); #endif -static __inline void bzero4 __P((void *ptr, size_t siz)); +static inline void bzero4 __P((void *ptr, size_t siz)); static void xk_aout __P((struct execkern_arg *xarg, struct exec *hdr)); static void xk_elf __P((struct execkern_arg *xarg, Elf32_Ehdr *hdr)); @@ -60,7 +60,7 @@ DPRINT_SEC(ident, sec) #define SECTION_NOPAD(sec, ident, image, size) \ SECTION(sec, (ident), (image), (size), 0) -static __inline void +static inline void bzero4(ptr, siz) void *ptr; size_t siz; diff --git a/sys/arch/x68k/stand/libdos/dos_errno.h b/sys/arch/x68k/stand/libdos/dos_errno.h index ab85d7186c9..b6282026e53 100644 --- a/sys/arch/x68k/stand/libdos/dos_errno.h +++ b/sys/arch/x68k/stand/libdos/dos_errno.h @@ -5,7 +5,7 @@ * written by Yasha (ITOH Yasufumi) * public domain * - * $NetBSD: dos_errno.h,v 1.2 1999/11/11 08:14:43 itohy Exp $ + * $NetBSD: dos_errno.h,v 1.3 2005/12/24 20:07:41 perry Exp $ */ #ifndef X68K_DOS_ERRNO_H @@ -15,9 +15,9 @@ #include <sys/cdefs.h> extern int dos_errno; -extern __const int dos_nerr; +extern const int dos_nerr; -__const char * __pure dos_strerror __P((int)) __attribute__((__const__)); +const char * __pure dos_strerror __P((int)) __attribute__((__const__)); #endif /* diff --git a/sys/arch/x68k/stand/libiocs/iocs.h b/sys/arch/x68k/stand/libiocs/iocs.h index 78600f38ae0..6b341899f61 100644 --- a/sys/arch/x68k/stand/libiocs/iocs.h +++ b/sys/arch/x68k/stand/libiocs/iocs.h @@ -6,7 +6,7 @@ * (based on PD libc 1.1.32 by PROJECT C Library) * public domain * - * $NetBSD: iocs.h,v 1.2 1999/11/22 01:14:55 itohy Exp $ + * $NetBSD: iocs.h,v 1.3 2005/12/24 20:07:41 perry Exp $ */ /* * PROJECT C Library, X68000 PROGRAMMING INTERFACE DEFINITION @@ -101,8 +101,8 @@ struct iocs_putptr { short y1; short x2; short y2; - __const void *buf_start; - __const void *buf_end; + const void *buf_start; + const void *buf_end; }; struct iocs_symbolptr { @@ -141,7 +141,7 @@ struct iocs_chain { struct iocs_chain2 { void *addr; unsigned short len; - __const struct iocs_chain2 *next; + const struct iocs_chain2 *next; } __attribute__((__packed__)); struct iocs_clipxy { diff --git a/sys/arch/x68k/stand/libiocs/scsi.h b/sys/arch/x68k/stand/libiocs/scsi.h index 3c462c551af..85db763c836 100644 --- a/sys/arch/x68k/stand/libiocs/scsi.h +++ b/sys/arch/x68k/stand/libiocs/scsi.h @@ -2,7 +2,7 @@ * X680x0 ROM IOCS access definitions. * based on Project C Library X68000 Programing Interface Definition * /usr/include/sys/scsi.h - * $Id: scsi.h,v 1.1 2001/09/27 10:03:27 minoura Exp $ + * $Id: scsi.h,v 1.2 2005/12/24 20:07:41 perry Exp $ */ /* * PROJECT C Library, X68000 PROGRAMMING INTERFACE DEFINITION @@ -31,11 +31,11 @@ struct _inquiry { unsigned char buff[0]; }; -static __inline int _scsi_inquiry (int n, int id, struct _inquiry *buf) +static inline int _scsi_inquiry (int n, int id, struct _inquiry *buf) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d3-%%d4,%%sp@-\n\t" + __asm volatile ("moveml %%d3-%%d4,%%sp@-\n\t" "movel %2,%%d3\n\t" "movel %3,%%d4\n\t" "movel %4,%%a1\n\t" @@ -49,11 +49,11 @@ static __inline int _scsi_inquiry (int n, int id, struct _inquiry *buf) return reg_d0; } -static __inline int _scsi_modesense (int page, int n, int id, void *buf) +static inline int _scsi_modesense (int page, int n, int id, void *buf) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d3-%%d4,%%sp@-\n\t" + __asm volatile ("moveml %%d3-%%d4,%%sp@-\n\t" "movel %2,%%d2\n\t" "movel %3,%%d3\n\t" "movel %4,%%d4\n\t" @@ -69,11 +69,11 @@ static __inline int _scsi_modesense (int page, int n, int id, void *buf) return reg_d0; } -static __inline int _scsi_read (int pos, int blk, int id, int size, void *buf) +static inline int _scsi_read (int pos, int blk, int id, int size, void *buf) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d3-%%d5,%%sp@-\n\t" + __asm volatile ("moveml %%d3-%%d5,%%sp@-\n\t" "movel %2,%%d2\n\t" "movel %3,%%d3\n\t" "movel %4,%%d4\n\t" @@ -90,11 +90,11 @@ static __inline int _scsi_read (int pos, int blk, int id, int size, void *buf) return reg_d0; } -static __inline int _scsi_readcap (int id, struct _readcap *buf) +static inline int _scsi_readcap (int id, struct _readcap *buf) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d4,%%sp@-\n\t" + __asm volatile ("moveml %%d4,%%sp@-\n\t" "movel %2,%%d4\n\t" "movel %3,%%a1\n\t" "movel #0x25,%%d1\n\t" @@ -108,11 +108,11 @@ static __inline int _scsi_readcap (int id, struct _readcap *buf) return reg_d0; } -static __inline int _scsi_seek (int pos, int id) +static inline int _scsi_seek (int pos, int id) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d4,%%sp@-\n\t" + __asm volatile ("moveml %%d4,%%sp@-\n\t" "movel %1,%%d2\n\t" "movel %2,%%d4\n\t" "movel #0x2d,%%d1\n\t" @@ -126,11 +126,11 @@ static __inline int _scsi_seek (int pos, int id) return reg_d0; } -static __inline int _scsi_testunit (int id) +static inline int _scsi_testunit (int id) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d4,%%sp@-\n\t" + __asm volatile ("moveml %%d4,%%sp@-\n\t" "movel %1,%%d4\n\t" "movel #0x24,%%d1\n\t" "movel #0xf5,%%d0\n\t" @@ -143,11 +143,11 @@ static __inline int _scsi_testunit (int id) return reg_d0; } -static __inline int _scsi_write (int pos, int blk, int id, int size, void *buf) +static inline int _scsi_write (int pos, int blk, int id, int size, void *buf) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d3-%%d5,%%sp@-\n\t" + __asm volatile ("moveml %%d3-%%d5,%%sp@-\n\t" "movel %1,%%d2\n\t" "movel %2,%%d3\n\t" "movel %3,%%d4\n\t" @@ -164,9 +164,9 @@ static __inline int _scsi_write (int pos, int blk, int id, int size, void *buf) return reg_d0; } -static __inline void _scsi_reset (void) +static inline void _scsi_reset (void) { - __asm __volatile ("movel #0,%%d1\n\t" + __asm volatile ("movel #0,%%d1\n\t" "movel #0xf5,%%d0\n\t" "trap #15\n\t" : diff --git a/sys/arch/x68k/stand/mboot/mboot.c b/sys/arch/x68k/stand/mboot/mboot.c index ff1666a8cc1..6bd1af3bef4 100644 --- a/sys/arch/x68k/stand/mboot/mboot.c +++ b/sys/arch/x68k/stand/mboot/mboot.c @@ -1,4 +1,4 @@ -/* $NetBSD: mboot.c,v 1.3 2001/06/12 16:57:28 minoura Exp $ */ +/* $NetBSD: mboot.c,v 1.4 2005/12/24 20:07:41 perry Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ IOCS_BITSNS (int row) { register unsigned int reg_d0 __asm ("%d0"); - __asm __volatile ("movel %1,%%d1\n\t" + __asm volatile ("movel %1,%%d1\n\t" "movel #0x04,%0\n\t" "trap #15" : "=d" (reg_d0) @@ -60,7 +60,7 @@ IOCS_BITSNS (int row) static inline void IOCS_B_PRINT (const char *str) { - __asm __volatile ("moval %0,%%a1\n\t" + __asm volatile ("moval %0,%%a1\n\t" "movel #0x21,%%d0\n\t" "trap #15\n\t" : @@ -73,7 +73,7 @@ IOCS_S_READCAP (int id, struct iocs_readcap *cap) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d4,%%sp@-\n\t" + __asm volatile ("moveml %%d4,%%sp@-\n\t" "movel %2,%%d4\n\t" "moval %3,%%a1\n\t" "movel #0x25,%%d1\n\t" @@ -91,7 +91,7 @@ IOCS_S_READ (int pos, int blk, int id, int size, void *buf) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d3-%%d5,%%sp@-\n\t" + __asm volatile ("moveml %%d3-%%d5,%%sp@-\n\t" "movel %2,%%d2\n\t" "movel %3,%%d3\n\t" "movel %4,%%d4\n\t" @@ -113,7 +113,7 @@ IOCS_S_READEXT (int pos, int blk, int id, int size, void *buf) { register int reg_d0 __asm ("%d0"); - __asm __volatile ("moveml %%d3-%%d5,%%sp@-\n\t" + __asm volatile ("moveml %%d3-%%d5,%%sp@-\n\t" "movel %2,%%d2\n\t" "movel %3,%%d3\n\t" "movel %4,%%d4\n\t" diff --git a/sys/arch/x68k/usr.bin/rtcalarm/rtcalarm.c b/sys/arch/x68k/usr.bin/rtcalarm/rtcalarm.c index 6c5282a42ec..825b5904df1 100644 --- a/sys/arch/x68k/usr.bin/rtcalarm/rtcalarm.c +++ b/sys/arch/x68k/usr.bin/rtcalarm/rtcalarm.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtcalarm.c,v 1.3 1998/08/04 16:10:45 minoura Exp $ */ +/* $NetBSD: rtcalarm.c,v 1.4 2005/12/24 20:07:41 perry Exp $ */ /* * Copyright (c) 1995 MINOURA Makoto. * All rights reserved. @@ -32,7 +32,7 @@ /* rtcalarm: X68k RTC alarm test program */ #ifndef __GNUC__ -#define __volatile +#define volatile #endif #include <stdio.h> @@ -46,8 +46,8 @@ char *prog; -static __volatile void usage __P((void)); -static __volatile void myperror __P((const char *, int)); +static volatile void usage __P((void)); +static volatile void myperror __P((const char *, int)); static void showinfo __P((void)); static char *numstr __P((unsigned int)); @@ -75,7 +75,7 @@ main(argc, argv) return 0; } -static __volatile void +static volatile void usage(void) { fprintf(stderr, "Usage: %s [[-w day-of-the-week] [-d day-of-the-month]\n", prog); @@ -84,7 +84,7 @@ usage(void) exit(1); } -static __volatile void +static volatile void myperror(str, fd) const char *str; int fd; diff --git a/sys/arch/x86/include/bus.h b/sys/arch/x86/include/bus.h index 0055f7687ba..64d9356c5aa 100644 --- a/sys/arch/x86/include/bus.h +++ b/sys/arch/x86/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.9 2005/04/16 07:53:35 yamt Exp $ */ +/* $NetBSD: bus.h,v 1.10 2005/12/24 20:07:42 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -271,7 +271,7 @@ do { \ int dummy2; \ void *dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: movb (%2),%%al ; \ stosb ; \ @@ -293,7 +293,7 @@ do { \ int dummy2; \ void *dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: movw (%2),%%ax ; \ stosw ; \ @@ -315,7 +315,7 @@ do { \ int dummy2; \ void *dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: movl (%2),%%eax ; \ stosl ; \ @@ -353,7 +353,7 @@ do { \ void *dummy2; \ int dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: inb %w1,%%al ; \ stosb ; \ @@ -367,7 +367,7 @@ do { \ int dummy1; \ void *dummy2; \ int dummy3; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ repne ; \ movsb" : \ @@ -386,7 +386,7 @@ do { \ void *dummy2; \ int dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: inw %w1,%%ax ; \ stosw ; \ @@ -400,7 +400,7 @@ do { \ int dummy1; \ void *dummy2; \ int dummy3; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ repne ; \ movsw" : \ @@ -419,7 +419,7 @@ do { \ void *dummy2; \ int dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: inl %w1,%%eax ; \ stosl ; \ @@ -433,7 +433,7 @@ do { \ int dummy1; \ void *dummy2; \ int dummy3; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ repne ; \ movsl" : \ @@ -516,7 +516,7 @@ do { \ int dummy2; \ void *dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: lodsb ; \ movb %%al,(%2) ; \ @@ -537,7 +537,7 @@ do { \ int dummy2; \ void *dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: lodsw ; \ movw %%ax,(%2) ; \ @@ -558,7 +558,7 @@ do { \ int dummy2; \ void *dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: lodsl ; \ movl %%eax,(%2) ; \ @@ -595,7 +595,7 @@ do { \ void *dummy2; \ int dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: lodsb ; \ outb %%al,%w1 ; \ @@ -609,7 +609,7 @@ do { \ int dummy1; \ void *dummy2; \ int dummy3; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ repne ; \ movsb" : \ @@ -628,7 +628,7 @@ do { \ void *dummy2; \ int dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: lodsw ; \ outw %%ax,%w1 ; \ @@ -642,7 +642,7 @@ do { \ int dummy1; \ void *dummy2; \ int dummy3; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ repne ; \ movsw" : \ @@ -661,7 +661,7 @@ do { \ void *dummy2; \ int dummy3; \ int __x; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ 1: lodsl ; \ outl %%eax,%w1 ; \ @@ -675,7 +675,7 @@ do { \ int dummy1; \ void *dummy2; \ int dummy3; \ - __asm __volatile(" \ + __asm volatile(" \ cld ; \ repne ; \ movsl" : \ @@ -705,11 +705,11 @@ do { \ * by tag/handle/offset `count' times. */ -static __inline void x86_memio_set_multi_1(bus_space_tag_t, +static inline void x86_memio_set_multi_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, size_t); -static __inline void x86_memio_set_multi_2(bus_space_tag_t, +static inline void x86_memio_set_multi_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, size_t); -static __inline void x86_memio_set_multi_4(bus_space_tag_t, +static inline void x86_memio_set_multi_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, size_t); #define bus_space_set_multi_1(t, h, o, v, c) \ @@ -727,7 +727,7 @@ do { \ x86_memio_set_multi_4((t), (h), (o), (v), (c)); \ } while (/* CONSTCOND */ 0) -static __inline void +static inline void x86_memio_set_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t v, size_t c) { @@ -741,7 +741,7 @@ x86_memio_set_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, *(volatile u_int8_t *)(addr) = v; } -static __inline void +static inline void x86_memio_set_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v, size_t c) { @@ -755,7 +755,7 @@ x86_memio_set_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, *(volatile u_int16_t *)(addr) = v; } -static __inline void +static inline void x86_memio_set_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v, size_t c) { @@ -782,11 +782,11 @@ x86_memio_set_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, * by tag/handle starting at `offset'. */ -static __inline void x86_memio_set_region_1(bus_space_tag_t, +static inline void x86_memio_set_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int8_t, size_t); -static __inline void x86_memio_set_region_2(bus_space_tag_t, +static inline void x86_memio_set_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int16_t, size_t); -static __inline void x86_memio_set_region_4(bus_space_tag_t, +static inline void x86_memio_set_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, u_int32_t, size_t); #define bus_space_set_region_1(t, h, o, v, c) \ @@ -804,7 +804,7 @@ do { \ x86_memio_set_region_4((t), (h), (o), (v), (c)); \ } while (/* CONSTCOND */ 0) -static __inline void +static inline void x86_memio_set_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t v, size_t c) { @@ -818,7 +818,7 @@ x86_memio_set_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, *(volatile u_int8_t *)(addr) = v; } -static __inline void +static inline void x86_memio_set_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v, size_t c) { @@ -832,7 +832,7 @@ x86_memio_set_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, *(volatile u_int16_t *)(addr) = v; } -static __inline void +static inline void x86_memio_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v, size_t c) { @@ -860,13 +860,13 @@ x86_memio_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. */ -static __inline void x86_memio_copy_region_1(bus_space_tag_t, +static inline void x86_memio_copy_region_1(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, size_t); -static __inline void x86_memio_copy_region_2(bus_space_tag_t, +static inline void x86_memio_copy_region_2(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, size_t); -static __inline void x86_memio_copy_region_4(bus_space_tag_t, +static inline void x86_memio_copy_region_4(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, size_t); @@ -887,7 +887,7 @@ do { \ x86_memio_copy_region_4((t), (h1), (o1), (h2), (o2), (c)); \ } while (/* CONSTCOND */ 0) -static __inline void +static inline void x86_memio_copy_region_1(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, size_t c) @@ -922,7 +922,7 @@ x86_memio_copy_region_1(bus_space_tag_t t, } } -static __inline void +static inline void x86_memio_copy_region_2(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, size_t c) @@ -957,7 +957,7 @@ x86_memio_copy_region_2(bus_space_tag_t t, } } -static __inline void +static inline void x86_memio_copy_region_4(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, size_t c) @@ -1110,7 +1110,7 @@ struct x86_bus_dma_tag { int, off_t, int, int); }; -static __inline void bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, +static inline void bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_addr_t, bus_size_t, int) __attribute__((__unused__)); #define bus_dmamap_create(t, s, n, m, b, f, p) \ @@ -1127,7 +1127,7 @@ static __inline void bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, (*(t)->_dmamap_load_raw)((t), (m), (sg), (n), (s), (f)) #define bus_dmamap_unload(t, p) \ (*(t)->_dmamap_unload)((t), (p)) -static __inline void +static inline void bus_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t p, bus_addr_t o, bus_size_t l, int ops) { diff --git a/sys/arch/x86/include/bus_private.h b/sys/arch/x86/include/bus_private.h index fd19ee8c9eb..b9694b6a23b 100644 --- a/sys/arch/x86/include/bus_private.h +++ b/sys/arch/x86/include/bus_private.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus_private.h,v 1.3 2005/08/22 11:09:39 bouyer Exp $ */ +/* $NetBSD: bus_private.h,v 1.4 2005/12/24 20:07:42 perry Exp $ */ /* NetBSD: bus.h,v 1.8 2005/03/09 19:04:46 matt Exp */ /*- @@ -157,10 +157,10 @@ struct x86_bus_dma_cookie { #if !defined(_BUS_VIRT_TO_BUS) #include <uvm/uvm_extern.h> -static __inline bus_addr_t _bus_virt_to_bus(struct pmap *, vaddr_t); +static inline bus_addr_t _bus_virt_to_bus(struct pmap *, vaddr_t); #define _BUS_VIRT_TO_BUS(pm, va) _bus_virt_to_bus((pm), (va)) -static __inline bus_addr_t +static inline bus_addr_t _bus_virt_to_bus(struct pmap *pm, vaddr_t va) { paddr_t pa; diff --git a/sys/arch/x86/include/intr.h b/sys/arch/x86/include/intr.h index d231d6eb2e4..7970cc06d7c 100644 --- a/sys/arch/x86/include/intr.h +++ b/sys/arch/x86/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.18 2005/11/03 13:06:06 yamt Exp $ */ +/* $NetBSD: intr.h,v 1.19 2005/12/24 20:07:42 perry Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -115,9 +115,9 @@ struct intrhand { extern void Xspllower(int); -static __inline int splraise(int); -static __inline void spllower(int); -static __inline void softintr(int); +static inline int splraise(int); +static inline void spllower(int); +static inline void softintr(int); /* * Convert spl level to local APIC level @@ -127,7 +127,7 @@ static __inline void softintr(int); /* * Add a mask to cpl, and return the old value of cpl. */ -static __inline int +static inline int splraise(int nlevel) { int olevel; @@ -144,7 +144,7 @@ splraise(int nlevel) * Restore a value to cpl (unmasking interrupts). If any unmasked * interrupts are pending, call Xspllower() to process them. */ -static __inline void +static inline void spllower(int nlevel) { struct cpu_info *ci = curcpu(); @@ -191,12 +191,12 @@ spllower(int nlevel) * * XXX always scheduled on the current CPU. */ -static __inline void +static inline void softintr(int sir) { struct cpu_info *ci = curcpu(); - __asm __volatile("lock ; orl %1, %0" : + __asm volatile("lock ; orl %1, %0" : "=m"(ci->ci_ipending) : "ir" (1 << sir)); } diff --git a/sys/arch/x86/include/lock.h b/sys/arch/x86/include/lock.h index a2043290b98..259683f330d 100644 --- a/sys/arch/x86/include/lock.h +++ b/sys/arch/x86/include/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.9 2005/04/16 07:45:59 yamt Exp $ */ +/* $NetBSD: lock.h,v 1.10 2005/12/24 20:07:42 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -60,16 +60,16 @@ extern void __cpu_simple_unlock(__cpu_simple_lock_t *); #include <machine/atomic.h> -static __inline void __cpu_simple_lock_init(__cpu_simple_lock_t *) +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *) __attribute__((__unused__)); -static __inline void __cpu_simple_lock(__cpu_simple_lock_t *) +static inline void __cpu_simple_lock(__cpu_simple_lock_t *) __attribute__((__unused__)); -static __inline int __cpu_simple_lock_try(__cpu_simple_lock_t *) +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *) __attribute__((__unused__)); -static __inline void __cpu_simple_unlock(__cpu_simple_lock_t *) +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *) __attribute__((__unused__)); -static __inline void +static inline void __cpu_simple_lock_init(__cpu_simple_lock_t *lockp) { @@ -77,7 +77,7 @@ __cpu_simple_lock_init(__cpu_simple_lock_t *lockp) __insn_barrier(); } -static __inline void +static inline void __cpu_simple_lock(__cpu_simple_lock_t *lockp) { @@ -90,7 +90,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *lockp) __insn_barrier(); } -static __inline int +static inline int __cpu_simple_lock_try(__cpu_simple_lock_t *lockp) { int r = (x86_atomic_testset_i(lockp, __SIMPLELOCK_LOCKED) @@ -101,7 +101,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *lockp) return (r); } -static __inline void +static inline void __cpu_simple_unlock(__cpu_simple_lock_t *lockp) { diff --git a/sys/arch/x86/include/pio.h b/sys/arch/x86/include/pio.h index e0bd3fbf888..2f4277292a4 100644 --- a/sys/arch/x86/include/pio.h +++ b/sys/arch/x86/include/pio.h @@ -1,4 +1,4 @@ -/* $NetBSD: pio.h,v 1.2 2003/02/27 11:22:46 fvdl Exp $ */ +/* $NetBSD: pio.h,v 1.3 2005/12/24 20:07:42 perry Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -63,28 +63,28 @@ #define inb(port) \ (/* CONSTCOND */ __use_immediate_port(port) ? __inbc(port) : __inb(port)) -static __inline u_int8_t +static inline u_int8_t __inbc(unsigned port) { u_int8_t data; - __asm __volatile("inb %w1,%0" : "=a" (data) : "id" (port)); + __asm volatile("inb %w1,%0" : "=a" (data) : "id" (port)); return data; } -static __inline u_int8_t +static inline u_int8_t __inb(unsigned port) { u_int8_t data; - __asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port)); + __asm volatile("inb %w1,%0" : "=a" (data) : "d" (port)); return data; } -static __inline void +static inline void insb(unsigned port, void *addr, int cnt) { void *dummy1; int dummy2; - __asm __volatile("cld\n\trepne\n\tinsb" : + __asm volatile("cld\n\trepne\n\tinsb" : "=D" (dummy1), "=c" (dummy2) : "d" (port), "0" (addr), "1" (cnt) : "memory"); @@ -93,28 +93,28 @@ insb(unsigned port, void *addr, int cnt) #define inw(port) \ (/* CONSTCOND */ __use_immediate_port(port) ? __inwc(port) : __inw(port)) -static __inline u_int16_t +static inline u_int16_t __inwc(unsigned port) { u_int16_t data; - __asm __volatile("inw %w1,%0" : "=a" (data) : "id" (port)); + __asm volatile("inw %w1,%0" : "=a" (data) : "id" (port)); return data; } -static __inline u_int16_t +static inline u_int16_t __inw(unsigned port) { u_int16_t data; - __asm __volatile("inw %w1,%0" : "=a" (data) : "d" (port)); + __asm volatile("inw %w1,%0" : "=a" (data) : "d" (port)); return data; } -static __inline void +static inline void insw(unsigned port, void *addr, int cnt) { void *dummy1; int dummy2; - __asm __volatile("cld\n\trepne\n\tinsw" : + __asm volatile("cld\n\trepne\n\tinsw" : "=D" (dummy1), "=c" (dummy2) : "d" (port), "0" (addr), "1" (cnt) : "memory"); @@ -123,28 +123,28 @@ insw(unsigned port, void *addr, int cnt) #define inl(port) \ (/* CONSTCOND */ __use_immediate_port(port) ? __inlc(port) : __inl(port)) -static __inline u_int32_t +static inline u_int32_t __inlc(unsigned port) { u_int32_t data; - __asm __volatile("inl %w1,%0" : "=a" (data) : "id" (port)); + __asm volatile("inl %w1,%0" : "=a" (data) : "id" (port)); return data; } -static __inline u_int32_t +static inline u_int32_t __inl(unsigned port) { u_int32_t data; - __asm __volatile("inl %w1,%0" : "=a" (data) : "d" (port)); + __asm volatile("inl %w1,%0" : "=a" (data) : "d" (port)); return data; } -static __inline void +static inline void insl(unsigned port, void *addr, int cnt) { void *dummy1; int dummy2; - __asm __volatile("cld\n\trepne\n\tinsl" : + __asm volatile("cld\n\trepne\n\tinsl" : "=D" (dummy1), "=c" (dummy2) : "d" (port), "0" (addr), "1" (cnt) : "memory"); @@ -154,24 +154,24 @@ insl(unsigned port, void *addr, int cnt) (/* CONSTCOND */__use_immediate_port(port) ? __outbc(port, data) : \ __outb(port, data)) -static __inline void +static inline void __outbc(unsigned port, u_int8_t data) { - __asm __volatile("outb %0,%w1" : : "a" (data), "id" (port)); + __asm volatile("outb %0,%w1" : : "a" (data), "id" (port)); } -static __inline void +static inline void __outb(unsigned port, u_int8_t data) { - __asm __volatile("outb %0,%w1" : : "a" (data), "d" (port)); + __asm volatile("outb %0,%w1" : : "a" (data), "d" (port)); } -static __inline void +static inline void outsb(unsigned port, const void *addr, int cnt) { void *dummy1; int dummy2; - __asm __volatile("cld\n\trepne\n\toutsb" : + __asm volatile("cld\n\trepne\n\toutsb" : "=S" (dummy1), "=c" (dummy2) : "d" (port), "0" (addr), "1" (cnt)); } @@ -180,24 +180,24 @@ outsb(unsigned port, const void *addr, int cnt) (/* CONSTCOND */ __use_immediate_port(port) ? __outwc(port, data) : \ __outw(port, data)) -static __inline void +static inline void __outwc(unsigned port, u_int16_t data) { - __asm __volatile("outw %0,%w1" : : "a" (data), "id" (port)); + __asm volatile("outw %0,%w1" : : "a" (data), "id" (port)); } -static __inline void +static inline void __outw(unsigned port, u_int16_t data) { - __asm __volatile("outw %0,%w1" : : "a" (data), "d" (port)); + __asm volatile("outw %0,%w1" : : "a" (data), "d" (port)); } -static __inline void +static inline void outsw(unsigned port, const void *addr, int cnt) { void *dummy1; int dummy2; - __asm __volatile("cld\n\trepne\n\toutsw" : + __asm volatile("cld\n\trepne\n\toutsw" : "=S" (dummy1), "=c" (dummy2) : "d" (port), "0" (addr), "1" (cnt)); } @@ -206,24 +206,24 @@ outsw(unsigned port, const void *addr, int cnt) (/* CONSTCOND */ __use_immediate_port(port) ? __outlc(port, data) : \ __outl(port, data)) -static __inline void +static inline void __outlc(unsigned port, u_int32_t data) { - __asm __volatile("outl %0,%w1" : : "a" (data), "id" (port)); + __asm volatile("outl %0,%w1" : : "a" (data), "id" (port)); } -static __inline void +static inline void __outl(unsigned port, u_int32_t data) { - __asm __volatile("outl %0,%w1" : : "a" (data), "d" (port)); + __asm volatile("outl %0,%w1" : : "a" (data), "d" (port)); } -static __inline void +static inline void outsl(unsigned port, const void *addr, int cnt) { void *dummy1; int dummy2; - __asm __volatile("cld\n\trepne\n\toutsl" : + __asm volatile("cld\n\trepne\n\toutsl" : "=S" (dummy1), "=c" (dummy2) : "d" (port), "0" (addr), "1" (cnt)); } diff --git a/sys/arch/x86/x86/bus_dma.c b/sys/arch/x86/x86/bus_dma.c index 2373ed510da..4b2a0bc54c4 100644 --- a/sys/arch/x86/x86/bus_dma.c +++ b/sys/arch/x86/x86/bus_dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.26 2005/12/11 12:19:47 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.27 2005/12/24 20:07:42 perry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.26 2005/12/11 12:19:47 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.27 2005/12/24 20:07:42 perry Exp $"); /* * The following is included because _bus_dma_uiomove is derived from @@ -146,7 +146,7 @@ static int _bus_dma_alloc_bouncebuf(bus_dma_tag_t t, bus_dmamap_t map, static void _bus_dma_free_bouncebuf(bus_dma_tag_t t, bus_dmamap_t map); static int _bus_dmamap_load_buffer(bus_dma_tag_t t, bus_dmamap_t map, void *buf, bus_size_t buflen, struct proc *p, int flags); -static __inline int _bus_dmamap_load_busaddr(bus_dma_tag_t, bus_dmamap_t, +static inline int _bus_dmamap_load_busaddr(bus_dma_tag_t, bus_dmamap_t, bus_addr_t, int); #ifndef _BUS_DMAMEM_ALLOC_RANGE @@ -385,7 +385,7 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dmamap_t map, void *buf, return (0); } -static __inline int +static inline int _bus_dmamap_load_busaddr(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t addr, int size) { diff --git a/sys/arch/x86/x86/ioapic.c b/sys/arch/x86/x86/ioapic.c index 9e856397248..53cd86ac69a 100644 --- a/sys/arch/x86/x86/ioapic.c +++ b/sys/arch/x86/x86/ioapic.c @@ -1,4 +1,4 @@ -/* $NetBSD: ioapic.c,v 1.11 2005/12/11 12:19:47 christos Exp $ */ +/* $NetBSD: ioapic.c,v 1.12 2005/12/24 20:07:42 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.11 2005/12/11 12:19:47 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.12 2005/12/24 20:07:42 perry Exp $"); #include "opt_ddb.h" @@ -126,7 +126,7 @@ struct ioapic_softc *ioapics; /* head of linked list */ int nioapics = 0; /* number attached */ static int ioapic_vecbase; -static __inline u_long +static inline u_long ioapic_lock(struct ioapic_softc *sc) { u_long flags; @@ -141,7 +141,7 @@ ioapic_lock(struct ioapic_softc *sc) return flags; } -static __inline void +static inline void ioapic_unlock(struct ioapic_softc *sc, u_long flags) { __cpu_simple_unlock(&sc->sc_pic.pic_lock); @@ -151,7 +151,7 @@ ioapic_unlock(struct ioapic_softc *sc, u_long flags) /* * Register read/write routines. */ -static __inline u_int32_t +static inline u_int32_t ioapic_read_ul(struct ioapic_softc *sc,int regid) { u_int32_t val; @@ -163,14 +163,14 @@ ioapic_read_ul(struct ioapic_softc *sc,int regid) } -static __inline void +static inline void ioapic_write_ul(struct ioapic_softc *sc,int regid, u_int32_t val) { *(sc->sc_reg) = regid; *(sc->sc_data) = val; } -static __inline u_int32_t +static inline u_int32_t ioapic_read(struct ioapic_softc *sc, int regid) { u_int32_t val; @@ -182,7 +182,7 @@ ioapic_read(struct ioapic_softc *sc, int regid) return val; } -static __inline void +static inline void ioapic_write(struct ioapic_softc *sc,int regid, int val) { u_long flags; @@ -232,7 +232,7 @@ ioapic_find_bybase(int vec) return NULL; } -static __inline void +static inline void ioapic_add(struct ioapic_softc *sc) { struct ioapic_softc **scp; diff --git a/sys/arch/x86/x86/lapic.c b/sys/arch/x86/x86/lapic.c index 3b2d153a236..c8fde956ed6 100644 --- a/sys/arch/x86/x86/lapic.c +++ b/sys/arch/x86/x86/lapic.c @@ -1,4 +1,4 @@ -/* $NetBSD: lapic.c,v 1.13 2005/12/11 12:19:47 christos Exp $ */ +/* $NetBSD: lapic.c,v 1.14 2005/12/24 20:07:42 perry Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.13 2005/12/11 12:19:47 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.14 2005/12/24 20:07:42 perry Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -438,9 +438,9 @@ void lapic_delay(usec) * XXX the following belong mostly or partly elsewhere.. */ -static __inline void i82489_icr_wait(void); +static inline void i82489_icr_wait(void); -static __inline void +static inline void i82489_icr_wait() { #ifdef DIAGNOSTIC diff --git a/sys/arch/xen/i386/gdt.c b/sys/arch/xen/i386/gdt.c index a5b1f89f3c9..58247d3008f 100644 --- a/sys/arch/xen/i386/gdt.c +++ b/sys/arch/xen/i386/gdt.c @@ -1,4 +1,4 @@ -/* $NetBSD: gdt.c,v 1.7 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: gdt.c,v 1.8 2005/12/24 20:07:48 perry Exp $ */ /* NetBSD: gdt.c,v 1.32 2004/02/13 11:36:13 wiz Exp */ /*- @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.7 2005/12/11 12:19:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.8 2005/12/24 20:07:48 perry Exp $"); #include "opt_multiprocessor.h" #include "opt_xen.h" @@ -60,8 +60,8 @@ int gdt_free[2]; /* next free slot; terminated with GNULL_SEL */ struct lock gdt_lock_store; -static __inline void gdt_lock(void); -static __inline void gdt_unlock(void); +static inline void gdt_lock(void); +static inline void gdt_unlock(void); void gdt_init(void); void gdt_grow(int); int gdt_get_slot(void); @@ -78,14 +78,14 @@ void gdt_put_slot1(int, int); * some time after the GDT is unlocked, so gdt_compact() could attempt to * reclaim it. */ -static __inline void +static inline void gdt_lock() { (void) lockmgr(&gdt_lock_store, LK_EXCLUSIVE, NULL); } -static __inline void +static inline void gdt_unlock() { diff --git a/sys/arch/xen/i386/identcpu.c b/sys/arch/xen/i386/identcpu.c index 5a221e1a3e0..b23451f0d7b 100644 --- a/sys/arch/xen/i386/identcpu.c +++ b/sys/arch/xen/i386/identcpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.7 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: identcpu.c,v 1.8 2005/12/24 20:07:48 perry Exp $ */ /* NetBSD: identcpu.c,v 1.16 2004/04/05 02:09:41 mrg Exp */ /*- @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.7 2005/12/11 12:19:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.8 2005/12/24 20:07:48 perry Exp $"); #include "opt_cputype.h" @@ -141,14 +141,14 @@ static const char *intel_family6_name(struct cpu_info *); static void transmeta_cpu_info(struct cpu_info *); -static __inline u_char +static inline u_char cyrix_read_reg(u_char reg) { outb(0x22, reg); return inb(0x23); } -static __inline void +static inline void cyrix_write_reg(u_char reg, u_char data) { outb(0x22, reg); diff --git a/sys/arch/xen/i386/machdep.c b/sys/arch/xen/i386/machdep.c index 9b7b20a6be5..97687df58f0 100644 --- a/sys/arch/xen/i386/machdep.c +++ b/sys/arch/xen/i386/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.21 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.22 2005/12/24 20:07:48 perry Exp $ */ /* NetBSD: machdep.c,v 1.559 2004/07/22 15:12:46 mycroft Exp */ /*- @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2005/12/11 12:19:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.22 2005/12/24 20:07:48 perry Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -880,7 +880,7 @@ haltsys: if (cngetc() == 0) { /* no console attached, so just hlt */ for(;;) { - __asm __volatile("hlt"); + __asm volatile("hlt"); } } cnpollc(0); diff --git a/sys/arch/xen/i386/npx.c b/sys/arch/xen/i386/npx.c index f66f09905f9..95684682bd7 100644 --- a/sys/arch/xen/i386/npx.c +++ b/sys/arch/xen/i386/npx.c @@ -1,4 +1,4 @@ -/* $NetBSD: npx.c,v 1.5 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: npx.c,v 1.6 2005/12/24 20:07:48 perry Exp $ */ /* NetBSD: npx.c,v 1.103 2004/03/21 10:56:24 simonb Exp */ /*- @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.5 2005/12/11 12:19:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.6 2005/12/24 20:07:48 perry Exp $"); #if 0 #define IPRINTF(x) printf x @@ -172,7 +172,7 @@ extern int i386_fpu_fdivbug; struct npx_softc *npx_softc; -static __inline void +static inline void fpu_save(union savefpu *addr) { #ifdef I686_CPU diff --git a/sys/arch/xen/i386/pmap.c b/sys/arch/xen/i386/pmap.c index 38f3106ac33..57118a48a1c 100644 --- a/sys/arch/xen/i386/pmap.c +++ b/sys/arch/xen/i386/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.17 2005/11/16 22:41:20 jld Exp $ */ +/* $NetBSD: pmap.c,v 1.18 2005/12/24 20:07:48 perry Exp $ */ /* NetBSD: pmap.c,v 1.179 2004/10/10 09:55:24 yamt Exp */ /* @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.17 2005/11/16 22:41:20 jld Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.18 2005/12/24 20:07:48 perry Exp $"); #include "opt_cputype.h" #include "opt_user_ldt.h" @@ -411,7 +411,7 @@ static int pv_nfpvents; /* # of free pv entries */ #define PVE_HIWAT (PVE_LOWAT + (PVE_PER_PVPAGE * 2)) /* high water mark */ -static __inline int +static inline int pv_compare(struct pv_entry *a, struct pv_entry *b) { if (a->pv_pmap < b->pv_pmap) @@ -540,7 +540,7 @@ u_int curapdp; * of course the kernel is always loaded */ -__inline static boolean_t +inline static boolean_t pmap_is_curpmap(pmap) struct pmap *pmap; { @@ -553,7 +553,7 @@ pmap_is_curpmap(pmap) * pmap_is_active: is this pmap loaded into the specified processor's %cr3? */ -__inline static boolean_t +inline static boolean_t pmap_is_active(pmap, cpu_id) struct pmap *pmap; int cpu_id; @@ -567,7 +567,7 @@ pmap_is_active(pmap, cpu_id) * pmap_tmpmap_pa: map a page in for tmp usage */ -__inline static vaddr_t +inline static vaddr_t pmap_tmpmap_pa(pa) paddr_t pa; { @@ -590,7 +590,7 @@ pmap_tmpmap_pa(pa) * pmap_tmpunmap_pa: unmap a tmp use page (undoes pmap_tmpmap_pa) */ -__inline static void +inline static void pmap_tmpunmap_pa() { #ifdef MULTIPROCESSOR @@ -619,7 +619,7 @@ pmap_tmpunmap_pa() * => do NOT use this on kernel mappings [why? because pv_ptp may be NULL] */ -__inline static pt_entry_t * +inline static pt_entry_t * pmap_tmpmap_pvepte(pve) struct pv_entry *pve; { @@ -640,7 +640,7 @@ pmap_tmpmap_pvepte(pve) * pmap_tmpunmap_pvepte: release a mapping obtained with pmap_tmpmap_pvepte */ -__inline static void +inline static void pmap_tmpunmap_pvepte(pve) struct pv_entry *pve; { @@ -651,7 +651,7 @@ pmap_tmpunmap_pvepte(pve) pmap_tmpunmap_pa(); } -__inline static void +inline static void pmap_apte_flush(struct pmap *pmap) { #if defined(MULTIPROCESSOR) @@ -693,7 +693,7 @@ pmap_apte_flush(struct pmap *pmap) * => must be undone with pmap_unmap_ptes before returning */ -__inline static pt_entry_t * +inline static pt_entry_t * pmap_map_ptes(pmap) struct pmap *pmap; { @@ -755,7 +755,7 @@ pmap_map_ptes(pmap) * pmap_unmap_ptes: unlock the PTE mapping of "pmap" */ -__inline static void +inline static void pmap_unmap_ptes(pmap) struct pmap *pmap; { @@ -790,7 +790,7 @@ pmap_unmap_ptes(pmap) } } -__inline static void +inline static void pmap_exec_account(struct pmap *pm, vaddr_t va, pt_entry_t opte, pt_entry_t npte) { if (curproc == NULL || curproc->p_vmspace == NULL || @@ -816,7 +816,7 @@ pmap_exec_account(struct pmap *pm, vaddr_t va, pt_entry_t opte, pt_entry_t npte) } } -__inline static pt_entry_t +inline static pt_entry_t pte_mtop(pt_entry_t pte) { pt_entry_t ppte; @@ -832,14 +832,14 @@ pte_mtop(pt_entry_t pte) return ppte; } -__inline static pt_entry_t +inline static pt_entry_t pte_get_ma(pt_entry_t *pte) { return *pte; } -__inline static pt_entry_t +inline static pt_entry_t pte_get(pt_entry_t *pte) { @@ -848,7 +848,7 @@ pte_get(pt_entry_t *pte) return *pte; } -__inline static pt_entry_t +inline static pt_entry_t pte_atomic_update_ma(pt_entry_t *pte, pt_entry_t *mapte, pt_entry_t npte) { pt_entry_t opte; @@ -883,7 +883,7 @@ pte_atomic_update_ma(pt_entry_t *pte, pt_entry_t *mapte, pt_entry_t npte) return opte; } -__inline static pt_entry_t +inline static pt_entry_t pte_atomic_update(pt_entry_t *pte, pt_entry_t *mapte, pt_entry_t npte) { pt_entry_t opte; @@ -1416,7 +1416,7 @@ pmap_init() * "try" is for optional functions like pmap_copy(). */ -__inline static struct pv_entry * +inline static struct pv_entry * pmap_alloc_pv(pmap, mode) struct pmap *pmap; int mode; @@ -1554,7 +1554,7 @@ pmap_add_pvpage(pvp, need_entry) * => we must be holding pvalloc_lock */ -__inline static void +inline static void pmap_free_pv_doit(pv) struct pv_entry *pv; { @@ -1589,7 +1589,7 @@ pmap_free_pv_doit(pv) * => we gain the pvalloc_lock */ -__inline static void +inline static void pmap_free_pv(pmap, pv) struct pmap *pmap; struct pv_entry *pv; @@ -1614,7 +1614,7 @@ pmap_free_pv(pmap, pv) * => we gain the pvalloc_lock */ -__inline static void +inline static void pmap_free_pvs(pmap, pvs) struct pmap *pmap; struct pv_entry *pvs; @@ -1669,7 +1669,7 @@ pmap_free_pvpage() * Observe locking order when locking both pvhs */ -__inline static void +inline static void pmap_lock_pvhs(struct pv_head *pvh1, struct pv_head *pvh2) { @@ -1706,7 +1706,7 @@ pmap_lock_pvhs(struct pv_head *pvh1, struct pv_head *pvh2) * => caller should adjust ptp's wire_count before calling */ -__inline static void +inline static void pmap_enter_pv(pvh, pve, pmap, va, ptp) struct pv_head *pvh; struct pv_entry *pve; /* preallocated pve for us to use */ @@ -1730,7 +1730,7 @@ pmap_enter_pv(pvh, pve, pmap, va, ptp) * => we return the removed pve */ -__inline static struct pv_entry * +inline static struct pv_entry * pmap_remove_pv(pvh, pmap, va) struct pv_head *pvh; struct pmap *pmap; @@ -1760,7 +1760,7 @@ pmap_remove_pv(pvh, pmap, va) * will ever leak onto the active/inactive queues) */ -__inline static struct vm_page * +inline static struct vm_page * pmap_alloc_ptp(pmap, pde_index) struct pmap *pmap; int pde_index; @@ -2573,7 +2573,7 @@ pmap_pageidlezero(pa) } #if defined(I686_CPU) if (cpu_features & CPUID_SSE2) - __asm __volatile ("movnti %1, %0" : + __asm volatile ("movnti %1, %0" : "=m"(*ptr) : "r" (0)); else #endif /* defined(I686_CPU) */ @@ -2582,7 +2582,7 @@ pmap_pageidlezero(pa) #if defined(I686_CPU) if (cpu_features & CPUID_SSE2) - __asm __volatile ("sfence" ::: "memory"); + __asm volatile ("sfence" ::: "memory"); #endif /* defined(I686_CPU) */ PTE_CLEAR(zpte, maptp); /* zap! */ @@ -4570,7 +4570,7 @@ pmap_tlb_shootdown(pmap, va, pte, cpumaskp) * => called at splvm if !MULTIPROCESSOR. * => return TRUE if we need to maintain user tlbs. */ -static __inline boolean_t +static inline boolean_t pmap_do_tlb_shootdown_checktlbstate(struct cpu_info *ci) { diff --git a/sys/arch/xen/include/bus_private.h b/sys/arch/xen/include/bus_private.h index 2a5d65e5f4b..b72190ff4e5 100644 --- a/sys/arch/xen/include/bus_private.h +++ b/sys/arch/xen/include/bus_private.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus_private.h,v 1.4 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: bus_private.h,v 1.5 2005/12/24 20:07:48 perry Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -31,9 +31,9 @@ #define _BUS_PHYS_TO_BUS(pa) ((bus_addr_t)xpmap_ptom(pa)) #define _BUS_VIRT_TO_BUS(pm, va) _bus_virt_to_bus((pm), (va)) -static __inline bus_addr_t _bus_virt_to_bus(struct pmap *, vaddr_t); +static inline bus_addr_t _bus_virt_to_bus(struct pmap *, vaddr_t); -static __inline bus_addr_t +static inline bus_addr_t _bus_virt_to_bus(struct pmap *pm, vaddr_t va) { bus_addr_t ba; diff --git a/sys/arch/xen/include/cpu.h b/sys/arch/xen/include/cpu.h index 4c34794e351..939b94ac5eb 100644 --- a/sys/arch/xen/include/cpu.h +++ b/sys/arch/xen/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.10 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.11 2005/12/24 20:07:48 perry Exp $ */ /* NetBSD: cpu.h,v 1.113 2004/02/20 17:35:01 yamt Exp */ /*- @@ -193,12 +193,12 @@ extern struct cpu_info *cpu_info_list; static struct cpu_info *curcpu(void); -__inline static struct cpu_info * __attribute__((__unused__)) +inline static struct cpu_info * __attribute__((__unused__)) curcpu() { struct cpu_info *ci; - __asm __volatile("movl %%fs:%1, %0" : + __asm volatile("movl %%fs:%1, %0" : "=r" (ci) : "m" (*(struct cpuinfo * const *)offsetof(struct cpu_info, ci_self))); diff --git a/sys/arch/xen/include/cpufunc.h b/sys/arch/xen/include/cpufunc.h index 002884420ab..dc54b892563 100644 --- a/sys/arch/xen/include/cpufunc.h +++ b/sys/arch/xen/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.8 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: cpufunc.h,v 1.9 2005/12/24 20:07:48 perry Exp $ */ /* NetBSD: cpufunc.h,v 1.28 2004/01/14 11:31:55 yamt Exp */ /*- @@ -51,20 +51,20 @@ #include <machine/xen.h> #include <machine/hypervisor.h> -static __inline void +static inline void x86_pause(void) { - __asm __volatile("pause"); + __asm volatile("pause"); } -static __inline void +static inline void x86_lfence(void) { /* * XXX it's better to use real lfence insn if available. */ - __asm __volatile("lock; addl $0, 0(%%esp)" : : : "memory"); + __asm volatile("lock; addl $0, 0(%%esp)" : : : "memory"); } #ifdef _KERNEL @@ -72,87 +72,87 @@ x86_lfence(void) extern unsigned int cpu_feature; #if 0 -static __inline void +static inline void invlpg(u_int addr) { - __asm __volatile("invlpg (%0)" : : "r" (addr) : "memory"); + __asm volatile("invlpg (%0)" : : "r" (addr) : "memory"); } #endif -static __inline void +static inline void lidt(void *p) { - __asm __volatile("lidt (%0)" : : "r" (p)); + __asm volatile("lidt (%0)" : : "r" (p)); } #if 0 -static __inline void +static inline void lldt(u_short sel) { - __asm __volatile("lldt %0" : : "r" (sel)); + __asm volatile("lldt %0" : : "r" (sel)); } #endif #if 0 -static __inline void +static inline void ltr(u_short sel) { - __asm __volatile("ltr %0" : : "r" (sel)); + __asm volatile("ltr %0" : : "r" (sel)); } -static __inline void +static inline void lcr0(u_int val) { - __asm __volatile("movl %0,%%cr0" : : "r" (val)); + __asm volatile("movl %0,%%cr0" : : "r" (val)); } -static __inline u_int +static inline u_int rcr0(void) { u_int val; - __asm __volatile("movl %%cr0,%0" : "=r" (val)); + __asm volatile("movl %%cr0,%0" : "=r" (val)); return val; } #endif -static __inline u_int +static inline u_int rcr2(void) { return 0; } #if 0 -static __inline void +static inline void lcr3(u_int val) { - __asm __volatile("movl %0,%%cr3" : : "r" (val)); + __asm volatile("movl %0,%%cr3" : : "r" (val)); } #endif -static __inline u_int +static inline u_int rcr3(void) { u_int val; - __asm __volatile("movl %%cr3,%0" : "=r" (val)); + __asm volatile("movl %%cr3,%0" : "=r" (val)); return val; } -static __inline void +static inline void lcr4(u_int val) { - __asm __volatile("movl %0,%%cr4" : : "r" (val)); + __asm volatile("movl %0,%%cr4" : : "r" (val)); } -static __inline u_int +static inline u_int rcr4(void) { u_int val; - __asm __volatile("movl %%cr4,%0" : "=r" (val)); + __asm volatile("movl %%cr4,%0" : "=r" (val)); return val; } #if 0 -static __inline void +static inline void tlbflush(void) { u_int val; @@ -160,7 +160,7 @@ tlbflush(void) lcr3(val); } -static __inline void +static inline void tlbflushg(void) { /* @@ -202,90 +202,90 @@ void setidt(int idx, /*XXX*/caddr_t func, int typ, int dpl); void dr0(caddr_t, u_int32_t, u_int32_t, u_int32_t); #if 0 -static __inline u_int +static inline u_int rdr6(void) { u_int val; - __asm __volatile("movl %%dr6,%0" : "=r" (val)); + __asm volatile("movl %%dr6,%0" : "=r" (val)); return val; } -static __inline void +static inline void ldr6(u_int val) { - __asm __volatile("movl %0,%%dr6" : : "r" (val)); + __asm volatile("movl %0,%%dr6" : : "r" (val)); } #endif /* XXXX ought to be in psl.h with spl() functions */ -static __inline void +static inline void disable_intr(void) { __cli(); } -static __inline void +static inline void enable_intr(void) { __sti(); } -static __inline u_long +static inline u_long read_eflags(void) { u_long ef; - __asm __volatile("pushfl; popl %0" : "=r" (ef)); + __asm volatile("pushfl; popl %0" : "=r" (ef)); return (ef); } -static __inline void +static inline void write_eflags(u_long ef) { - __asm __volatile("pushl %0; popfl" : : "r" (ef)); + __asm volatile("pushl %0; popfl" : : "r" (ef)); } -static __inline u_int64_t +static inline u_int64_t rdmsr(u_int msr) { u_int64_t rv; - __asm __volatile("rdmsr" : "=A" (rv) : "c" (msr)); + __asm volatile("rdmsr" : "=A" (rv) : "c" (msr)); return (rv); } -static __inline void +static inline void wrmsr(u_int msr, u_int64_t newval) { - __asm __volatile("wrmsr" : : "A" (newval), "c" (msr)); + __asm volatile("wrmsr" : : "A" (newval), "c" (msr)); } -static __inline u_int64_t +static inline u_int64_t rdtsc(void) { u_int64_t rv; - __asm __volatile("rdtsc" : "=A" (rv)); + __asm volatile("rdtsc" : "=A" (rv)); return (rv); } -static __inline u_int64_t +static inline u_int64_t rdpmc(u_int pmc) { u_int64_t rv; - __asm __volatile("rdpmc" : "=A" (rv) : "c" (pmc)); + __asm volatile("rdpmc" : "=A" (rv) : "c" (pmc)); return (rv); } /* Break into DDB/KGDB. */ -static __inline void +static inline void breakpoint(void) { - __asm __volatile("int $3"); + __asm volatile("int $3"); } #define read_psl() (HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask) diff --git a/sys/arch/xen/include/intr.h b/sys/arch/xen/include/intr.h index 1d51ac73478..c5a44c3a7ca 100644 --- a/sys/arch/xen/include/intr.h +++ b/sys/arch/xen/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.7 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: intr.h,v 1.8 2005/12/24 20:07:48 perry Exp $ */ /* NetBSD intr.h,v 1.15 2004/10/31 10:39:34 yamt Exp */ /*- @@ -104,14 +104,14 @@ extern struct intrstub xenev_stubs[]; extern void Xspllower(int); -static __inline int splraise(int); -static __inline void spllower(int); -static __inline void softintr(int); +static inline int splraise(int); +static inline void spllower(int); +static inline void softintr(int); /* * Add a mask to cpl, and return the old value of cpl. */ -static __inline int +static inline int splraise(int nlevel) { int olevel; @@ -128,7 +128,7 @@ splraise(int nlevel) * Restore a value to cpl (unmasking interrupts). If any unmasked * interrupts are pending, call Xspllower() to process them. */ -static __inline void +static inline void spllower(int nlevel) { struct cpu_info *ci = curcpu(); @@ -177,12 +177,12 @@ spllower(int nlevel) * * XXX always scheduled on the current CPU. */ -static __inline void +static inline void softintr(int sir) { struct cpu_info *ci = curcpu(); - __asm __volatile("lock ; orl %1, %0" : + __asm volatile("lock ; orl %1, %0" : "=m"(ci->ci_ipending) : "ir" (1 << sir)); } diff --git a/sys/arch/xen/include/pmap.h b/sys/arch/xen/include/pmap.h index c74ad49ecfd..aef07bb1da3 100644 --- a/sys/arch/xen/include/pmap.h +++ b/sys/arch/xen/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.6 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: pmap.h,v 1.7 2005/12/24 20:07:48 perry Exp $ */ /* NetBSD: pmap.h,v 1.82 2004/02/20 17:35:01 yamt Exp */ /* @@ -380,7 +380,7 @@ boolean_t pmap_pageidlezero(paddr_t); */ /*ARGSUSED*/ -static __inline void +static inline void pmap_remove_all(struct pmap *pmap) { /* Nothing. */ @@ -391,7 +391,7 @@ pmap_remove_all(struct pmap *pmap) * if hardware doesn't support one-page flushing) */ -__inline static void __attribute__((__unused__)) +inline static void __attribute__((__unused__)) pmap_update_pg(vaddr_t va) { #if defined(I386_CPU) @@ -406,7 +406,7 @@ pmap_update_pg(vaddr_t va) * pmap_update_2pg: flush two pages from the TLB */ -__inline static void __attribute__((__unused__)) +inline static void __attribute__((__unused__)) pmap_update_2pg(vaddr_t va, vaddr_t vb) { #if defined(I386_CPU) @@ -429,7 +429,7 @@ pmap_update_2pg(vaddr_t va, vaddr_t vb) * unprotecting a page is done on-demand at fault time. */ -__inline static void __attribute__((__unused__)) +inline static void __attribute__((__unused__)) pmap_page_protect(struct vm_page *pg, vm_prot_t prot) { if ((prot & VM_PROT_WRITE) == 0) { @@ -449,7 +449,7 @@ pmap_page_protect(struct vm_page *pg, vm_prot_t prot) * unprotecting a page is done on-demand at fault time. */ -__inline static void __attribute__((__unused__)) +inline static void __attribute__((__unused__)) pmap_protect(struct pmap *pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot) { if ((prot & VM_PROT_WRITE) == 0) { @@ -472,7 +472,7 @@ pmap_protect(struct pmap *pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot) #include <lib/libkern/libkern.h> -static __inline pt_entry_t * __attribute__((__unused__)) +static inline pt_entry_t * __attribute__((__unused__)) vtopte(vaddr_t va) { @@ -481,7 +481,7 @@ vtopte(vaddr_t va) return (PTE_BASE + x86_btop(va)); } -static __inline pt_entry_t * __attribute__((__unused__)) +static inline pt_entry_t * __attribute__((__unused__)) kvtopte(vaddr_t va) { diff --git a/sys/arch/xen/include/xen.h b/sys/arch/xen/include/xen.h index 038e405d534..1a6122151de 100644 --- a/sys/arch/xen/include/xen.h +++ b/sys/arch/xen/include/xen.h @@ -1,4 +1,4 @@ -/* $NetBSD: xen.h,v 1.16 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: xen.h,v 1.17 2005/12/24 20:07:48 perry Exp $ */ /* * @@ -174,7 +174,7 @@ x86_atomic_xchg(volatile uint32_t *ptr, unsigned long val) { unsigned long result; - __asm __volatile(__LOCK_PREFIX + __asm volatile(__LOCK_PREFIX "xchgl %0,%1" :"=r" (result) :"m" (*ptr), "0" (val) @@ -188,7 +188,7 @@ x86_atomic_test_and_clear_bit(volatile void *ptr, int bitno) { int result; - __asm __volatile(__LOCK_PREFIX + __asm volatile(__LOCK_PREFIX "btrl %2,%1 ;" "sbbl %0,%0" :"=r" (result), "=m" (*(volatile uint32_t *)(ptr)) @@ -201,7 +201,7 @@ x86_atomic_test_and_set_bit(volatile void *ptr, int bitno) { int result; - __asm __volatile(__LOCK_PREFIX + __asm volatile(__LOCK_PREFIX "btsl %2,%1 ;" "sbbl %0,%0" :"=r" (result), "=m" (*(volatile uint32_t *)(ptr)) @@ -209,19 +209,19 @@ x86_atomic_test_and_set_bit(volatile void *ptr, int bitno) return result; } -static __inline int +static inline int x86_constant_test_bit(const volatile void *ptr, int bitno) { return ((1UL << (bitno & 31)) & (((const volatile uint32_t *) ptr)[bitno >> 5])) != 0; } -static __inline int +static inline int x86_variable_test_bit(const volatile void *ptr, int bitno) { int result; - __asm __volatile( + __asm volatile( "btl %2,%1 ;" "sbbl %0,%0" :"=r" (result) @@ -234,25 +234,25 @@ x86_variable_test_bit(const volatile void *ptr, int bitno) x86_constant_test_bit((ptr),(bitno)) : \ x86_variable_test_bit((ptr),(bitno))) -static __inline void +static inline void x86_atomic_set_bit(volatile void *ptr, int bitno) { - __asm __volatile(__LOCK_PREFIX + __asm volatile(__LOCK_PREFIX "btsl %1,%0" :"=m" (*(volatile uint32_t *)(ptr)) :"Ir" (bitno)); } -static __inline void +static inline void x86_atomic_clear_bit(volatile void *ptr, int bitno) { - __asm __volatile(__LOCK_PREFIX + __asm volatile(__LOCK_PREFIX "btrl %1,%0" :"=m" (*(volatile uint32_t *)(ptr)) :"Ir" (bitno)); } -static __inline void +static inline void wbinvd(void) { xpq_flush_cache(); diff --git a/sys/arch/xen/include/xenfunc.h b/sys/arch/xen/include/xenfunc.h index d836eb0b23a..7e2f991b4a5 100644 --- a/sys/arch/xen/include/xenfunc.h +++ b/sys/arch/xen/include/xenfunc.h @@ -1,4 +1,4 @@ -/* $NetBSD: xenfunc.h,v 1.8 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: xenfunc.h,v 1.9 2005/12/24 20:07:48 perry Exp $ */ /* * @@ -50,7 +50,7 @@ void xen_set_ldt(vaddr_t, uint32_t); void xen_update_descriptor(union descriptor *, union descriptor *); -static __inline void +static inline void invlpg(u_int addr) { int s = splvm(); @@ -59,7 +59,7 @@ invlpg(u_int addr) splx(s); } -static __inline void +static inline void lldt(u_short sel) { @@ -71,19 +71,19 @@ lldt(u_short sel) cpu_info_primary.ci_gdt[IDXSELN(sel)].ld.ld_entries); } -static __inline void +static inline void ltr(u_short sel) { __PRINTK(("XXX ltr not supported\n")); } -static __inline void +static inline void lcr0(u_int val) { __PRINTK(("XXX lcr0 not supported\n")); } -static __inline u_int +static inline u_int rcr0(void) { __PRINTK(("XXX rcr0 not supported\n")); @@ -91,7 +91,7 @@ rcr0(void) } #define lcr3(_v) _lcr3((_v), __FILE__, __LINE__) -static __inline void +static inline void _lcr3(u_int val, const char *file, int line) { int s = splvm(); @@ -101,7 +101,7 @@ _lcr3(u_int val, const char *file, int line) splx(s); } -static __inline void +static inline void tlbflush(void) { int s = splvm(); @@ -112,7 +112,7 @@ tlbflush(void) #define tlbflushg() tlbflush() /* we don't use PGE */ -static __inline u_int +static inline u_int rdr6(void) { u_int val; @@ -121,7 +121,7 @@ rdr6(void) return val; } -static __inline void +static inline void ldr6(u_int val) { diff --git a/sys/arch/xen/include/xenpmap.h b/sys/arch/xen/include/xenpmap.h index 373f1f7c567..253495d0d62 100644 --- a/sys/arch/xen/include/xenpmap.h +++ b/sys/arch/xen/include/xenpmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: xenpmap.h,v 1.10 2005/12/11 12:19:48 christos Exp $ */ +/* $NetBSD: xenpmap.h,v 1.11 2005/12/24 20:07:48 perry Exp $ */ /* * @@ -212,14 +212,14 @@ paddr_t *xpmap_phys_to_machine_mapping; #endif #define XPMAP_OFFSET (KERNTEXTOFF - KERNBASE) -static __inline paddr_t +static inline paddr_t xpmap_mtop(paddr_t mpa) { return ((machine_to_phys_mapping[mpa >> PAGE_SHIFT] << PAGE_SHIFT) + XPMAP_OFFSET) | (mpa & ~PG_FRAME); } -static __inline paddr_t +static inline paddr_t xpmap_ptom(paddr_t ppa) { return (xpmap_phys_to_machine_mapping[(ppa - @@ -227,7 +227,7 @@ xpmap_ptom(paddr_t ppa) | (ppa & ~PG_FRAME); } -static __inline paddr_t +static inline paddr_t xpmap_ptom_masked(paddr_t ppa) { return (xpmap_phys_to_machine_mapping[(ppa - diff --git a/sys/arch/xen/xen/xbdback.c b/sys/arch/xen/xen/xbdback.c index 91d13609d48..1d36b844c02 100644 --- a/sys/arch/xen/xen/xbdback.c +++ b/sys/arch/xen/xen/xbdback.c @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback.c,v 1.17 2005/12/11 12:19:50 christos Exp $ */ +/* $NetBSD: xbdback.c,v 1.18 2005/12/24 20:07:48 perry Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -132,7 +132,7 @@ struct xbdback_instance { #define xbdi_get(xbdip) (++(xbdip)->refcnt) #define xbdi_put(xbdip) \ do { \ - __asm __volatile("decl %0" \ + __asm volatile("decl %0" \ : "=m"((xbdip)->refcnt) : "m"((xbdip)->refcnt)); \ if (0 == (xbdip)->refcnt) \ xbdback_finish_disconnect(xbdip); \ |
