diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-04-19 20:19:13 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-04-19 20:19:13 +0000 |
commit | 8df790f38fc6501dadb8302ef4a236525bb7d2c4 (patch) | |
tree | 30f708f0df558e2567b5c3f03e96c6e13b769058 /sys/powerpc | |
parent | 293f0e00a8f2ff1afb964eb68e56e4ec5a140506 (diff) | |
download | FreeBSD-src-8df790f38fc6501dadb8302ef4a236525bb7d2c4.zip FreeBSD-src-8df790f38fc6501dadb8302ef4a236525bb7d2c4.tar.gz |
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@
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/include/param.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h index 1a910ba..7dddb30 100644 --- a/sys/powerpc/include/param.h +++ b/sys/powerpc/include/param.h @@ -79,6 +79,11 @@ #define ALIGNBYTES _ALIGNBYTES #define ALIGN(p) _ALIGN(p) +#ifndef CACHE_LINE_SHIFT +#define CACHE_LINE_SHIFT 7 +#endif +#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) + #define PAGE_SHIFT 12 #define PAGE_SIZE (1 << PAGE_SHIFT) /* Page size */ #define PAGE_MASK (PAGE_SIZE - 1) |