# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1183604755 -32400 # Node ID d504e53612decf16e2b26cb7b7ff9f9418105d81 # Parent 0b302c2a3bf50f84a9ca331c971bf9ac686eb79b add more __read_mostly and add const to running_on_xen. PATCHNAME: add__read_mostly_and_const_to_running_on_xen Signed-off-by: Isaku Yamahata diff -r 0b302c2a3bf5 -r d504e53612de arch/ia64/kernel/patch.c --- a/arch/ia64/kernel/patch.c Mon Jul 02 18:03:11 2007 +0900 +++ b/arch/ia64/kernel/patch.c Thu Jul 05 12:05:55 2007 +0900 @@ -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 0b302c2a3bf5 -r d504e53612de arch/ia64/xen/hypervisor.c --- a/arch/ia64/xen/hypervisor.c Mon Jul 02 18:03:11 2007 +0900 +++ b/arch/ia64/xen/hypervisor.c Thu Jul 05 12:05:55 2007 +0900 @@ -35,13 +35,12 @@ #include #include -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 0b302c2a3bf5 -r d504e53612de arch/ia64/xen/xensetup.S --- a/arch/ia64/xen/xensetup.S Mon Jul 02 18:03:11 2007 +0900 +++ b/arch/ia64/xen/xensetup.S Thu Jul 05 12:05:55 2007 +0900 @@ -6,6 +6,13 @@ #include #include + + .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 0b302c2a3bf5 -r d504e53612de include/asm-ia64/hypervisor.h --- a/include/asm-ia64/hypervisor.h Mon Jul 02 18:03:11 2007 +0900 +++ b/include/asm-ia64/hypervisor.h Thu Jul 05 12:05:55 2007 +0900 @@ -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