diff options
author | Richard Braun <rbraun@sceen.net> | 2014-01-02 23:38:15 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2014-01-02 23:38:15 +0100 |
commit | 73cb08aea72483f509d774630a63006b9338c1ad (patch) | |
tree | 44022440ecadd82c9c0cd1f2219996d7949cadcd /arch | |
parent | b50e90de4e56d22f5f40f09f02c7b9d7833a8452 (diff) |
x86/param: new __read_mostly macro
Also, update the linker script with the new .data.read_mostly section.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/machine/param.h | 5 | ||||
-rw-r--r-- | arch/x86/x15.lds.S | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/machine/param.h b/arch/x86/machine/param.h index 5ed5d46..80c8de9 100644 --- a/arch/x86/machine/param.h +++ b/arch/x86/machine/param.h @@ -45,6 +45,11 @@ #endif /* __LP64__ */ /* + * Attributes for variables that are mostly read and seldom changed. + */ +#define __read_mostly __section(".data.read_mostly") + +/* * System timer frequency. * * The selected value of 200 translates to a period of 5ms, small enough to diff --git a/arch/x86/x15.lds.S b/arch/x86/x15.lds.S index f1d52e7..7adee46 100644 --- a/arch/x86/x15.lds.S +++ b/arch/x86/x15.lds.S @@ -66,6 +66,9 @@ SECTIONS _data = .; .data ALIGN(PAGE_SIZE) : AT(BOOT_VTOP(ADDR(.data))) { + . = ALIGN(CPU_L1_SIZE); + *(.data.read_mostly) + . = ALIGN(CPU_L1_SIZE); *(.data) } : data |