From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754842AbdJSOMV (ORCPT ); Thu, 19 Oct 2017 10:12:21 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:33601 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754660AbdJSOMT (ORCPT ); Thu, 19 Oct 2017 10:12:19 -0400 Date: Thu, 19 Oct 2017 16:12:12 +0200 (CEST) From: Thomas Gleixner To: Paul Burton cc: Ralf Baechle , dianders@chromium.org, James Hogan , Brian Norris , Jason Cooper , jeffy.chen@rock-chips.com, Marc Zyngier , linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, tfiga@chromium.org Subject: Re: [RFC PATCH v1 6/9] MIPS: perf: percpu_devid interrupt support In-Reply-To: <20170907232542.20589-7-paul.burton@imgtec.com> Message-ID: References: <1682867.tATABVWsV9@np-p-burton> <20170907232542.20589-1-paul.burton@imgtec.com> <20170907232542.20589-7-paul.burton@imgtec.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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