ia64/linux-2.6.18-xen.hg

changeset 90:7357f635cc41

[IA64] Add more __read_mostly and add const to running_on_xen.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Thu Jul 05 14:24:26 2007 -0600 (2007-07-05)
parents 7063c3087b2f
children a52d392e18e7
files arch/ia64/kernel/patch.c arch/ia64/xen/hypervisor.c arch/ia64/xen/xensetup.S include/asm-ia64/hypervisor.h
line diff
     1.1 --- a/arch/ia64/kernel/patch.c	Thu Jul 05 14:22:46 2007 -0600
     1.2 +++ b/arch/ia64/kernel/patch.c	Thu Jul 05 14:24:26 2007 -0600
     1.3 @@ -191,7 +191,7 @@ extern char __end_gate_running_on_xen_pa
     1.4  void
     1.5  patch_running_on_xen(unsigned long start, unsigned long end)
     1.6  {
     1.7 -	extern int running_on_xen;
     1.8 +	extern const int running_on_xen;
     1.9  	s32 *offp = (s32 *)start;
    1.10  	u64 ip;
    1.11  
     2.1 --- a/arch/ia64/xen/hypervisor.c	Thu Jul 05 14:22:46 2007 -0600
     2.2 +++ b/arch/ia64/xen/hypervisor.c	Thu Jul 05 14:24:26 2007 -0600
     2.3 @@ -35,13 +35,12 @@
     2.4  #include <xen/xencons.h>
     2.5  #include <xen/balloon.h>
     2.6  
     2.7 -shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)XSI_BASE;
     2.8 +shared_info_t *HYPERVISOR_shared_info __read_mostly = (shared_info_t *)XSI_BASE;
     2.9  EXPORT_SYMBOL(HYPERVISOR_shared_info);
    2.10  
    2.11  start_info_t *xen_start_info;
    2.12  EXPORT_SYMBOL(xen_start_info);
    2.13  
    2.14 -int running_on_xen;
    2.15  EXPORT_SYMBOL(running_on_xen);
    2.16  
    2.17  #ifdef CONFIG_XEN_IA64_EXPOSE_P2M
    2.18 @@ -90,7 +89,7 @@ xen_cpu_init(void)
    2.19   * Bitmap is indexed by page number. If bit is set, the page is part of a
    2.20   * xen_create_contiguous_region() area of memory.
    2.21   */
    2.22 -unsigned long *contiguous_bitmap;
    2.23 +unsigned long *contiguous_bitmap __read_mostly;
    2.24  
    2.25  #ifdef CONFIG_VIRTUAL_MEM_MAP
    2.26  /* Following logic is stolen from create_mem_map_table() for virtual memmap */
     3.1 --- a/arch/ia64/xen/xensetup.S	Thu Jul 05 14:22:46 2007 -0600
     3.2 +++ b/arch/ia64/xen/xensetup.S	Thu Jul 05 14:24:26 2007 -0600
     3.3 @@ -7,6 +7,13 @@
     3.4  #include <asm/processor.h>
     3.5  #include <asm/asmmacro.h>
     3.6  
     3.7 +	.section .data.read_mostly
     3.8 +	.align 8
     3.9 +	.global running_on_xen
    3.10 +running_on_xen:
    3.11 +	data4 0
    3.12 +	.previous
    3.13 +
    3.14  #define isBP	p3	// are we the Bootstrap Processor?
    3.15  
    3.16  	.text
     4.1 --- a/include/asm-ia64/hypervisor.h	Thu Jul 05 14:22:46 2007 -0600
     4.2 +++ b/include/asm-ia64/hypervisor.h	Thu Jul 05 14:24:26 2007 -0600
     4.3 @@ -34,7 +34,8 @@
     4.4  #define __HYPERVISOR_H__
     4.5  
     4.6  #ifdef CONFIG_XEN
     4.7 -extern int running_on_xen;
     4.8 +/* running_on_xen is set before executing any C code by early_xen_setup */
     4.9 +extern const int running_on_xen;
    4.10  #define is_running_on_xen()			(running_on_xen)
    4.11  #else /* CONFIG_XEN */
    4.12  # ifdef CONFIG_VMX_GUEST