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 B7E94C9830E for ; Thu, 24 Sep 2026 17:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LGhEdzHOKmu/eRgXKiCEX9gNoHS+6ZJVhoJgxOgxGqA=; b=AP3qA7gXy4ZEai6L1PalmbzWNV RT3OFFAnBVSkl/L4BNDu6v7IT4RCH9m4VGS1DVNsELJp+nZbq3Y2oKN/YZix8fPB4R4mhk+82oNbO spbd/ypJENHl9SId0w692vgOeMAzWBXbYSHNN3a0ox25oAiCUxsNIBXZ0ELUj2Xb5K5+2JbXuikuK OWy2KNujAPKpuIp7jq/RFukGqvxx0SqC7gm4RQfxlhaoYzUOnT8HnmMDL6mTapstPKPD6I522if+c 4GzprRhCL7Kqgl5ootfBJDrFiVxrzoxIv7W3orgjrxMPmipBMThPZqLTuKn0fuBkTxZq5rbrKJnxK SZ0GuX1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x9nGG-0000000BjnB-0pAc; Thu, 24 Sep 2026 17:29:32 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x9nGF-0000000Bjmc-2q6Q for linux-arm-kernel@lists.infradead.org; Thu, 24 Sep 2026 17:29:31 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 1F99840F0D; Thu, 24 Sep 2026 17:29:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 008801F000FF; Thu, 24 Sep 2026 17:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1790270971; bh=LGhEdzHOKmu/eRgXKiCEX9gNoHS+6ZJVhoJgxOgxGqA=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=h0gEL18A0n0UViV6WFhpZxzB1GebdW9MnUkXyatmpL2Q4XmYE8T6M2dn4Y9feslkL hazVaKZXWMY38rfeoXXOs5meEpygAWyNcTjWFfTrNhjMwJ/dVXHeY3Bf9PNNDODcKB r0ePU+DWymjoBle4YI3+diyzifDMydoVuf0nbAcRR9M2zf7112PkU6aTz7GJd9T0IE JZeESZyroFDW43y3Ta6WWLFCOXEWltACv/LSv48/skdZEavKdEd/dw4O7j3E/ivRgj Yl9drdXm+n9Oa1pVGcqNY2lYkmuFzP77znSNr5RvAaB9CIc6PuKhW5nySbny92uvUj owJnbOCMOytWA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x9nGC-0000000D7xF-3HVC; Thu, 24 Sep 2026 17:29:28 +0000 Date: Thu, 24 Sep 2026 18:29:28 +0100 Message-ID: <86pky24kxz.wl-maz@kernel.org> From: Marc Zyngier To: Fuad Tabba Cc: Thomas Gleixner , Radu Rendec , James Morse , Will Deacon , Fuad Tabba , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] irqchip/gic-v3: Don't register a redistributor that was never counted In-Reply-To: <20260924161514.1112730-4-fuad.tabba@linux.dev> References: <20260924161514.1112730-1-fuad.tabba@linux.dev> <20260924161514.1112730-4-fuad.tabba@linux.dev> 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/30.1 (aarch64-unknown-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: 185.219.108.64 X-SA-Exim-Rcpt-To: fuad.tabba@linux.dev, tglx@kernel.org, radu@rendec.net, james.morse@arm.com, will@kernel.org, tabba@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 24 Sep 2026 17:15:14 +0100, Fuad Tabba wrote: > > gic_acpi_match_gicc() counts only the enabled GICCs with a non-zero > gicr_base_address, and that count sizes redist_regs[], but > gic_acpi_parse_madt_gicc() registers every enabled one. For an enabled > GICC with a zero GICR base, gic_acpi_register_redist() therefore writes > a struct redist_region past the end of the array. > > Commit fa2dabe57220e ("irqchip/gic-v3: Don't return errors from > gic_acpi_match_gicc()") removed the check that kept the two consistent; > its message says such entries are still caught by gic_populate_rdist(), > but that runs from gic_cpu_init(), after the write. Skip the entry > instead. > > Fixes: fa2dabe57220e ("irqchip/gic-v3: Don't return errors from gic_acpi_match_gicc()") > Signed-off-by: Fuad Tabba > --- > drivers/irqchip/irq-gic-v3.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > index 6e1fa5b247fc4..fb6a0570fb154 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -2344,6 +2344,12 @@ gic_acpi_parse_madt_gicc(union acpi_subtable_headers *header, > return 0; > } > > + /* Not counted by gic_acpi_match_gicc(), so there is no slot for it */ > + if (!gicc->gicr_base_address) { > + pr_warn(FW_BUG "GICC entry with ACPI UID %u has no GICR base address\n", gicc->uid); > + return 0; > + } > + Shouldn't this also update the broken_rdist bitmap? M. -- Without deviation from the norm, progress is not possible.