ia64/xen-unstable

annotate xen/include/asm-ia64/linux-xen/asm/cache.h @ 11013:6b821e310597

[XEN] Implement proper __read_mostly memory arrangemengt for x86.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Aug 08 15:14:43 2006 +0100 (2006-08-08)
parents 0ee00faf332d
children 61504e80defa
rev   line source
djm@7922 1 #ifndef _ASM_IA64_CACHE_H
djm@7922 2 #define _ASM_IA64_CACHE_H
djm@7922 3
djm@7922 4 #include <linux/config.h>
djm@7922 5
djm@7922 6 /*
djm@7922 7 * Copyright (C) 1998-2000 Hewlett-Packard Co
djm@7922 8 * David Mosberger-Tang <davidm@hpl.hp.com>
djm@7922 9 */
djm@7922 10
djm@7922 11 /* Bytes per L1 (data) cache line. */
djm@7922 12 #define L1_CACHE_SHIFT CONFIG_IA64_L1_CACHE_SHIFT
djm@7922 13 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
djm@7922 14
djm@7922 15 #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */
djm@7922 16
djm@7922 17 #ifdef XEN
djm@7922 18 # define SMP_CACHE_SHIFT L1_CACHE_SHIFT
djm@7922 19 # define SMP_CACHE_BYTES L1_CACHE_BYTES
djm@7922 20 #else
djm@7922 21 #ifdef CONFIG_SMP
djm@7922 22 # define SMP_CACHE_SHIFT L1_CACHE_SHIFT
djm@7922 23 # define SMP_CACHE_BYTES L1_CACHE_BYTES
djm@7922 24 #else
djm@7922 25 /*
djm@7922 26 * The "aligned" directive can only _increase_ alignment, so this is
djm@7922 27 * safe and provides an easy way to avoid wasting space on a
djm@7922 28 * uni-processor:
djm@7922 29 */
djm@7922 30 # define SMP_CACHE_SHIFT 3
djm@7922 31 # define SMP_CACHE_BYTES (1 << 3)
djm@7922 32 #endif
djm@7922 33 #endif
djm@7922 34
kaf24@11013 35 #define __read_mostly
kaf24@11013 36
djm@7922 37 #endif /* _ASM_IA64_CACHE_H */