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.9 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 AC55EC4743D for ; Fri, 4 Jun 2021 17:44:52 +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 71B54613F9 for ; Fri, 4 Jun 2021 17:44:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71B54613F9 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=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=4xBOqDqTIk6pYP8REwhJzMBdxFn7wvrkaCITZ/6WyJQ=; b=JP702Q3W8Pw5VE f8qjSyXBrJGMcXv6WmOb9GfBIAKWCIXmkAgnJ53VzU7xm1/MvvecccscfiVHqfWNC48Uj6eKYSLBV lwtLu08MQM2VV6CauVUfUVw/Hz9AesTjd0Gy1a7PayzdlnWlV8LnugCA1CkipciMdienS+1EFRc34 7tXalvb1NIg/RaJ8WXBqP1bdrrQTXXZt/9zPgaeaHJ6DMLtCVP3I8U/+h7oRDmxYUvF1tZJqH6gRU kpfzMr+5wbnBJe96x/va5zWUAo3DmXBKtlLUeCRTXEZZDF7Jp9tzLv2Ox7bfYiQx6bwWhVvwWKS6F C3ClxUJsN013pU8Q7kHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpDqn-00Ej1r-F7; Fri, 04 Jun 2021 17:43:17 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpDqi-00Eiyb-RY for linux-arm-kernel@lists.infradead.org; Fri, 04 Jun 2021 17:43:14 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0CEE6611CE; Fri, 4 Jun 2021 17:43:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622828592; bh=EOl8pFiR4rpOlJK32vSgVuCgvW3zk8KL3G64Bw4Nhyw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eMoR1euZWdYT4U7M4WeU6DSr8PWzymTZAXnAQ+9rUO0OPJPkZWjDGfItd+ngZC2xR gSmTwwrg274hBDCh48n4m83jGNNR6hGnzg3dk8BsLJJVWxhBAksmMpA5Lh9VTowOXW 1Ze8+/srzsXLCXr3N39SdV7wBSYpgLb29gBgK/nZav9mHAIOUcFt/ed5MufMgzm5VX BOzwGaCPe9wUzP8TpWXOsBFol3qzVWBaSYCskviUmIt/GwpsChrMUSNl4T/1R9C0bC /ETYzi8ER1h68wewtH2O1KjVi61unhRIs3zFCMhhMuSvmFdhbe8lPREmmpPDybkb6B UnuTxSNSVSlMA== Date: Fri, 4 Jun 2021 18:43:07 +0100 From: Will Deacon To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, james.morse@arm.com, joey.gouly@arm.com, maz@kernel.org Subject: Re: [PATCH v3 11/20] arm64: entry: move bad_mode() to entry-common.c Message-ID: <20210604174307.GA3703@willie-the-truck> References: <20210525183302.56293-1-mark.rutland@arm.com> <20210525183302.56293-12-mark.rutland@arm.com> <20210604165754.GC3416@willie-the-truck> <20210604174216.GC73426@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210604174216.GC73426@C02TD0UTHF1T.local> 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-20210604_104312_948671_2A6E5D1F X-CRM114-Status: GOOD ( 27.89 ) 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 Fri, Jun 04, 2021 at 06:42:16PM +0100, Mark Rutland wrote: > On Fri, Jun 04, 2021 at 05:57:55PM +0100, Will Deacon wrote: > > On Tue, May 25, 2021 at 07:32:53PM +0100, Mark Rutland wrote: > > > In subsequent patches we'll rework the way bad_mode is called by > > > exception entry code. In preparation for this, let's move bad_mode() > > > itself into entry-common.c. > > > > > > Let's also mark it as noinstr (e.g. to prevent it being kprobed), and > > > let's also make the `handler` array a local variable, as this is only > > > use by bad_mode(), and will be removed entirely in a subsequent patch. > > > > > > There should be no functional change as a result of this patch. > > > > > > Signed-off-by: Mark Rutland > > > Reviewed-by: Joey Gouly > > > Cc: Catalin Marinas > > > Cc: James Morse > > > Cc: Marc Zyngier > > > Cc: Will Deacon > > > --- > > > arch/arm64/kernel/entry-common.c | 27 +++++++++++++++++++++++++++ > > > arch/arm64/kernel/traps.c | 25 ------------------------- > > > 2 files changed, 27 insertions(+), 25 deletions(-) > > > > > > diff --git a/arch/arm64/kernel/entry-common.c b/arch/arm64/kernel/entry-common.c > > > index 9c0ed05b98c4..25531a0b547e 100644 > > > --- a/arch/arm64/kernel/entry-common.c > > > +++ b/arch/arm64/kernel/entry-common.c > > > @@ -22,6 +22,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > > > /* > > > * This is intended to match the logic in irqentry_enter(), handling the kernel > > > @@ -159,6 +160,32 @@ static void do_interrupt_handler(struct pt_regs *regs, > > > extern void (*handle_arch_irq)(struct pt_regs *); > > > extern void (*handle_arch_fiq)(struct pt_regs *); > > > > > > +/* > > > + * bad_mode handles the impossible case in the exception vector. This is always > > > + * fatal. > > > + */ > > > +asmlinkage void noinstr bad_mode(struct pt_regs *regs, int reason, unsigned int esr) > > > +{ > > > + const char *handler[] = { > > > + "Synchronous Abort", > > > + "IRQ", > > > + "FIQ", > > > + "Error" > > > + }; > > > > If you're rejigging this array anyway, maybe initialising it as: > > > > [BAD_SYNC] = "Synchronous Abort", > > [BAD_IRQ] = ... > > > > might make it even clearer. Up to you. > > Since I'm removing the BAD_* definitions (and the array) in a latter > patch, I'd prefer to leave this as-is here so that this clearly has no > functional change. Sure thing, I only spotted that after I'd already replied to this. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel