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 BDF82C433F5 for ; Fri, 4 Mar 2022 16:46:04 +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:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xwa+yZ7wzCf9C9/gphXfKYL8JpoQi6CxkL2buEnTeaA=; b=RFZ638CJg6Fqdm zOLgCuRyanjedaCng0+AFYNaNIXR4f2ogTzvnZxkABa61pEsG8gSKbhaEKQZJ/rO/ByiByBcJsDPF NyyvzexdZ0B8q1uZnobWQE7+szGMDoh0KRWwGGOMqov9w98gZt88nLIcOq2zaPSJKQoCVb9KFkYe1 xQDSCTAjQ+stAzezJ6ZCqMK0JUklj95vsZT+W0RclvKu5Y+0900XFLwqK5qhS7Kno6FBd2vimIEBe eyuE4sMa8UPe76pgjxlO+yoPM3jlxXo1zbu8NDU3yUbssLrKlySFW0kJXMcQK0U7huxh2BTdobcWQ r8iimPdmua4NO3vkDZAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQB2o-00B8z7-B9; Fri, 04 Mar 2022 16:44:42 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQB2i-00B8xZ-Uo for linux-arm-kernel@lists.infradead.org; Fri, 04 Mar 2022 16:44:38 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CC6BF61CE6; Fri, 4 Mar 2022 16:44:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F1E8C340E9; Fri, 4 Mar 2022 16:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646412275; bh=O/rYuApC0mWYwuhxZoGy9dgi/jdtzvUbyF59nA1gQPw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Hz/roOLF1RLzsMLwHPnGcjc08FiVUts+qgqtIxUGNvM7K5JMBg6L0gU4TydNhqLUU Km9B6kIU6pc/THyWfnATx8vb623YLxtECdDfF6tj1Pao9qBlxYwdn5YyfNM02PDW2Z IGQA7qpyNw9kqGTG7YPmL6b+7eB1jz4bUKwmVdk+SZvJAbXyPKUMTDHhXQ7ajFjwgl Jt38aYCJ1yCzXbKL3GyPYGWIJpX1mptdLPZcUdQz6DdJuqSPKg1XvDakkNK2pwEKHc SCDAqV3zywmoAg40qOMSD765ocaA8DP8MBMnq+x4003pxc68cqh5FceLjFmhigTe/u 4lW/CwgXxXXbg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nQB2e-00CHEk-Tv; Fri, 04 Mar 2022 16:44:33 +0000 Date: Fri, 04 Mar 2022 16:44:32 +0000 Message-ID: <87k0d91xcf.wl-maz@kernel.org> From: Marc Zyngier To: Linu Cherian Cc: "tglx@linutronix.de" , "catalin.marinas@arm.com" , "will@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linuc.decode@gmail.com" Subject: Re: [EXT] Re: [PATCH V2] irqchip/gic-v3: Workaround Marvell erratum 38545 when reading IAR In-Reply-To: References: <20220304014301.2515-1-lcherian@marvell.com> <87ilsutb6w.wl-maz@kernel.org> 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") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: lcherian@marvell.com, tglx@linutronix.de, catalin.marinas@arm.com, will@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuc.decode@gmail.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220304_084437_138792_7F03F433 X-CRM114-Status: GOOD ( 28.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 Hi Linu, On Fri, 04 Mar 2022 13:25:42 +0000, Linu Cherian wrote: > > Hi Marc, > > > > static inline u64 gic_read_iar_cavium_thunderx(void) > > > { > > > - u64 irqstat; > > > + u64 irqstat, apr; > > > > > > + apr = read_sysreg_s(SYS_ICC_AP1R0_EL1); > > > > Why only AP1R0? Does the HW only support 5 bits of priority? If it supports > > more, you need to check all the registers that may contain an active priority > > (0xa0 for a standard interrupt, 0x20 for a pNMI). > > > > Yes correct. HW supports only 5 bits of priority groups. > Will note this in the comment. Thanks. > > > > nops(8); > > > irqstat = read_sysreg_s(SYS_ICC_IAR1_EL1); > > > nops(4); > > > mb(); > > > > > > - return irqstat; > > > + if (likely(apr != read_sysreg_s(SYS_ICC_AP1R0_EL1))) > > > + return irqstat; > > > + > > > + return 0x3ff; > > > > This should be ICC_IAR1_EL1_SPURIOUS. > > Looks like we need fixes like below in couple of files to make use > of this macro. > > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h > index 5bc01e62c08a..d02b7339d21a 100644 > --- a/arch/arm64/include/asm/kvm_host.h > +++ b/arch/arm64/include/asm/kvm_host.h > @@ -18,7 +18,7 @@ > #include > #include > #include > -#include > +#include > > Should I consider fixing these ? > At least its builds fine for me with similar header fixes. Ah, crap. I'd like to avoid dragging too much of the linux/*.h into asm/*.h, as this eventually leads to a pretty terrible mess. Never mind then. I'll look into fixing it independently, and we'll live with the 0x3ff for now. > > > +#define CAVIUM_CPU_PART_THUNDERX_OTX_GEN 0x0A0 > > > > Is this an actual part number? What does 'GEN' stand for? > > > > No, this is not an actual part number. GEN was meant to be generic > to cover a group of part numbers. The problem with that is that it eventually clashes with part numbers that are allocated later, and your old kernel tries to apply a workaround on the new HW... Sticking to the actual parts is a lot safer. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel