02 Apr, 2014

1 commit

  • Commit 14318efb(ARM: 7587/1: implement optimized percpu variable access)
    introduces arm's __my_cpu_offset to optimize percpu vaiable access,
    which really works well on hackbench, but will cause __my_cpu_offset
    to return garbage value before it is initialized in cpu_init() called
    by setup_arch, so accessing percpu variable before setup_arch may cause
    kernel hang. But generic __my_cpu_offset always returns zero before
    percpu area is brought up, and won't hang kernel.

    So the patch tries to clear __my_cpu_offset on boot CPU early
    to avoid boot hang.

    At least now percpu variable is accessed by lockdep before
    setup_arch(), and enabling CONFIG_LOCK_STAT or CONFIG_DEBUG_LOCKDEP
    can trigger kernel hang.

    Signed-off-by: Ming Lei
    Signed-off-by: Russell King
    (cherry picked from commit 9394c1c65e61eb6f4c1c99f342b49e451ec337b6)

    Ming Lei
     

20 Nov, 2013

1 commit

  • Some PCI drivers may need to adjust the pci_bus structure after it has
    been allocated by the Linux PCI core. The PCI core allows
    architectures to implement the pcibios_add_bus() and
    pcibios_remove_bus() for this purpose. This commit therefore extends
    the hw_pci and pci_sys_data structures of the ARM PCI core to allow
    PCI drivers to register ->add_bus() and ->remove_bus() in hw_pci,
    which will get called when a bus is added or removed from the system.

    This will be used for example by the Marvell PCIe driver to connect a
    particular PCI bus with its corresponding MSI chip to handle Message
    Signaled Interrupts.

    Signed-off-by: Thomas Petazzoni
    Reviewed-by: Thierry Reding
    Acked-by: Russell King
    Tested-by: Daniel Price
    Tested-by: Thierry Reding
    Signed-off-by: Jason Cooper

    Thomas Petazzoni
     

30 Oct, 2013

1 commit

  • Some modules may need to know cpu idle status and take
    actions before and after cpu idle, so we can add
    notification callback when enter/exit cpu idle, then
    modules only need to register this notification callback,
    everytime cpu enter/exit idle, the callback chain will be
    executed.

    Currently only cpufreq interactive governor use this
    notification, as it wants to save power, the timers of
    interactive governor are only enabled when cpu is not in idle.

    Signed-off-by: Anson Huang

    Anson Huang
     

18 Oct, 2013

1 commit


20 Aug, 2013

2 commits

  • commit c95eb3184ea1a3a2551df57190c81da695e2144b upstream.

    It is possible to construct an event group with a software event as a
    group leader and then subsequently add a hardware event to the group.
    This results in the event group being validated by adding all members
    of the group to a fake PMU and attempting to allocate each event on
    their respective PMU.

    Unfortunately, for software events wthout a corresponding arm_pmu, this
    results in a kernel crash attempting to dereference the ->get_event_idx
    function pointer.

    This patch fixes the problem by checking explicitly for software events
    and ignoring those in event validation (since they can always be
    scheduled). We will probably want to revisit this for 3.12, since the
    validation checks don't appear to work correctly when dealing with
    multiple hardware PMUs anyway.

    Reported-by: Vince Weaver
    Tested-by: Vince Weaver
    Tested-by: Mark Rutland
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Will Deacon
     
  • commit b88a2595b6d8aedbd275c07dfa784657b4f757eb upstream.

    Fix constraint check in armpmu_map_hw_event().

    Reported-and-tested-by: Vince Weaver
    Signed-off-by: Ingo Molnar
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Stephen Boyd
     

12 Aug, 2013

