29 Jun, 2013

5 commits

  • Conflicts:
    arch/arm/Makefile
    arch/arm/include/asm/glue-proc.h

    Russell King
     
  • Russell King
     
  • For LPAE, do_sect_fault used to be invoked as the second level access
    flag handler. When transparent huge pages were introduced for LPAE,
    do_page_fault was used instead.

    Unfortunately, do_sect_fault remains defined but not used for LPAE code
    resulting in a compile warning.

    This patch surrounds do_sect_fault with #ifndef CONFIG_ARM_LPAE to fix
    this warning.

    Signed-off-by: Steve Capper
    Acked-by: Arnd Bergmann
    Signed-off-by: Russell King

    Steven Capper
     
  • Starting up the C compiler can be a slow operation on some systems.
    Though these calls don't individually take a lot of time, they add up.
    Rearrange the ARM Makefile a bit to avoid extra calls to the compiler
    when they can be easily avoided.

    When running with the Chrome OS ARM cross compiler
    "armv7a-cros-linux-gnueabi-", this shaved .55 seconds (from 5.31
    seconds to 4.76 seconds) off an incremental build of the kernel:
    time make -j32 ARCH=arm CROSS_COMPILE=armv7a-cros-linux-gnueabi-

    Thanks to Mike Frysinger for the clean trick to make this work.

    Signed-off-by: Doug Anderson
    Acked-by: Mike Frysinger
    Signed-off-by: Russell King

    Douglas Anderson
     
  • The %.dtb dependency is specified to depend on the PHONY "scripts".
    That means that it'll build every time even if the underlying dtb file
    hasn't been touched. Use an order-only prerequisites to fix this.
    Also mark "dtbs" as PHONY for correctness.

    This was broken in (70b0476 ARM: 7513/1: Make sure dtc is built before
    running it).

    Reported-by: Mike Frysinger
    Signed-off-by: Doug Anderson
    Acked-by: Olof Johansson
    Reviewed-by: David Brown
    Signed-off-by: Russell King

    Douglas Anderson
     

24 Jun, 2013

