History log of /arch/arm/include/asm/pmu.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5727347180ebc6b4a866fcbe00dcb39cc03acb37 06-Mar-2012 Will Deacon <will.deacon@arm.com> ARM: 7354/1: perf: limit sample_period to half max_period in non-sampling mode

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: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/include/asm/pmu.h
e0516a64e7ea9d9522d98f9f5f47aa38f147779f 02-Mar-2011 Ming Lei <ming.lei@canonical.com> arm: pmu: allow platform specific irq enable/disable handling

This patch introduces .enable_irq and .disable_irq into
struct arm_pmu_platdata, so platform specific irq enablement
can be handled after request_irq, and platform specific irq
disablement can be handled before free_irq.

This patch is for support of pmu irq routed from CTI on omap4.

Acked-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
/arch/arm/include/asm/pmu.h
14e25c5eeb90d4f61cc94933307d04a19738ad2f 16-Nov-2011 Will Deacon <will.deacon@arm.com> ARM: PMU: remove pmu_init declaration

pmu_init no longer exists, so don't declare it in asm/pmu.h.

Reported-by: Pawel Moll <Pawel.Moll@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
/arch/arm/include/asm/pmu.h
0ce47080dfffe71edd433b35dcdada24c61079eb 19-May-2011 Mark Rutland <mark.rutland@arm.com> ARM: perf: move arm_pmu into <asm/pmu.h>

Currently, struct arm_pmu and related functions are only visible to
{,arch/arm/}/kernel/perf_event.c. This prevents new drivers from using
the framework.

This patch moves declarations to asm/pmu.h, allowing new PMU drivers
to use the framework.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
/arch/arm/include/asm/pmu.h
b0e89590f4f27ea5ff30bdedb9a58ea904a6b353 26-Jul-2011 Will Deacon <will.deacon@arm.com> ARM: PMU: move CPU PMU platform device handling and init into perf

Once upon a time, OProfile and Perf fought hard over who could play with
the PMU. To stop all hell from breaking loose, pmu.c offered an internal
reserve/release API and took care of parsing PMU platform data passed in
from board support code.

Now that Perf has ingested OProfile, let's move the platform device
handling into the Perf driver and out of the PMU locking code.
Unfortunately, the lock has to remain to prevent Perf being bitten by
out-of-tree modules such as LTTng, which still claim a right to the PMU
when Perf isn't looking.

Acked-by: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
/arch/arm/include/asm/pmu.h
7fdd3c49629e8aab48dbd1b2f800854b0f93cba0 12-Aug-2011 Mark Rutland <mark.rutland@arm.com> ARM: perf: make name of arm_pmu_type consistent

Commit f12482c9 ("ARM: 6974/1: pmu: refactor reservation") changed
{release,reserve}_pmu to take an enum arm_pmu_type as a parameter, but
inconsistently named the parameter `type' or `device'. It would be nice
if these were consistent.

This patch makes use of enum arm_pmu_type consistent, always using
`type'. Related printks are updated, explicitly mentioning `type' also.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
/arch/arm/include/asm/pmu.h
49bef8331afefa4dd75f7124c50bde47168f5492 10-Aug-2011 Mark Rutland <Mark.Rutland@arm.com> ARM: perf: fix prototype of release_pmu

Commit f12482c9 ("ARM: 6974/1: pmu: refactor reservation") changed the
prototype of release_pmu, but missed the stub for when
CONFIG_CPU_HAS_PMU is not selected by the platform.

This patch changes the prototype of the stub, preventing possible build
failures when CONFIG_CPU_HAS_PMU is not selected.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
/arch/arm/include/asm/pmu.h
f12482c9393da2c1f5cb3217f29aa79c653dd980 22-Jun-2011 Mark Rutland <mark.rutland@arm.com> ARM: 6974/1: pmu: refactor reservation

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: Mark Rutland <mark.rutland@arm.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/include/asm/pmu.h
0e25a5c98067286fc727cf142fc0dadf95790921 08-Feb-2011 Rabin Vincent <rabin.vincent@stericsson.com> ARM: perf_event: allow platform-specific interrupt handler

Allow a platform-specific IRQ handler to be specified via platform data.
This will be used to implement the single-irq workaround for the DB8500.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
/arch/arm/include/asm/pmu.h
49c006b93769a86bec2b32b9234abf016ac0d50e 29-Apr-2010 Will Deacon <will.deacon@arm.com> ARM: 6064/1: pmu: register IRQs at runtime

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: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/include/asm/pmu.h
28d7f4ec98a8edb029ef24c1ee4af6a1ccbc9633 29-Apr-2010 Will Deacon <will.deacon@arm.com> ARM: 6063/1: pmu: add enum describing PMU types

This patch adds an enum describing the potential PMU device types in
preparation for PMU device registration via platform devices.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/include/asm/pmu.h
0f4f0672ac950c96cffaf84a666d35e817d7c3ca 02-Feb-2010 Jamie Iles <jamie.iles@picochip.com> ARM: 5899/2: arm: provide a mechanism to reserve performance counters

To add support for perf events and to allow the hardware counters to be
shared with oprofile, we need a way to reserve access to the pmu
(performance monitor unit). Platforms with PMU interrupts should
register the interrupts in arch/arm/kernel/pmu.c

Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/include/asm/pmu.h