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 X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95966C433DB for ; Wed, 24 Mar 2021 16:51:26 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 21F6F61A0E for ; Wed, 24 Mar 2021 16:51:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21F6F61A0E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=m2cwb/m/BWvmLXXRdUCKrybpx5YFN23gJ7/riG05BY0=; b=EdFl1UYFfug10aXYsNOBcgCnS VIqCa2TCw5yed1BTAuKllYfl2RImOC76xeMN7tG38GNp+PBcg0B7E0mwRQiN4eNh+xw8HSZpvRV+5 bnU43XoQGYlOW9lz2FXBWw/TbkqA/Nxl6gPGwmSMIKN0nuz5UMl6YjCMINNdj+/j9gnyIDeXKkQBf 6QWhTBMZ/HT4ptk9+j7nOMpLuoBNg8FkV3InCP1HiyiH9vnWCeneSkyw0nZmtkvFCn43gBXXNIckl TwGtz/ieoUsT1XQpPqyKG9sMlQz/AQSPP8dgiJh9cKEA9ozjU/rtwKjpjFqZKwhgJY4x6g2UGz7eq W8hBbJtPQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lP6hL-00HRQp-1a; Wed, 24 Mar 2021 16:49:35 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lP6hE-00HRPW-4u for linux-arm-kernel@lists.infradead.org; Wed, 24 Mar 2021 16:49:29 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 635A2619F3; Wed, 24 Mar 2021 16:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616604566; bh=z7u23l1L1urULCfNXhb+ljpef7GftgjOaulfS2dx3Y4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DqMYMYsQj8+grxt4l7MHbDguytm2ZtqupYhBMki6TcrNfeYmJDNIMRiiLPZMWna74 0PsCww+Yw1aYWXtAIBD44Gf8PlWORyRxkDdzIIn9xmkkpywc0y9xMh+DYUpqX/oenp 6aHU+a7zWf/+pa0QmJuJw13pLuquLhc0uH20UMu4XSX9+XEb802TGJRhdb8TzRTDVg OC4v3WftAnnPA/Jq5fQJ/ZAqCPV5AHNx31Rju7YStypjJP9RQ59fbpJYgR6p6id9Mj PzxejVzI8s1HvmILjomIK2xURR9BGmkBLtxdoLCPsGgXIiqiuoJTj57Dg0gN++qzDI QhgPYgqjZ5fOA== Date: Wed, 24 Mar 2021 16:49:22 +0000 From: Will Deacon To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, james.morse@arm.com, marcan@marcan.st, maz@kernel.org, tglx@linutronix.de Subject: Re: [PATCHv3 3/6] arm64: irq: rework root IRQ handler registration Message-ID: <20210324164921.GB13030@willie-the-truck> References: <20210315115629.57191-1-mark.rutland@arm.com> <20210315115629.57191-4-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210315115629.57191-4-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-20210324_164928_418424_C76E4789 X-CRM114-Status: GOOD ( 16.04 ) 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 Mon, Mar 15, 2021 at 11:56:26AM +0000, Mark Rutland wrote: > If we accidentally unmask IRQs before we've registered a root IRQ > handler, handle_arch_irq will be NULL, and the IRQ exception handler > will branch to a bogus address. > > To make this easier to debug, this patch initialises handle_arch_irq to > a default handler which will panic(), making such problems easier to > debug. When we add support for FIQ handlers, we can follow the same > approach. > > When we add support for a root FIQ handler, it's possible to have root > IRQ handler without an root FIQ handler, and in theory the inverse is > also possible. To permit this, and to keep the IRQ/FIQ registration > logic similar, this patch removes the panic in the absence of a root IRQ > controller. Instead, set_handle_irq() logs when a handler is registered, > which is sufficient for debug purposes. > > Signed-off-by: Mark Rutland > Tested-by: Hector Martin > Cc: Catalin Marinas > Cc: James Morse > Cc: Marc Zyngier > Cc: Thomas Gleixner > Cc: Will Deacon > --- > arch/arm64/kernel/irq.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel