[PATCH 5/5] arm/perfevents: implement perf event support for ARMv6

Jamie Iles jamie at jamieiles.com
Mon Dec 14 11:20:03 EST 2009


On Mon, Dec 14, 2009 at 04:13:05PM -0000, Will Deacon wrote:
> > diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
> > index fc5c05b..89a26ea 100644
> > --- a/arch/arm/mm/Kconfig
> > +++ b/arch/arm/mm/Kconfig
> > @@ -791,3 +791,11 @@ config ARM_L1_CACHE_SHIFT
> >  	int
> >  	default 6 if ARCH_OMAP3 || ARCH_S5PC1XX
> >  	default 5
> > +
> > +config HW_PERF_EVENTS
> > +	bool "Enable hardware performance counter support for perf events"
> > +	depends on PERF_EVENTS && CPU_HAS_PMU && CPU_V6
> > +	default n
> > +	help
> > +	  Enable hardware performance counter support for perf events. If
> > +	  disabled, perf events will use software events only.
> > --
> > 1.6.5.4
> 
> Why are you modifying mm/Kconfig? I think it would be better to change the
> Makefile to use CONFIG_HAVE_PERF_EVENTS rather than define a new bool.
Because this bool says that we support hardware perf events. If it isn't set,
we can still do perf events, but only the software variety. This allows us to
do software events for ARMv5 and earlier, but also do hardware counter support
where available.

Jamie



More information about the linux-arm-kernel mailing list