[PATCH 1/2] ARM: pmu: refactor reservation

Jamie Iles jamie at jamieiles.com
Thu Jun 9 05:55:47 EDT 2011

On Wed, Jun 08, 2011 at 04:28:30PM +0100, Mark Rutland wrote:
> 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 will require the addition of new
> platform drivers (e.g. "arm-pmu-l2cc").
> Signed-off-by: Mark Rutland <mark.rutland at arm.com>
> Acked-by: Will Deacon <will.deacon at arm.com>
> Cc: Jamie Iles <jamie at jamieiles.com>
> Cc: Rob Herring <rob.herring at calxeda.com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---

Looks good to me.

Acked-by: Jamie Iles <jamie at jamieiles.com>

As a slight aside, when we have more PMU types could we key off of an ID 
table rather than creating a new platform driver for each type?


More information about the linux-arm-kernel mailing list