android_kernel_google_msm/arch/avr32/kernel
Andreas Bießmann fb1601f038 avr32: fix out-of-range jump in large kernels
commit d617b338bb upstream.

This patch fixes following error (for big kernels):

---8<---
arch/avr32/boot/u-boot/head.o: In function `no_tag_table':
(.init.text+0x44): relocation truncated to fit: R_AVR32_22H_PCREL against symbol `panic' defined in .text.unlikely section in kernel/built-in.o
arch/avr32/kernel/built-in.o: In function `bad_return':
(.ex.text+0x236): relocation truncated to fit: R_AVR32_22H_PCREL against symbol `panic' defined in .text.unlikely section in kernel/built-in.o
--->8---

It comes up when the kernel increases and 'panic()' is too far away to fit in
the +/- 2MiB range. Which in turn issues from the 21-bit displacement in
'br{cond4}' mnemonic which is one of the two ways to do jumps (rjmp has just
10-bit displacement and therefore a way smaller range). This fact was stated
before in 8d29b7b9f8.
One solution to solve this is to add a local storage for the symbol address
and just load the $pc with that value.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04 10:50:32 -08:00
..
.gitignore avr32: add .gitignore files 2008-09-19 18:21:29 +02:00
asm-offsets.c avr32: Fix lockup after Java stack underflow in user mode 2008-09-01 13:04:04 +02:00
avr32_ksyms.c asm-generic: rename generic little-endian bitops functions 2011-03-23 19:46:11 -07:00
cpu.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
entry-avr32b.S avr32: fix out-of-range jump in large kernels 2013-12-04 10:50:32 -08:00
head.S avr32: setup crt for early panic() 2013-12-04 10:50:32 -08:00
init_task.c Use new __init_task_data macro in arch init_task.c files. 2009-09-21 06:27:08 +02:00
irq.c driver-core: remove sysdev.h usage. 2011-12-21 16:26:03 -08:00
kprobes.c
Makefile
module.c avr32: fix relocation check for signed 18-bit offset 2013-06-07 12:49:10 -07:00
nmi_debug.c
ocd.c
process.c sched/rt: Use schedule_preempt_disabled() 2012-03-01 10:28:03 +01:00
ptrace.c ptrace: cleanup arch_ptrace() on avr32 2010-10-27 18:03:10 -07:00
setup.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
signal.c KEYS: Add missing linux/tracehook.h #inclusions 2009-09-09 18:30:02 +10:00
stacktrace.c fix core/stacktrace changes on avr32, mips, sh 2008-07-18 14:42:35 +02:00
switch_to.S
sys_avr32.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
syscall-stubs.S Unify sys_mmap* 2009-12-11 06:44:29 -05:00
syscall_table.S All Arch: remove linkage for sys_nfsservctl system call 2011-08-26 15:09:58 -07:00
time.c avr32: Convert to clocksource_register_hz 2011-01-13 20:41:11 +01:00
traps.c treewide: remove useless NORET_TYPE macro and uses 2012-01-12 20:13:03 -08:00
vmlinux.lds.S avr32: clean up linker script using standard macros. 2009-10-06 17:39:22 +02:00