10 commits

  • commit 8c0cc8a5d90bc7373a7a9e7f7a40eb41f51e03fc upstream.

    Olof reports that noMMU builds error out with:

    arch/arm/kernel/signal.c: In function 'setup_return':
    arch/arm/kernel/signal.c:413:25: error: 'mm_context_t' has no member named 'sigpage'

    This shows one of the evilnesses of IS_ENABLED(). Get rid of it here
    and replace it with #ifdef's - and as no noMMU platform can make use
    of sigpage, depend on CONIFG_MMU not CONFIG_ARM_MPU.

    Reported-by: Olof Johansson
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit e0d407564b532d978b03ceccebd224a05d02f111 upstream.

    Unfortunately, I never committed the fix to a nasty oops which can
    occur as a result of that commit:

    ------------[ cut here ]------------
    kernel BUG at /home/olof/work/batch/include/linux/mm.h:414!
    Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 0 PID: 490 Comm: killall5 Not tainted 3.11.0-rc3-00288-gabe0308 #53
    task: e90acac0 ti: e9be8000 task.ti: e9be8000
    PC is at special_mapping_fault+0xa4/0xc4
    LR is at __do_fault+0x68/0x48c

    This doesn't show up unless you do quite a bit of testing; a simple
    boot test does not do this, so all my nightly tests were passing fine.

    The reason for this is that install_special_mapping() expects the
    page array to stick around, and as this was only inserting one page
    which was stored on the kernel stack, that's why this was blowing up.

    Reported-by: Olof Johansson
    Tested-by: Olof Johansson
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit a5463cd3435475386cbbe7b06e01292ac169d36f upstream.

    If kuser helpers are not provided by the kernel, disable user access to
    the vectors page. With the kuser helpers gone, there is no reason for
    this page to be visible to userspace.

    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit 48be69a026b2c17350a5ef18a1959a919f60be7d upstream.

    Move the signal handlers into a VDSO page rather than keeping them in
    the vectors page. This allows us to place them randomly within this
    page, and also map the page at a random location within userspace
    further protecting these code fragments from ROP attacks. The new
    VDSO page is also poisoned in the same way as the vector page.

    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit f6f91b0d9fd971c630cef908dde8fe8795aefbf8 upstream.

    Provide a kernel configuration option to allow the kernel user helpers
    to be removed from the vector page, thereby preventing their use with
    ROP (return orientated programming) attacks. This option is only
    visible for CPU architectures which natively support all the operations
    which kernel user helpers would normally provide, and must be enabled
    with caution.

    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit e39e3f3ebfef03450cf7bfa7a974a8c61f7980c8 upstream.

    FIQ should no longer copy the FIQ code into the user visible vector
    page. Instead, it should use the hidden page. This change makes
    that happen.

    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit b9b32bf70f2fb710b07c94e13afbc729afe221da upstream.

    Use linker magic to create the vectors and vector stubs: we can tell the
    linker to place them at an appropriate VMA, but keep the LMA within the
    kernel. This gets rid of some unnecessary symbol manipulation, and
    have the linker calculate the relocations appropriately.

    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit 19accfd373847ac3d10623c5d20f948846299741 upstream.

    Move the machine vector stubs into the page above the vector page,
    which we can prevent from being visible to userspace. Also move
    the reset stub, and place the swi vector at a location that the
    'ldr' can get to it.

    This hides pointers into the kernel which could give valuable
    information to attackers, and reduces the number of exploitable
    instructions at a fixed address.

    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit 5b43e7a383d69381ffe53423e46dd0fafae07da3 upstream.

    Poison the memory between each kuser helper. This ensures that any
    branch between the kuser helpers will be appropriately trapped.

    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit f928d4f2a86f46b030fa0850385b4391fc2b5918 upstream.

    Fill the empty regions of the vectors page with an exception generating
    instruction. This ensures that any inappropriate branch to the vector
    page is appropriately trapped, rather than just encountering some code
    to execute. (The vectors page was filled with zero before, which
    corresponds with the "andeq r0, r0, r0" instruction - a no-op.)

    Acked-by Nicolas Pitre
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     

22 Jul, 2013

3 commits

  • commit cbbe6f82b489e7ceba4ad7c833bd3a76cd0084cb upstream.

    When the local timer freq changed, the twd_update_frequency function
    should be run all the CPUs include itself, otherwise, the twd freq will
    not get updated and the local timer will not run correcttly.

    smp_call_function will run functions on all other CPUs, but not include
    himself, this is not correct,use on_each_cpu instead to fix this issue.

    Acked-by: Linus Walleij
    Cc: Linus Walleij
    Cc: Rob Herring
    Cc: Shawn Guo
    Cc: Arnd Bergmann
    Acked-by: Shawn Guo
    Signed-off-by: Jason Liu
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Jason Liu
     
  • commit 0d0752bca1f9a91fb646647aa4abbb21156f316c upstream.

    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.

    Acked-by: Will Deacon
    Acked-by: Catalin Marinas
    Signed-off-by: Marc Zyngier
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Marc Zyngier
     
  • commit c5f927a6f62196226915f12194c9d0df4e2210d7 upstream.

    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.

    Signed-off-by: Jed Davis
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Jed Davis
     

30 Jun, 2013

1 commit

  • Due to recent changes and expecations of proper cpu bindings, there are
    now cases for many of the in-tree devicetrees where a WARN() will hit
    on boot due to badly formatted /cpus nodes.

    Downgrade this to a pr_warn() to be less alarmist, since it's not a
    new problem.

    Tested on Arndale, Cubox, Seaboard and Panda ES. Panda hits the WARN
    without this, the others do not.

    Acked-by: Russell King
    Signed-off-by: Olof Johansson
    Signed-off-by: Linus Torvalds

    Olof Johansson
     

24 Jun, 2013

2 commits

  • 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
     

18 Jun, 2013

1 commit

  • Add comments to machine_shutdown()/halt()/power_off()/restart() that
    describe their purpose and/or requirements re: CPUs being active/not.

    In machine_shutdown(), replace the call to smp_send_stop() with a call to
    disable_nonboot_cpus(). This completely disables all but one CPU, thus
    satisfying the requirement that only a single CPU be active for kexec.
    Adjust Kconfig dependencies for this change.

    In machine_halt()/power_off()/restart(), call smp_send_stop() directly,
    rather than via machine_shutdown(); these functions don't need to
    completely de-activate all CPUs using hotplug, but rather just quiesce
    them.

    Remove smp_kill_cpus(), and its call from smp_send_stop().
    smp_kill_cpus() was indirectly calling smp_ops.cpu_kill() without calling
    smp_ops.cpu_die() on the target CPUs first. At least some implementations
    of smp_ops had issues with this; it caused cpu_kill() to hang on Tegra,
    for example. Since smp_send_stop() is only used for shutdown, halt, and
    power-off, there is no need to attempt any kind of CPU hotplug here.

    Adjust Kconfig to reflect that machine_shutdown() (and hence kexec)
    relies upon disable_nonboot_cpus(). However, this alone doesn't guarantee
    that hotplug will work, or even that hotplug is implemented for a
    particular piece of HW that a multi-platform zImage runs on. Hence, add
    error-checking to machine_kexec() to determine whether it did work.

    Suggested-by: Russell King
    Signed-off-by: Stephen Warren
    Acked-by: Will Deacon
    Tested-by: Zhangfei Gao
    Signed-off-by: Russell King

    Stephen Warren
     

06 Jun, 2013

1 commit

  • The cpu_topology symbol is required by any driver using the topology
    interfaces, which leads to a couple of build errors:

    ERROR: "cpu_topology" [drivers/net/ethernet/sfc/sfc.ko] undefined!
    ERROR: "cpu_topology" [drivers/cpufreq/arm_big_little.ko] undefined!
    ERROR: "cpu_topology" [drivers/block/mtip32xx/mtip32xx.ko] undefined!

    The obvious solution is to export this symbol.

    Signed-off-by: Arnd Bergmann
    Acked-by: Will Deacon
    Cc: stable@vger.kernel.org
    Cc: Nicolas Pitre
    Cc: Vincent Guittot
    Signed-off-by: Russell King

    Arnd Bergmann
     

