aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-08-08 15:14:43 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-08-08 15:14:43 +0100
commit67a4f5634cf869a6a476f21b94a1f09be19627d2 (patch)
treea8f918a019f88eadf02019f61373cd83b44a9e20
parent1d82ec977453fe0f352b221536dd0c587b880b0f (diff)
downloadxen-67a4f5634cf869a6a476f21b94a1f09be19627d2.tar.gz
xen-67a4f5634cf869a6a476f21b94a1f09be19627d2.tar.bz2
xen-67a4f5634cf869a6a476f21b94a1f09be19627d2.zip
[XEN] Implement proper __read_mostly memory arrangemengt for x86.
Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r--xen/arch/x86/x86_32/xen.lds.S3
-rw-r--r--xen/arch/x86/x86_64/xen.lds.S3
-rw-r--r--xen/include/asm-ia64/linux-xen/asm/cache.h2
-rw-r--r--xen/include/asm-powerpc/cache.h2
-rw-r--r--xen/include/asm-x86/cache.h2
-rw-r--r--xen/include/xen/config.h1
6 files changed, 12 insertions, 1 deletions
diff --git a/xen/arch/x86/x86_32/xen.lds.S b/xen/arch/x86/x86_32/xen.lds.S
index f58bd191f5..a44bf8701b 100644
--- a/xen/arch/x86/x86_32/xen.lds.S
+++ b/xen/arch/x86/x86_32/xen.lds.S
@@ -46,6 +46,9 @@ SECTIONS
CONSTRUCTORS
} :text
+ . = ALIGN(128);
+ .data.read_mostly : { *(.data.read_mostly) } :text
+
. = ALIGN(4096); /* Init code and data */
__init_begin = .;
.text.init : { *(.text.init) } :text
diff --git a/xen/arch/x86/x86_64/xen.lds.S b/xen/arch/x86/x86_64/xen.lds.S
index 92d395d5f9..f2ab8f8aa5 100644
--- a/xen/arch/x86/x86_64/xen.lds.S
+++ b/xen/arch/x86/x86_64/xen.lds.S
@@ -44,6 +44,9 @@ SECTIONS
CONSTRUCTORS
} :text
+ . = ALIGN(128);
+ .data.read_mostly : { *(.data.read_mostly) } :text
+
. = ALIGN(4096); /* Init code and data */
__init_begin = .;
.text.init : { *(.text.init) } :text
diff --git a/xen/include/asm-ia64/linux-xen/asm/cache.h b/xen/include/asm-ia64/linux-xen/asm/cache.h
index 7d4cfd5682..0db88a7044 100644
--- a/xen/include/asm-ia64/linux-xen/asm/cache.h
+++ b/xen/include/asm-ia64/linux-xen/asm/cache.h
@@ -32,4 +32,6 @@
#endif
#endif
+#define __read_mostly
+
#endif /* _ASM_IA64_CACHE_H */
diff --git a/xen/include/asm-powerpc/cache.h b/xen/include/asm-powerpc/cache.h
index 9151f84000..db1315dcf1 100644
--- a/xen/include/asm-powerpc/cache.h
+++ b/xen/include/asm-powerpc/cache.h
@@ -57,4 +57,6 @@ static __inline__ void synchronize_caches(ulong start, size_t len)
isync();
}
+#define __read_mostly
+
#endif
diff --git a/xen/include/asm-x86/cache.h b/xen/include/asm-x86/cache.h
index 2539a6f240..f5667a14fa 100644
--- a/xen/include/asm-x86/cache.h
+++ b/xen/include/asm-x86/cache.h
@@ -10,4 +10,6 @@
#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
#endif
diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h
index e38cf9e366..e3f94d5843 100644
--- a/xen/include/xen/config.h
+++ b/xen/include/xen/config.h
@@ -50,6 +50,5 @@
#endif /* !__ASSEMBLY__ */
#define fastcall
-#define __read_mostly
#endif /* __XEN_CONFIG_H__ */