Skip to contentSkip to conversation

Use LOAD_PHYSICAL_ADDR in vmlinux.lds.S

PATCH In review Zhihui Zhang 2 participants 2 messages Jan 26, 2014 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use LOAD_PHYSICAL_ADDR in vmlinux.lds.S

This unifies the way to specify start VMA on both 32 and 64-bit platforms. I would like to remove __PHYSICAL_START as well, but that appears to be harder.

---
 arch/x86/kernel/vmlinux.lds.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kernel/vmlinux.lds.S +1 -2
index da6b35a..e81bf49 100644
@@ -81,11 +81,10 @@ PHDRS {
 
 SECTIONS
 {
-#ifdef CONFIG_X86_32
         . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
+#ifdef CONFIG_X86_32
         phys_startup_32 = startup_32 - LOAD_OFFSET;
 #else
-        . = __START_KERNEL;
         phys_startup_64 = startup_64 - LOAD_OFFSET;
 #endif
 
Signature · 1 line
1.8.1.2
#1 lore raw
Quoted 7 lines · Zhihui Zhang
arch/x86/kernel/vmlinux.lds.S +0 -0
index da6b35a..e81bf49 100644
@@ -81,11 +81,10 @@ PHDRS {
 
 SECTIONS

arch/x86/kernel/vmlinux.lds.S PHDRS { · line 90

Quoted 10 lines
arch/x86/kernel/vmlinux.lds.S +1 -2
 {
-#ifdef CONFIG_X86_32
         . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
+#ifdef CONFIG_X86_32
         phys_startup_32 = startup_32 - LOAD_OFFSET;
 #else
-        . = __START_KERNEL;
         phys_startup_64 = startup_64 - LOAD_OFFSET;
 #endif
 

Makes sense, but any reason to not make LOAD_PHYSICAL_ADDR to use ALIGN()?

(You'll also want to prefix the patch title in the subject line with "x86, boot:" and cc [email protected] on patches like this.)