1. 27 5月, 2015 2 次提交
  2. 24 3月, 2015 1 次提交
    • W
      ARM: pmu: add support for interrupt-affinity property · 9fd85eb5
      Will Deacon 提交于
      Historically, the PMU devicetree bindings have expected SPIs to be
      listed in order of *logical* CPU number. This is problematic for
      bootloaders, especially when the boot CPU (logical ID 0) isn't listed
      first in the devicetree.
      
      This patch adds a new optional property, interrupt-affinity, to the
      PMU node which allows the interrupt affinity to be described using
      a list of phandled to CPU nodes, with each entry in the list
      corresponding to the SPI at the same index in the interrupts property.
      
      Cc: Mark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      9fd85eb5
  3. 18 3月, 2015 1 次提交
    • S
      ARM: perf: Add support for Scorpion PMUs · 341e42c4
      Stephen Boyd 提交于
      Scorpion supports a set of local performance monitor event
      selection registers (LPM) sitting behind a cp15 based interface
      that extend the architected PMU events to include Scorpion CPU
      and Venum VFP specific events. To use these events the user is
      expected to program the lpm register with the event code shifted
      into the group they care about and then point the PMNx event at
      that region+group combo by writing a LPMn_GROUPx event. Add
      support for this hardware.
      
      Note: the raw event number is a pure software construct that
      allows us to map the multi-dimensional number space of regions,
      groups, and event codes into a flat event number space suitable
      for use by the perf framework.
      
      This is based on code originally written by Sheetal Sahasrabudhe,
      Ashwin Chaugule, and Neil Leeder [1].
      
      [1] https://www.codeaurora.org/cgit/quic/la/kernel/msm/tree/arch/arm/kernel/perf_event_msm.c?h=msm-3.4
      
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Neil Leeder <nleeder@codeaurora.org>
      Cc: Ashwin Chaugule <ashwinc@codeaurora.org>
      Cc: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
      Cc: <devicetree@vger.kernel.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      341e42c4
  4. 19 2月, 2015 1 次提交
  5. 30 10月, 2014 9 次提交
  6. 26 9月, 2014 1 次提交
  7. 16 9月, 2014 1 次提交
    • S
      ARM: 8149/1: perf: Don't sleep while atomic when enabling per-cpu interrupts · 505013bc
      Stephen Boyd 提交于
      Rob Clark reports a sleeping while atomic bug when using perf.
      
      BUG: sleeping function called from invalid context at ../kernel/locking/mutex.c:583
      in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0
      ------------[ cut here ]------------
      WARNING: CPU: 2 PID: 4828 at ../kernel/locking/mutex.c:479 mutex_lock_nested+0x3a0/0x3e8()
      DEBUG_LOCKS_WARN_ON(in_interrupt())
      Modules linked in:
      CPU: 2 PID: 4828 Comm: Xorg.bin Tainted: G        W      3.17.0-rc3-00234-gd535c45-dirty #819
      [<c0216690>] (unwind_backtrace) from [<c0212174>] (show_stack+0x10/0x14)
      [<c0212174>] (show_stack) from [<c0867cc0>] (dump_stack+0x98/0xb8)
      [<c0867cc0>] (dump_stack) from [<c02492a4>] (warn_slowpath_common+0x70/0x8c)
      [<c02492a4>] (warn_slowpath_common) from [<c02492f0>] (warn_slowpath_fmt+0x30/0x40)
      [<c02492f0>] (warn_slowpath_fmt) from [<c086a3f8>] (mutex_lock_nested+0x3a0/0x3e8)
      [<c086a3f8>] (mutex_lock_nested) from [<c0294d08>] (irq_find_host+0x20/0x9c)
      [<c0294d08>] (irq_find_host) from [<c0769d50>] (of_irq_get+0x28/0x48)
      [<c0769d50>] (of_irq_get) from [<c057d104>] (platform_get_irq+0x1c/0x8c)
      [<c057d104>] (platform_get_irq) from [<c021a06c>] (cpu_pmu_enable_percpu_irq+0x14/0x38)
      [<c021a06c>] (cpu_pmu_enable_percpu_irq) from [<c02b1634>] (flush_smp_call_function_queue+0x88/0x178)
      [<c02b1634>] (flush_smp_call_function_queue) from [<c0214dc0>] (handle_IPI+0x88/0x160)
      [<c0214dc0>] (handle_IPI) from [<c0208930>] (gic_handle_irq+0x64/0x68)
      [<c0208930>] (gic_handle_irq) from [<c0212d04>] (__irq_svc+0x44/0x5c)
      Exception stack(0xe63ddea0 to 0xe63ddee8)
      dea0: 00000001 00000001 00000000 c2f3b200 c16db380 c032d4a0 e63ddf40 60010013
      dec0: 00000000 001fbfd4 00000100 00000000 00000001 e63ddee8 c0284770 c02a2e30
      dee0: 20010013 ffffffff
      [<c0212d04>] (__irq_svc) from [<c02a2e30>] (ktime_get_ts64+0x1c8/0x200)
      [<c02a2e30>] (ktime_get_ts64) from [<c032d4a0>] (poll_select_set_timeout+0x60/0xa8)
      [<c032d4a0>] (poll_select_set_timeout) from [<c032df64>] (SyS_select+0xa8/0x118)
      [<c032df64>] (SyS_select) from [<c020e8e0>] (ret_fast_syscall+0x0/0x48)
      ---[ end trace 0bb583b46342da6f ]---
      INFO: lockdep is turned off.
      
      We don't really need to get the platform irq again when we're
      enabling or disabling the per-cpu irq. Furthermore, we don't
      really need to set and clear bits in the active_irqs bitmask
      because that's only used in the non-percpu irq case to figure out
      when the last CPU PMU has been disabled. Just pass the irq
      directly to the enable/disable functions to clean all this up.
      This should be slightly more efficient and also fix the
      scheduling while atomic bug.
      
      Fixes: bbd64559 "ARM: perf: support percpu irqs for the CPU PMU"
      Reported-by: NRob Clark <robdclark@gmail.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      505013bc
  8. 18 7月, 2014 1 次提交
    • R
      ARM: make it easier to check the CPU part number correctly · af040ffc
      Russell King 提交于
      Ensure that platform maintainers check the CPU part number in the right
      manner: the CPU part number is meaningless without also checking the
      CPU implement(e|o)r (choose your preferred spelling!)  Provide an
      interface which returns both the implementer and part number together,
      and update the definitions to include the implementer.
      
      Mark the old function as being deprecated... indeed, using the old
      function with the definitions will now always evaluate as false, so
      people must update their un-merged code to the new function.  While
      this could be avoided by adding new definitions, we'd also have to
      create new names for them which would be awkward.
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      af040ffc
  9. 02 7月, 2014 2 次提交
    • M
      arm: perf: add more specific platform device IDs · 253d8c3d
      Mark Rutland 提交于
      When described in DT, PMUs are given specific compatible strings
      (e.g. "arm,cortex-a15-pmu") which makes it very easy to reorganise the
      way individual PMUs are handled (i.e. we can easily split them into
      separate drivers). The same is not true of PMUs described in board
      files, which are all use the platform_device_id "arm-pmu" and must all
      be handled by the same driver.
      
      To enable splitting the ARMv6, ARMv7, and XScale PMU drivers we need
      board files to identify which variant they provide. As a first step,
      this patch adds new platform_device_id values: "armv6-pmu", "armv7-pmu,
      and "xscale-pmu".
      
      Once board files are moved over and all existing uses of "arm-pmu" are
      gone, we can split the existing driver apart.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: NChristopher Covington <cov@codeaurora.org>
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      253d8c3d
    • M
      arm: perf: clean up PMU names · 3d1ff755
      Mark Rutland 提交于
      The perf userspace tools can't handle dashes or spaces in PMU names,
      which conflicts with the current naming scheme in the arm perf backend.
      This prevents these PMUs from being accessed by name from the perf
      tools. Additionally the ARMv6 pmus are named "v6", which does not fully
      distinguish them in the sys/bus/event_source namespace.
      
      This patch renames the PMUs consistently to a lower case form with
      underscores, e.g. "armv6_1176", "armv7_cortex_a9". This is both readily
      accepted by today's perf tool, and far easier to type than the
      (apparently unused) convention in use previously. The OProfile name
      conversion code is updated to handle this.
      
      Due to a copy-paste error involving two "xscale1" entries, "xscale2" has
      never been matched by the name OProfile name mapping. While we're
      updating names, this is corrected.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: NChristopher Covington <cov@codeaurora.org>
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      [sachin: fixed missing semicolons in armv6 backend]
      Signed-off-by: NSachin Kamat <sachin.kamat@samsung.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      3d1ff755
  10. 05 6月, 2014 1 次提交
  11. 26 5月, 2014 1 次提交
  12. 21 2月, 2014 5 次提交
  13. 11 1月, 2014 1 次提交
  14. 29 10月, 2013 1 次提交
  15. 20 8月, 2013 1 次提交
  16. 15 7月, 2013 1 次提交
    • P
      arm: delete __cpuinit/__CPUINIT usage from all ARM users · 8bd26e3a
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      and are flagged as __cpuinit  -- so if we remove the __cpuinit from
      the arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      related content into no-ops as early as possible, since that will get
      rid of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the ARM uses of the __cpuinit macros from C code,
      and all __CPUINIT from assembly code.  It also had two ".previous"
      section statements that were paired off against __CPUINIT
      (aka .section ".cpuinit.text") that also get removed here.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      8bd26e3a
  17. 18 1月, 2013 1 次提交
    • M
      ARM: perf: handle armpmu_register failing · 76b8a0e4
      Mark Rutland 提交于
      Currently perf_pmu_register may fail for several reasons (e.g. being
      unable to allocate memory for the struct device it associates with each
      PMU), and while any error is propagated by armpmu_register, it is
      ignored by cpu_pmu_device_probe and not propagated to the caller.  This
      also results in a leak of a struct arm_pmu.
      
      This patch adds cleanup if armpmu_register fails, and updates the info
      messages to better differentiate this type of failure from a failure to
      probe the PMU type from the hardware or dt.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      76b8a0e4
  18. 15 1月, 2013 1 次提交
  19. 11 1月, 2013 1 次提交
  20. 04 1月, 2013 1 次提交
    • G
      ARM: drivers: remove __dev* attributes. · 351a102d
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      351a102d
  21. 09 11月, 2012 5 次提交
  22. 23 8月, 2012 1 次提交