summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-07-05 17:45:48 +0000
committersam <sam@FreeBSD.org>2009-07-05 17:45:48 +0000
commitc67dff7aca2dbc37c9abe5f0d576016dd2b9905c (patch)
tree5014c430476acd9a353d9342a22288dd1b848162 /sys/mips
parenteeddcf1cf56c015e07a4015b8058940ef0531643 (diff)
downloadFreeBSD-src-c67dff7aca2dbc37c9abe5f0d576016dd2b9905c.zip
FreeBSD-src-c67dff7aca2dbc37c9abe5f0d576016dd2b9905c.tar.gz
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: re (kensmith)
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/include/param.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/mips/include/param.h b/sys/mips/include/param.h
index ea599d1..250de77 100644
--- a/sys/mips/include/param.h
+++ b/sys/mips/include/param.h
@@ -84,10 +84,16 @@
*/
#define _ALIGNBYTES 7
#define _ALIGN(p) (((u_int)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
-#define ALIGNED_POINTER(p, t) ((((u_int32_t)(p)) & (sizeof (t) - 1)) == 0)
#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)
/*
* CACHE_LINE_SIZE is the compile-time maximum cache line size for an
OpenPOWER on IntegriCloud