From patchwork Tue Feb 13 10:12:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 200332 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp439425dyb; Tue, 13 Feb 2024 02:13:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXaBoKjBeOf2OP+sy1PmiJCL2DThmNdLhR6TRaWK3GhiwGtiEBzbCcNxRKhk3mS9Ax6WBsDC7GPufvixtD8wwSVmkKkMQ== X-Google-Smtp-Source: AGHT+IGPAZ11G0cCptW6uTOqFaY0UhEsMt3UqEbyPsX1+Q1vvkiThxTwGB4l0MjW4vZu8ifUPoXT X-Received: by 2002:a17:906:7c55:b0:a3b:f7cf:6616 with SMTP id g21-20020a1709067c5500b00a3bf7cf6616mr6600322ejp.18.1707819181517; Tue, 13 Feb 2024 02:13:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707819181; cv=pass; d=google.com; s=arc-20160816; b=ywbp0prb7DQB/rTL054t5mb0+FEYebWHSJ0j5j9pPDHuaERO82ZDrMlJtJMH6WHBpL SlnD7dDs9r+SlWsA/+xss5bqTdfoBpNy7rmfNYfAs2BAzCzKAVCbwHOt8U9abfVUnacb Je+N2rpWzLlGUU4hve2N/h89KzDcj5Znb3R16tkktqjvC/reIEYUP15ZKGe3D6bZX1Z4 S4mKhZYmshKBfmRoyLpYvTmq8EQhXlsHhI/bZXlIafxxiJSSKHMUmAVCJ5i0TnZFUxd4 CTLP6ijj3QIGUbTbjmrO1eEYYLEAurGYqFF87fnOv1TPFipU8IOqNHK+OSNKrb70U24y 3GdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6U0Tjjqp+dzO49dPmOW+kfC6hB+LvtqDbOS7L9vqNAc=; fh=612XTm4bC4u9OtYp6QM9i1NC3YGHVRcyZPV8BMWHn1w=; b=yA/Gox7OinxplS+yOpfPPIt8PVv0h+m8VI3PX53NPaRnbHEJiWHSwbc1RFU0u9W951 FOTC+tw9soGxE66GQggdsvya3/xon5+gx7KhtWdabWbVAi4Y81tiykjAyQ9sAZ9Ehr6T fSjsF7LVJmsr57SHTyrPyW2NjMtgGeEMpcNZj5HCgv/PKm93aqJlOgNH3hQ1uBTGBjAf +Y7elYZ6FYikSzcMpaSmkdcEfdKf4gXQSepO+E/IZRbW7u+EDoLWoj4e6YhG2G6GfMkD aFOg6G+a8UQriqQJJig9ABvwFSEkT27enHy88IDfz2DSGDc9OV5Iu21e2MDSr8Eqf2Qc OkjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZJ0LpLUr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63316-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63316-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUA0DVVZFg27sk95hi2T/jh5uriaBgCnRRsWe3z7oq0JyoQwd9RP/jccBP0H0egavntJsA+lPtPyqMKlCXgun9GitbgDg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u8-20020a170906068800b00a3d0e145fe9si291975ejb.597.2024.02.13.02.13.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:13:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63316-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZJ0LpLUr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63316-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63316-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E77C61F2141D for ; Tue, 13 Feb 2024 10:13:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40981286BC; Tue, 13 Feb 2024 10:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZJ0LpLUr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54C88225A4 for ; Tue, 13 Feb 2024 10:12:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819133; cv=none; b=Ur7wSYb5olNG3Y8mWZXT0y7pGTC3xVJd4GXiT4QwgpkkinO31gLXJv+mjlQLGaW2CULx74edipNiZGcQY7wey2j17tPHtg0E53aP2ibU5VguOUoJ1Q+5ohxnx94dKHXyN3FYBjAsnnnyzuR2Cc0LiCkaRXiy96+Ggw5iga6tGjs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819133; c=relaxed/simple; bh=y6fOsCJvWITZP3N0edq1izJAfFOb77a1S9SDSCyM6wY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Gi54KEnYiWxzKIeLv0sphVlW7wLHHbiF3lJ0BmSt+sbiIDuOXB4Ywh6hWl0Vt0EuDyA8hu+WB2+6Rb6kxfBezkO6qig+c3/n0WtiGbRl6Ty0Aif4bzJCxgW5Xj0tjyDa56LW+4sgDsi+h0A1TFqI0KOjEVADUHUJQ4BMGclhjfg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZJ0LpLUr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7200C433F1; Tue, 13 Feb 2024 10:12:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707819133; bh=y6fOsCJvWITZP3N0edq1izJAfFOb77a1S9SDSCyM6wY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZJ0LpLUr63UODRUhWz1ZbnYp3RArl4C4JFIPR6YNtfFjeKb99s3F712N1VrsbRe7W Ny315lBS9w7sLBMdvWvy1plBsF8kv6CIIlvV9fxzEy85MMHCS2loEC+vw9okIWsDOK 07UEdH3z7WNC373CcSSYPoFy1uU1/vmSJg2ReB8df16n5lD2pgUGlUzKFblYyv6Ulc E4OjnzrjZFOD3PKcHrKddqgmoilc1NqSyGGf80+SAFAYAxRDt54O+We20tMNl+sZAN UZ1ONZBDQhndJccDrT19N4nSRIpcPcVrxUXsAyTIxP+p+Uh14qQnw/RPwHwyqzlJTe akVVFK+NNdi/g== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rZplq-002j7r-Uv; Tue, 13 Feb 2024 10:12:11 +0000 From: Marc Zyngier To: Thomas Gleixner Cc: Kunkun Jiang , Lorenzo Pieralisi , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] irqchip/gic-v3-its: Handle non-coherent GICv4 redistributors Date: Tue, 13 Feb 2024 10:12:04 +0000 Message-Id: <20240213101206.2137483-2-maz@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240213101206.2137483-1-maz@kernel.org> References: <20240213101206.2137483-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: tglx@linutronix.de, jiangkunkun@huawei.com, lpieralisi@kernel.org, yuzenghui@huawei.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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790778206112983659 X-GMAIL-MSGID: 1790778206112983659 Although the GICv3 code base has gained some handling of systems failing to handle the shareability attributes, the GICv4 side of things has been firmly ignored. This is unfortunate, as the new recent addition of the "dma-noncoherent" is supposed to apply to all of the GICR tables, and not just the ones that are common to v3 and v4. Add some checks to handle the VPROPBASE/VPENDBASE shareability and cacheability attributes in the same way we deal with the other GICR_BASE registers, wrapping the flag check in a helper for improved readability. Note that this has been found by inspection only, as I don't have access to HW that suffers from this particular issue. Fixes: 3a0fff0fb6a3 ("irqchip/gic-v3: Enable non-coherent redistributors/ITSes DT probing") Reviewed-by: Lorenzo Pieralisi Signed-off-by: Marc Zyngier --- drivers/irqchip/irq-gic-v3-its.c | 37 +++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index d097001c1e3e..fec1b58470df 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -207,6 +207,11 @@ static bool require_its_list_vmovp(struct its_vm *vm, struct its_node *its) return (gic_rdists->has_rvpeid || vm->vlpi_count[its->list_nr]); } +static bool rdists_support_shareable(void) +{ + return !(gic_rdists->flags & RDIST_FLAGS_FORCE_NON_SHAREABLE); +} + static u16 get_its_list(struct its_vm *vm) { struct its_node *its; @@ -2710,10 +2715,12 @@ static u64 inherit_vpe_l1_table_from_its(void) break; } val |= FIELD_PREP(GICR_VPROPBASER_4_1_ADDR, addr >> 12); - val |= FIELD_PREP(GICR_VPROPBASER_SHAREABILITY_MASK, - FIELD_GET(GITS_BASER_SHAREABILITY_MASK, baser)); - val |= FIELD_PREP(GICR_VPROPBASER_INNER_CACHEABILITY_MASK, - FIELD_GET(GITS_BASER_INNER_CACHEABILITY_MASK, baser)); + if (rdists_support_shareable()) { + val |= FIELD_PREP(GICR_VPROPBASER_SHAREABILITY_MASK, + FIELD_GET(GITS_BASER_SHAREABILITY_MASK, baser)); + val |= FIELD_PREP(GICR_VPROPBASER_INNER_CACHEABILITY_MASK, + FIELD_GET(GITS_BASER_INNER_CACHEABILITY_MASK, baser)); + } val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, GITS_BASER_NR_PAGES(baser) - 1); return val; @@ -2936,8 +2943,10 @@ static int allocate_vpe_l1_table(void) WARN_ON(!IS_ALIGNED(pa, psz)); val |= FIELD_PREP(GICR_VPROPBASER_4_1_ADDR, pa >> 12); - val |= GICR_VPROPBASER_RaWb; - val |= GICR_VPROPBASER_InnerShareable; + if (rdists_support_shareable()) { + val |= GICR_VPROPBASER_RaWb; + val |= GICR_VPROPBASER_InnerShareable; + } val |= GICR_VPROPBASER_4_1_Z; val |= GICR_VPROPBASER_4_1_VALID; @@ -3126,7 +3135,7 @@ static void its_cpu_init_lpis(void) gicr_write_propbaser(val, rbase + GICR_PROPBASER); tmp = gicr_read_propbaser(rbase + GICR_PROPBASER); - if (gic_rdists->flags & RDIST_FLAGS_FORCE_NON_SHAREABLE) + if (!rdists_support_shareable()) tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK; if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) { @@ -3153,7 +3162,7 @@ static void its_cpu_init_lpis(void) gicr_write_pendbaser(val, rbase + GICR_PENDBASER); tmp = gicr_read_pendbaser(rbase + GICR_PENDBASER); - if (gic_rdists->flags & RDIST_FLAGS_FORCE_NON_SHAREABLE) + if (!rdists_support_shareable()) tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK; if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) { @@ -3880,14 +3889,18 @@ static void its_vpe_schedule(struct its_vpe *vpe) val = virt_to_phys(page_address(vpe->its_vm->vprop_page)) & GENMASK_ULL(51, 12); val |= (LPI_NRBITS - 1) & GICR_VPROPBASER_IDBITS_MASK; - val |= GICR_VPROPBASER_RaWb; - val |= GICR_VPROPBASER_InnerShareable; + if (rdists_support_shareable()) { + val |= GICR_VPROPBASER_RaWb; + val |= GICR_VPROPBASER_InnerShareable; + } gicr_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER); val = virt_to_phys(page_address(vpe->vpt_page)) & GENMASK_ULL(51, 16); - val |= GICR_VPENDBASER_RaWaWb; - val |= GICR_VPENDBASER_InnerShareable; + if (rdists_support_shareable()) { + val |= GICR_VPENDBASER_RaWaWb; + val |= GICR_VPENDBASER_InnerShareable; + } /* * There is no good way of finding out if the pending table is * empty as we can race against the doorbell interrupt very From patchwork Tue Feb 13 10:12:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 200333 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp439456dyb; Tue, 13 Feb 2024 02:13:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXfQK9kEcERUP4XsrNSkrKHFoqFmcp65m7WthmHqQp+3f9TMm4ddoW//1BgNla7Fff4hDYBlHksd1ZTxxLu53Ypn61OXA== X-Google-Smtp-Source: AGHT+IEdDiK8q01iHfsX+LX874SydKkR1DV74kj9kY8lnOaUHU5lSxZmrXxr+9nu9LOb1PHhHt4v X-Received: by 2002:a17:906:7c55:b0:a3b:f7cf:6616 with SMTP id g21-20020a1709067c5500b00a3bf7cf6616mr6600473ejp.18.1707819186055; Tue, 13 Feb 2024 02:13:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707819186; cv=pass; d=google.com; s=arc-20160816; b=KSsz6/UfvpHPsuD93+PZ5Kl5tANrYaXcFfIRMtpqDhcKzrT5d/19gWKEVjZnZHzN8j ig347CucW2Q9mFJvepgfhR62p31XBqi/1ATtt7wPMfzLuttdPwVNu7M6E6gPcW9gCY8l XRlCNa2pPAw+DidsGEmYjoDYuNYZgPSK8GEfd3dHC20B3tX47AMlgxtJ7L81nW/zzSBW 16V6lpA3NLTRi7u5WeiADTu7VX6bNRFJ6x+luxY0P9u+jHoxwNIm2Cc6y8GJDkT1oqF8 JM08w5d1f4BPyiakdAllXkLnzMcWG8HvQt5RLxWt7aBuzzqAbyRV3CZOHoug2/R0Dxe1 6K3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Gde7vWY5Ss5LiJeb0QflfnX043glkXlEh5FCddn78Qo=; fh=43ZFWtpiLHFbFnYWxqBFMNMTd3aVHkriZ5MDx4JmVL0=; b=DlmXfOCuB5iGShIkS38JOuSYII8qfFuZm0zt+KxOxRrDFNFVGhivUmIHCBp+uymfY5 KnBmHhG9au0cGkXyDiWZUf1B2BJBFLCQKB3LkAqdhygywiEnyOYgO5ZJHJZX3miQqINN OFLKA5tWu85XvTMYbRBAMZbif/JVpzsEHjX+CVU83KqIdW+9kz1+l23/4iR0BiU7s1cV 00LeqZ6hue6XgcRjp4j+UgpyVW2kQAErJ1mE+nxtZ30Rkkl3CTPQLL46cHiLvngRRkdD 1nUDPYPedDqtaJeXaN5nHA07YxolOsLhYEYNQSCJ5vpnz2z335WlHBJXVllYmhz44Z0w d1iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WarX6W84; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63319-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63319-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWH51iyI2hnHvbo6My1k+KbDLd26Qjuf3L5SncWFK4tIAFK9Mg+nk2c82esriuNHoGfGlVF67mZw/y1IVv2vceRbvJiwQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id yr5-20020a170907334500b00a3c4138857fsi1064098ejb.512.2024.02.13.02.13.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:13:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63319-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WarX6W84; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63319-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63319-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 821D91F21E0A for ; Tue, 13 Feb 2024 10:13:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8061722F02; Tue, 13 Feb 2024 10:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WarX6W84" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD1BC225D7; Tue, 13 Feb 2024 10:12:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819133; cv=none; b=KLdfYuNDRuLOAKDFVl4N7ZhryP6vxTRZbNumW1ZW/mAI7ygt7WaR5HlpU9p6wRHc62fzLH50sT3y3rO5ttZjxXgfilatHScL7YEsu6t+kw/bHETlaMHeAdyy6+YA1W4CoGWaO47T7+fQF3r8GupnWqZRLR5hTq2eUA76sQvWtGU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819133; c=relaxed/simple; bh=FYsp97vFbDiqatkf1UqYPH39ft6E0mUS7CzZXsJpk5U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=opyLBvaZS6l+KGuD/RJak14sqtnt9ZC0bt4T2dpOlRj+eH58oYguiLzWzmgpvdKx67klDKY+yj5bGbur1gGL6O0X0DV1icbLSlo2MRiBboKsGdKKHXUji4ZXHIQZryNaaOxeKU6fDsS2yKqhuFG3lCQaC8WCuGR2+oCZ1bOBWzI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WarX6W84; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54CD7C43394; Tue, 13 Feb 2024 10:12:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707819133; bh=FYsp97vFbDiqatkf1UqYPH39ft6E0mUS7CzZXsJpk5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WarX6W8402RK6EJ2bQjfEIFEb6JGg4S+xOhyWQYRFC2bV92GNHC6kZmpSPzvetnZ1 czegp3GfMGUbkOZ05z3gVzKTl+q2e6vuny672EFAG+dukKOyhTajePpDqCm+rlADYw Cow/zY0fupw/WmtF7NULqrO/QEdf5+yvtjC36YxrHOEG/7l3pProD0qc6elNTBae0R aTlu5A9zJtXHswKxhlZyqOMieezKWlKW5ea1RsZp5NlglFxi606j0bU3GDjWys2UiD L9MRjvZRLQASGUJkcDFxqUnZDfeGGFnVGhikGcBfFl99F3V2ggDmcWQ3+L+ikUOh+Q ohZJ443Dg4NEg== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rZplr-002j7r-4j; Tue, 13 Feb 2024 10:12:11 +0000 From: Marc Zyngier To: Thomas Gleixner Cc: Kunkun Jiang , Lorenzo Pieralisi , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 2/3] irqchip/gic-v3-its: Restore quirk probing for ACPI-based systems Date: Tue, 13 Feb 2024 10:12:05 +0000 Message-Id: <20240213101206.2137483-3-maz@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240213101206.2137483-1-maz@kernel.org> References: <20240213101206.2137483-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: tglx@linutronix.de, jiangkunkun@huawei.com, lpieralisi@kernel.org, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790778210754021551 X-GMAIL-MSGID: 1790778210754021551 While refactoring the way the ITSs are probed, the handling of quirks applicable to ACPI-based platforms was lost. As a result, systems such as HIP07 lose their GICv4 functionnality, and some other may even fail to boot, unless they are configured to boot with DT. Move the enabling of quirks into its_probe_one(), making it common to all firmware implementations. Fixes: 9585a495ac93 ("irqchip/gic-v3-its: Split allocation from initialisation of its_node") Reviewed-by: Lorenzo Pieralisi Reviewed-by: Zenghui Yu Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org --- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index fec1b58470df..250b4562f308 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -5091,6 +5091,8 @@ static int __init its_probe_one(struct its_node *its) u32 ctlr; int err; + its_enable_quirks(its); + if (is_v4(its)) { if (!(its->typer & GITS_TYPER_VMOVP)) { err = its_compute_its_list_map(its); @@ -5442,7 +5444,6 @@ static int __init its_of_probe(struct device_node *node) if (!its) return -ENOMEM; - its_enable_quirks(its); err = its_probe_one(its); if (err) { its_node_destroy(its);