26 May, 2013

1 commit


23 May, 2013

1 commit

  • If one reads /proc/$PID/smaps, the mmap_sem belonging to the
    address space of the task being examined is locked for reading.
    All the pages of the vmas belonging to the task's address space
    are then walked with this lock held.

    If a gate_vma is present in the architecture, it too is examined
    by the fs/proc/task_mmu.c code. As gate_vma doesn't belong to the
    address space of the task though, its pages are not walked.

    A recent cleanup (commit f6604efe) of the gate_vma initialisation
    code set the vm_mm value to &init_mm. Unfortunately a non-NULL
    vm_mm value in the gate_vma will cause the task_mmu code to attempt
    to walk the pages of the gate_vma (with no mmap-sem lock held). If
    one enables Transparent Huge Page support and vm debugging, this
    will then cause OOPses as pmd_trans_huge_lock is called without
    mmap_sem being locked.

    This patch removes the .vm_mm value from gate_vma, restoring the
    original behaviour of the task_mmu code.

    Signed-off-by: Steve Capper
    Signed-off-by: Russell King

    Steven Capper
     

21 May, 2013

1 commit

  • Before f7b861b7a6d9 ("arm: Use generic idle loop") ARM would kill the
    CPU within the rcu idle section. Now that the rcu_idle_enter()/exit()
    pair have been pushed lower down in the idle loop this is no longer true
    and so using RCU_NONIDLE here is no longer necessary and also harmful
    because RCU is not actually idle at this point.

    Cc: Russell King
    Acked-by: Paul E. McKenney
    Signed-off-by: Stephen Boyd
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

10 May, 2013

1 commit

  • * late/fixes:
    ARM: OMAP2+: Fix unmet direct dependencies for SERIAL_OMAP
    ARM: ux500: always select ABX500_CORE
    ARM: SIRF: select SMP_ON_UP only on SMP builds
    ARM: SPEAr: conditionalize l2x0 support
    ARM: imx: build CPU suspend code only when needed
    ARM: OMAP: build SMP code only for OMAP4/5
    ARM: tegra: Tegra114 needs CPU_FREQ_TABLE
    ARM: default machine descriptor for multiplatform

    Signed-off-by: Olof Johansson

    Olof Johansson
     

08 May, 2013

1 commit

  • Pull ARM SoC late cleanups from Arnd Bergmann:
    "These are cleanups and smaller changes that either depend on earlier
    feature branches or came in late during the development cycle. We
    normally try to get all cleanups early, so these are the exceptions:

    - A follow-up on the clocksource reworks, hopefully the last time we
    need to merge clocksource subsystem changes through arm-soc.

    A first set of patches was part of the original 3.10 arm-soc
    cleanup series because of interdependencies with timer drivers now
    moved out of arch/arm.

    - Migrating the SPEAr13xx platform away from using auxdata for DMA
    channel descriptions towards using information in device tree,
    based on the earlier SPEAr multiplatform series

    - A few follow-ups on the Atmel SAMA5 support and other changes for
    Atmel at91 based on the larger at91 reworks.

    - Moving the armada irqchip implementation to drivers/irqchip

    - Several OMAP cleanups following up on the larger series already
    merged in 3.10."

    * tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits)
    ARM: OMAP4: change the device names in usb_bind_phy
    ARM: OMAP2+: Fix mismerge for timer.c between ff931c82 and da4a686a
    ARM: SPEAr: conditionalize SMP code
    ARM: arch_timer: Silence debug preempt warnings
    ARM: OMAP: remove unused variable
    serial: amba-pl011: fix !CONFIG_DMA_ENGINE case
    ata: arasan: remove the need for platform_data
    ARM: at91/sama5d34ek.dts: remove not needed compatibility string
    ARM: at91: dts: add MCI DMA support
    ARM: at91: dts: add i2c dma support
    ARM: at91: dts: set #dma-cells to the correct value
    ARM: at91: suspend both memory controllers on at91sam9263
    irqchip: armada-370-xp: slightly cleanup irq controller driver
    irqchip: armada-370-xp: move IRQ handler to avoid forward declaration
    irqchip: move IRQ driver for Armada 370/XP
    ARM: mvebu: move L2 cache initialization in init_early()
    devtree: add binding documentation for sp804
    ARM: integrator-cp: convert use CLKSRC_OF for timer init
    ARM: versatile: use OF init for sp804 timer
    ARM: versatile: add versatile dtbs to dtbs target
    ...

    Linus Torvalds
     

