27 Sep, 2011

4 commits


26 Sep, 2011

4 commits


21 Sep, 2011

3 commits

  • 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: Rob Herring
    Tested-by: Mark Brown
    Signed-off-by: Russell King

    Russell King
     
  • The changes introduced in commit
    cc22b4c18540e5e8bf55c7d124044f9317527d3c
    "ARM: set vga memory base at run-time"

    Makes the Integrator/AP freeze completely. I appears that
    this is due to the VGA base address being assigned at PCI
    init time, while this base is needed earlier than that.
    Moving the initialization of the base address to the
    .map_io function solves this problem.

    Cc: Rob Herring
    Cc: Nicolas Pitre
    Cc: Arnd Bergmann
    Signed-off-by: Linus Walleij
    Acked-by: Rob Herring
    Signed-off-by: Arnd Bergmann

    Linus Walleij
     
  • The bindings were recently updated to have separate properties for each
    type of GPIO. Update the Device Tree source to match that.

    Signed-off-by: Stephen Warren
    Acked-by: Olof Johansson
    Signed-off-by: Arnd Bergmann

    Stephen Warren
     

17 Sep, 2011

2 commits

  • CALL scripts/checksyscalls.sh
    :46:1: warning: "__IGNORE_migrate_pages" redefined
    In file included from :2:
    arch/arm/include/asm/unistd.h:482:1: warning: this is the location of the previous definition

    This is caused because we define __IGNORE_migrate_pages to be 1, but
    in the case of nommu, it's defined to be empty. Fix this by just
    defining the __IGNORE_ symbols to be empty.

    Signed-off-by: Russell King

    Russell King
     
  • This patch implements a workaround for erratum 764369 affecting
    Cortex-A9 MPCore with two or more processors (all current revisions).
    Under certain timing circumstances, a data cache line maintenance
    operation by MVA targeting an Inner Shareable memory region may fail to
    proceed up to either the Point of Coherency or to the Point of
    Unification of the system. This workaround adds a DSB instruction before
    the relevant cache maintenance functions and sets a specific bit in the
    diagnostic control register of the SCU.

    Cc:
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Tested-by: Mark Rutland
    Signed-off-by: Russell King

    Will Deacon
     

15 Sep, 2011

9 commits


14 Sep, 2011

1 commit


13 Sep, 2011

2 commits

  • * 'fixes' of git://git.linaro.org/people/arnd/arm-soc:
    ARM: CSR: add missing sentinels to of_device_id tables
    ARM: cns3xxx: Fix newly introduced warnings in the PCIe code
    ARM: cns3xxx: Fix compile error caused by hardware.h removed
    ARM: davinci: fix cache flush build error
    ARM: davinci: correct MDSTAT_STATE_MASK
    ARM: davinci: da850 EVM: read mac address from SPI flash
    OMAP: omap_device: fix !CONFIG_SUSPEND case in _noirq handlers
    OMAP2430: hwmod: musb: add missing terminator to omap2430_usbhsotg_addrs[]
    OMAP3: clock: indicate that gpt12_fck and wdt1_fck are in the WKUP clockdomain
    OMAP4: clock: fix compile warning
    OMAP4: clock: re-enable previous clockdomain enable/disable sequence
    OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup
    OMAP: powerdomains: Make all powerdomain target states as ON at init

    Linus Torvalds
     
  • Arnd Bergmann
     

12 Sep, 2011

1 commit


11 Sep, 2011

3 commits


10 Sep, 2011

