1. 24 7月, 2013 1 次提交
    • A
      powerpc/modules: Module CRC relocation fix causes perf issues · 0e0ed640
      Anton Blanchard 提交于
      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: NAnton Blanchard <anton@samba.org>
      Cc: <stable@kernel.org>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      0e0ed640
  2. 28 9月, 2012 1 次提交
    • D
      Make most arch asm/module.h files use asm-generic/module.h · 786d35d4
      David Howells 提交于
      Use the mapping of Elf_[SPE]hdr, Elf_Addr, Elf_Sym, Elf_Dyn, Elf_Rel/Rela,
      ELF_R_TYPE() and ELF_R_SYM() to either the 32-bit version or the 64-bit version
      into asm-generic/module.h for all arches bar MIPS.
      
      Also, use the generic definition mod_arch_specific where possible.
      
      To this end, I've defined three new config bools:
      
       (*) HAVE_MOD_ARCH_SPECIFIC
      
           Arches define this if they don't want to use the empty generic
           mod_arch_specific struct.
      
       (*) MODULES_USE_ELF_RELA
      
           Arches define this if their modules can contain RELA records.  This causes
           the Elf_Rela mapping to be emitted and allows apply_relocate_add() to be
           defined by the arch rather than have the core emit an error message.
      
       (*) MODULES_USE_ELF_REL
      
           Arches define this if their modules can contain REL records.  This causes
           the Elf_Rel mapping to be emitted and allows apply_relocate() to be
           defined by the arch rather than have the core emit an error message.
      
      Note that it is possible to allow both REL and RELA records: m68k and mips are
      two arches that do this.
      
      With this, some arch asm/module.h files can be deleted entirely and replaced
      with a generic-y marker in the arch Kbuild file.
      
      Additionally, I have removed the bits from m32r and score that handle the
      unsupported type of relocation record as that's now handled centrally.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      786d35d4
  3. 15 12月, 2009 1 次提交
  4. 21 11月, 2008 2 次提交
  5. 04 8月, 2008 1 次提交
  6. 11 12月, 2006 1 次提交
    • J
      [POWERPC] Generic BUG for powerpc · 73c9ceab
      Jeremy Fitzhardinge 提交于
      This makes powerpc use the generic BUG machinery.  The biggest reports the
      function name, since it is redundant with kallsyms, and not needed in general.
      
      There is an overall reduction of code, since module_32/64 duplicated several
      functions.
      
      Unfortunately there's no way to tell gcc that BUG won't return, so the BUG
      macro includes a goto loop.  This will generate a real jmp instruction, which
      is never used.
      
      [akpm@osdl.org: build fix]
      [paulus@samba.org: remove infinite loop in BUG_ON]
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Hugh Dickens <hugh@veritas.com>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      73c9ceab
  7. 09 1月, 2006 1 次提交
  8. 09 9月, 2005 1 次提交
  9. 06 9月, 2005 1 次提交