lkml.org 
[lkml]   [2017]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v1 6/9] MIPS: perf: percpu_devid interrupt support
On Thu, 7 Sep 2017, Paul Burton wrote:
>
> +static struct irqaction c0_perf_irqaction = {
> + .handler = mipsxx_pmu_handle_irq,
> + .flags = IRQF_PERCPU | IRQF_TIMER | IRQF_SHARED | IRQF_NOAUTOEN,
> + .name = "mips_perf_pmu",
> + .percpu_dev_id = &mipspmu,
> +};
> +
> static int mipspmu_get_irq(void)
> {
> - int err;
> + if (irq_is_percpu_devid(mipspmu.irq))
> + return setup_percpu_irq(mipspmu.irq, &c0_perf_irqaction);
>
> - err = request_irq(mipspmu.irq, mipsxx_pmu_handle_irq,
> - IRQF_PERCPU | IRQF_NOBALANCING |
> - IRQF_NO_THREAD | IRQF_NO_SUSPEND |
> - IRQF_SHARED,
> - "mips_perf_pmu", &mipspmu);
> - if (err)
> - pr_warn("Unable to request IRQ%d for MIPS performance counters!\n",
> - mipspmu.irq);
> - return err;
> + return setup_irq(mipspmu.irq, &c0_perf_irqaction);

request_irq() is really preferred over setup_irq(). setup_irq() exists for
historical reasons because back in the days the allocators were not working
when early interrupts got initialized. Today that's a non issue, but I
never got around to remove the setup_irq() cruft.

Thanks,

tglx




\
 
 \ /
  Last update: 2017-10-22 17:25    [W:0.053 / U:8.076 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site