summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/machine/param.h5
-rw-r--r--arch/x86/x15.lds.S3
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/machine/param.h b/arch/x86/machine/param.h
index 5ed5d461..80c8de93 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 f1d52e79..7adee46a 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