diff options
| author | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2007-09-13 14:23:48 -0400 |
|---|---|---|
| committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-18 13:11:46 -0400 |
| commit | 15ad838d281b3681d96e37cba8a628177da8f4ff (patch) | |
| tree | 655606a3de4a688ac5b409e7986ceb20b8c258c0 | |
| parent | d85714d81cc0408daddb68c10f7fd69eafe7c213 (diff) | |
[MIPS] Always do the ARC64_TWIDDLE_PC thing.
Always jump to the place where the kernel is linked to. This helps where
the bootloaders/proms ignores the start address inside the ELF header.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| -rw-r--r-- | arch/mips/kernel/head.S | 16 | ||||
| -rw-r--r-- | include/asm-mips/mach-ip27/kernel-entry-init.h | 9 |
2 files changed, 13 insertions, 12 deletions
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index bf164a562acb..236768731063 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
| @@ -27,16 +27,6 @@ | |||
| 27 | 27 | ||
| 28 | #include <kernel-entry-init.h> | 28 | #include <kernel-entry-init.h> |
| 29 | 29 | ||
| 30 | .macro ARC64_TWIDDLE_PC | ||
| 31 | #if defined(CONFIG_ARC64) || defined(CONFIG_MAPPED_KERNEL) | ||
| 32 | /* We get launched at a XKPHYS address but the kernel is linked to | ||
| 33 | run at a KSEG0 address, so jump there. */ | ||
| 34 | PTR_LA t0, \@f | ||
| 35 | jr t0 | ||
| 36 | \@: | ||
| 37 | #endif | ||
| 38 | .endm | ||
| 39 | |||
| 40 | /* | 30 | /* |
| 41 | * inputs are the text nasid in t1, data nasid in t2. | 31 | * inputs are the text nasid in t1, data nasid in t2. |
| 42 | */ | 32 | */ |
| @@ -157,7 +147,11 @@ NESTED(kernel_entry, 16, sp) # kernel entry point | |||
| 157 | 147 | ||
| 158 | setup_c0_status_pri | 148 | setup_c0_status_pri |
| 159 | 149 | ||
| 160 | ARC64_TWIDDLE_PC | 150 | /* We might not get launched at the address the kernel is linked to, |
| 151 | so we jump there. */ | ||
| 152 | PTR_LA t0, 0f | ||
| 153 | jr t0 | ||
| 154 | 0: | ||
| 161 | 155 | ||
| 162 | #ifdef CONFIG_MIPS_MT_SMTC | 156 | #ifdef CONFIG_MIPS_MT_SMTC |
| 163 | /* | 157 | /* |
diff --git a/include/asm-mips/mach-ip27/kernel-entry-init.h b/include/asm-mips/mach-ip27/kernel-entry-init.h index c1a10314b317..624d66c7f290 100644 --- a/include/asm-mips/mach-ip27/kernel-entry-init.h +++ b/include/asm-mips/mach-ip27/kernel-entry-init.h | |||
| @@ -46,7 +46,14 @@ | |||
| 46 | lh t1, KV_RO_NASID_OFFSET(t0) | 46 | lh t1, KV_RO_NASID_OFFSET(t0) |
| 47 | lh t2, KV_RW_NASID_OFFSET(t0) | 47 | lh t2, KV_RW_NASID_OFFSET(t0) |
| 48 | MAPPED_KERNEL_SETUP_TLB | 48 | MAPPED_KERNEL_SETUP_TLB |
| 49 | ARC64_TWIDDLE_PC | 49 | |
| 50 | /* | ||
| 51 | * We might not get launched at the address the kernel is linked to, | ||
| 52 | * so we jump there. | ||
| 53 | */ | ||
| 54 | PTR_LA t0, 0f | ||
| 55 | jr t0 | ||
| 56 | 0: | ||
| 50 | .endm | 57 | .endm |
| 51 | 58 | ||
| 52 | #endif /* __ASM_MACH_IP27_KERNEL_ENTRY_H */ | 59 | #endif /* __ASM_MACH_IP27_KERNEL_ENTRY_H */ |
