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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C96BC433EF for ; Sun, 24 Oct 2021 15:39:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 54BFB60EBC for ; Sun, 24 Oct 2021 15:39:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 54BFB60EBC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y6Pb7oOB1OgwBC9bOoWi+QuzL+g+Fm2sXUNWuj4IqwI=; b=0ApPgLV+uAgMai dsCKd+lTPo8K8UFKwtu2lmzyVBQB13j/PehVuZ9JgV7k/zQH+M+ESVswE1PH07noAQWlFd1z4DOPY 8E7BUxy7roTpU0vkBJQEX+uez3cmmzYkbgXcFwb21kj63ZruiKfZAdT3hAuQGCkEUAyfRINTJR53x TIIQSqqJs1/WH1egOUSsapjaJ8iJmXqgMjzvRWa6aI5s68FSLAR7ob5n9LC45WuNDr7ir2F5fvh0/ uSIvLYE8UNvw9o9gczUA1CG+DFC9p/Jrn++O03qW5hxipA6yMAffrGAWl3HX/Bvpxi4D6d8ksdkba xe/v2hCY3GnHjqMFWERQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mefZF-00EBWn-9z; Sun, 24 Oct 2021 15:37:49 +0000 Received: from elvis.franken.de ([193.175.24.41]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mefZ0-00EBRc-Tw for linux-arm-kernel@lists.infradead.org; Sun, 24 Oct 2021 15:37:36 +0000 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1mefYp-0006bc-05; Sun, 24 Oct 2021 17:37:23 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 3BCA5C265F; Sun, 24 Oct 2021 17:30:41 +0200 (CEST) Date: Sun, 24 Oct 2021 17:30:41 +0200 From: Thomas Bogendoerfer To: Mark Rutland Cc: linux-kernel@vger.kernel.org, aou@eecs.berkeley.edu, catalin.marinas@arm.com, deanbo422@gmail.com, green.hu@gmail.com, guoren@kernel.org, jonas@southpole.se, kernelfans@gmail.com, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, maz@kernel.org, nickhu@andestech.com, palmer@dabbelt.com, paulmck@kernel.org, paul.walmsley@sifive.com, peterz@infradead.org, shorne@gmail.com, stefan.kristiansson@saunalahti.fi, tglx@linutronix.de, torvalds@linux-foundation.org, vgupta@kernel.org, will@kernel.org Subject: Re: [PATCH 02/15] irq: mips: stop (ab)using handle_domain_irq() Message-ID: <20211024153041.GF4721@alpha.franken.de> References: <20211021180236.37428-1-mark.rutland@arm.com> <20211021180236.37428-3-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211021180236.37428-3-mark.rutland@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_083735_278528_708CFF5D X-CRM114-Status: GOOD ( 19.16 ) 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 On Thu, Oct 21, 2021 at 07:02:23PM +0100, Mark Rutland wrote: > On MIPS, the only user of handle_domain_irq() is octeon_irq_ciu3_ip2(), > which is called from the platform-specific plat_irq_dispatch() function > invoked from the early assembly code. > > No other irqchip relevant to arch/mips uses handle_domain_irq(): > > * No other plat_irq_dispatch() function transitively calls > handle_domain_irq(). > > * No other vectored IRQ dispatch function registered with > set_vi_handler() calls handle_domain_irq(). > > * No chained irqchip handlers call handle_domain_irq(), which makes > sense as this is meant to only be used by root irqchip handlers. > > Currently octeon_irq_ciu3_ip2() passes NULL as the `regs` argument to > handle_domain_irq(), and as handle_domain_irq() will pass this to > set_irq_regs(), any invoked IRQ handlers will erroneously see a NULL > pt_regs if they call get_pt_regs(). > > Fix this by calling generic_handle_domain_irq() directly, and performing > the necessary irq_{enter,exit}() logic directly in > octeon_irq_ciu3_ip2(). At the same time, deselect HANDLE_DOMAIN_IRQ, > which subsequent patches will remove. > > Other than the corrected behaviour of get_pt_regs(), there should be no > functional change as a result of this patch. > > Fixes: ce210d35bb93c2c5 ("MIPS: OCTEON: Add support for OCTEON III interrupt controller.") > Signed-off-by: Mark Rutland > Cc: Marc Zyngier > Cc: Thomas Bogendoerfer > Cc: Thomas Gleixner > --- > arch/mips/Kconfig | 1 - > arch/mips/cavium-octeon/octeon-irq.c | 5 ++++- > 2 files changed, 4 insertions(+), 2 deletions(-) Acked-by: Thomas Bogendoerfer -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07D88C433F5 for ; Sun, 24 Oct 2021 15:37:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E653B60FBF for ; Sun, 24 Oct 2021 15:37:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232070AbhJXPkI (ORCPT ); Sun, 24 Oct 2021 11:40:08 -0400 Received: from elvis.franken.de ([193.175.24.41]:37658 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231781AbhJXPjw (ORCPT ); Sun, 24 Oct 2021 11:39:52 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1mefYp-0006bc-05; Sun, 24 Oct 2021 17:37:23 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 3BCA5C265F; Sun, 24 Oct 2021 17:30:41 +0200 (CEST) Date: Sun, 24 Oct 2021 17:30:41 +0200 From: Thomas Bogendoerfer To: Mark Rutland Cc: linux-kernel@vger.kernel.org, aou@eecs.berkeley.edu, catalin.marinas@arm.com, deanbo422@gmail.com, green.hu@gmail.com, guoren@kernel.org, jonas@southpole.se, kernelfans@gmail.com, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, maz@kernel.org, nickhu@andestech.com, palmer@dabbelt.com, paulmck@kernel.org, paul.walmsley@sifive.com, peterz@infradead.org, shorne@gmail.com, stefan.kristiansson@saunalahti.fi, tglx@linutronix.de, torvalds@linux-foundation.org, vgupta@kernel.org, will@kernel.org Subject: Re: [PATCH 02/15] irq: mips: stop (ab)using handle_domain_irq() Message-ID: <20211024153041.GF4721@alpha.franken.de> References: <20211021180236.37428-1-mark.rutland@arm.com> <20211021180236.37428-3-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211021180236.37428-3-mark.rutland@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 21, 2021 at 07:02:23PM +0100, Mark Rutland wrote: > On MIPS, the only user of handle_domain_irq() is octeon_irq_ciu3_ip2(), > which is called from the platform-specific plat_irq_dispatch() function > invoked from the early assembly code. > > No other irqchip relevant to arch/mips uses handle_domain_irq(): > > * No other plat_irq_dispatch() function transitively calls > handle_domain_irq(). > > * No other vectored IRQ dispatch function registered with > set_vi_handler() calls handle_domain_irq(). > > * No chained irqchip handlers call handle_domain_irq(), which makes > sense as this is meant to only be used by root irqchip handlers. > > Currently octeon_irq_ciu3_ip2() passes NULL as the `regs` argument to > handle_domain_irq(), and as handle_domain_irq() will pass this to > set_irq_regs(), any invoked IRQ handlers will erroneously see a NULL > pt_regs if they call get_pt_regs(). > > Fix this by calling generic_handle_domain_irq() directly, and performing > the necessary irq_{enter,exit}() logic directly in > octeon_irq_ciu3_ip2(). At the same time, deselect HANDLE_DOMAIN_IRQ, > which subsequent patches will remove. > > Other than the corrected behaviour of get_pt_regs(), there should be no > functional change as a result of this patch. > > Fixes: ce210d35bb93c2c5 ("MIPS: OCTEON: Add support for OCTEON III interrupt controller.") > Signed-off-by: Mark Rutland > Cc: Marc Zyngier > Cc: Thomas Bogendoerfer > Cc: Thomas Gleixner > --- > arch/mips/Kconfig | 1 - > arch/mips/cavium-octeon/octeon-irq.c | 5 ++++- > 2 files changed, 4 insertions(+), 2 deletions(-) Acked-by: Thomas Bogendoerfer -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]