linux/arch/powerpc
Anton Blanchard 0e0ed6406e powerpc/modules: Module CRC relocation fix causes perf issues
Module CRCs are implemented as absolute symbols that get resolved by
a linker script. We build an intermediate .o that contains an
unresolved symbol for each CRC. genksysms parses this .o, calculates
the CRCs and writes a linker script that "resolves" the symbols to
the calculated CRC.

Unfortunately the ppc64 relocatable kernel sees these CRCs as symbols
that need relocating and relocates them at boot. Commit d4703aef
(module: handle ppc64 relocating kcrctabs when CONFIG_RELOCATABLE=y)
added a hook to reverse the bogus relocations. Part of this patch
created a symbol at 0x0:

# head -2 /proc/kallsyms
0000000000000000 T reloc_start
c000000000000000 T .__start

This reloc_start symbol is causing lots of confusion to perf. It
thinks reloc_start is a massive function that stretches from 0x0 to
0xc000000000000000 and we get various cryptic errors out of perf,
including:

problem incrementing symbol count, skipping event

This patch removes the  reloc_start linker script label and instead
defines it as PHYSICAL_START. We also need to wrap it with
CONFIG_PPC64 because the ppc32 kernel can set a non zero
PHYSICAL_START at compile time and we wouldn't want to subtract
it from the CRCs in that case.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-07-24 14:18:43 +10:00
..
boot powerpc: Add T4 LAC device tree binding & defs 2013-06-24 19:52:36 -05:00
configs Merge remote-tracking branch 'agust/next' into next 2013-07-02 18:31:08 +10:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include powerpc/modules: Module CRC relocation fix causes perf issues 2013-07-24 14:18:43 +10:00
kernel powerpc/modules: Module CRC relocation fix causes perf issues 2013-07-24 14:18:43 +10:00
kvm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-07-04 10:29:23 -07:00
lib powerpc: Fix single step emulation of 32bit overflowed branches 2013-06-20 16:55:13 +10:00
math-emu powerpc/math-emu: Fix decoding of some instructions 2013-06-20 17:05:05 +10:00
mm mm: remove free_area_cache 2013-07-10 18:11:34 -07:00
net ppc: bpf_jit: can call module_free() from any context 2013-05-20 14:03:50 -07:00
oprofile Merge branch 'merge' into next 2013-01-29 11:33:37 +11:00
perf Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-13 15:35:47 -07:00
platforms irqdomain refactoring for v3.11 2013-07-06 12:37:04 -07:00
sysdev Merge remote-tracking branch 'scott/next' into next 2013-07-02 17:42:17 +10:00
xmon Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
Kconfig.debug Merge branch 'kconfig-diet' from Dave Hansen 2013-07-04 11:25:51 -07:00
Makefile powerpc: Avoid load of static chain register when calling nested functions through a pointer on 64bit 2013-01-10 17:01:27 +11:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00