diff mbox series

[RFC,06/12] x86: align kernel text and rodata using HUGE_PAGE boundary

Message ID 20231228131056.602411-7-artem.kuzin@huawei.com (mailing list archive)
State New
Headers show
Series x86 NUMA-aware kernel replication | expand

Commit Message

Artem Kuzin Dec. 28, 2023, 1:10 p.m. UTC
From: Artem Kuzin <artem.kuzin@huawei.com>

Co-developed-by: Nikita Panov <nikita.panov@huawei-partners.com>
Signed-off-by: Nikita Panov <nikita.panov@huawei-partners.com>
Co-developed-by: Alexander Grubnikov <alexander.grubnikov@huawei.com>
Signed-off-by: Alexander Grubnikov <alexander.grubnikov@huawei.com>
Signed-off-by: Artem Kuzin <artem.kuzin@huawei.com>
---
 arch/x86/kernel/vmlinux.lds.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index f15fb71f280e..3841293e7aad 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -159,11 +159,11 @@  SECTIONS
 	} :text = 0xcccccccc
 
 	/* End of text section, which should occupy whole number of pages */
+	. = ALIGN(HPAGE_SIZE); //For kernel replication
 	_etext = .;
-	. = ALIGN(PAGE_SIZE);
 
 	X86_ALIGN_RODATA_BEGIN
-	RO_DATA(PAGE_SIZE)
+	RO_DATA(HPAGE_SIZE)
 	X86_ALIGN_RODATA_END
 
 	/* Data */