direct-io.hg

changeset 10985: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 aa25666d4643
children b3dd6ceda9bc
files xen/arch/x86/x86_32/xen.lds.S xen/arch/x86/x86_64/xen.lds.S xen/include/asm-ia64/linux-xen/asm/cache.h xen/include/asm-powerpc/cache.h xen/include/asm-x86/cache.h xen/include/xen/config.h
line diff
     1.1 --- a/xen/arch/x86/x86_32/xen.lds.S	Tue Aug 08 14:56:22 2006 +0100
     1.2 +++ b/xen/arch/x86/x86_32/xen.lds.S	Tue Aug 08 15:14:43 2006 +0100
     1.3 @@ -46,6 +46,9 @@ SECTIONS
     1.4  	CONSTRUCTORS
     1.5  	} :text
     1.6  
     1.7 +  . = ALIGN(128);
     1.8 +  .data.read_mostly : { *(.data.read_mostly) } :text
     1.9 +
    1.10    . = ALIGN(4096);		/* Init code and data */
    1.11    __init_begin = .;
    1.12    .text.init : { *(.text.init) } :text
     2.1 --- a/xen/arch/x86/x86_64/xen.lds.S	Tue Aug 08 14:56:22 2006 +0100
     2.2 +++ b/xen/arch/x86/x86_64/xen.lds.S	Tue Aug 08 15:14:43 2006 +0100
     2.3 @@ -44,6 +44,9 @@ SECTIONS
     2.4  	CONSTRUCTORS
     2.5  	} :text
     2.6  
     2.7 +  . = ALIGN(128);
     2.8 +  .data.read_mostly : { *(.data.read_mostly) } :text
     2.9 +
    2.10    . = ALIGN(4096);		/* Init code and data */
    2.11    __init_begin = .;
    2.12    .text.init : { *(.text.init) } :text
     3.1 --- a/xen/include/asm-ia64/linux-xen/asm/cache.h	Tue Aug 08 14:56:22 2006 +0100
     3.2 +++ b/xen/include/asm-ia64/linux-xen/asm/cache.h	Tue Aug 08 15:14:43 2006 +0100
     3.3 @@ -32,4 +32,6 @@
     3.4  #endif
     3.5  #endif
     3.6  
     3.7 +#define __read_mostly
     3.8 +
     3.9  #endif /* _ASM_IA64_CACHE_H */
     4.1 --- a/xen/include/asm-powerpc/cache.h	Tue Aug 08 14:56:22 2006 +0100
     4.2 +++ b/xen/include/asm-powerpc/cache.h	Tue Aug 08 15:14:43 2006 +0100
     4.3 @@ -57,4 +57,6 @@ static __inline__ void synchronize_cache
     4.4      isync();
     4.5  }
     4.6  
     4.7 +#define __read_mostly
     4.8 +
     4.9  #endif
     5.1 --- a/xen/include/asm-x86/cache.h	Tue Aug 08 14:56:22 2006 +0100
     5.2 +++ b/xen/include/asm-x86/cache.h	Tue Aug 08 15:14:43 2006 +0100
     5.3 @@ -10,4 +10,6 @@
     5.4  #define L1_CACHE_SHIFT	(CONFIG_X86_L1_CACHE_SHIFT)
     5.5  #define L1_CACHE_BYTES	(1 << L1_CACHE_SHIFT)
     5.6  
     5.7 +#define __read_mostly __attribute__((__section__(".data.read_mostly")))
     5.8 +
     5.9  #endif
     6.1 --- a/xen/include/xen/config.h	Tue Aug 08 14:56:22 2006 +0100
     6.2 +++ b/xen/include/xen/config.h	Tue Aug 08 15:14:43 2006 +0100
     6.3 @@ -50,6 +50,5 @@
     6.4  #endif /* !__ASSEMBLY__ */
     6.5  
     6.6  #define fastcall
     6.7 -#define __read_mostly
     6.8  
     6.9  #endif /* __XEN_CONFIG_H__ */