13 commits

  • This patch series that implements MPIDR linearization through a simple
    hashing algorithm and updates current cpu_{suspend}/{resume} code to use
    the newly created hash structures to retrieve context pointers. It
    represents a stepping stone for the implementation of power management code
    on forthcoming multi-cluster ARM systems.

    It has been tested on TC2 (dual cluster A15xA7 system), iMX6q, OMAP4 and
    Tegra, with processors hitting low-power states requiring warm-boot resume
    through the cpu_resume code path.

    Russell King
     
  • arm26 support in Linux is long gone, yet it left an interresting,
    fossilized trace in the decompressor.

    Remove it so people won't get confused about what teqp is actually
    doing here...

    Signed-off-by: Marc Zyngier
    Signed-off-by: Russell King

    Marc Zyngier
     
  • Looking into the active_asids array is not enough, as we also need
    to look into the reserved_asids array (they both represent processes
    that are currently running).

    Also, not holding the ASID allocator lock is racy, as another CPU
    could schedule that process and trigger a rollover, making the erratum
    workaround miss an IPI.

    Exposing this outside of context.c is a little ugly on the side, so
    let's define a new entry point that the erratum workaround can call
    to obtain the cpumask.

    Cc: # 3.9
    Acked-by: Will Deacon
    Acked-by: Catalin Marinas
    Signed-off-by: Marc Zyngier
    Signed-off-by: Russell King

    Marc Zyngier
     
  • On a CPU that never ran anything, both the active and reserved ASID
    fields are set to zero. In this case the ASID_TO_IDX() macro will
    return -1, which is not a very useful value to index a bitmap.

    Instead of trying to offset the ASID so that ASID #1 is actually
    bit 0 in the asid_map bitmap, just always ignore bit 0 and start
    the search from bit 1. This makes the code a bit more readable,
    and without risk of OoB access.

    Cc: # 3.9
    Acked-by: Will Deacon
    Acked-by: Catalin Marinas
    Reported-by: Catalin Marinas
    Signed-off-by: Marc Zyngier
    Signed-off-by: Russell King

    Marc Zyngier
     
  • When a CPU is running a process, the ASID for that process is
    held in a per-CPU variable (the "active ASIDs" array). When
    the ASID allocator handles a rollover, it copies the active
    ASIDs into a "reserved ASIDs" array to ensure that a process
    currently running on another CPU will continue to run unaffected.
    The active array is zero-ed to indicate that a rollover occurred.

    Because of this mechanism, a reserved ASID is only remembered for
    a single rollover. A subsequent rollover will completely refill
    the reserved ASIDs array.

    In a severely oversubscribed environment where a CPU can be
    prevented from running for extended periods of time (think virtual
    machines), the above has a horrible side effect:

    [P{a} denotes process P running with ASID a]

    CPU-0 CPU-1

    A{x} [active = ]

    [suspended] runs B{y} [active = ]

    [rollover:
    active =
    reserved = ]

    runs B{y} [active =
    reserved = ]

    [rollover:
    active =
    reserved = ]

    runs C{x} [active = ]

    [resumes]

    runs A{x}

    At that stage, both A and C have the same ASID, with deadly
    consequences.

    The fix is to preserve reserved ASIDs across rollovers if
    the CPU doesn't have an active ASID when the rollover occurs.

    Cc: # 3.9
    Acked-by: Will Deacon
    Acked-by: Catalin Carinas
    Signed-off-by: Marc Zyngier
    Signed-off-by: Russell King

    Marc Zyngier
     
  • When booting fewer cores than are physically present on a versatile
    platform (e.g. when passing maxcpus=N on the command line), some
    secondary cores may remain in the holding pen, which is marked __INIT,
    as each CPU's gic cpumask is initialised to 0xff, and thus an IPI to any
    CPU will wake up *all* secondaries. This behaviour is crucial to the GIC
    cpumask self-discovery. Late in the boot process, the memory comprising
    the holding pen will be released to the kernel for more general use, and
    may be overwritten with arbitrary data, which can cause the held
    secondaries to start behaving unpredictably. This can lead to all manner
    of odd behaviour from the kernel.

    As preventing cpus from entering the pen would require invasive changes
    to the GIC driver and to existing dts used in the wild, we instead
    remove the __INIT marker from the pen, keeping it around and leaving the
    unused secondary CPUs dormant.

    Link: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/175039.html

    Signed-off-by: Mark Rutland
    Acked-by: Pawel Moll
    Acked-by: Nicolas Pitre
    Cc: Lorenzo Pieralisi
    Signed-off-by: Russell King

    Mark Rutland
     
  • With this change, we no longer lose the innermost entry in the user-mode
    part of the call chain. See also the x86 port, which includes the ip.

    It's possible to partially work around this problem by post-processing
    the data to use the PERF_SAMPLE_IP value, but this works only if the CPU
    wasn't in the kernel when the sample was taken.

    Cc:
    Signed-off-by: Jed Davis
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Jed Davis
     
  • Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
    prevent it from being used as a covert channel between two tasks.

    There are more and more applications coming to Windows RT,
    Wine could support them, but mostly they expect to have
    the thread environment block (TEB) in TPIDRURW.

    This patch preserves that register per thread instead of clearing it.
    Unlike the TPIDRURO, which is already switched, the TPIDRURW
    can be updated from userspace so needs careful treatment in the case that we
    modify TPIDRURW and call fork(). To avoid this we must always read
    TPIDRURW in copy_thread.

    Signed-off-by: André Hentschel
    Signed-off-by: Will Deacon
    Signed-off-by: Jonathan Austin
    Signed-off-by: Russell King

    André Hentschel
     
  • This commit fixes the regression on Armada 370 (the kernal hang during
    boot) introduced by the commit: "ARM: 7691/1: mm: kill unused
    TLB_CAN_READ_FROM_L1_CACHE and use ALT_SMP instead".

    When coming out of either a Wait for Interrupt (WFI) or a Wait for
    Event (WFE) IDLE states, a specific timing sensitivity exists between
    the retiring WFI/WFE instructions and the newly issued subsequent
    instructions. This sensitivity can result in a CPU hang scenario. The
    workaround is to insert either a Data Synchronization Barrier (DSB) or
    Data Memory Barrier (DMB) command immediately after the WFI/WFE
    instruction.

    This commit was based on the work of Lior Amsalem, but heavily
    modified to apply the errata fix dynamically according to the
    processor type thanks to the suggestions of Russell King and Nicolas
    Pitre.

    Signed-off-by: Gregory CLEMENT
    Reviewed-by: Will Deacon
    Acked-by: Nicolas Pitre
    Tested-by: Willy Tarreau
    Cc:
    Signed-off-by: Russell King

    Gregory CLEMENT
     
  • Commit 1bc3974 (ARM: 7755/1: handle user space mapped pages in
    flush_kernel_dcache_page) moved the implementation of
    flush_kernel_dcache_page() into mm/flush.c but did not implement it
    on noMMU ARM.

    Signed-off-by: Simon Baatz
    Acked-by: Kevin Hilman
    Cc: # 3.2+: 1bc3974: ARM: 7755/1
    Signed-off-by: Russell King

    Simon Baatz
     
  • The __cpu_logical_map array is statically initialized to 0, which is a valid
    MPIDR value. To prevent issues with the current implementation, this patch
    defines an MPIDR_INVALID value, and statically initializes the
    __cpu_logical_map[] array to it. Entries in the arm_dt_init_cpu_maps()
    tmp_map array used to stash DT reg properties while parsing DT are initialized
    with the MPIDR_INVALID value as well for consistency.

    Signed-off-by: Lorenzo Pieralisi
    Acked-by: Nicolas Pitre
    Cc: Will Deacon
    Signed-off-by: Russell King

    Lorenzo Pieralisi
     
  • The introduction of the cpu-map topology node in the cpus node implies
    that cpus node might have children that are not cpu nodes. The DT
    parsing code needs updating otherwise it would check for cpu nodes
    properties in nodes that are not required to contain them, resulting
    in warnings that have no bearing on bindings defined in the dts source file.

    Cc: [3.8+]
    Signed-off-by: Lorenzo Pieralisi
    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King

    Lorenzo Pieralisi
     
  • As it was already suggested by Russell King and Arnd Bergmann:

    https://lkml.org/lkml/2013/5/16/133

    moxart and gemini seem to be the only platforms using CPU_FA526,
    and instead of pointing arm_pm_idle to an empty function from
    platform code, it makes sense to remove WFI code from the processor
    specific idle function.

    Applies to arm-soc/for-next (and 3.10-rc1).

    Changes since v1:

    1. remove WFI but make sure cpu_fa526_do_idle do not fall through
    to cpu_fa526_dcache_clean_area

    Note: moxart boots and prints to UART without this patch, but input is broken.

    Signed-off-by: Jonas Jensen
    Signed-off-by: Russell King

    Jonas Jensen
     