2 commits

  • commit d5341942d784134f2997b3ff82cd63cf71d1f932 ("PCI: Make the struct
    pci_dev * argument of pci_fixup_irqs const") did not change argument
    of pdev_to_cnspci(), and thus introduced the following warnings:

    CHECK arch/arm/mach-cns3xxx/pcie.c
    pcie.c:177:60: warning: incorrect type in argument 1 (different modifiers)
    pcie.c:177:60: expected struct pci_dev *dev
    pcie.c:177:60: got struct pci_dev const *dev
    CC arch/arm/mach-cns3xxx/pcie.o
    pcie.c: In function 'cns3xxx_pcie_map_irq':
    pcie.c:177: warning: passing argument 1 of 'pdev_to_cnspci' discards qualifiers from pointer target type
    pcie.c:52: note: expected 'struct pci_dev *' but argument is of type 'const struct pci_dev *'

    This patch fixes the issue.

    Signed-off-by: Anton Vorontsov

    Anton Vorontsov
     
  • Commit c9d95fbe59e426eed7f16e7cac812e46ac4772d0 "ARM: convert PCI defines
    to variables" deleted cns3xxx' hardware.h, but didn't remove references
    for it, so do it now.

    This patch removes lines that refer to hardware.h.

    Signed-off-by: Tommy Lin
    Signed-off-by: Imre Kaloz
    Signed-off-by: Anton Vorontsov

    Tommy Lin
     

07 Sep, 2011

6 commits

  • The TNET variant of DaVinci compiles some code that it shares
    with other DaVinci variants, however it has a V6 CPU rather than
    an ARM926T, thus the hardcoded call to arm926_flush_kern_cache_all()
    in sleep.S will obviously fail, and we need to build with the
    v6_flush_kern_cache_all() call instead. This was triggered by
    manually altering the DaVinci config to build the TNET version.

    Cc: Dave Martin
    Cc: Arnd Bergmann
    Signed-off-by: Linus Walleij
    Signed-off-by: Sekhar Nori
    Cc: stable@kernel.org

    Linus Walleij
     
  • MDSTAT.STATE occupies bits 0..5 according to all available documentation, so fix
    the #define MDSTAT_STATE_MASK at last. Using the wrong value seems to have been
    harmless though...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Sekhar Nori

    Sergei Shtylyov
     
  • DA850/OMAP-L138 EMAC driver uses random mac address instead of
    a fixed one because the mac address is not stuffed into EMAC
    platform data.

    This patch provides a function which reads the mac address
    stored in SPI flash (registered as MTD device) and populates the
    EMAC platform data. The function which reads the mac address is
    registered as a callback which gets called upon addition of MTD
    device.

    NOTE: In case the MAC address stored in SPI flash is erased, follow
    the instructions at [1] to restore it.

    [1] http://processors.wiki.ti.com/index.php/GSG:_OMAP-L138_DVEVM_Additional_Procedures#Restoring_MAC_address_on_SPI_Flash

    Modifications in v2:
    Guarded registering the mtd_notifier only when MTD is enabled.
    Earlier this was handled using mtd_has_partitions() call, but
    this has been removed in Linux v3.0.

    Modifications in v3:
    a. Guarded da850_evm_m25p80_notify_add() function and
    da850evm_spi_notifier structure with CONFIG_MTD macros.
    b. Renamed da850_evm_register_mtd_user() function to
    da850_evm_setup_mac_addr() and removed the struct mtd_notifier
    argument to this function.
    c. Passed the da850evm_spi_notifier structure to register_mtd_user()
    function.

    Modifications in v4:
    Moved the da850_evm_setup_mac_addr() function within the first
    CONFIG_MTD ifdef construct.

    Signed-off-by: Rajashekhara, Sudhakar
    Signed-off-by: Sekhar Nori
    Cc: stable@kernel.org

    Rajashekhara, Sudhakar
     
  • Fighting unfixed U-Boots and other beasts that may the cache in
    a locked-down state when starting the kernel, we make sure to
    disable all cache lock-down when initializing the l2x0 so we
    are in a known state.

    Cc: Srinidhi Kasagar
    Cc: Rabin Vincent
    Cc: Adrian Bunk
    Cc: Rob Herring
    Cc: Catalin Marinas
    Cc: Will Deacon
    Reviewed-by: Santosh Shilimkar
    Reported-by: Jan Rinze
    Tested-by: Robert Marklund
    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     
  • I was intrigued by the fact that the clock stood still on
    the Integrator, but it wasn't strange at all, because the
    timer was set up all wrong and probably has been for a
    while. With this patch the clock starts ticking again:
    make the timer periodic (reload), |= on the divisor bit
    and load the timer before starting it.

    Cc: stable@kernel.org
    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     
  • The suspend/resume _noirq handlers were #ifdef'd out in the
    !CONFIG_SUSPEND case, but were still assigned to the dev_pm_ops
    struct. Fix by defining them to NULL in the !CONFIG_SUSPEND case.

    Reported-by: Arnd Bergmann
    Acked-by: Arnd Bergmann
    Signed-off-by: Kevin Hilman

    Kevin Hilman
     

05 Sep, 2011

2 commits


04 Sep, 2011

1 commit

  • When ARCH_HAS_HOLES_MEMORYMODEL is selected, pfn_valid calls
    memblock_is_memory to test validity of a pfn:

    > memblock_is_memory(pfn << PAGE_SHIFT);

    On LPAE systems this cuts off the top bits, as the shift occurs before
    the value is promoted to a phys_addr_t.

    This patch replaces the shift with a call to __pfn_to_phys (which casts
    pfn to phys_addr_t before shifting), preventing the loss of significant
    bits.

    Signed-off-by: Mark Rutland
    Acked-by: Will Deacon
    Signed-off-by: Russell King

    Mark Rutland