Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2101633ybc; Wed, 20 Nov 2019 08:56:59 -0800 (PST) X-Google-Smtp-Source: APXvYqy2s4oTbCfxp1SHwoye2MezFMXqiwvRO2ax3K4GtcKI69G5H58WsfehIAYf3EJKTeqJ3daj X-Received: by 2002:a17:906:d9c4:: with SMTP id qk4mr6336199ejb.214.1574269019782; Wed, 20 Nov 2019 08:56:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574269019; cv=none; d=google.com; s=arc-20160816; b=vKmbOSYmZVpSfi1C185IcsulrPUssF7Ro/4MH28OzQeWvvgXBnk63HImbE/U48sndv P61FHZhz8Fm066b1QyLDYEkHGefYmm5aghIGUuto/vQVzMDXDWSzUIlhckKKA5CbZLZS NoNJkioDUBRzPXtOPA+Enf8hWWyVFDyYNW2RW8JM5d/6fQYlhAUTNFui5vWj6YvVfH2L rLLpdBzcjEYyJd+9085xHzTWdmzg5AjbUPwdDP3lvvY7bmhM0krOKBIH6PCcNz4djQ2+ U8QM6vOAop+8qbeVOtW3vsKZQ8yfOCZlivvYJCvPCMgdBphA0OeRpo2HtdXzZDcxwYGW IT9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=CmemVc6bbko7mLFA63bdXpToc36jNgOpdHO9+OkXdyw=; b=EZiYe4FchVKPJ2IlCsGH1bhy4XPbNDQG/BIIXtIqIW8vWVZzjXNIw6XVYuQlMyXWf6 upAYBJEvFOgvzGCo9mx7fOp6vC0xIRocQfrbcUgKNy8u3e3HpFBCOzJI6YDnEwzmAn79 g03oA+Jm7h3PDyPKdh1oe5tkGUxPcGODD+HxkBRsTK2tu6Tox2e3ODNyWr8KMACHZdKi 36lHGPwC1NL2CiUItgDxdYjKvYhaNOHE44BVFUBnLOz1JUY6QtD1h2jyUq3leo1at+JG CuIVK670hbQ2Ediry6cg9BqwQCkVxw5l1t9aQyx1YsfLuGhEz/D7ru7HG+p+9XX7Ngio WaAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z22si4200912ejm.326.2019.11.20.08.56.34; Wed, 20 Nov 2019 08:56:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730269AbfKTNVX (ORCPT + 99 others); Wed, 20 Nov 2019 08:21:23 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:56746 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730207AbfKTNVQ (ORCPT ); Wed, 20 Nov 2019 08:21:16 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iXPuy-0007AH-1E; Wed, 20 Nov 2019 14:21:12 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 820E11C1A15; Wed, 20 Nov 2019 14:21:04 +0100 (CET) Date: Wed, 20 Nov 2019 13:21:04 -0000 From: "tip-bot2 for Marc Zyngier" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/gic-v3-its: Kill its->ite_size and use TYPER copy instead Cc: Marc Zyngier , Zenghui Yu , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20191027144234.8395-6-maz@kernel.org> References: <20191027144234.8395-6-maz@kernel.org> MIME-Version: 1.0 Message-ID: <157425606440.12247.526387246151472820.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: ffedbf0cba153c91a0da5d1280a5e639664c5ab3 Gitweb: https://git.kernel.org/tip/ffedbf0cba153c91a0da5d1280a5e639664c5ab3 Author: Marc Zyngier AuthorDate: Fri, 08 Nov 2019 16:57:59 Committer: Marc Zyngier CommitterDate: Sun, 10 Nov 2019 18:47:52 irqchip/gic-v3-its: Kill its->ite_size and use TYPER copy instead Now that we have a copy of TYPER in the ITS structure, rely on this to provide the same service as its->ite_size, which gets axed. Errata workarounds are now updating the cached fields instead of requiring a separate field in the ITS structure. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191027144234.8395-6-maz@kernel.org Link: https://lore.kernel.org/r/20191108165805.3071-6-maz@kernel.org --- drivers/irqchip/irq-gic-v3-its.c | 8 ++++---- include/linux/irqchip/arm-gic-v3.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 5bb3eac..c3a1e47 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -108,7 +109,6 @@ struct its_node { struct list_head its_device_list; u64 flags; unsigned long list_nr; - u32 ite_size; u32 device_ids; int numa_node; unsigned int msi_domain_flags; @@ -2453,7 +2453,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id, * sized as a power of two (and you need at least one bit...). */ nr_ites = max(2, nvecs); - sz = nr_ites * its->ite_size; + sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1); sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1; itt = kzalloc_node(sz, GFP_KERNEL, its->numa_node); if (alloc_lpis) { @@ -3268,7 +3268,8 @@ static bool __maybe_unused its_enable_quirk_qdf2400_e0065(void *data) struct its_node *its = data; /* On QDF2400, the size of the ITE is 16Bytes */ - its->ite_size = 16; + its->typer &= ~GITS_TYPER_ITT_ENTRY_SIZE; + its->typer |= FIELD_PREP(GITS_TYPER_ITT_ENTRY_SIZE, 16 - 1); return true; } @@ -3637,7 +3638,6 @@ static int __init its_probe_one(struct resource *res, its->typer = typer; its->base = its_base; its->phys_base = res->start; - its->ite_size = GITS_TYPER_ITT_ENTRY_SIZE(typer); its->device_ids = GITS_TYPER_DEVBITS(typer); if (is_v4(its)) { if (!(typer & GITS_TYPER_VMOVP)) { diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index 5cc10cf..4bce7a9 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h @@ -334,7 +334,7 @@ #define GITS_TYPER_PLPIS (1UL << 0) #define GITS_TYPER_VLPIS (1UL << 1) #define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT 4 -#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1) +#define GITS_TYPER_ITT_ENTRY_SIZE GENMASK_ULL(7, 4) #define GITS_TYPER_IDBITS_SHIFT 8 #define GITS_TYPER_DEVBITS_SHIFT 13 #define GITS_TYPER_DEVBITS(r) ((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)