23 Jun, 2013

8 commits

  • Linus Torvalds
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "These are two fixes that came in this week, one for a regression we
    introduced in 3.10 in the GIC interrupt code, and the other one fixes
    a typo in newly introduced code"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case
    ARM: dts: Correct the base address of pinctrl_3 on Exynos5250

    Linus Torvalds
     
  • Pull driver core fix from Greg Kroah-Hartman:
    "Here's a single patch for the firmware core that resolves a reported
    oops in the firmware core that people have been hitting."

    * tag 'driver-core-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    firmware loader: fix use-after-free by double abort

    Linus Torvalds
     
  • Pull USB fixes from Greg Kroah-Hartman:
    "Here are two USB patches for 3.10.

    One updates the Kconfig wording for CONFIG_USB_PHY to make it,
    hopefully, more obvious what this option is (I know you complained
    about this when it hit the tree.) The other is a new device id for a
    driver"

    * tag 'usb-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: serial: ti_usb_3410_5052: new device id for Abbot strip port cable
    usb: phy: Improve Kconfig help for CONFIG_USB_PHY

    Linus Torvalds
     
  • Pul tty fixes from Greg Kroah-Hartman:
    "Here are two tty core fixes that resolve some regressions that have
    been reported recently. Both tiny fixes, but needed"

    * tag 'tty-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    tty: Fix transient pty write() EIO
    tty/vt: Return EBUSY if deallocating VT1 and it is busy

    Linus Torvalds
     
  • Pull SCSI target fixes from Nicholas Bellinger:
    "Included is the recent tcm_qla2xxx residual underrun length fix from
    Roland, along with Joern's iscsi-target patch for session_lock
    breakage within iscsit_stop_time2retain_timer() code. Both are CC'ed
    to stable.

    The remaining two are specific to recent iscsi-target + iser
    conversion changes. One drops some left-over debug noise, and Andy's
    patch fixes configfs attribute handling during an explicit network
    portal feature bit disable when iser-target is unsupported."

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    iscsi-target: Remove left over v3.10-rc debug printks
    target/iscsi: Fix op=disable + error handling cases in np_store_iser
    tcm_qla2xxx: Fix residual for underrun commands that fail
    target/iscsi: don't corrupt bh_count in iscsit_stop_time2retain_timer()

    Linus Torvalds
     
  • Pull media fixes from Mauro Carvalho Chehab:
    "Another set of fixes for Kernel 3.10.

    This series contain:
    - two Kbuild fixes for randconfig
    - a buffer overflow when using rtl28xuu with r820t tuner
    - one clk fixup on exynos4-is driver"

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] Fix build when drivers are builtin and frontend modules
    [media] s5p makefiles: don't override other selections on obj-[ym]
    [media] exynos4-is: Fix FIMC-IS clocks initialization
    [media] rtl28xxu: fix buffer overflow when probing Rafael Micro r820t tuner

    Linus Torvalds
     
  • Pull vfs fixes from Al Viro:
    "Several fixes for bugs caught while looking through f_pos (ab)users"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    aout32 coredump compat fix
    splice: don't pass the address of ->f_pos to methods
    mconsole: we'd better initialize pos before passing it to vfs_read()...

    Linus Torvalds
     

