From owner-p4-projects@FreeBSD.ORG Wed Jan 30 06:48:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3F81B16A469; Wed, 30 Jan 2008 06:48:53 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B0816A417 for ; Wed, 30 Jan 2008 06:48:52 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AFE9C13C465 for ; Wed, 30 Jan 2008 06:48:52 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0U6mqtY091732 for ; Wed, 30 Jan 2008 06:48:52 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0U6mqB6091729 for perforce@freebsd.org; Wed, 30 Jan 2008 06:48:52 GMT (envelope-from imp@freebsd.org) Date: Wed, 30 Jan 2008 06:48:52 GMT Message-Id: <200801300648.m0U6mqB6091729@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 134451 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2008 06:48:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=134451 Change 134451 by imp@imp_lighthouse on 2008/01/30 06:48:22 Prefer uintXX_t to u_intXX_t Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpufunc.h#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpufunc.h#5 (text+ko) ==== @@ -131,7 +131,7 @@ #if 0 /* XXX mips64 */ #define MIPS_RDRW64_COP0(n,r) \ -static __inline u_int64_t \ +static __inline uint64_t \ mips_rd_ ## n (void) \ { \ int v0; \ @@ -141,7 +141,7 @@ return (v0); \ } \ static __inline void \ -mips_wr_ ## n (u_int64_t a0) \ +mips_wr_ ## n (uint64_t a0) \ { \ __asm __volatile ("dmtc0 %[a0], $"__XSTRING(r)";" \ __XSTRING(COP0_SYNC)";" \ @@ -162,7 +162,7 @@ #endif #define MIPS_RDRW32_COP0(n,r) \ -static __inline u_int32_t \ +static __inline uint32_t \ mips_rd_ ## n (void) \ { \ int v0; \ @@ -172,7 +172,7 @@ return (v0); \ } \ static __inline void \ -mips_wr_ ## n (u_int32_t a0) \ +mips_wr_ ## n (uint32_t a0) \ { \ __asm __volatile ("mtc0 %[a0], $"__XSTRING(r)";" \ __XSTRING(COP0_SYNC)";" \ @@ -201,7 +201,7 @@ MIPS_RDRW32_COP0(watchlo, MIPS_COP_0_WATCH_LO); MIPS_RDRW32_COP0(watchhi, MIPS_COP_0_WATCH_HI); -static __inline u_int32_t +static __inline uint32_t mips_rd_config_sel1(void) { int v0; @@ -245,13 +245,13 @@ #endif /* _KERNEL */ -#define readb(va) (*(volatile u_int8_t *) (va)) -#define readw(va) (*(volatile u_int16_t *) (va)) -#define readl(va) (*(volatile u_int32_t *) (va)) +#define readb(va) (*(volatile uint8_t *) (va)) +#define readw(va) (*(volatile uint16_t *) (va)) +#define readl(va) (*(volatile uint32_t *) (va)) -#define writeb(va, d) (*(volatile u_int8_t *) (va) = (d)) -#define writew(va, d) (*(volatile u_int16_t *) (va) = (d)) -#define writel(va, d) (*(volatile u_int32_t *) (va) = (d)) +#define writeb(va, d) (*(volatile uint8_t *) (va) = (d)) +#define writew(va, d) (*(volatile uint16_t *) (va) = (d)) +#define writel(va, d) (*(volatile uint32_t *) (va) = (d)) /* * I/O macros. @@ -271,64 +271,64 @@ #define in32(a) inl(a) #define out8rb(a,v) (*(volatile unsigned char*)(a) = (v)) -#define out16rb(a,v) (__out16rb((volatile u_int16_t *)(a), v)) -#define out32rb(a,v) (__out32rb((volatile u_int32_t *)(a), v)) +#define out16rb(a,v) (__out16rb((volatile uint16_t *)(a), v)) +#define out32rb(a,v) (__out32rb((volatile uint32_t *)(a), v)) #define in8rb(a) (*(volatile unsigned char*)(a)) -#define in16rb(a) (__in16rb((volatile u_int16_t *)(a))) -#define in32rb(a) (__in32rb((volatile u_int32_t *)(a))) +#define in16rb(a) (__in16rb((volatile uint16_t *)(a))) +#define in32rb(a) (__in32rb((volatile uint32_t *)(a))) #define _swap_(x) (((x) >> 24) | ((x) << 24) | \ (((x) >> 8) & 0xff00) | (((x) & 0xff00) << 8)) -static __inline void __out32rb(volatile u_int32_t *, u_int32_t); -static __inline void __out16rb(volatile u_int16_t *, u_int16_t); -static __inline u_int32_t __in32rb(volatile u_int32_t *); -static __inline u_int16_t __in16rb(volatile u_int16_t *); +static __inline void __out32rb(volatile uint32_t *, uint32_t); +static __inline void __out16rb(volatile uint16_t *, uint16_t); +static __inline uint32_t __in32rb(volatile uint32_t *); +static __inline uint16_t __in16rb(volatile uint16_t *); static __inline void -__out32rb(volatile u_int32_t *a, u_int32_t v) +__out32rb(volatile uint32_t *a, uint32_t v) { - u_int32_t _v_ = v; + uint32_t _v_ = v; _v_ = _swap_(_v_); out32(a, _v_); } static __inline void -__out16rb(volatile u_int16_t *a, u_int16_t v) +__out16rb(volatile uint16_t *a, uint16_t v) { - u_int16_t _v_; + uint16_t _v_; _v_ = ((v >> 8) & 0xff) | (v << 8); out16(a, _v_); } -static __inline u_int32_t -__in32rb(volatile u_int32_t *a) +static __inline uint32_t +__in32rb(volatile uint32_t *a) { - u_int32_t _v_; + uint32_t _v_; _v_ = in32(a); _v_ = _swap_(_v_); return _v_; } -static __inline u_int16_t -__in16rb(volatile u_int16_t *a) +static __inline uint16_t +__in16rb(volatile uint16_t *a) { - u_int16_t _v_; + uint16_t _v_; _v_ = in16(a); _v_ = ((_v_ >> 8) & 0xff) | (_v_ << 8); return _v_; } -void insb(u_int8_t *, u_int8_t *,int); -void insw(u_int16_t *, u_int16_t *,int); -void insl(u_int32_t *, u_int32_t *,int); -void outsb(u_int8_t *, const u_int8_t *,int); -void outsw(u_int16_t *, const u_int16_t *,int); -void outsl(u_int32_t *, const u_int32_t *,int); +void insb(uint8_t *, uint8_t *,int); +void insw(uint16_t *, uint16_t *,int); +void insl(uint32_t *, uint32_t *,int); +void outsb(uint8_t *, const uint8_t *,int); +void outsw(uint16_t *, const uint16_t *,int); +void outsl(uint32_t *, const uint32_t *,int); u_int loadandclear(volatile u_int *addr); #endif /* !_MACHINE_CPUFUNC_H_ */