[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] [IA64] Add more __read_mostly and add const to running_on_xen.



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1183667066 21600
# Node ID 7357f635cc41b806aa18696bde56bc31df91e3e0
# Parent  7063c3087b2f341de8bcb7542475683439f017fd
[IA64] Add more __read_mostly and add const to running_on_xen.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 arch/ia64/kernel/patch.c      |    2 +-
 arch/ia64/xen/hypervisor.c    |    5 ++---
 arch/ia64/xen/xensetup.S      |    7 +++++++
 include/asm-ia64/hypervisor.h |    3 ++-
 4 files changed, 12 insertions(+), 5 deletions(-)

diff -r 7063c3087b2f -r 7357f635cc41 arch/ia64/kernel/patch.c
--- a/arch/ia64/kernel/patch.c  Thu Jul 05 14:22:46 2007 -0600
+++ b/arch/ia64/kernel/patch.c  Thu Jul 05 14:24:26 2007 -0600
@@ -191,7 +191,7 @@ void
 void
 patch_running_on_xen(unsigned long start, unsigned long end)
 {
-       extern int running_on_xen;
+       extern const int running_on_xen;
        s32 *offp = (s32 *)start;
        u64 ip;
 
diff -r 7063c3087b2f -r 7357f635cc41 arch/ia64/xen/hypervisor.c
--- a/arch/ia64/xen/hypervisor.c        Thu Jul 05 14:22:46 2007 -0600
+++ b/arch/ia64/xen/hypervisor.c        Thu Jul 05 14:24:26 2007 -0600
@@ -35,13 +35,12 @@
 #include <xen/xencons.h>
 #include <xen/balloon.h>
 
-shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)XSI_BASE;
+shared_info_t *HYPERVISOR_shared_info __read_mostly = (shared_info_t 
*)XSI_BASE;
 EXPORT_SYMBOL(HYPERVISOR_shared_info);
 
 start_info_t *xen_start_info;
 EXPORT_SYMBOL(xen_start_info);
 
-int running_on_xen;
 EXPORT_SYMBOL(running_on_xen);
 
 #ifdef CONFIG_XEN_IA64_EXPOSE_P2M
@@ -90,7 +89,7 @@ xen_cpu_init(void)
  * Bitmap is indexed by page number. If bit is set, the page is part of a
  * xen_create_contiguous_region() area of memory.
  */
-unsigned long *contiguous_bitmap;
+unsigned long *contiguous_bitmap __read_mostly;
 
 #ifdef CONFIG_VIRTUAL_MEM_MAP
 /* Following logic is stolen from create_mem_map_table() for virtual memmap */
diff -r 7063c3087b2f -r 7357f635cc41 arch/ia64/xen/xensetup.S
--- a/arch/ia64/xen/xensetup.S  Thu Jul 05 14:22:46 2007 -0600
+++ b/arch/ia64/xen/xensetup.S  Thu Jul 05 14:24:26 2007 -0600
@@ -6,6 +6,13 @@
 
 #include <asm/processor.h>
 #include <asm/asmmacro.h>
+
+       .section .data.read_mostly
+       .align 8
+       .global running_on_xen
+running_on_xen:
+       data4 0
+       .previous
 
 #define isBP   p3      // are we the Bootstrap Processor?
 
diff -r 7063c3087b2f -r 7357f635cc41 include/asm-ia64/hypervisor.h
--- a/include/asm-ia64/hypervisor.h     Thu Jul 05 14:22:46 2007 -0600
+++ b/include/asm-ia64/hypervisor.h     Thu Jul 05 14:24:26 2007 -0600
@@ -34,7 +34,8 @@
 #define __HYPERVISOR_H__
 
 #ifdef CONFIG_XEN
-extern int running_on_xen;
+/* running_on_xen is set before executing any C code by early_xen_setup */
+extern const int running_on_xen;
 #define is_running_on_xen()                    (running_on_xen)
 #else /* CONFIG_XEN */
 # ifdef CONFIG_VMX_GUEST

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.