linux/arch/powerpc/kernel
Anton Blanchard 1674400aae powerpc: Fix -mcmodel=medium breakage in prom_init.c
Commit 5ac47f7a6e (powerpc: Relocate prom_init.c on 64bit) made
prom_init.c position independent by manually relocating its entries
in the TOC.

We get the address of the TOC entries with the __prom_init_toc_start
linker symbol. If __prom_init_toc_start ends up as an entry in the
TOC then we need to add an offset to get the current address. This is
the case for older toolchains.

On the other hand, if we have a newer toolchain that supports
-mcmodel=medium then __prom_init_toc_start will be created by a
relative offset from r2 (the TOC pointer). Since r2 has already been
relocated, nothing more needs to be done.  Adding an offset in this
case is wrong and Aaro Koskinen and Alexander Graf have noticed noticed
G5 and OpenBIOS breakage.

Alan Modra suggested we just use r2 to get at the TOC which is simpler
and works with both old and new toolchains.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anton Blanchard <anton@samba.org>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-03-13 10:06:52 +11:00
..
vdso32
vdso64
.gitignore
align.c
asm-offsets.c Merge tag 'kvm-3.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-02-24 13:07:18 -08:00
audit.c
btext.c
cacheinfo.c
cacheinfo.h
clock.c
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_a2.S
cpu_setup_fsl_booke.S
cpu_setup_pa6t.S
cpu_setup_power.S powerpc: Set DSCR bit in FSCR setup 2013-03-05 16:56:30 +11:00
cpu_setup_ppc970.S
cputable.c powerpc: Fix cputable entry for 970MP rev 1.0 2013-03-13 10:06:46 +11:00
crash.c
crash_dump.c
dbell.c powerpc: Define differences between doorbells on book3e and book3s 2013-01-10 15:09:05 +11:00
dma-iommu.c
dma-swiotlb.c
dma.c
entry_32.S powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning for ppc32 2013-01-29 10:10:22 +11:00
entry_64.S Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-02-23 17:09:55 -08:00
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S powerpc: Move branch instruction from ACCOUNT_CPU_USER_ENTRY to caller 2013-01-10 17:00:59 +11:00
exceptions-64s.S powerpc: Avoid link stack corruption in MMU on syscall entry path 2013-03-05 16:56:28 +11:00
fadump.c
firmware.c
fpu.S powerpc: Add FP/VSX and VMX register load functions for transactional memory 2013-02-15 16:58:52 +11:00
fsl_booke_entry_mapping.S
ftrace.c
head_8xx.S
head_32.S
head_40x.S powerpc: Enable the Watchdog vector for 405 2013-01-10 14:43:46 +11:00
head_44x.S
head_64.S powerpc/kexec: Add kexec "hold" support for Book3e processors 2013-01-10 17:00:39 +11:00
head_booke.h
head_fsl_booke.S
hw_breakpoint.c powerpc: Change hardware breakpoint to allow longer ranges 2013-01-29 11:35:08 +11:00
ibmebus.c
idle.c
idle_6xx.S
idle_book3e.S
idle_e500.S
idle_power4.S
idle_power7.S
io-workarounds.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
io.c
iomap.c
iommu.c powerpc/iommu: Prevent false TCE leak message 2013-01-10 17:01:53 +11:00
irq.c powerpc: Add code to handle soft-disabled doorbells on server 2013-01-10 15:09:07 +11:00
isa-bridge.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
jump_label.c
kgdb.c Merge branch 'merge' into next 2013-01-29 11:33:37 +11:00
kprobes.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
kvm.c
kvm_emul.S
l2cr_6xx.S
legacy_serial.c
lparcfg.c
machine_kexec.c
machine_kexec_32.c
machine_kexec_64.c powerpc/kexec: Disable hard IRQ before kexec 2013-02-24 03:49:28 +11:00
Makefile powerpc: Add helper functions for transactional memory context switching 2013-02-15 16:58:52 +11:00
misc.S
misc_32.S
misc_64.S
module.c
module_32.c
module_64.c powerpc: Build kernel with -mcmodel=medium 2013-01-10 17:00:31 +11:00
msi.c
nvram_64.c
of_platform.c powerpc/eeh: Fix crash when adding a device in a slot with DDW 2013-01-10 17:01:58 +11:00
paca.c powerpc: Move boot_paca into early_setup 2013-02-15 16:54:48 +11:00
pci-common.c powerpc/eeh: Fix crash when adding a device in a slot with DDW 2013-01-10 17:01:58 +11:00
pci_32.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
pci_64.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
pci_dn.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
pci_of_scan.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
pmc.c
ppc32.h powerpc: switch to generic old sigaction() 2013-02-03 18:16:10 -05:00
ppc_ksyms.c
ppc_save_regs.S
proc_powerpc.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
process.c powerpc: Hook in new transactional memory code 2013-02-15 17:02:23 +11:00
prom.c
prom_init.c powerpc: Fix -mcmodel=medium breakage in prom_init.c 2013-03-13 10:06:52 +11:00
prom_init_check.sh powerpc: Relocate prom_init.c on 64bit 2013-01-10 17:00:25 +11:00
prom_parse.c
ptrace.c powerpc: Add DSCR support to ptrace 2013-01-16 05:25:46 +11:00
ptrace32.c powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers 2013-01-10 17:01:44 +11:00
reloc_32.S
reloc_64.S
rtas-proc.c
rtas-rtc.c
rtas.c
rtas_flash.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
rtas_pci.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
rtasd.c
setup-common.c
setup.h
setup_32.c
setup_64.c powerpc: Apply early paca fixups to boot_paca and the boot cpu's paca 2013-02-15 16:55:06 +11:00
signal.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2013-02-23 18:50:11 -08:00
signal.h powerpc: Add new transactional memory state to the signal context 2013-02-15 17:02:23 +11:00
signal_32.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2013-02-23 18:50:11 -08:00
signal_64.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2013-02-23 18:50:11 -08:00
smp-tbsync.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
smp.c powerpc: fix ics_rtas_init and start_secondary section mismatch 2013-02-08 14:05:48 +11:00
softemu8xx.c
stacktrace.c
suspend.c
swsusp.c
swsusp_32.S
swsusp_64.c
swsusp_asm64.S
swsusp_booke.S
sys_ppc32.c fix compat truncate/ftruncate 2013-02-25 09:24:55 -05:00
syscalls.c
sysfs.c
systbl.S
systbl_chk.c
systbl_chk.sh
tau_6xx.c
time.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-19 19:05:45 -08:00
tm.S powerpc: Add helper functions for transactional memory context switching 2013-02-15 16:58:52 +11:00
traps.c The sweeping change is to make add_taint() explicitly indicate whether to disable 2013-02-25 15:41:43 -08:00
udbg.c
udbg_16550.c
uprobes.c
vdso.c
vecemu.c
vector.S powerpc: Add FP/VSX and VMX register load functions for transactional memory 2013-02-15 16:58:52 +11:00
vio.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
vmlinux.lds.S powerpc: Relocate prom_init.c on 64bit 2013-01-10 17:00:25 +11:00