aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/include/param.h
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2009-04-19 20:19:13 +0000
committerRobert Watson <rwatson@FreeBSD.org>2009-04-19 20:19:13 +0000
commita93fa8f2bbd27fcd845e2ed0b5359e14f0e19910 (patch)
tree30f708f0df558e2567b5c3f03e96c6e13b769058 /sys/sparc64/include/param.h
parent99d67eca502799fc5e63a6409033a0fabe79c64e (diff)
downloadsrc-a93fa8f2bbd27fcd845e2ed0b5359e14f0e19910.tar.gz
src-a93fa8f2bbd27fcd845e2ed0b5359e14f0e19910.zip
For each architecture, define CACHE_LINE_SHIFT and a derived
CACHE_LINE_SIZE constant. These constants are intended to over-estimate the cache line size, and be used at compile-time when a run-time tuning alternative isn't appropriate or available. Defaults for all architectures are 64 bytes, except powerpc where it is 128 bytes (used on G5 systems). MFC after: 2 weeks Discussed on: arch@
Notes
Notes: svn path=/head/; revision=191276
Diffstat (limited to 'sys/sparc64/include/param.h')
-rw-r--r--sys/sparc64/include/param.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/sparc64/include/param.h b/sys/sparc64/include/param.h
index 8a1c7df4aedf..e8f783f180b4 100644
--- a/sys/sparc64/include/param.h
+++ b/sys/sparc64/include/param.h
@@ -71,6 +71,11 @@
#define ALIGNBYTES _ALIGNBYTES
#define ALIGN(p) _ALIGN(p)
+#ifndef CACHE_LINE_SHIFT
+#define CACHE_LINE_SHIFT 6
+#endif
+#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT)
+
#define PAGE_SHIFT_8K 13
#define PAGE_SIZE_8K (1L<<PAGE_SHIFT_8K)
#define PAGE_MASK_8K (PAGE_SIZE_8K-1)