18 Mar, 2013

1 commit

  • Commit 1d9d8639c063 ("perf,x86: fix kernel crash with PEBS/BTS after
    suspend/resume") fixed a crash when doing PEBS performance profiling
    after resuming, but in using init_debug_store_on_cpu() to restore the
    DS_AREA mtrr it also resulted in a new WARN_ON() triggering.

    init_debug_store_on_cpu() uses "wrmsr_on_cpu()", which in turn uses CPU
    cross-calls to do the MSR update. Which is not really valid at the
    early resume stage, and the warning is quite reasonable. Now, it all
    happens to _work_, for the simple reason that smp_call_function_single()
    ends up just doing the call directly on the CPU when the CPU number
    matches, but we really should just do the wrmsr() directly instead.

    This duplicates the wrmsr() logic, but hopefully we can just remove the
    wrmsr_on_cpu() version eventually.

    Reported-and-tested-by: Parag Warudkar
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

16 Mar, 2013

5 commits

  • Pull OpenRISC bug fixes from Jonas Bonn:

    - The GPIO descriptor work has exposed how broken the non-GPIOLIB bits
    for OpenRISC were. We now require GPIOLIB as this is the preferred
    way forward.

    - The system.h split introduced a bug in llist.h for arches using
    asm-generic/cmpxchg.h directly, which is currently only OpenRISC.
    The patch here moves two defines from asm-generic/atomic.h to
    asm-generic/cmpxchg.h to make things work as they should.

    - The VIRT_TO_BUS selector was added for OpenRISC, but OpenRISC does
    not have the virt_to_bus methods, so there's a patch to remove it
    again.

    * tag 'for-3.9-rc3' of git://openrisc.net/jonas/linux:
    openrisc: remove HAVE_VIRT_TO_BUS
    asm-generic: move cmpxchg*_local defs to cmpxchg.h
    openrisc: require gpiolib

    Linus Torvalds
     
  • Pull char/misc fixes from Greg Kroah-Hartman:
    "Here are some tiny fixes for the w1 drivers and the final removal
    patch for getting rid of CONFIG_EXPERIMENTAL (all users of it are now
    gone from your tree, this just drops the Kconfig item itself.)

    All have been in the linux-next tree for a while"

    * tag 'char-misc-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    final removal of CONFIG_EXPERIMENTAL
    w1: fix oops when w1_search is called from netlink connector
    w1-gpio: fix unused variable warning
    w1-gpio: remove erroneous __exit and __exit_p()
    ARM: w1-gpio: fix erroneous gpio requests

    Linus Torvalds
     
  • Pull DMA-mapping fix from Marek Szyprowski:
    "An important fix for all ARM architectures which use ZONE_DMA.
    Without it dma_alloc_* calls with GFP_ATOMIC flag might have allocated
    buffers outsize DMA zone."

    * 'fixes-for-3.9' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
    ARM: DMA-mapping: add missing GFP_DMA flag for atomic buffer allocation

    Linus Torvalds
     
  • Pull MFD fixes from Samuel Ortiz:
    "This is the first batch of MFD fixes for 3.9.

    With this one we have:

    - An ab8500 build failure fix.
    - An ab8500 device tree parsing fix.
    - A fix for twl4030_madc remove routine to work properly (when
    built-in).
    - A fix for properly registering palmas interrupt handler.
    - A fix for omap-usb init routine to actually write into the
    hostconfig register.
    - A couple of warning fixes for ab8500-gpadc and tps65912"

    * tag 'mfd-fixes-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes:
    mfd: twl4030-madc: Remove __exit_p annotation
    mfd: ab8500: Kill "reg" property from binding
    mfd: ab8500-gpadc: Complain if we fail to enable vtvout LDO
    mfd: wm831x: Don't forward declare enum wm831x_auxadc
    mfd: twl4030-audio: Fix argument type for twl4030_audio_disable_resource()
    mfd: tps65912: Declare and use tps65912_irq_exit()
    mfd: palmas: Provide irq flags through DT/platform data
    mfd: Make AB8500_CORE select POWER_SUPPLY to fix build error
    mfd: omap-usb-host: Actually update hostconfig

    Linus Torvalds
     
  • This patch fixes a kernel crash when using precise sampling (PEBS)
    after a suspend/resume. Turns out the CPU notifier code is not invoked
    on CPU0 (BP). Therefore, the DS_AREA (used by PEBS) is not restored properly
    by the kernel and keeps it power-on/resume value of 0 causing any PEBS
    measurement to crash when running on CPU0.

    The workaround is to add a hook in the actual resume code to restore
    the DS Area MSR value. It is invoked for all CPUS. So for all but CPU0,
    the DS_AREA will be restored twice but this is harmless.

    Reported-by: Linus Torvalds
    Signed-off-by: Stephane Eranian
    Signed-off-by: Linus Torvalds

    Stephane Eranian
     

14 Mar, 2013

2 commits

  • Atomic pool should always be allocated from DMA zone if such zone is
    available in the system to avoid issues caused by limited dma mask of
    any of the devices used for making an atomic allocation.

    Reported-by: Krzysztof Halasa
    Signed-off-by: Marek Szyprowski
    Cc: Stable [v3.6+]

    Marek Szyprowski
     
  • In the UAPI header files, __BIG_ENDIAN and __LITTLE_ENDIAN must be
    compared against __BYTE_ORDER in preprocessor conditionals where these are
    exposed to userspace (that is they're not inside __KERNEL__ conditionals).

    However, in the main kernel the norm is to check for
    "defined(__XXX_ENDIAN)" rather than comparing against __BYTE_ORDER and
    this has incorrectly leaked into the userspace headers.

    The definition of struct stat64 in M32R's asm/stat.h is wrong in this way.
    Note that userspace will likely interpret the field order incorrectly as
    the big-endian variant on little-endian machines - depending on header
    inclusion order.

    [!!!] NOTE [!!!] This patch may adversely change the userspace API. It might
    be better to fix the ordering of st_blocks and __pad4 in struct stat64.

    Signed-off-by: David Howells
    Cc: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

13 Mar, 2013

7 commits

  • The OpenRISC arch doesn't actually have the virt_to_bus methods

    Signed-off-by: Jonas Bonn

    Jonas Bonn
     
  • The recent move to GPIO descriptors breaks the OpenRISC build. Requiring
    gpiolib resolves this; using gpiolib exclusively is also the recommended
    way forward for all arches by the developers working on these GPIO changes.
    The non-gpiolib implementation for OpenRISC never worked anyway...

    Signed-off-by: Jonas Bonn

    Jonas Bonn
     
  • Pull Xen fixes from Konrad Rzeszutek Wilk:
    - Compile warnings and errors (one on x86, two on ARM)
    - WARNING in xen-pciback
    - Use the acpi_processor_get_performance_info instead of the 'register'
    version

    * tag 'stable/for-linus-3.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/acpi: remove redundant acpi/acpi_drivers.h include
    xen: arm: mandate EABI and use generic atomic operations.
    acpi: Export the acpi_processor_get_performance_info
    xen/pciback: Don't disable a PCI device that is already disabled.

    Linus Torvalds
     
  • Fix regression introduced by commit d2323cf773 ("onewire: w1-gpio: add
    ext_pullup_enable pin in platform data") which added a gpio entry to the
    platform data, but did not add the required initialisers to the board
    files using it. Consequently, the driver would request gpio 0 at probe,
    which could break other uses of the corresponding pin.

    On AT91 requesting gpio 0 changes the pin muxing for PIOA0, which, for
    instance, breaks SPI0 on at91sam9g20.

    Cc: stable
    Signed-off-by: Johan Hovold
    Acked-by: Jean-Christophe PLAGNIOL-VILLARD
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • In commit 887cbce0adea ("arch Kconfig: centralise ARCH_NO_VIRT_TO_BUS")
    I introduced the config sybmol HAVE_VIRT_TO_BUS and selected that where
    needed. I am not sure what I was thinking. Instead, just directly
    select VIRT_TO_BUS where it is needed.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "These bug fixes are for the largest part for mvebu/kirkwood, which saw
    a few regressions after the clock infrastructure was enabled, and for
    OMAP, which showed a few more preexisting bugs with the new
    multiplatform support.

    Other small fixes are for imx, mxs, tegra, spear and socfpga"

    * tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits)
    ARM: spear3xx: Use correct pl080 header file
    Arm: socfpga: pl330: Add #dma-cells for generic dma binding support
    ARM: multiplatform: Sort the max gpio numbers.
    ARM: imx: fix typo "DEBUG_IMX50_IMX53_UART"
    ARM: imx: pll1_sys should be an initial on clk
    arm: mach-orion5x: fix typo in compatible string of a .dts file
    arm: mvebu: fix address-cells in mpic DT node
    arm: plat-orion: fix address decoding when > 4GB is used
    arm: mvebu: Reduce reg-io-width with UARTs
    ARM: Dove: add RTC device node
    arm: mvebu: enable the USB ports on Armada 370 Reference Design board
    ARM: dove: drop "select COMMON_CLK_DOVE"
    rtc: rtc-mv: Add support for clk to avoid lockups
    gpio: mvebu: Add clk support to prevent lockup
    ARM: kirkwood: fix to retain gbe MAC addresses for DT kernels
    ARM: kirkwood: of_serial: fix clock gating by removing clock-frequency
    ARM: mxs: cfa10049: Fix fb initialisation function
    ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ"
    ARM: OMAP: RX-51: add missing USB phy binding
    clk: Tegra: Remove duplicate smp_twd clock
    ...

    Linus Torvalds
     
  • Pull m68knommu fixes from Greg Ungerer:
    "It contains a few small fixes for the non-MMU m68k platforms. Fixes
    some compilation problems, some broken header definitions, removes an
    unused config option and adds a name for the old 68000 CPU support."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68k: drop "select EMAC_INC"
    m68knommu: fix misnamed GPIO pin definition for ColdFire 528x CPU
    m68knommu: fix MC68328.h defines
    m68knommu: fix build when CPU is not coldfire
    m68knommu: add CPU_NAME for 68000

    Linus Torvalds
     

12 Mar, 2013

8 commits

  • The definitions have move around recently, causing build errors
    in spear3xx for all configurations:

    spear3xx.c:47:5: error: 'PL080_BSIZE_16' undeclared here (not in a function)
    spear3xx.c:47:23: error: 'PL080_CONTROL_SB_SIZE_SHIFT' undeclared here (not in a function)
    spear3xx.c:48:22: error: 'PL080_CONTROL_DB_SIZE_SHIFT' undeclared here (not in a function)

    Signed-off-by: Arnd Bergmann
    Cc: Alessandro Rubini
    Cc: Viresh Kumar

    Arnd Bergmann
     
  • The ab8500 device is a child of the prcmu device, which is a memory mapped
    bus device, whose children are addressable using physical memory addresses,
    not using mailboxes, so a mailbox number in the ab8500 node cannot be
    parsed by DT. Nothing uses this number, since it was only introduced
    as part of the failed attempt to clean up prcmu mailbox handling, and
    we can simply remove it.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Samuel Ortiz

    Arnd Bergmann
     
  • This patch adds #dma-cells property to PL330 DMA controller nodes for
    supporting generic dma dt bindings on SOCFPGA platform. #dma-channels
    and #dma-requests are not required now but added in advance.

    Signed-off-by: Padmavathi Venna
    Signed-off-by: Arnd Bergmann

    Padmavathi Venna
     
  • mvebu fixes for v3.9 from Jason Cooper :

    The first four patches:

    89c58c1 rtc: rtc-mv: Add support for clk to avoid lockups
    de88747 gpio: mvebu: Add clk support to prevent lockup
    7bf5b40 ARM: kirkwood: fix to retain gbe MAC addresses for DT kernels
    93fff4c ARM: kirkwood: of_serial: fix clock gating by removing clock-frequency

    are Cc'd to stable since they were held over from the previous merge window.

    The rest are a small collection of fixes and a couple of devicetree conversion
    catchups.

    * tag 'mvebu_fixes_for_v3.9' of git://git.infradead.org/users/jcooper/linux:
    arm: mach-orion5x: fix typo in compatible string of a .dts file
    arm: mvebu: fix address-cells in mpic DT node
    arm: plat-orion: fix address decoding when > 4GB is used
    arm: mvebu: Reduce reg-io-width with UARTs
    ARM: Dove: add RTC device node
    arm: mvebu: enable the USB ports on Armada 370 Reference Design board
    ARM: dove: drop "select COMMON_CLK_DOVE"
    rtc: rtc-mv: Add support for clk to avoid lockups
    gpio: mvebu: Add clk support to prevent lockup
    ARM: kirkwood: fix to retain gbe MAC addresses for DT kernels
    ARM: kirkwood: of_serial: fix clock gating by removing clock-frequency

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • From Shawn Guo :

    The 2nd take of imx fixes for 3.9:
    - Fix pll1_sys clk initial status
    - Fix a typo in imx DEBUG_LL Kconfig

    * tag 'imx-fixes-3.9-2' of git://git.linaro.org/people/shawnguo/linux-2.6:
    ARM: imx: fix typo "DEBUG_IMX50_IMX53_UART"
    ARM: imx: pll1_sys should be an initial on clk

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • From Shawn Guo :

    The 2nd mxs fixes for 3.9:
    - Fix an error caused by incorrect conflict resolution when
    applying the patch

    * tag 'mxs-fixes-3.9-2' of git://git.linaro.org/people/shawnguo/linux-2.6:
    ARM: mxs: cfa10049: Fix fb initialisation function

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • When building a multiplatform kernel, we could end up with a smaller
    number of GPIOs than the one required by the platform the kernel was
    running on.

    Sort the max GPIO number by descending order so that we always take the
    highest number required.

    Signed-off-by: Maxime Ripard
    Signed-off-by: Arnd Bergmann

    Maxime Ripard
     
  • Rob Herring has observed that c81611c4e96f "xen: event channel arrays are
    xen_ulong_t and not unsigned long" introduced a compile failure when building
    without CONFIG_AEABI:

    /tmp/ccJaIZOW.s: Assembler messages:
    /tmp/ccJaIZOW.s:831: Error: even register required -- `ldrexd r5,r6,[r4]'

    Will Deacon pointed out that this is because OABI does not require even base
    registers for 64-bit values. We can avoid this by simply using the existing
    atomic64_xchg operation and the same containerof trick as used by the cmpxchg
    macros. However since this code is used on memory which is shared with the
    hypervisor we require proper atomic instructions and cannot use the generic
    atomic64 callbacks (which are based on spinlocks), therefore add a dependency
    on !GENERIC_ATOMIC64. Since we already depend on !CPU_V6 there isn't much
    downside to this.

    While thinking about this we also observed that OABI has different struct
    alignment requirements to EABI, which is a problem for hypercall argument
    structs which are shared with the hypervisor and which must be in EABI layout.
    Since I don't expect people to want to run OABI kernels on Xen depend on
    CONFIG_AEABI explicitly too (although it also happens to be enforced by the
    !GENERIC_ATOMIC64 requirement too).

    Signed-off-by: Ian Campbell
    Cc: Will Deacon
    Cc: Rob Herring
    Acked-by: Stefano Stabellini
    Cc: Konrad Rzeszutek Wilk
    Signed-off-by: Konrad Rzeszutek Wilk

    Ian Campbell
     

11 Mar, 2013

9 commits

  • Pull perf fixes from Ingo Molnar:
    "Misc minor fixes mostly related to tracing"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    s390: Fix a header dependencies related build error
    tracing: update documentation of snapshot utility
    tracing: Do not return EINVAL in snapshot when not allocated
    tracing: Add help of snapshot feature when snapshot is empty
    ftrace: Update the kconfig for DYNAMIC_FTRACE

    Linus Torvalds
     
  • Commit f8c95fe (ARM: imx: support DEBUG_LL uart port selection for all
    i.MX SoCs) had a typo that DEBUG_IMX50_IMX53_UART should be
    DEBUG_IMX53_UART.

    Signed-off-by: Paul Bolle
    Signed-off-by: Shawn Guo

    Paul Bolle
     
  • Commit 877c685607925238e302cd3aa38788dca6c1b226
    ("perf: Remove include of cgroup.h from perf_event.h") caused
    this build failure if PERF_EVENTS is enabled:

    In file included from arch/s390/include/asm/perf_event.h:9:0,
    from include/linux/perf_event.h:24,
    from kernel/events/ring_buffer.c:12:
    arch/s390/include/asm/cpu_mf.h: In function 'qctri':
    arch/s390/include/asm/cpu_mf.h:61:12: error: 'EINVAL' undeclared (first use in this function)

    cpu_mf.h had an implicit errno.h dependency, which was added
    indirectly via cgroups.h but not anymore. Add it explicitly.

    Reported-by: Fengguang Wu
    Tested-by: Fengguang Wu
    Signed-off-by: Li Zefan
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Link: http://lkml.kernel.org/r/51385F79.7000106@huawei.com
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • The tty below tty_port might get destroyed by the tty layer
    while we hold a reference to it.
    So we have to carry tty_port around...

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • As we setup the SIGWINCH handler in tty_port_operations->activate
    it makes sense to tear down it in ->destruct.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • arch/um/os-Linux/signal.c:18:8: error: conflicting types for 'sig_info'
    In file included from /home/slyfox/linux-2.6/arch/um/os-Linux/signal.c:12:0:
    arch/um/include/shared/as-layout.h:64:15: note: previous declaration of 'sig_info' was here

    Signed-off-by: Sergei Trofimovich
    CC: Jeff Dike
    CC: Richard Weinberger
    CC: "Martin Pärtel"
    CC: Al Viro
    CC: user-mode-linux-devel@lists.sourceforge.net
    CC: user-mode-linux-user@lists.sourceforge.net
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: Richard Weinberger

    Sergei Trofimovich
     
  • arch/um/os-Linux/start_up.c: In function 'check_coredump_limit':
    arch/um/os-Linux/start_up.c:338:16: error: storage size of 'lim' isn't known
    arch/um/os-Linux/start_up.c:339:2: error: implicit declaration of function 'getrlimit' [-Werror=implicit-function-declaration]

    Signed-off-by: Sergei Trofimovich
    CC: Jeff Dike
    CC: Richard Weinberger
    CC: Al Viro
    CC: user-mode-linux-devel@lists.sourceforge.net
    CC: user-mode-linux-user@lists.sourceforge.net
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: Richard Weinberger

    Sergei Trofimovich
     
  • This new version moves the skb_tx_timestamp in the main uml
    driver. This should avoid the need to call this function in each
    transport (vde, slirp, tuntap, ...). It also add support for ethtool
    get_ts_info.

    Signed-off-by: Paul Chavent
    Acked-by: Richard Cochran
    Signed-off-by: Richard Weinberger

    Paul Chavent
     
  • We always boot from PLL1, so let's have pll1_sys in the clks_init_on
    list to have clk prepare/enable use count match the hardware status,
    so that drivers managing pll1_sys like cpufreq can get the use count
    right from the start.

    Reported-by: Dirk Behme
    Signed-off-by: Shawn Guo

    Shawn Guo
     

10 Mar, 2013

1 commit

  • Pull namespace bugfixes from Eric Biederman:
    "This is three simple fixes against 3.9-rc1. I have tested each of
    these fixes and verified they work correctly.

    The userns oops in key_change_session_keyring and the BUG_ON triggered
    by proc_ns_follow_link were found by Dave Jones.

    I am including the enhancement for mount to only trigger requests of
    filesystem modules here instead of delaying this for the 3.10 merge
    window because it is both trivial and the kind of change that tends to
    bit-rot if left untouched for two months."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    proc: Use nd_jump_link in proc_ns_follow_link
    fs: Limit sys_mount to only request filesystem modules (Part 2).
    fs: Limit sys_mount to only request filesystem modules.
    userns: Stop oopsing in key_change_session_keyring

    Linus Torvalds
     

09 Mar, 2013

7 commits

  • Merge misc fixes from Andrew Morton.

    * emailed patches from Andrew Morton :
    alpha: boot: fix build breakage introduced by system.h disintegration
    memcg: initialize kmem-cache destroying work earlier
    Randy has moved
    ksm: fix m68k build: only NUMA needs pfn_to_nid
    dmi_scan: fix missing check for _DMI_ signature in smbios_present()
    Revert parts of "hlist: drop the node parameter from iterators"
    idr: remove WARN_ON_ONCE() on negative IDs
    mm/mempolicy.c: fix sp_node_init() argument ordering
    mm/mempolicy.c: fix wrong sp_node insertion
    ipc: don't allocate a copy larger than max
    ipc: fix potential oops when src msg > 4k w/ MSG_COPY

    Linus Torvalds
     
  • Commit ec2212088c42 ("Disintegrate asm/system.h for Alpha") removed the
    system.h include from boot/head.S, which puts the PAL_* asm constants
    out of scope.

    Include so we can get building again.

    Signed-off-by: Will Deacon
    Cc: David Rusling
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Deacon
     
  • Pull tile architecture fixes from Chris Metcalf:
    "This fixes the bug that Al Viro spotted with the compat llseek code.
    I also fixed the compat syscall definitions to use the new syscall
    define macros to properly sign-extend their arguments."

    * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    tile: properly use COMPAT_SYSCALL_DEFINEx
    tile: work around bug in the generic sys_llseek

    Linus Torvalds
     
  • Pull metag bugfixes from James Hogan:
    "A couple of fairly minor arch/metag integration fixes from v3.9-rc1:

    - remove SET_PERSONALITY(): use default definition like other arches
    now do.

    - inhibit NUMA balancing: like SH, NUMA is used for memories with
    different latencies. ARCH_WANT_VARIABLE_LOCALITY has been added
    for this purpose."

    * tag 'metag-for-v3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
    metag: Inhibit NUMA balancing.
    metag: remove SET_PERSONALITY()

    Linus Torvalds
     
  • The orion5x-lacie-ethernet-disk-mini-v2.dts file was using
    "marvell-orion5x-88f5182" as a compatible string, while it should have
    been "marvell,orion5x-88f5182".

    Signed-off-by: Thomas Petazzoni
    Signed-off-by: Jason Cooper

    Thomas Petazzoni
     
  • There is no need to have a #address-cells property in the MPIC Device
    Tree node, and more than that, having it confuses the of_irq_map_raw()
    logic, which will be used by the Marvell PCIe driver.

    Signed-off-by: Thomas Petazzoni
    Signed-off-by: Jason Cooper

    Thomas Petazzoni
     
  • During the system initialization, the orion_setup_cpu_mbus_target()
    function reads the SDRAM address decoding registers to find out how
    many chip-selects of SDRAM have been enabled, and builds a small array
    with one entry per chip-select. This array is then used by device
    drivers (XOR, Ethernet, etc.) to configure their own address decoding
    windows to the SDRAM.

    However, devices can only access the first 32 bits of the physical
    memory. Even though LPAE is not supported for now, some Marvell boards
    are now showing up with 8 GB of RAM, configured using two SDRAM
    address decoding windows: the first covering the first 4 GB, the
    second covering the last 4 GB. The array built by
    orion_setup_cpu_mbus_target() has therefore two entries, and device
    drivers try to set up two address decoding windows to the
    SDRAM. However, in the device registers for the address decoding, the
    base address is only 32 bits, so those two windows overlap each other,
    and the devices do not work at all.

    This patch makes sure that the array built by
    orion_setup_cpu_mbus_target() only contains the SDRAM decoding windows
    that correspond to the first 4 GB of the memory. To do that, it
    ignores the SDRAM decoding windows for which the 4 low-order bits are
    not zero (the 4 low-order bits of the base register are used to store
    bits 32:35 of the base address, so they actually indicate whether the
    base address is above 4 GB).

    This patch allows the newly introduced armada-xp-gp board to properly
    operate when it is mounted with more than 4 GB of RAM. Without that,
    all devices doing DMA (for example XOR and Ethernet) do not work at
    all.

    Signed-off-by: Thomas Petazzoni
    Tested-by: Ezequiel Garcia
    Signed-off-by: Jason Cooper

    Thomas Petazzoni