07 May, 2013

1 commit


06 May, 2013

1 commit

  • Pull kvm updates from Gleb Natapov:
    "Highlights of the updates are:

    general:
    - new emulated device API
    - legacy device assignment is now optional
    - irqfd interface is more generic and can be shared between arches

    x86:
    - VMCS shadow support and other nested VMX improvements
    - APIC virtualization and Posted Interrupt hardware support
    - Optimize mmio spte zapping

    ppc:
    - BookE: in-kernel MPIC emulation with irqfd support
    - Book3S: in-kernel XICS emulation (incomplete)
    - Book3S: HV: migration fixes
    - BookE: more debug support preparation
    - BookE: e6500 support

    ARM:
    - reworking of Hyp idmaps

    s390:
    - ioeventfd for virtio-ccw

    And many other bug fixes, cleanups and improvements"

    * tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits)
    kvm: Add compat_ioctl for device control API
    KVM: x86: Account for failing enable_irq_window for NMI window request
    KVM: PPC: Book3S: Add API for in-kernel XICS emulation
    kvm/ppc/mpic: fix missing unlock in set_base_addr()
    kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write
    kvm/ppc/mpic: remove users
    kvm/ppc/mpic: fix mmio region lists when multiple guests used
    kvm/ppc/mpic: remove default routes from documentation
    kvm: KVM_CAP_IOMMU only available with device assignment
    ARM: KVM: iterate over all CPUs for CPU compatibility check
    KVM: ARM: Fix spelling in error message
    ARM: KVM: define KVM_ARM_MAX_VCPUS unconditionally
    KVM: ARM: Fix API documentation for ONE_REG encoding
    ARM: KVM: promote vfp_host pointer to generic host cpu context
    ARM: KVM: add architecture specific hook for capabilities
    ARM: KVM: perform HYP initilization for hotplugged CPUs
    ARM: KVM: switch to a dual-step HYP init code
    ARM: KVM: rework HYP page table freeing
    ARM: KVM: enforce maximum size for identity mapped code
    ARM: KVM: move to a KVM provided HYP idmap
    ...

    Linus Torvalds
     

05 May, 2013

1 commit


04 May, 2013

