From owner-svn-src-projects@FreeBSD.ORG Mon Jan 10 03:59:05 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59FCD106564A; Mon, 10 Jan 2011 03:59:05 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 488F58FC08; Mon, 10 Jan 2011 03:59:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0A3x5Ln066412; Mon, 10 Jan 2011 03:59:05 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0A3x5JB066405; Mon, 10 Jan 2011 03:59:05 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201101100359.p0A3x5JB066405@svn.freebsd.org> From: Jeff Roberson Date: Mon, 10 Jan 2011 03:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217218 - in projects/ofed/head/sys: amd64/include conf i386/include net netinet vm X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2011 03:59:05 -0000 Author: jeff Date: Mon Jan 10 03:59:04 2011 New Revision: 217218 URL: http://svn.freebsd.org/changeset/base/217218 Log: - Eliminate extraneous diffs as found by an audit of diffs to current. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/amd64/include/endian.h projects/ofed/head/sys/conf/kern.pre.mk projects/ofed/head/sys/i386/include/endian.h projects/ofed/head/sys/net/if_arp.h projects/ofed/head/sys/netinet/ip_var.h projects/ofed/head/sys/vm/vm_map.h Modified: projects/ofed/head/sys/amd64/include/endian.h ============================================================================== --- projects/ofed/head/sys/amd64/include/endian.h Mon Jan 10 03:57:27 2011 (r217217) +++ projects/ofed/head/sys/amd64/include/endian.h Mon Jan 10 03:59:04 2011 (r217218) @@ -74,14 +74,11 @@ __byte_swap_int_var(__uint32_t x) { register __uint32_t _x; - _x = x; __asm ("bswap %0" : "+r" (_x)); return (_x); } -#if 1 /* def __OPTIMIZE__ */ - #define __byte_swap_int_const(x) \ (__uint32_t)((((x) & 0xff000000) >> 24) | \ (((x) & 0x00ff0000) >> 8) | \ @@ -90,12 +87,6 @@ __byte_swap_int_var(__uint32_t x) #define __bswap32(x) (__builtin_constant_p(x) ? \ __byte_swap_int_const(x) : __byte_swap_int_var(x)) -#else /* __OPTIMIZE__ */ - -#define __bswap32(x) __byte_swap_int_var(x) - -#endif /* __OPTIMIZE__ */ - static __inline __uint64_t __byte_swap_long_var(__uint64_t x) { @@ -106,8 +97,6 @@ __byte_swap_long_var(__uint64_t x) return (_x); } -#if 1 /* def __OPTIMIZE__ */ - #define __byte_swap_long_const(x) \ (__uint64_t)((((__uint64_t)x >> 56) | \ (((__uint64_t)x >> 40) & 0xff00) | \ @@ -121,12 +110,6 @@ __byte_swap_long_var(__uint64_t x) #define __bswap64(x) (__builtin_constant_p(x) ? \ __byte_swap_long_const(x) : __byte_swap_long_var(x)) -#else /* __OPTIMIZE__ */ - -#define __bswap64(x) __byte_swap_long_var(x) - -#endif /* __OPTIMIZE__ */ - #define __byte_swap_short_const(_x) (__uint16_t)((_x) << 8 | (_x) >> 8) static __inline __uint16_t Modified: projects/ofed/head/sys/conf/kern.pre.mk ============================================================================== --- projects/ofed/head/sys/conf/kern.pre.mk Mon Jan 10 03:57:27 2011 (r217217) +++ projects/ofed/head/sys/conf/kern.pre.mk Mon Jan 10 03:59:04 2011 (r217218) @@ -30,10 +30,10 @@ COPTFLAGS?= -O _MINUS_O= -O CTFFLAGS+= -g . else -_MINUS_O= -O +_MINUS_O= -O2 . endif . if ${MACHINE_CPUARCH} == "amd64" -COPTFLAGS?=-O -frename-registers -pipe +COPTFLAGS?=-O2 -frename-registers -pipe . else COPTFLAGS?=${_MINUS_O} -pipe . endif Modified: projects/ofed/head/sys/i386/include/endian.h ============================================================================== --- projects/ofed/head/sys/i386/include/endian.h Mon Jan 10 03:57:27 2011 (r217217) +++ projects/ofed/head/sys/i386/include/endian.h Mon Jan 10 03:59:04 2011 (r217218) @@ -69,50 +69,47 @@ extern "C" { #if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE_BUILTIN_CONSTANT_P) -#define __byte_swap_int_var(x) \ -__extension__ ({ register __uint32_t __X = (x); \ - __asm ("bswap %0" : "+r" (__X)); \ - __X; }) +static __inline __uint32_t +__byte_swap_int_var(__uint32_t x) +{ + register __uint32_t _x; -#ifdef __OPTIMIZE__ + _x = x; + __asm ("bswap %0" : "+r" (_x)); + return (_x); +} #define __byte_swap_int_const(x) \ - ((((x) & 0xff000000) >> 24) | \ + (__uint32_t)((((x) & 0xff000000) >> 24) | \ (((x) & 0x00ff0000) >> 8) | \ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24)) -#define __byte_swap_int(x) (__builtin_constant_p(x) ? \ +#define __bswap32(x) (__builtin_constant_p(x) ? \ __byte_swap_int_const(x) : __byte_swap_int_var(x)) -#else /* __OPTIMIZE__ */ - -#define __byte_swap_int(x) __byte_swap_int_var(x) +#define __byte_swap_64_const(x) \ + (__uint64_t)((((__uint64_t)x >> 56) | \ + (((__uint64_t)x >> 40) & 0xff00) | \ + (((__uint64_t)x >> 24) & 0xff0000) | \ + (((__uint64_t)x >> 8) & 0xff000000) | \ + (((__uint64_t)x << 8) & (0xfful << 32)) | \ + (((__uint64_t)x << 24) & (0xfful << 40)) | \ + (((__uint64_t)x << 40) & (0xfful << 48)) | \ + (((__uint64_t)x << 56)))) -#endif /* __OPTIMIZE__ */ +#define __bswap64(x) __byte_swap_64_const(x) -static __inline __uint64_t -__bswap64(__uint64_t _x) -{ - - return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) | - ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) | - ((_x << 24) & ((__uint64_t)0xff << 40)) | - ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); -} - -static __inline __uint32_t -__bswap32(__uint32_t _x) -{ - - return (__byte_swap_int(_x)); -} +#define __byte_swap_short_const(_x) (__uint16_t)((_x) << 8 | (_x) >> 8) static __inline __uint16_t -__bswap16(__uint16_t _x) +__byte_swap_short_var(__uint16_t x) { - return (_x << 8 | _x >> 8); + return __byte_swap_short_const(x); } +#define __bswap16(x) (__builtin_constant_p(x) ? \ + __byte_swap_short_const(x) : __byte_swap_short_var(x)) + #define __htonl(x) __bswap32(x) #define __htons(x) __bswap16(x) #define __ntohl(x) __bswap32(x) Modified: projects/ofed/head/sys/net/if_arp.h ============================================================================== --- projects/ofed/head/sys/net/if_arp.h Mon Jan 10 03:57:27 2011 (r217217) +++ projects/ofed/head/sys/net/if_arp.h Mon Jan 10 03:59:04 2011 (r217218) @@ -50,7 +50,7 @@ struct arphdr { #define ARPHRD_ARCNET 7 /* arcnet hardware format */ #define ARPHRD_FRELAY 15 /* frame relay hardware format */ #define ARPHRD_IEEE1394 24 /* firewire hardware format */ -#define ARPHRD_INFINIBAND 32 /* infiniband hardware format */ +#define ARPHRD_INFINIBAND 32 /* infiniband hardware format */ u_short ar_pro; /* format of protocol address */ u_char ar_hln; /* length of hardware address */ u_char ar_pln; /* length of protocol address */ Modified: projects/ofed/head/sys/netinet/ip_var.h ============================================================================== --- projects/ofed/head/sys/netinet/ip_var.h Mon Jan 10 03:57:27 2011 (r217217) +++ projects/ofed/head/sys/netinet/ip_var.h Mon Jan 10 03:59:04 2011 (r217218) @@ -307,7 +307,8 @@ extern int (*ip_dn_io_ptr)(struct mbuf * VNET_DECLARE(int, ip_do_randomid); #define V_ip_do_randomid VNET(ip_do_randomid) -#define ip_newid() ip_randomid() +#define ip_newid() ((V_ip_do_randomid != 0) ? ip_randomid() : \ + htons(V_ip_id++)) #endif /* _KERNEL */ Modified: projects/ofed/head/sys/vm/vm_map.h ============================================================================== --- projects/ofed/head/sys/vm/vm_map.h Mon Jan 10 03:57:27 2011 (r217217) +++ projects/ofed/head/sys/vm/vm_map.h Mon Jan 10 03:59:04 2011 (r217218) @@ -346,7 +346,7 @@ long vmspace_wired_count(struct vmspace #define VM_MAP_WIRE_NOHOLES 0 /* region must not have holes */ #define VM_MAP_WIRE_HOLESOK 2 /* region may have holes */ -#define VM_MAP_WIRE_WRITE 4 /* Validate writable. */ +#define VM_MAP_WIRE_WRITE 4 /* Validate writable. */ #ifdef _KERNEL boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t);