lkml.org 
[lkml]   [2014]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch/rfc] perf on raspberry-pi without overflow interrupt
On Fri, Jan 10, 2014 at 04:08:47AM +0000, Vince Weaver wrote:
> On Thu, 9 Jan 2014, Will Deacon wrote:
>
> > I'd rather see it in the generic code if at all possible. Maybe we could add
> > a flags field to perf_pmu_register?
>
> I can look into adding the check in generic code.
>
> In the meantime, would you consider a patch like this that disables
> the IRQ check and lets ARM devices missing an IRQ (such as the rasp-pi)
> still have access to the counters?

In the absence of a core change, I think I'd rather have something like your
second patch, but without the extra no_overflow_irq field (you can check the
platform device, as I mentioned previously).

Cheers,

Will

>
> diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
> index d85055c..ff1a752 100644
> --- a/arch/arm/kernel/perf_event_cpu.c
> +++ b/arch/arm/kernel/perf_event_cpu.c
> @@ -97,8 +97,8 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler)
>
> irqs = min(pmu_device->num_resources, num_possible_cpus());
> if (irqs < 1) {
> - pr_err("no irqs for PMUs defined\n");
> - return -ENODEV;
> + printk_once("no irqs for PMUs defined, sampling events not supported\n");
> + return 0;
> }
>
> for (i = 0; i < irqs; ++i) {
>
>


\
 
 \ /
  Last update: 2014-01-10 11:41    [W:0.139 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site