kernel_optimize_test/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
a.out.h
asm-offsets.h
assembler.h
atomic.h
bitops.h
bug.h ARM: 7017/1: Use generic BUG() handler 2011-10-17 09:13:41 +01:00
bugs.h
byteorder.h
cache.h
cacheflush.h
cachetype.h ARM: 7062/1: cache: detect PIPT I-cache using CTR 2011-10-17 09:13:41 +01:00
checksum.h
clkdev.h
cpu.h
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
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
ecard.h ARM: io: ecard: move ioaddr() inside __ecard_address 2011-08-17 08:44:16 +01:00
elf.h
entry-macro-multi.S ARM: gic: consolidate PPI handling 2011-10-23 13:32:29 +01:00
entry-macro-vic2.S
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
fixmap.h
flat.h
floppy.h
fncpy.h
fpstate.h
ftrace.h
futex.h ARM: 7099/1: futex: preserve oldval in SMP __futex_atomic_op 2011-09-26 12:36:47 +01:00
glue-cache.h
glue-df.h
glue-pf.h
glue-proc.h
glue.h
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
hw_breakpoint.h ARM: hw_breakpoint: add support for multiple watchpoints 2011-08-31 10:42:48 +01:00
hw_irq.h
hwcap.h
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
ipcbuf.h
irq.h
irqflags.h
Kbuild ARM: 7006/1: Migrate to asm-generic wrapper support 2011-10-17 09:12:40 +01:00
kexec.h
kgdb.h
kmap_types.h
kprobes.h
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
mc146818rtc.h
memblock.h
memory.h ARM: switch from NO_MACH_MEMORY_H to NEED_MACH_MEMORY_H 2011-10-13 12:53:53 -04:00
mman.h
mmu_context.h
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
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
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
perf_event.h
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
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
procinfo.h
prom.h irq: add irq_domain translation infrastructure 2011-07-28 01:32:04 -06:00
ptrace.h
scatterlist.h
sched_clock.h
seccomp.h
segment.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
signal.h
smp_plat.h
smp_scu.h
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
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h
stackprotector.h
stacktrace.h
stat.h
statfs.h
string.h
suspend.h ARM: pm: preallocate a page table for suspend/resume 2011-09-20 23:33:36 +01:00
swab.h
system.h Merge branch 'misc' into for-linus 2011-10-25 08:19:59 +01:00
tcm.h
termbits.h
termios.h
therm.h
thread_info.h
thread_notify.h
timex.h
tlb.h
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
topology.h ARM: 7182/1: ARM cpu topology: fix warning 2011-11-30 23:55:21 +00:00
traps.h
types.h
uaccess.h
ucontext.h
unaligned.h
unified.h
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
vfp.h
vfpmacros.h
vga.h
xor.h