summaryrefslogtreecommitdiff
path: root/arch/parisc/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2015-11-22 00:07:44 +0100
committerHelge Deller <deller@gmx.de>2015-11-22 12:23:19 +0100
commit41b85a1163386f8328ad570f383973cb3975d2fa (patch)
tree37a8970781d2bb57603966f7e7e0722346a88e5e /arch/parisc/kernel/asm-offsets.c
parent736d2169338a50c8814efc186b5423aee43b0c68 (diff)
parisc: Map kernel text and data on huge pages
Adjust the linker script and map_pages() to map kernel text and data on physical 1MB huge/large pages. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/asm-offsets.c')
-rw-r--r--arch/parisc/kernel/asm-offsets.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c
index 59001cea13f9..d2f62570a7b1 100644
--- a/arch/parisc/kernel/asm-offsets.c
+++ b/arch/parisc/kernel/asm-offsets.c
@@ -290,6 +290,14 @@ int main(void)
DEFINE(ASM_PFN_PTE_SHIFT, PFN_PTE_SHIFT);
DEFINE(ASM_PT_INITIAL, PT_INITIAL);
BLANK();
+ /* HUGEPAGE_SIZE is only used in vmlinux.lds.S to align kernel text
+ * and kernel data on physical huge pages */
+#ifdef CONFIG_HUGETLB_PAGE
+ DEFINE(HUGEPAGE_SIZE, 1UL << REAL_HPAGE_SHIFT);
+#else
+ DEFINE(HUGEPAGE_SIZE, PAGE_SIZE);
+#endif
+ BLANK();
DEFINE(EXCDATA_IP, offsetof(struct exception_data, fault_ip));
DEFINE(EXCDATA_SPACE, offsetof(struct exception_data, fault_space));
DEFINE(EXCDATA_ADDR, offsetof(struct exception_data, fault_addr));