lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 9 Jan 2014 10:19:21 +0000
From:	Will Deacon <will.deacon@....com>
To:	Vince Weaver <vincent.weaver@...ne.edu>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Stephane Eranian <eranian@...il.com>
Subject: Re: [patch/rfc] perf on raspberry-pi without overflow interrupt

Hi Vince,

On Thu, Jan 09, 2014 at 03:47:19AM +0000, Vince Weaver wrote:
> On Wed, 8 Jan 2014, Peter Zijlstra wrote:
> 
> > On Wed, Jan 08, 2014 at 04:28:20PM -0500, Vince Weaver wrote:
> > > Should the perf_event interface handle setups like this better and work 
> > > fine in aggregate mode but return ENOTSUP if a sampled or overflow event 
> > > is attempted?
> > 
> > Yeah that would be better, we do something similar for P6 class machines
> > without lapic IIRC.
> 
> You're right.  Something like the following works for me on the rasp-pi,
> although maybe if x86 is doing it too things should be moved up into 
> generic code?

I'd rather see it in the generic code if at all possible. Maybe we could add
a flags field to perf_pmu_register?

> Return EOPNOTSUPP if we have no PMU overflow interrupt but a
> sampled event is requested.
> 
> Signed-off-by: Vince Weaver <vincent.weaver@...ne.edu>
> 
> diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h
> index f24edad..f1f27a3 100644
> --- a/arch/arm/include/asm/pmu.h
> +++ b/arch/arm/include/asm/pmu.h
> @@ -87,6 +87,7 @@ struct arm_pmu {
>  	u64		max_period;
>  	struct platform_device	*plat_device;
>  	struct pmu_hw_events	*(*get_hw_events)(void);
> +	int		no_overflow_interrupt;

For the arm bits, we can actually use platform_get_irq on the platform
device and avoid the need for a new field in here.

Cheers,

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