22 Jun, 2013

7 commits

  • dump_seek() does SEEK_CUR, not SEEK_SET; native binfmt_aout
    handles it correctly (seeks by PAGE_SIZE - sizeof(struct user),
    getting the current position to PAGE_SIZE), compat one seeks
    by PAGE_SIZE and ends up at PAGE_SIZE + already written...

    Signed-off-by: Al Viro

    Al Viro
     
  • Pull x86 fixes from Peter Anvin:
    "This series fixes a couple of build failures, and fixes MTRR cleanup
    and memory setup on very specific memory maps.

    Finally, it fixes triggering backtraces on all CPUs, which was
    inadvertently disabled on x86."

    * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/efi: Fix dummy variable buffer allocation
    x86: Fix trigger_all_cpu_backtrace() implementation
    x86: Fix section mismatch on load_ucode_ap
    x86: fix build error and kconfig for ia32_emulation and binfmt
    range: Do not add new blank slot with add_range_with_merge
    x86, mtrr: Fix original mtrr range get for mtrr_cleanup

    Linus Torvalds
     
  • Pull drm radeon fixes from Dave Airlie:
    "One core fix, but mostly radeon fixes for s/r and big endian UVD
    support, and a fix to stop the GPU being reset for no good reason, and
    crashing people's machines."

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon: update lockup tracking when scheduling in empty ring
    drm/prime: Honor requested file flags when exporting a buffer
    drm/radeon: fix UVD on big endian
    drm/radeon: fix write back suspend regression with uvd v2
    drm/radeon: do not try to uselessly update virtual memory pagetable

    Linus Torvalds
     
  • Pull ACPI fixes from Rafael Wysocki:

    - Fix for a regression causing a failure to turn on some devices on
    some systems during initialization introduced by a recent revert of
    an ACPI PM change that broke something else. Fortunately, we know
    exactly what devices are affected, so we can add a fix just for them
    leaving everyone else alone.

    - ACPI power resources initialization fix preventing a NULL pointer
    from being dereferenced in the acpi_add_power_resource() error code
    path.

    - ACPI dock station driver fix that adds missing locking to
    write_undock().

    - ACPI resources allocation fix changing the scope of an old workaround
    so that it doesn't affect systems that aren't actually buggy. This
    was reported a couple of days ago to fix DMA problems on some new
    platforms so we need it in -stable. From Mika Westerberg.

    * tag 'acpi-3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / LPSS: Power up LPSS devices during enumeration
    ACPI / PM: Fix error code path for power resources initialization
    ACPI / dock: Take ACPI scan lock in write_undock()
    ACPI / resources: call acpi_get_override_irq() only for legacy IRQ resources

    Linus Torvalds
     
  • Pull KVM fixes from Paolo Bonzini:
    "Three one-line fixes for my first pull request; one for x86 host, one
    for x86 guest, one for PPC"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    x86: kvmclock: zero initialize pvclock shared memory area
    kvm/ppc/booke: Delay kvmppc_lazy_ee_enable
    KVM: x86: remove vcpu's CPL check in host-invoked XCR set

    Linus Torvalds
     
  • Pull crypto fix from Herbert Xu:
    "This fixes an unaligned crash in XTS mode when using aseni_intel"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: aesni_intel - fix accessing of unaligned memory

    Linus Torvalds
     
  • Pull Ceph fix from Sage Weil:
    "This fixes a problem preventing the kernel and userland librbd
    libraries from sharing data with the new format 2 images"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    rbd: use the correct length for format 2 object names

    Linus Torvalds
     

21 Jun, 2013

7 commits