1 commit

  • Pull ARM updates from Russell King:
    "The major items included in here are:

    - MCPM, multi-cluster power management, part of the infrastructure
    required for ARMs big.LITTLE support.

    - A rework of the ARM KVM code to allow re-use by ARM64.

    - Error handling cleanups of the IS_ERR_OR_NULL() madness and fixes
    of that stuff for arch/arm

    - Preparatory patches for Cortex-M3 support from Uwe Kleine-König.

    There is also a set of three patches in here from Hugh/Catalin to
    address freeing of inappropriate page tables on LPAE. You already
    have these from akpm, but they were already part of my tree at the
    time he sent them, so unfortunately they'll end up with duplicate
    commits"

    * 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (77 commits)
    ARM: EXYNOS: remove unnecessary use of IS_ERR_VALUE()
    ARM: IMX: remove unnecessary use of IS_ERR_VALUE()
    ARM: OMAP: use consistent error checking
    ARM: cleanup: OMAP hwmod error checking
    ARM: 7709/1: mcpm: Add explicit AFLAGS to support v6/v7 multiplatform kernels
    ARM: 7700/2: Make cpu_init() notrace
    ARM: 7702/1: Set the page table freeing ceiling to TASK_SIZE
    ARM: 7701/1: mm: Allow arch code to control the user page table ceiling
    ARM: 7703/1: Disable preemption in broadcast_tlb*_a15_erratum()
    ARM: mcpm: provide an interface to set the SMP ops at run time
    ARM: mcpm: generic SMP secondary bringup and hotplug support
    ARM: mcpm_head.S: vlock-based first man election
    ARM: mcpm: Add baremetal voting mutexes
    ARM: mcpm: introduce helpers for platform coherency exit/setup
    ARM: mcpm: introduce the CPU/cluster power API
    ARM: multi-cluster PM: secondary kernel entry code
    ARM: cacheflush: add synchronization helpers for mixed cache state accesses
    ARM: cpu hotplug: remove majority of cache flushing from platforms
    ARM: smp: flush L1 cache in cpu_die()
    ARM: tegra: remove tegra specific cpu_disable()
    ...

    Linus Torvalds
     

03 May, 2013

3 commits

  • Conflicts:
    arch/arm/plat-omap/dmtimer.c

    Russell King
     
  • …otplug' into for-linus

    Russell King
     
  • Pull ARM SoC cleanup from Olof Johansson:
    "Here is a collection of cleanup patches. Among the pieces that stand
    out are:

    - The deletion of h720x platforms
    - Split of at91 non-dt platforms to their own Kconfig file to keep
    them separate
    - General cleanups and refactoring of i.MX and MXS platforms
    - Some restructuring of clock tables for OMAP
    - Convertion of PMC driver for Tegra to dt-only
    - Some renames of sunxi -> sun4i (Allwinner A10)
    - ... plus a bunch of other stuff that I haven't mentioned"

    * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (119 commits)
    ARM: i.MX: remove unused ARCH_* configs
    ARM i.MX53: remove platform ahci support
    ARM: sunxi: Rework the restart code
    irqchip: sunxi: Rename sunxi to sun4i
    irqchip: sunxi: Make use of the IRQCHIP_DECLARE macro
    clocksource: sunxi: Rename sunxi to sun4i
    clocksource: sunxi: make use of CLKSRC_OF
    clocksource: sunxi: Cleanup the timer code
    ARM: at91: remove trailing semicolon from macros
    ARM: at91/setup: fix trivial typos
    ARM: EXYNOS: remove "config EXYNOS_DEV_DRM"
    ARM: EXYNOS: change the name of USB ohci header
    ARM: SAMSUNG: Remove unnecessary code for dma
    ARM: S3C24XX: Remove unused GPIO drive strength register definitions
    ARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method
    ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412
    ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410
    ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards
    ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC"
    ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"
    ...

    Linus Torvalds
     

02 May, 2013

1 commit

  • Pull VFS updates from Al Viro,

    Misc cleanups all over the place, mainly wrt /proc interfaces (switch
    create_proc_entry to proc_create(), get rid of the deprecated
    create_proc_read_entry() in favor of using proc_create_data() and
    seq_file etc).

    7kloc removed.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
    don't bother with deferred freeing of fdtables
    proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
    proc: Make the PROC_I() and PDE() macros internal to procfs
    proc: Supply a function to remove a proc entry by PDE
    take cgroup_open() and cpuset_open() to fs/proc/base.c
    ppc: Clean up scanlog
    ppc: Clean up rtas_flash driver somewhat
    hostap: proc: Use remove_proc_subtree()
    drm: proc: Use remove_proc_subtree()
    drm: proc: Use minor->index to label things, not PDE->name
    drm: Constify drm_proc_list[]
    zoran: Don't print proc_dir_entry data in debug
    reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
    proc: Supply an accessor for getting the data from a PDE's parent
    airo: Use remove_proc_subtree()
    rtl8192u: Don't need to save device proc dir PDE
    rtl8187se: Use a dir under /proc/net/r8180/
    proc: Add proc_mkdir_data()
    proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
    proc: Move PDE_NET() to fs/proc/proc_net.c
    ...

    Linus Torvalds
     

