1. 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
  2. 30 10月, 2014 5 次提交
  3. 02 7月, 2014 2 次提交
  4. 21 2月, 2014 1 次提交
    • S
      ARM: perf: add hook for event index clearing · eab443ef
      Stephen Boyd 提交于
      On Krait processors we have a many-to-one relationship between
      raw CPU events and the event programmed into the PMNx counter.
      Two raw CPU events could map to the same value programmed in the
      PMNx counter. To avoid this problem, we check for collisions
      during the get_event_idx() callback by setting a bit in a bitmap
      whenever a certain event is used in a PMNx counter (see the next
      patch). Unfortunately, we don't have a hook to clear this bit in
      the bitmap when the event is deleted so let's add an optional
      clear_event_idx() callback for this purpose.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      eab443ef
  5. 09 11月, 2012 2 次提交
  6. 23 8月, 2012 5 次提交
    • S
      ARM: perf: move irq registration into pmu implementation · 051f1b13
      Sudeep KarkadaNagesha 提交于
      This patch moves the CPU-specific IRQ registration and parsing code into
      the CPU PMU backend. This is required because a PMU may have more than
      one interrupt, which in turn can be either PPI (per-cpu) or SPI
      (requiring strict affinity setting at the interrupt distributor).
      Signed-off-by: NSudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
      [will: cosmetic edits and reworked interrupt dispatching]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      051f1b13
    • W
      ARM: perf: prepare for moving CPU PMU code into separate file · 6dbc0029
      Will Deacon 提交于
      The CPU PMU code is tightly coupled with generic ARM PMU handling code.
      This makes it cumbersome when trying to add support for other ARM PMUs
      (e.g. interconnect, L2 cache controller, bus) as the generic parts of
      the code are not readily reusable.
      
      This patch cleans up perf_event.c so that reusable code is exposed via
      header files to other potential PMU drivers. The CPU code is
      consistently named to identify it as such and also to prepare for moving
      it into a separate file.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      6dbc0029
    • S
      ARM: pmu: remove arm_pmu_type enumeration · df3d17e0
      Sudeep KarkadaNagesha 提交于
      The arm_pmu_type enumeration was initially introduced to identify
      different PMU types in the system, the usual one being that on the CPU
      (ARM_PMU_DEVICE_CPU). With the removal of the PMU reservation code and
      the introduction of devicetree bindings for the CPU PMU, the enumeration
      is no longer required.
      
      This patch removes the enumeration and updates the various CPU PMU
      platform devices so that they no longer pass an .id field referring
      to identify the PMU type.
      
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Acked-by: NJon Hunter <jon-hunter@ti.com>
      Acked-by: NKukjin Kim <kgene.kim@samsung.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Acked-by: NJiandong Zheng <jdzheng@broadcom.com>
      Signed-off-by: NSudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
      [will: cosmetic edits and actual removal of the enum type]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      df3d17e0
    • W
      ARM: pmu: remove unused reservation mechanism · f0d1bc47
      Will Deacon 提交于
      The PMU reservation mechanism was originally intended to allow OProfile
      and perf-events to co-ordinate over access to the CPU PMU. Since then,
      OProfile for ARM has moved to using perf as its backend, so the
      reservation code is no longer used.
      
      This patch removes the reservation code for the CPU PMU on ARM.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      f0d1bc47
    • J
      ARM: PMU: Add runtime PM Support · 7be2958e
      Jon Hunter 提交于
      Add runtime PM support to the ARM PMU driver so that devices such as OMAP
      supporting dynamic PM can use the platform->runtime_* hooks to initialise
      hardware at runtime. Without having these runtime PM hooks in place any
      configuration of the PMU hardware would be lost when low power states are
      entered and hence would prevent PMU from working.
      
      This change also replaces the PMU platform functions enable_irq and disable_irq
      added by Ming Lei with runtime_resume and runtime_suspend funtions. Ming had
      added the enable_irq and disable_irq functions as a method to configure the
      cross trigger interface on OMAP4 for routing the PMU interrupts. By adding
      runtime PM support, we can move the code called by enable_irq and disable_irq
      into the runtime PM callbacks runtime_resume and runtime_suspend.
      
      Cc: Ming Lei <ming.lei@canonical.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      7be2958e
  7. 10 7月, 2012 1 次提交
    • W
      ARM: 7448/1: perf: remove arm_perf_pmu_ids global enumeration · 4295b898
      Will Deacon 提交于
      In order to provide PMU name strings compatible with the OProfile
      user ABI, an enumeration of all PMUs is currently used by perf to
      identify each PMU uniquely. Unfortunately, this does not scale well
      in the presence of multiple PMUs and creates a single, global namespace
      across all PMUs in the system.
      
      This patch removes the enumeration and instead uses the name string
      for the PMU to map onto the OProfile variant. perf_pmu_name is
      implemented for CPU PMUs, which is all that OProfile cares about anyway.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4295b898
  8. 07 3月, 2012 1 次提交
    • W
      ARM: 7354/1: perf: limit sample_period to half max_period in non-sampling mode · 57273471
      Will Deacon 提交于
      On ARM, the PMU does not stop counting after an overflow and therefore
      IRQ latency affects the new counter value read by the kernel. This is
      significant for non-sampling runs where it is possible for the new value
      to overtake the previous one, causing the delta to be out by up to
      max_period events.
      
      Commit a737823d ("ARM: 6835/1: perf: ensure overflows aren't missed due
      to IRQ latency") attempted to fix this problem by allowing interrupt
      handlers to pass an overflow flag to the event update function, causing
      the overflow calculation to assume that the counter passed through zero
      when going from prev to new. Unfortunately, this doesn't work when
      overflow occurs on the perf_task_tick path because we have the flag
      cleared and end up computing a large negative delta.
      
      This patch removes the overflow flag from armpmu_event_update and
      instead limits the sample_period to half of the max_period for
      non-sampling profiling runs.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      57273471
  9. 02 12月, 2011 1 次提交
  10. 16 11月, 2011 1 次提交
  11. 31 8月, 2011 2 次提交
  12. 12 8月, 2011 2 次提交
  13. 29 6月, 2011 1 次提交
    • M
      ARM: 6974/1: pmu: refactor reservation · f12482c9
      Mark Rutland 提交于
      Currently, PMU platform_device reservation relies on some minor abuse
      of the platform_device::id field for determining the type of PMU. This
      is problematic for device tree based probing, where the ID cannot be
      controlled.
      
      This patch removes reliance on the id field, and depends on each PMU's
      platform driver to figure out which type it is. As all PMUs handled by
      the current platform_driver name "arm-pmu" are CPU PMUs, this
      convention is hardcoded. New PMU types can be supported through the use
      of {of,platform}_device_id tables
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NJamie Iles <jamie@jamieiles.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      f12482c9
  14. 17 2月, 2011 1 次提交
  15. 17 5月, 2010 1 次提交
    • W
      ARM: 6064/1: pmu: register IRQs at runtime · 49c006b9
      Will Deacon 提交于
      The current PMU infrastructure for ARM requires that the IRQs for the PMU
      device are fixed at compile time and are selected based on the ARCH_ or MACH_ flags. This has the disadvantage of tying the Kernel down to a
      particular board as far as profiling is concerned.
      
      This patch replaces the compile-time IRQ registration with a runtime mechanism which allows the IRQs to be registered with the framework as
      a platform_device.
      
      A further advantage of this change is that there is scope for registering
      different types of performance counters in the future by changing the id
      of the platform_device and attaching different resources to it.
      Acked-by: NJamie Iles <jamie.iles@picochip.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      49c006b9
  16. 30 4月, 2010 1 次提交
  17. 13 2月, 2010 1 次提交