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=-3.0 required=3.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 BB139C433E0 for ; Mon, 8 Feb 2021 11:30:54 +0000 (UTC) Received: by mail.kernel.org (Postfix) id 7443964E99; Mon, 8 Feb 2021 11:30:54 +0000 (UTC) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 467E164EA1; Mon, 8 Feb 2021 11:30:54 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l94km-00ClSf-1Q; Mon, 08 Feb 2021 11:30:52 +0000 Date: Mon, 08 Feb 2021 11:30:50 +0000 Message-ID: <87blculrth.wl-maz@kernel.org> From: Marc Zyngier To: Hector Martin 'marcan' List-Id: Cc: soc@kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Olof Johansson , Mark Rutland , James Morse Subject: Re: [PATCH 10/18] arm64: Introduce FIQ support In-Reply-To: <2bfebb31-afb5-88a7-d092-87f88aa7367a@marcan.st> References: <20210204203951.52105-1-marcan@marcan.st> <20210204203951.52105-11-marcan@marcan.st> <87h7mpky0f.wl-maz@kernel.org> <2bfebb31-afb5-88a7-d092-87f88aa7367a@marcan.st> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: marcan@marcan.st, soc@kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, arnd@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, olof@lixom.net, mark.rutland@arm.com, james.morse@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Sun, 07 Feb 2021 08:47:23 +0000, Hector Martin 'marcan' wrote: > > On 07/02/2021 00.37, Marc Zyngier wrote: > > See my digression in patch 8. I really wonder what the benefit is to > > treat FIQ independently of IRQ, and we might as well generalise > > this. We could always panic on getting a FIQ on platforms that don't > > expect one. > > > > It'd be good to rope in the other interested parties (Mark for the > > early entry code, James for RAS and SError handling). > > CCing Mark and James: TL;DR what do you think about unconditionally > keeping DAIF.I == DAIF.F, would this break other platforms with > spurious FIQs or conversely mask FIQs when we don't want to in some > cases? The FIQ vector would remain a panic except on platforms that > require using it, via an alternatives patch. > > >> kernel_ventry 1, sync // Synchronous EL1h > >> kernel_ventry 1, irq // IRQ EL1h > >> - kernel_ventry 1, fiq_invalid // FIQ EL1h > >> + // FIQ EL1h > >> + kernel_ventry 1, fiq_invalid, 64, irq, ARM64_NEEDS_FIQ > > > > It could be better to create a set of first class FIQ handlers rather > > than this alternative target macro. I quickly hacked this instead, > > which I find more readable. > > I think I ended up with the macro change to keep it 1:1 with IRQ, vs a > separate branch... but I didn't think of the fallthrough-with-nop > trick, neat. It is definitely is more readable. Are you OK with me > pulling this patch in for v2, with your name on it? Up to you, I don't mind either way. This is just code! :D > > > - kernel_ventry 0, fiq_invalid_compat, 32 // FIQ 32-bit EL0 > > + kernel_ventry 0, fiq, 32 // FIQ 32-bit EL0 > > fiq_compat here, right? Of course. Thanks, M. -- Without deviation from the norm, progress is not possible.