diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2006-12-06 20:14:04 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-12-06 20:14:04 -0500 |
commit | 2a43f3ede48ea3d5790b863b719a1e21c90a3697 (patch) | |
tree | fedadc184156392feeb25dcf85a2c5db6138fb26 /arch | |
parent | 8621b81c744ff8880a1efe095a4dcd09763ddb5a (diff) |
[PATCH] i386: CONFIG_PHYSICAL_START cleanup
Defining __PHYSICAL_START and __KERNEL_START in asm-i386/page.h works but
it triggers a full kernel rebuild for the silliest of reasons. This
modifies the users to directly use CONFIG_PHYSICAL_START and linux/config.h
which prevents the full rebuild problem, which makes the code much
more maintainer and hopefully user friendly.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/boot/compressed/head.S | 7 | ||||
-rw-r--r-- | arch/i386/boot/compressed/misc.c | 7 | ||||
-rw-r--r-- | arch/i386/kernel/vmlinux.lds.S | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/arch/i386/boot/compressed/head.S b/arch/i386/boot/compressed/head.S index b5893e4ecd37..40a8de8270a9 100644 --- a/arch/i386/boot/compressed/head.S +++ b/arch/i386/boot/compressed/head.S | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/linkage.h> | 26 | #include <linux/linkage.h> |
27 | #include <asm/segment.h> | 27 | #include <asm/segment.h> |
28 | #include <asm/page.h> | ||
29 | 28 | ||
30 | .globl startup_32 | 29 | .globl startup_32 |
31 | 30 | ||
@@ -75,7 +74,7 @@ startup_32: | |||
75 | popl %esi # discard address | 74 | popl %esi # discard address |
76 | popl %esi # real mode pointer | 75 | popl %esi # real mode pointer |
77 | xorl %ebx,%ebx | 76 | xorl %ebx,%ebx |
78 | ljmp $(__BOOT_CS), $__PHYSICAL_START | 77 | ljmp $(__BOOT_CS), $CONFIG_PHYSICAL_START |
79 | 78 | ||
80 | /* | 79 | /* |
81 | * We come here, if we were loaded high. | 80 | * We come here, if we were loaded high. |
@@ -100,7 +99,7 @@ startup_32: | |||
100 | popl %ecx # lcount | 99 | popl %ecx # lcount |
101 | popl %edx # high_buffer_start | 100 | popl %edx # high_buffer_start |
102 | popl %eax # hcount | 101 | popl %eax # hcount |
103 | movl $__PHYSICAL_START,%edi | 102 | movl $CONFIG_PHYSICAL_START,%edi |
104 | cli # make sure we don't get interrupted | 103 | cli # make sure we don't get interrupted |
105 | ljmp $(__BOOT_CS), $0x1000 # and jump to the move routine | 104 | ljmp $(__BOOT_CS), $0x1000 # and jump to the move routine |
106 | 105 | ||
@@ -125,5 +124,5 @@ move_routine_start: | |||
125 | movsl | 124 | movsl |
126 | movl %ebx,%esi # Restore setup pointer | 125 | movl %ebx,%esi # Restore setup pointer |
127 | xorl %ebx,%ebx | 126 | xorl %ebx,%ebx |
128 | ljmp $(__BOOT_CS), $__PHYSICAL_START | 127 | ljmp $(__BOOT_CS), $CONFIG_PHYSICAL_START |
129 | move_routine_end: | 128 | move_routine_end: |
diff --git a/arch/i386/boot/compressed/misc.c b/arch/i386/boot/compressed/misc.c index b2ccd543410d..20970ff44119 100644 --- a/arch/i386/boot/compressed/misc.c +++ b/arch/i386/boot/compressed/misc.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/vmalloc.h> | 13 | #include <linux/vmalloc.h> |
14 | #include <linux/screen_info.h> | 14 | #include <linux/screen_info.h> |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/page.h> | ||
17 | 16 | ||
18 | /* | 17 | /* |
19 | * gzip declarations | 18 | * gzip declarations |
@@ -303,7 +302,7 @@ static void setup_normal_output_buffer(void) | |||
303 | #else | 302 | #else |
304 | if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < 1024) error("Less than 2MB of memory"); | 303 | if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < 1024) error("Less than 2MB of memory"); |
305 | #endif | 304 | #endif |
306 | output_data = (unsigned char *)__PHYSICAL_START; /* Normally Points to 1M */ | 305 | output_data = (unsigned char *)CONFIG_PHYSICAL_START; /* Normally Points to 1M */ |
307 | free_mem_end_ptr = (long)real_mode; | 306 | free_mem_end_ptr = (long)real_mode; |
308 | } | 307 | } |
309 | 308 | ||
@@ -326,8 +325,8 @@ static void setup_output_buffer_if_we_run_high(struct moveparams *mv) | |||
326 | low_buffer_size = low_buffer_end - LOW_BUFFER_START; | 325 | low_buffer_size = low_buffer_end - LOW_BUFFER_START; |
327 | high_loaded = 1; | 326 | high_loaded = 1; |
328 | free_mem_end_ptr = (long)high_buffer_start; | 327 | free_mem_end_ptr = (long)high_buffer_start; |
329 | if ( (__PHYSICAL_START + low_buffer_size) > ((ulg)high_buffer_start)) { | 328 | if ( (CONFIG_PHYSICAL_START + low_buffer_size) > ((ulg)high_buffer_start)) { |
330 | high_buffer_start = (uch *)(__PHYSICAL_START + low_buffer_size); | 329 | high_buffer_start = (uch *)(CONFIG_PHYSICAL_START + low_buffer_size); |
331 | mv->hcount = 0; /* say: we need not to move high_buffer */ | 330 | mv->hcount = 0; /* say: we need not to move high_buffer */ |
332 | } | 331 | } |
333 | else mv->hcount = -1; | 332 | else mv->hcount = -1; |
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index c217e18f1081..f8d61ec4c8cb 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S | |||
@@ -27,7 +27,7 @@ PHDRS { | |||
27 | } | 27 | } |
28 | SECTIONS | 28 | SECTIONS |
29 | { | 29 | { |
30 | . = __KERNEL_START; | 30 | . = LOAD_OFFSET + CONFIG_PHYSICAL_START; |
31 | phys_startup_32 = startup_32 - LOAD_OFFSET; | 31 | phys_startup_32 = startup_32 - LOAD_OFFSET; |
32 | /* read-only */ | 32 | /* read-only */ |
33 | .text : AT(ADDR(.text) - LOAD_OFFSET) { | 33 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |