aboutsummaryrefslogtreecommitdiff
path: root/sys/sun4v
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2009-07-05 17:45:48 +0000
committerSam Leffler <sam@FreeBSD.org>2009-07-05 17:45:48 +0000
commit8c393fd1f0cc514a007104469b11eaeeefb829b6 (patch)
tree5014c430476acd9a353d9342a22288dd1b848162 /sys/sun4v
parent559bfa18dce5da2a1ffd664bc16e2c4a6e49d8fc (diff)
Notes
Diffstat (limited to 'sys/sun4v')
-rw-r--r--sys/sun4v/include/param.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sun4v/include/param.h b/sys/sun4v/include/param.h
index e42abf50c978..4b26748cb985 100644
--- a/sys/sun4v/include/param.h
+++ b/sys/sun4v/include/param.h
@@ -70,6 +70,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) ((((u_long)(p)) & (sizeof (t) - 1)) == 0)
/*
* CACHE_LINE_SIZE is the compile-time maximum cache line size for an