1. 24 10月, 2011 1 次提交
  2. 21 10月, 2011 1 次提交
  3. 17 10月, 2011 15 次提交
  4. 15 10月, 2011 1 次提交
  5. 02 10月, 2011 3 次提交
  6. 21 9月, 2011 1 次提交
    • R
      ARM: fix vmlinux.lds.S discarding sections · 6760b109
      Russell King 提交于
      We are seeing linker errors caused by sections being discarded, despite
      the linker script trying to keep them.  The result is (eg):
      
      `.exit.text' referenced in section `.alt.smp.init' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
      `.exit.text' referenced in section `.alt.smp.init' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o
      
      This is the relevent part of the linker script (reformatted to make it
      clearer):
      | SECTIONS
      | {
      | /*
      | * unwind exit sections must be discarded before the rest of the
      | * unwind sections get included.
      | */
      | /DISCARD/ : {
      | *(.ARM.exidx.exit.text)
      | *(.ARM.extab.exit.text)
      | }
      | ...
      | .exit.text : {
      | *(.exit.text)
      | *(.memexit.text)
      | }
      | ...
      | /DISCARD/ : {
      | *(.exit.text)
      | *(.memexit.text)
      | *(.exit.data)
      | *(.memexit.data)
      | *(.memexit.rodata)
      | *(.exitcall.exit)
      | *(.discard)
      | *(.discard.*)
      | }
      | }
      
      Now, this is what the linker manual says about discarded output sections:
      
      |    The special output section name `/DISCARD/' may be used to discard
      | input sections.  Any input sections which are assigned to an output
      | section named `/DISCARD/' are not included in the output file.
      
      No questions, no exceptions. It doesn't say "unless they are listed
      before the /DISCARD/ section." Now, this is what asn-generic/vmlinux.lds.S
      says:
      | /*
      |  * Default discarded sections.
      |  *
      |  * Some archs want to discard exit text/data at runtime rather than
      |  * link time due to cross-section references such as alt instructions,
      |  * bug table, eh_frame, etc. DISCARDS must be the last of output
      |  * section definitions so that such archs put those in earlier section
      |  * definitions.
      |  */
      
      And guess what - the list _always_ includes .exit.text etc.
      
      Now, what's actually happening is that the linker is reading the script,
      and it finds the first /DISCARD/ output section at the beginning of the
      script. It continues reading the script, and finds the 'DISCARD' macro
      at the end, which having been postprocessed results in another
      /DISCARD/ output section. As the linker already contains the earlier
      /DISCARD/ output section, it adds it to that existing section, so it
      effectively is placed at the start. This can be seen by using the -M
      option to ld:
      
      | Linker script and memory map
      |
      |                 0xc037c080                jiffies = jiffies_64
      |
      | /DISCARD/
      |  *(.ARM.exidx.exit.text)
      |  *(.ARM.extab.exit.text)
      |  *(.exit.text)
      |  *(.memexit.text)
      |  *(.exit.data)
      |  *(.memexit.data)
      |  *(.memexit.rodata)
      |  *(.exitcall.exit)
      |  *(.discard)
      |  *(.discard.*)
      |
      |                 0xc0008000                . = 0xc0008000
      |
      | .head.text      0xc0008000      0x1d0
      |                 0xc0008000                _text = .
      |  *(.head.text)
      |  .head.text     0xc0008000      0x1d0 arch/arm/kernel/head.o
      |                 0xc0008000                stext
      |
      | .text           0xc0008200   0x2d78d0
      |                 0xc0008200                _stext = .
      |                 0xc0008200                __exception_text_start = .
      |  *(.exception.text)
      |  .exception.text
      | ...
      
      As you can see, all the discarded sections are grouped together - and
      as a result of it being the first output section, they all appear before
      any other section.
      
      The result is that not only is the unwind information discarded (as
      intended), but also the .exit.text, despite us wanting to have the
      .exit.text preserved.
      
      We can't move the unwind information elsewhere, because it'll then be
      included even when we do actually discard the .exit.text (and similar)
      sections.
      
      So, work around this by avoiding the generic DISCARDS macro, and instead
      conditionalize the sections to be discarded ourselves.  This avoids the
      ambiguity in how the linker assigns input sections to output sections,
      making our script less dependent on undocumented linker behaviour.
      Reported-by: NRob Herring <robherring2@gmail.com>
      Tested-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6760b109
  7. 17 9月, 2011 1 次提交
  8. 28 8月, 2011 1 次提交
  9. 27 8月, 2011 1 次提交
  10. 23 8月, 2011 1 次提交
  11. 17 8月, 2011 3 次提交
  12. 13 8月, 2011 1 次提交
  13. 12 8月, 2011 3 次提交
  14. 11 8月, 2011 1 次提交
    • L
      ARM: pxa: fix logic error in PJ4 iWMMXt handling · 392ba787
      Lennert Buytenhek 提交于
      This got added in:
      
      	commit ef6c8445
      	Author: Haojian Zhuang <haojian.zhuang@marvell.com>
      	Date:   Wed Nov 24 11:54:25 2010 +0800
      
      	    ARM: pxa: add iwmmx support for PJ4
      
      which does:
      
      -       mrc     p15, 0, r2, c15, c1, 0
      -       orr     r2, r2, #0x3                    @ enable access to CP0 and CP1
      -       mcr     p15, 0, r2, c15, c1, 0
      +       @ enable access to CP0 and CP1
      +       XSC(mrc p15, 0, r2, c15, c1, 0)
      +       XSC(orr r2, r2, #0x3)
      +       XSC(mcr p15, 0, r2, c15, c1, 0)
      
      but then later does:
      
      -       mrc     p15, 0, r4, c15, c1, 0
      -       orr     r4, r4, #0x3                    @ enable access to CP0 and CP1
      -       mcr     p15, 0, r4, c15, c1, 0
      +       @ enable access to CP0 and CP1
      +       XSC(mrc p15, 0, r4, c15, c1, 0)
      +       XSC(orr r4, r4, #0xf)
      +       XSC(mcr p15, 0, r4, c15, c1, 0)
      Signed-off-by: NLennert Buytenhek <buytenh@laptop.org>
      Acked-by Haojian <haojian.zhuang@gmail.com>
      Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
      392ba787
  15. 08 8月, 2011 1 次提交
  16. 05 8月, 2011 1 次提交
  17. 04 8月, 2011 2 次提交
  18. 28 7月, 2011 1 次提交
    • G
      irq: add irq_domain translation infrastructure · 08a543ad
      Grant Likely 提交于
      This patch adds irq_domain infrastructure for translating from
      hardware irq numbers to linux irqs.  This is particularly important
      for architectures adding device tree support because the current
      implementation (excluding PowerPC and SPARC) cannot handle
      translation for more than a single interrupt controller.  irq_domain
      supports device tree translation for any number of interrupt
      controllers.
      
      This patch converts x86, Microblaze, ARM and MIPS to use irq_domain
      for device tree irq translation.  x86 is untested beyond compiling it,
      irq_domain is enabled for MIPS and Microblaze, but the old behaviour is
      preserved until the core code is modified to actually register an
      irq_domain yet.  On ARM it works and is required for much of the new
      ARM device tree board support.
      
      PowerPC has /not/ been converted to use this new infrastructure.  It
      is still missing some features before it can replace the virq
      infrastructure already in powerpc (see documentation on
      irq_domain_map/unmap for details).  Followup patches will add the
      missing pieces and migrate PowerPC to use irq_domain.
      
      SPARC has its own method of managing interrupts from the device tree
      and is unaffected by this change.
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      08a543ad
  19. 27 7月, 2011 1 次提交