01 May, 2013

3 commits

  • Currently help message of /proc/sysrq-trigger highlights its
    upper-case characters, like below:

    SysRq : HELP : loglevel(0-9) reBoot Crash terminate-all-tasks(E)
    memory-full-oom-kill(F) kill-all-tasks(I) ...

    this would confuse user trigger sysrq by upper-case character, which is
    inconsistent with the real lower-case character registed key.

    This inconsistent help message will also lead more confused when
    26 upper-case letters put into use in future.

    This patch fix arm etm sysrq key: "etm-buffer-dump(v)"
    (This patch also add "-" to separate each sysrq key help word,
    instead of spaces)

    Signed-off-by: zhangwei(Jovi)
    Acked-by: Randy Dunlap
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    zhangwei(Jovi)
     
  • show_regs() is inherently arch-dependent but it does make sense to print
    generic debug information and some archs already do albeit in slightly
    different forms. This patch introduces a generic function to print debug
    information from show_regs() so that different archs print out the same
    information and it's much easier to modify what's printed.

    show_regs_print_info() prints out the same debug info as dump_stack()
    does plus task and thread_info pointers.

    * Archs which didn't print debug info now do.

    alpha, arc, blackfin, c6x, cris, frv, h8300, hexagon, ia64, m32r,
    metag, microblaze, mn10300, openrisc, parisc, score, sh64, sparc,
    um, xtensa

    * Already prints debug info. Replaced with show_regs_print_info().
    The printed information is superset of what used to be there.

    arm, arm64, avr32, mips, powerpc, sh32, tile, unicore32, x86

    * s390 is special in that it used to print arch-specific information
    along with generic debug info. Heiko and Martin think that the
    arch-specific extra isn't worth keeping s390 specfic implementation.
    Converted to use the generic version.

    Note that now all archs print the debug info before actual register
    dumps.

    An example BUG() dump follows.

    kernel BUG at /work/os/work/kernel/workqueue.c:4841!
    invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #7
    Hardware name: empty empty/S3992, BIOS 080011 10/26/2007
    task: ffff88007c85e040 ti: ffff88007c860000 task.ti: ffff88007c860000
    RIP: 0010:[] [] init_workqueues+0x4/0x6
    RSP: 0000:ffff88007c861ec8 EFLAGS: 00010246
    RAX: ffff88007c861fd8 RBX: ffffffff824466a8 RCX: 0000000000000001
    RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffffffff8234a07a
    RBP: ffff88007c861ec8 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff8234a07a
    R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
    FS: 0000000000000000(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: ffff88015f7ff000 CR3: 00000000021f1000 CR4: 00000000000007f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Stack:
    ffff88007c861ef8 ffffffff81000312 ffffffff824466a8 ffff88007c85e650
    0000000000000003 0000000000000000 ffff88007c861f38 ffffffff82335e5d
    ffff88007c862080 ffffffff8223d8c0 ffff88007c862080 ffffffff81c47760
    Call Trace:
    [] do_one_initcall+0x122/0x170
    [] kernel_init_freeable+0x9b/0x1c8
    [] ? rest_init+0x140/0x140
    [] kernel_init+0xe/0xf0
    [] ret_from_fork+0x7c/0xb0
    [] ? rest_init+0x140/0x140
    ...

    v2: Typo fix in x86-32.

    v3: CPU number dropped from show_regs_print_info() as
    dump_stack_print_info() has been updated to print it. s390
    specific implementation dropped as requested by s390 maintainers.

    Signed-off-by: Tejun Heo
    Acked-by: David S. Miller
    Acked-by: Jesper Nilsson
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Bjorn Helgaas
    Cc: Fengguang Wu
    Cc: Mike Frysinger
    Cc: Vineet Gupta
    Cc: Sam Ravnborg
    Acked-by: Chris Metcalf [tile bits]
    Acked-by: Richard Kuo [hexagon bits]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Both dump_stack() and show_stack() are currently implemented by each
    architecture. show_stack(NULL, NULL) dumps the backtrace for the
    current task as does dump_stack(). On some archs, dump_stack() prints
    extra information - pid, utsname and so on - in addition to the
    backtrace while the two are identical on other archs.

    The usages in arch-independent code of the two functions indicate
    show_stack(NULL, NULL) should print out bare backtrace while
    dump_stack() is used for debugging purposes when something went wrong,
    so it does make sense to print additional information on the task which
    triggered dump_stack().

    There's no reason to require archs to implement two separate but mostly
    identical functions. It leads to unnecessary subtle information.

    This patch expands the dummy fallback dump_stack() implementation in
    lib/dump_stack.c such that it prints out debug information (taken from
    x86) and invokes show_stack(NULL, NULL) and drops arch-specific
    dump_stack() implementations in all archs except blackfin. Blackfin's
    dump_stack() does something wonky that I don't understand.

    Debug information can be printed separately by calling
    dump_stack_print_info() so that arch-specific dump_stack()
    implementation can still emit the same debug information. This is used
    in blackfin.

    This patch brings the following behavior changes.

    * On some archs, an extra level in backtrace for show_stack() could be
    printed. This is because the top frame was determined in
    dump_stack() on those archs while generic dump_stack() can't do that
    reliably. It can be compensated by inlining dump_stack() but not
    sure whether that'd be necessary.

    * Most archs didn't use to print debug info on dump_stack(). They do
    now.

    An example WARN dump follows.

    WARNING: at kernel/workqueue.c:4841 init_workqueues+0x35/0x505()
    Hardware name: empty
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #9
    0000000000000009 ffff88007c861e08 ffffffff81c614dc ffff88007c861e48
    ffffffff8108f50f ffffffff82228240 0000000000000040 ffffffff8234a03c
    0000000000000000 0000000000000000 0000000000000000 ffff88007c861e58
    Call Trace:
    [] dump_stack+0x19/0x1b
    [] warn_slowpath_common+0x7f/0xc0
    [] warn_slowpath_null+0x1a/0x20
    [] init_workqueues+0x35/0x505
    ...

    v2: CPU number added to the generic debug info as requested by s390
    folks and dropped the s390 specific dump_stack(). This loses %ksp
    from the debug message which the maintainers think isn't important
    enough to keep the s390-specific dump_stack() implementation.

    dump_stack_print_info() is moved to kernel/printk.c from
    lib/dump_stack.c. Because linkage is per objecct file,
    dump_stack_print_info() living in the same lib file as generic
    dump_stack() means that archs which implement custom dump_stack()
    - at this point, only blackfin - can't use dump_stack_print_info()
    as that will bring in the generic version of dump_stack() too. v1
    The v1 patch broke build on blackfin due to this issue. The build
    breakage was reported by Fengguang Wu.

    Signed-off-by: Tejun Heo
    Acked-by: David S. Miller
    Acked-by: Vineet Gupta
    Acked-by: Jesper Nilsson
    Acked-by: Vineet Gupta
    Acked-by: Martin Schwidefsky [s390 bits]
    Cc: Heiko Carstens
    Cc: Mike Frysinger
    Cc: Fengguang Wu
    Cc: Bjorn Helgaas
    Cc: Sam Ravnborg
    Acked-by: Richard Kuo [hexagon bits]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo