linux/arch/arm/include/asm
Uwe Kleine-König de66a97901 ARM: 7187/1: fix unwinding for XIP kernels
The linker places the unwind tables in readonly sections. So when using
an XIP kernel these are located in ROM and cannot be modified.
For that reason the current approach to convert the relative offsets in
the unwind index to absolute addresses early in the boot process doesn't
work with XIP.

The offsets in the unwind index section are signed 31 bit numbers and
the structs are sorted by this offset. So it first has offsets between
0x40000000 and 0x7fffffff (i.e. the negative offsets) and then offsets
between 0x00000000 and 0x3fffffff. When seperating these two blocks the
numbers are sorted even when interpreting the offsets as unsigned longs.

So determine the first non-negative entry once and track that using the
new origin pointer. The actual bisection can then use a plain unsigned
long comparison. The only thing that makes the new bisection more
complicated is that the offsets are relative to their position in the
index section, so the key to search needs to be adapted accordingly in
each step.

Moreover several consts are added to catch future writes and rename the
member "addr" of struct unwind_idx to "addr_offset" to better match the
new semantic. (This has the additional benefit of breaking eventual
users at compile time to make them aware of the change.)

In my tests the new algorithm was a tad faster than the original and has
the additional upside of not needing the initial conversion and so saves
some boot time and it's possible to unwind even earlier.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-12-06 11:16:13 +00:00
..
hardware ARM: 7156/1: l2x0: fix compile error on !CONFIG_USE_OF 2011-11-12 11:32:34 +00:00
mach ARM: 7155/1: arch.h: Declare 'pt_regs' locally 2011-11-09 21:53:36 +00:00
a.out-core.h ARM: 6798/1: aout-core: zero thread debug registers in a.out core dump 2011-03-10 15:16:29 +00:00
a.out.h headers_check fix: arm, a.out.h 2009-02-01 11:01:22 +05:30
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
assembler.h ARM: assembler.h: Add string declaration macro 2011-07-07 15:31:05 +01:00
atomic.h atomic: cleanup asm-generic atomic*.h inclusion 2011-07-26 16:49:47 -07:00
bitops.h asm-generic: add another generic ext2 atomic bitops 2011-07-26 16:49:46 -07:00
bug.h ARM: 7017/1: Use generic BUG() handler 2011-10-17 09:13:41 +01:00
bugs.h
byteorder.h byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
cache.h ARM: implement support for read-mostly sections 2010-12-05 08:39:36 +00:00
cacheflush.h Merge branch 'v6v7' into devel 2011-03-16 23:35:26 +00:00
cachetype.h ARM: 7062/1: cache: detect PIPT I-cache using CTR 2011-10-17 09:13:41 +01:00
checksum.h
clkdev.h ARM: Consolidate the clkdev header files 2011-07-19 18:09:45 +02:00
cpu.h ARM: 5872/1: ARM: include needed linux/cpu.h in asm/cpu.h 2010-01-10 13:03:52 +00:00
cputype.h ARM: 7011/1: Add ARM cpu topology definition 2011-10-17 09:02:43 +01:00
current.h
delay.h
device.h Merge branch 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:11:00 -07:00
div64.h [ARM] 5320/1: fix assembly constraints in implementation of do_div() 2008-10-23 12:53:32 +01:00
dma-mapping.h Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-10-28 12:02:27 -07:00
dma.h locking, ARM: Annotate low level hw locks as raw 2011-09-13 11:12:14 +02:00
domain.h ARM: 6384/1: Remove the domain switching on ARMv6k/v7 CPUs 2010-11-04 15:44:31 +00:00
ecard.h ARM: io: ecard: move ioaddr() inside __ecard_address 2011-08-17 08:44:16 +01:00
elf.h ARM: 6883/1: ptrace: Migrate to regsets framework 2011-05-14 21:36:55 +01:00
entry-macro-multi.S ARM: gic: consolidate PPI handling 2011-10-23 13:32:29 +01:00
entry-macro-vic2.S ARM: Add common entry code for system with two VICs 2010-01-15 17:10:14 +09:00
exception.h ARM: 7115/4: move __exception and friends to asm/exception.h 2011-10-17 09:02:44 +01:00
fb.h
fcntl.h
fiq.h ARM: 6940/1: fiq: Briefly document driver responsibilities for suspend/resume 2011-05-26 10:31:06 +01:00
fixmap.h [ARM] fixmap support 2009-03-15 21:01:20 -04:00
flat.h flat: fix data sections alignment 2009-05-29 08:40:02 -07:00
floppy.h [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
fncpy.h ARM: 6640/1: Thumb-2: Symbol manipulation macros for function body copying 2011-01-27 11:48:58 +00:00
fpstate.h Fix common misspellings 2011-03-31 11:26:23 -03:00
ftrace.h ARM: 6319/1: ftrace: add Thumb-2 support to dynamic ftrace 2010-09-02 15:28:43 +01:00
futex.h ARM: 7099/1: futex: preserve oldval in SMP __futex_atomic_op 2011-09-26 12:36:47 +01:00
glue-cache.h Fix common misspellings 2011-03-31 11:26:23 -03:00
glue-df.h ARM: move cache/processor/fault glue to separate include files 2011-02-12 11:52:21 +00:00
glue-pf.h ARM: move cache/processor/fault glue to separate include files 2011-02-12 11:52:21 +00:00
glue-proc.h Merge branch 'v6v7' into devel 2011-03-16 23:35:26 +00:00
glue.h Fix common misspellings 2011-03-31 11:26:23 -03:00
gpio.h ARM: gpio: make trivial GPIOLIB implementation the default 2011-08-12 08:54:19 +01:00
hardirq.h ARM: gic: consolidate PPI handling 2011-10-23 13:32:29 +01:00
highmem.h ARM: 6639/1: allow highmem on SMP platforms without h/w TLB ops broadcast 2011-02-23 17:24:17 +00:00
hw_breakpoint.h ARM: hw_breakpoint: add support for multiple watchpoints 2011-08-31 10:42:48 +01:00
hw_irq.h arm: dove: Use proper irq accessor functions 2011-03-29 14:47:57 +02:00
hwcap.h ARM: hwcaps: add new HWCAP defines for ARMv7-A 2011-07-07 19:20:51 +01:00
ide.h
io.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-10-25 12:11:02 +02:00
ioctls.h ioctl: Use asm-generic/ioctls.h on arm (enables termiox) 2010-10-22 10:19:59 -07:00
ipcbuf.h
irq.h ARM: introduce handle_IRQ() not to dump exception stack 2011-07-12 19:42:40 +08:00
irqflags.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
Kbuild ARM: 7006/1: Migrate to asm-generic wrapper support 2011-10-17 09:12:40 +01:00
kexec.h [ARM] add machine-specific hook to machine_kexec 2011-03-03 16:26:55 -05:00
kgdb.h kgdb,arm: fix register dump 2010-10-29 13:14:40 -05:00
kmap_types.h kdb: core for kgdb back end (2 of 2) 2010-05-20 21:04:21 -05:00
kprobes.h ARM: kprobes: Extend arch_specific_insn to add pointer to emulated instruction 2011-07-13 17:32:42 +00:00
leds.h
limits.h
linkage.h
localtimer.h Merge branch 'dt/gic' into next/dt 2011-10-31 14:08:10 +01:00
locks.h
mach-types.h arm: move mach-types to include/generated 2009-12-12 13:08:14 +01:00
mc146818rtc.h [ARM] Convert asm/io.h to linux/io.h 2008-09-06 12:10:45 +01:00
memblock.h ARM: fix memblock breakage 2010-10-27 21:41:39 +01:00
memory.h ARM: switch from NO_MACH_MEMORY_H to NEED_MACH_MEMORY_H 2011-10-13 12:53:53 -04:00
mman.h arm: add arch_mmap_check(), get rid of sys_arm_mremap() 2009-12-11 06:34:09 -05:00
mmu_context.h ARM: add a vma entry for the user accessible vector page 2010-10-01 22:35:19 -04:00
mmu.h locking, ARM: Annotate low level hw locks as raw 2011-09-13 11:12:14 +02:00
module.h ARM: 7013/1: P2V: Remove ARM_PATCH_PHYS_VIRT_16BIT 2011-08-13 11:26:40 +01:00
msgbuf.h
mtd-xip.h [ARM] move asm/xip.h's mach/hardware.h include to mach/xip.h 2008-12-14 13:22:51 +00:00
mutex.h
nwflash.h
outercache.h ARM: 7114/1: cache-l2x0: add resume entry for l2 in secure mode 2011-10-17 09:11:51 +01:00
page-nommu.h nommu: Remove the memory_start/end variables from ARM page-nommu.h 2009-07-24 12:35:01 +01:00
page.h ARM: 7075/1: LPAE: Factor out 2-level page table definitions into separate files 2011-10-06 15:40:05 +01:00
param.h
parport.h
pci.h ARM: convert PCI defines to variables 2011-07-12 11:19:29 -05:00
perf_event.h ARM: perf: add support for the Cortex-A15 PMU 2011-07-07 19:20:53 +01:00
pgalloc.h ARM: 7076/1: LPAE: Add (pte|pmd)val_t type definitions as u32 2011-10-06 15:40:05 +01:00
pgtable-2level-hwdef.h ARM: 7077/1: LPAE: Use a mask for physical addresses in page table entries 2011-10-06 15:40:06 +01:00
pgtable-2level-types.h ARM: 7076/1: LPAE: Add (pte|pmd)val_t type definitions as u32 2011-10-06 15:40:05 +01:00
pgtable-2level.h ARM: 7075/1: LPAE: Factor out 2-level page table definitions into separate files 2011-10-06 15:40:05 +01:00
pgtable-hwdef.h ARM: 7075/1: LPAE: Factor out 2-level page table definitions into separate files 2011-10-06 15:40:05 +01:00
pgtable-nommu.h ARM: 5988/1: pgprot_dmacoherent() for non-mmu builds 2010-03-13 10:48:22 +00:00
pgtable.h Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-10-28 12:02:27 -07:00
pmu.h ARM: PMU: remove pmu_init declaration 2011-11-16 10:06:57 +00:00
posix_types.h
proc-fns.h ARM: pm: convert some assembly to C 2011-09-20 23:33:44 +01:00
processor.h Merge branch 'misc' into devel 2011-03-16 23:35:25 +00:00
procinfo.h
prom.h irq: add irq_domain translation infrastructure 2011-07-28 01:32:04 -06:00
ptrace.h ARM: ptrace: Add APSR_MASK definition to ptrace.h 2011-07-13 17:32:43 +00:00
scatterlist.h ARM: Allow SoCs to enable scatterlist chaining 2011-06-02 11:16:22 +01:00
sched_clock.h ARM: sched_clock: allow init_sched_clock() to be called early 2011-01-11 16:23:04 +00:00
seccomp.h ARM: SECCOMP support 2010-10-01 22:32:18 -04:00
segment.h
sembuf.h
serial.h
setup.h Merge branches 'btc', 'dma', 'entry', 'fixes', 'linker-layout', 'misc', 'mmci', 'suspend' and 'vfp' into for-next 2011-07-22 23:08:48 +01:00
shmbuf.h
shmparam.h
sigcontext.h
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
smp_plat.h Merge branches 'at91', 'dcache', 'ftrace', 'hwbpt', 'misc', 'mmci', 's3c', 'st-ux' and 'unwind' into devel 2010-10-18 22:34:25 +01:00
smp_scu.h ARM: pm: add function to set WFI low-power mode for SMP CPUs 2011-02-11 12:29:18 +00:00
smp_twd.h ARM: gic, local timers: use the request_percpu_irq() interface 2011-10-23 13:32:33 +01:00
smp.h ARM: gic: consolidate PPI handling 2011-10-23 13:32:29 +01:00
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h
sparsemem.h [ARM] mm: enable sparsemem on clps7500 and RiscPC 2008-10-01 17:24:04 +01:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock.h ARM: 6939/1: fix missing 'cpu_relax()' declaration 2011-05-23 17:19:26 +01:00
stackprotector.h ARM: initial stack protector (-fstack-protector) support 2010-06-14 21:31:00 -04:00
stacktrace.h [ARM] 5382/1: unwind: Reorganise the stacktrace support 2009-02-12 13:21:17 +00:00
stat.h
statfs.h ARM: Use <asm-generic/statfs.h> 2008-09-04 09:46:11 +01:00
string.h [ARM] remove memzero() 2008-11-27 12:37:59 +00:00
suspend.h ARM: pm: preallocate a page table for suspend/resume 2011-09-20 23:33:36 +01:00
swab.h ARM: 5772/1: Use REV and REV16 for byte swapping on ARMv6+ 2009-10-25 15:59:53 +00:00
system.h Merge branch 'misc' into for-linus 2011-10-25 08:19:59 +01:00
tcm.h ARM: 6985/1: export functions to determine the presence of I/DTCM 2011-07-06 20:49:45 +01:00
termbits.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
termios.h
therm.h
thread_info.h ARM: SECCOMP support 2010-10-01 22:32:18 -04:00
thread_notify.h ARM: 6867/1: Introduce THREAD_NOTIFY_COPY for copy_thread() hooks 2011-04-10 21:13:36 +01:00
timex.h [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
tlb.h arm: mmu_gather rework 2011-05-25 08:39:14 -07:00
tlbflush.h ARM: 7076/1: LPAE: Add (pte|pmd)val_t type definitions as u32 2011-10-06 15:40:05 +01:00
tls.h ARM: v6k: select TLS register code according to V6 variants 2011-02-02 21:23:29 +00:00
topology.h ARM: 7182/1: ARM cpu topology: fix warning 2011-11-30 23:55:21 +00:00
traps.h ARM: 7004/1: fix traps.h compile warnings 2011-07-22 17:19:02 +01:00
types.h remove dma64_addr_t 2011-03-23 19:47:18 -07:00
uaccess.h ARM: 6384/1: Remove the domain switching on ARMv6k/v7 CPUs 2010-11-04 15:44:31 +00:00
ucontext.h Fix common misspellings 2011-03-31 11:26:23 -03:00
unaligned.h
unified.h Fix "W" macro in arch/arm/include/asm/unified.h 2009-09-18 23:30:11 +01:00
unistd.h ARM: wire up process_vm_writev and process_vm_readv syscalls 2011-11-17 16:58:00 +00:00
unwind.h ARM: 7187/1: fix unwinding for XIP kernels 2011-12-06 11:16:13 +00:00
user.h ARM: 6798/1: aout-core: zero thread debug registers in a.out core dump 2011-03-10 15:16:29 +00:00
vfp.h
vfpmacros.h ARM: 6203/1: Make VFPv3 usable on ARMv6 2010-07-09 14:41:34 +01:00
vga.h ARM: set vga memory base at run-time 2011-07-12 11:19:29 -05:00
xor.h