From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 734BDC38142 for ; Tue, 31 Jan 2023 16:42:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qlNikkWI3olyQhnMUvwF+mitbOBClWomnwpY3PzETT0=; b=0gWY5ISeC7TpZ0 B15/Z0r68XL6eMqBgy0Y/4yYMuGQeee3yWZrD57X1ZGPllA3oUwjy9t4WoHPGA3Yye6zZh7ldzGLd AB5ktrnd44TWyM5OFr7hlJkj9Ly8B/UNgD4sPt9gWOa1yfHfuNdQAPtKkdazSyrFOttKdPPToAMQh t+JvrAXRhBbZPtUzV2ZvecH7Uh/S4e+ooKfuZEEKnrF5hj6VSSXXUd6GqXdqRhnDwDls+xTWS96pf i9lLItMKTL3TsHSpqeLs8AIbPKa8lEB07nrzKRc69NcQPWhm43w1Bawelpuz4Bd436UrrABr6JtOq B+ltvcDlfjh2VbE9Kd3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMthY-008jML-5C; Tue, 31 Jan 2023 16:41:44 +0000 Received: from relay10.mail.gandi.net ([2001:4b98:dc4:8::230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMthU-008jJc-N6 for linux-arm-kernel@lists.infradead.org; Tue, 31 Jan 2023 16:41:43 +0000 Received: (Authenticated sender: gregory.clement@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 147CD240009; Tue, 31 Jan 2023 16:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675183295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=euDzKHP9/mtuK4Sv6gmdi0F88PCk07Xbz8L5E8Kz3kU=; b=gUXjnRAfNZaRf5ey5PfkDn+Il1s9laCJdGtd3dJY8iyRrhbHBL7xnQi+HPbe+0k4vkNH+d VXdqGOM3r8kDYflvrHO3/DE5mkYOwpPWvFSy2ovyKmSYw/jyJxZItR6bSCNB0Vq30wWDRv Ge0QmukmalggjGepa3NnnbPUaOqdoCfEy7rwL0EwWbl+RF1bS7eZv7qVBVEgvlgrqapsDa UUKAwJBuKYyJkMPwOSmpdgP4MRBAg2YLYpbudijNuA9IG+imy8vUlBT5FxRN6xge7K4rEW +hCYiGNar5YZX10UTzO1vTn3EXn2sVF2mC/nPVidXPpKt2K7wgPbIgB1KunC4Q== From: Gregory CLEMENT To: Arnd Bergmann , Russell King Cc: Marc Zyngier , Arnd Bergmann , Andrew Lunn , Sebastian Hesselbarth , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Sebastian Andrzej Siewior , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: irq: remove handle_IRQ() for good In-Reply-To: <20230117174117.3314951-1-arnd@kernel.org> References: <20230117174117.3314951-1-arnd@kernel.org> Date: Tue, 31 Jan 2023 17:41:33 +0100 Message-ID: <87k012bqrm.fsf@BL-laptop> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230131_084141_085518_EBF23700 X-CRM114-Status: GOOD ( 23.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Arnd Bergmann writes: > From: Arnd Bergmann > > The only difference between generic_handle_irq() and the ARM > handle_IRQ() version is now the range check, and in the remaining > drivers this does not appear to be needed any more. > > Remove this old interface and use the generic version in its place. > > Signed-off-by: Arnd Bergmann > --- > arch/arm/include/asm/irq.h | 4 ---- > arch/arm/kernel/irq.c | 25 ------------------------- > arch/arm/mach-dove/irq.c | 6 ++---- > arch/arm/mach-mv78xx0/irq.c | 9 +++------ > arch/arm/mach-orion5x/irq.c | 3 +-- > arch/arm/mach-pxa/irq.c | 4 ++-- For mvebu related platform Acked-by: Gregory CLEMENT Thanks, Gregory > 6 files changed, 8 insertions(+), 43 deletions(-) > > diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h > index a7c2337b0c7d..f62fa9f36192 100644 > --- a/arch/arm/include/asm/irq.h > +++ b/arch/arm/include/asm/irq.h > @@ -23,10 +23,6 @@ > #endif > > #ifndef __ASSEMBLY__ > -struct irqaction; > -struct pt_regs; > - > -void handle_IRQ(unsigned int, struct pt_regs *); > void init_IRQ(void); > > #ifdef CONFIG_SMP > diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c > index fe28fc1f759d..e0983269729f 100644 > --- a/arch/arm/kernel/irq.c > +++ b/arch/arm/kernel/irq.c > @@ -96,31 +96,6 @@ int arch_show_interrupts(struct seq_file *p, int prec) > return 0; > } > > -/* > - * handle_IRQ handles all hardware IRQ's. Decoded IRQs should > - * not come via this function. Instead, they should provide their > - * own 'handler'. Used by platform code implementing C-based 1st > - * level decoding. > - */ > -void handle_IRQ(unsigned int irq, struct pt_regs *regs) > -{ > - struct irq_desc *desc; > - > - /* > - * Some hardware gives randomly wrong interrupts. Rather > - * than crashing, do something sensible. > - */ > - if (unlikely(!irq || irq >= nr_irqs)) > - desc = NULL; > - else > - desc = irq_to_desc(irq); > - > - if (likely(desc)) > - handle_irq_desc(desc); > - else > - ack_bad_irq(irq); > -} > - > void __init init_IRQ(void) > { > int ret; > diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c > index 027a8f87bc2e..500f097e09b3 100644 > --- a/arch/arm/mach-dove/irq.c > +++ b/arch/arm/mach-dove/irq.c > @@ -47,15 +47,13 @@ __exception_irq_entry dove_legacy_handle_irq(struct pt_regs *regs) > stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_LOW_OFF); > stat &= readl_relaxed(dove_irq_base + IRQ_MASK_LOW_OFF); > if (stat) { > - unsigned int hwirq = 1 + __fls(stat); > - handle_IRQ(hwirq, regs); > + generic_handle_irq(1 + __fls(stat)); > return; > } > stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_HIGH_OFF); > stat &= readl_relaxed(dove_irq_base + IRQ_MASK_HIGH_OFF); > if (stat) { > - unsigned int hwirq = 33 + __fls(stat); > - handle_IRQ(hwirq, regs); > + generic_handle_irq(33 + __fls(stat)); > return; > } > } > diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c > index a34b6855fb19..6114ccbcdab2 100644 > --- a/arch/arm/mach-mv78xx0/irq.c > +++ b/arch/arm/mach-mv78xx0/irq.c > @@ -31,22 +31,19 @@ __exception_irq_entry mv78xx0_legacy_handle_irq(struct pt_regs *regs) > stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_LOW_OFF); > stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_LOW_OFF); > if (stat) { > - unsigned int hwirq = __fls(stat); > - handle_IRQ(hwirq, regs); > + generic_handle_irq(__fls(stat)); > return; > } > stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_HIGH_OFF); > stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_HIGH_OFF); > if (stat) { > - unsigned int hwirq = 32 + __fls(stat); > - handle_IRQ(hwirq, regs); > + generic_handle_irq(32 + __fls(stat)); > return; > } > stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_ERR_OFF); > stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_ERR_OFF); > if (stat) { > - unsigned int hwirq = 64 + __fls(stat); > - handle_IRQ(hwirq, regs); > + generic_handle_irq(64 + __fls(stat)); > return; > } > } > diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c > index e17727e53cb4..41d08934a918 100644 > --- a/arch/arm/mach-orion5x/irq.c > +++ b/arch/arm/mach-orion5x/irq.c > @@ -31,8 +31,7 @@ __exception_irq_entry orion5x_legacy_handle_irq(struct pt_regs *regs) > stat = readl_relaxed(MAIN_IRQ_CAUSE); > stat &= readl_relaxed(MAIN_IRQ_MASK); > if (stat) { > - unsigned int hwirq = 1 + __fls(stat); > - handle_IRQ(hwirq, regs); > + generic_handle_irq(1 + __fls(stat)); > return; > } > } > diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c > index 96f33ef1d9ea..1fe551b60eed 100644 > --- a/arch/arm/mach-pxa/irq.c > +++ b/arch/arm/mach-pxa/irq.c > @@ -101,7 +101,7 @@ asmlinkage void __exception_irq_entry icip_handle_irq(struct pt_regs *regs) > if (mask == 0) > break; > > - handle_IRQ(PXA_IRQ(fls(mask) - 1), regs); > + generic_handle_irq(PXA_IRQ(fls(mask) - 1)); > } while (1); > } > > @@ -115,7 +115,7 @@ asmlinkage void __exception_irq_entry ichp_handle_irq(struct pt_regs *regs) > if ((ichp & ICHP_VAL_IRQ) == 0) > break; > > - handle_IRQ(PXA_IRQ(ICHP_IRQ(ichp)), regs); > + generic_handle_irq(PXA_IRQ(ICHP_IRQ(ichp))); > } while (1); > } > > -- > 2.39.0 > -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel