From owner-svn-src-all@FreeBSD.ORG Thu Dec 17 07:36:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9F9B1065670; Thu, 17 Dec 2009 07:36:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5BD18FC1A; Thu, 17 Dec 2009 07:36:40 +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 nBH7aeOq024235; Thu, 17 Dec 2009 07:36:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBH7aexf024227; Thu, 17 Dec 2009 07:36:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200912170736.nBH7aexf024227@svn.freebsd.org> From: Marius Strobl Date: Thu, 17 Dec 2009 07:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200625 - in stable/7/sys: amd64/include arm/include i386/include ia64/include powerpc/include sparc64/include sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2009 07:36:41 -0000 Author: marius Date: Thu Dec 17 07:36:40 2009 New Revision: 200625 URL: http://svn.freebsd.org/changeset/base/200625 Log: MFC: r195376 Cleanup ALIGNED_POINTER: o add to platforms where it was missing (arm, i386, powerpc, sparc64, sun4v) o define as "1" on amd64 and i386 where there is no restriction o make the type returned consistent with ALIGN o remove _ALIGNED_POINTER o make associated comments consistent Reviewed by: bde, imp, marcel Approved by: sam (MFC to stable/7) Modified: stable/7/sys/amd64/include/param.h stable/7/sys/arm/include/param.h stable/7/sys/i386/include/param.h stable/7/sys/ia64/include/param.h stable/7/sys/powerpc/include/param.h stable/7/sys/sparc64/include/param.h stable/7/sys/sun4v/include/param.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/include/param.h ============================================================================== --- stable/7/sys/amd64/include/param.h Thu Dec 17 07:18:06 2009 (r200624) +++ stable/7/sys/amd64/include/param.h Thu Dec 17 07:36:40 2009 (r200625) @@ -47,12 +47,6 @@ * Round p (pointer or byte index) up to a correctly-aligned value * for all data types (int, long, ...). The result is u_long and * must be cast to any desired pointer type. - * - * ALIGNED_POINTER is a boolean macro that checks whether an address - * is valid to fetch data elements of type t from on this architecture. - * This does not reflect the optimal alignment, just the possibility - * (within reasonable limits). - * */ #ifndef _ALIGNBYTES #define _ALIGNBYTES (sizeof(long) - 1) @@ -60,9 +54,6 @@ #ifndef _ALIGN #define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES) #endif -#ifndef _ALIGNED_POINTER -#define _ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) -#endif #ifndef _NO_NAMESPACE_POLLUTION @@ -87,7 +78,13 @@ #define ALIGNBYTES _ALIGNBYTES #define ALIGN(p) _ALIGN(p) -#define ALIGNED_POINTER(p,t) _ALIGNED_POINTER(p,t) +/* + * ALIGNED_POINTER is a boolean macro that checks whether an address + * is valid to fetch data elements of type t from on this architecture. + * This does not reflect the optimal alignment, just the possibility + * (within reasonable limits). + */ +#define ALIGNED_POINTER(p, t) 1 /* Size of the level 1 page table units */ Modified: stable/7/sys/arm/include/param.h ============================================================================== --- stable/7/sys/arm/include/param.h Thu Dec 17 07:18:06 2009 (r200624) +++ stable/7/sys/arm/include/param.h Thu Dec 17 07:36:40 2009 (r200625) @@ -80,6 +80,13 @@ #define ALIGNBYTES _ALIGNBYTES #define ALIGN(p) _ALIGN(p) +/* + * ALIGNED_POINTER is a boolean macro that checks whether an address + * is valid to fetch data elements of type t from on this architecture. + * This does not reflect the optimal alignment, just the possibility + * (within reasonable limits). + */ +#define ALIGNED_POINTER(p, t) ((((unsigned)(p)) & (sizeof(t)-1)) == 0) #define PAGE_SHIFT 12 #define PAGE_SIZE (1 << PAGE_SHIFT) /* Page size */ Modified: stable/7/sys/i386/include/param.h ============================================================================== --- stable/7/sys/i386/include/param.h Thu Dec 17 07:18:06 2009 (r200624) +++ stable/7/sys/i386/include/param.h Thu Dec 17 07:36:40 2009 (r200625) @@ -73,6 +73,13 @@ #define ALIGNBYTES _ALIGNBYTES #define ALIGN(p) _ALIGN(p) +/* + * ALIGNED_POINTER is a boolean macro that checks whether an address + * is valid to fetch data elements of type t from on this architecture. + * This does not reflect the optimal alignment, just the possibility + * (within reasonable limits). + */ +#define ALIGNED_POINTER(p, t) 1 #define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ #define PAGE_SIZE (1<