diff options
author | Sonny Rao <sonnyrao@linux.vnet.ibm.com> | 2010-11-17 19:35:07 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-12-08 23:35:31 -0500 |
commit | 928a31978115b48ad634a97755915e8ab23c4749 (patch) | |
tree | 9d4b6d6fdfea9536a052075597109c074f2d9e98 /arch/powerpc | |
parent | 8f4da26e9bf89f54b68d5cc3f3596f45e5f43911 (diff) |
Powerpc: separate CONFIG_RELOCATABLE from CONFIG_CRASHDUMP in boot code
Fix head_64.S so that we can build a relocatable kernel
that isn't necessarily a crash-dump kernel
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index ce41b97eb512..782f23df7c85 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -97,7 +97,7 @@ __secondary_hold_acknowledge: | |||
97 | .llong hvReleaseData-KERNELBASE | 97 | .llong hvReleaseData-KERNELBASE |
98 | #endif /* CONFIG_PPC_ISERIES */ | 98 | #endif /* CONFIG_PPC_ISERIES */ |
99 | 99 | ||
100 | #ifdef CONFIG_CRASH_DUMP | 100 | #ifdef CONFIG_RELOCATABLE |
101 | /* This flag is set to 1 by a loader if the kernel should run | 101 | /* This flag is set to 1 by a loader if the kernel should run |
102 | * at the loaded address instead of the linked address. This | 102 | * at the loaded address instead of the linked address. This |
103 | * is used by kexec-tools to keep the the kdump kernel in the | 103 | * is used by kexec-tools to keep the the kdump kernel in the |
@@ -385,12 +385,10 @@ _STATIC(__after_prom_start) | |||
385 | /* process relocations for the final address of the kernel */ | 385 | /* process relocations for the final address of the kernel */ |
386 | lis r25,PAGE_OFFSET@highest /* compute virtual base of kernel */ | 386 | lis r25,PAGE_OFFSET@highest /* compute virtual base of kernel */ |
387 | sldi r25,r25,32 | 387 | sldi r25,r25,32 |
388 | #ifdef CONFIG_CRASH_DUMP | ||
389 | lwz r7,__run_at_load-_stext(r26) | 388 | lwz r7,__run_at_load-_stext(r26) |
390 | cmplwi cr0,r7,1 /* kdump kernel ? - stay where we are */ | 389 | cmplwi cr0,r7,1 /* flagged to stay where we are ? */ |
391 | bne 1f | 390 | bne 1f |
392 | add r25,r25,r26 | 391 | add r25,r25,r26 |
393 | #endif | ||
394 | 1: mr r3,r25 | 392 | 1: mr r3,r25 |
395 | bl .relocate | 393 | bl .relocate |
396 | #endif | 394 | #endif |