Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp974844ybl; Fri, 24 Jan 2020 13:01:52 -0800 (PST) X-Google-Smtp-Source: APXvYqwpu2iw/OFQqtFuhD+PH18yfUqUDwWR+V0hE2h/jpSo8Mok2Nckm2/bQay22dw6F5t7Xqub X-Received: by 2002:a9d:6251:: with SMTP id i17mr4329643otk.14.1579899712639; Fri, 24 Jan 2020 13:01:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579899712; cv=none; d=google.com; s=arc-20160816; b=Gmf+R2dd3nclxMgpHYvl0jGJ82RhzHJm+y9fiLZwOF4DcJFgpahttyUBhzHa7qU0R9 n+EcLy1CXnKBDGU8JeIf/fwlPu1E+fwYsHHDAtBKvqyzyOuVxa3KszspQFNwvDtGswwa 6VZLsSTz6IGttfF/cRCGIbKz9CvMWRe2HxDQitAeIJFj8FCXn6SX+1ovx3OZdni3gLJA KrLKzY544qnjwRtnwsh4tUZ1B4TCmvWpRsVH7MjyflhOCIOLFoMfvK+qEbnTyX4RGAP2 fBZEoL4hroRkM7+vTEqwo+1PTLNE+qmbte+AjZ6UkYNEKdU65GBUl+p6VG3XIsKKOrlA GfeQ== 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=ST/wPflislGfiGLSiJkiI0kduh2XGfNQFYbT2qakGrs=; b=Zs/tar439l92JdPCAUZ2oexjXX/atNUt4hr6aXwasUp6sAoscx11ZnG8jP5o23hhv9 UfhuDP2O0qAqVZ2ps0FGxTkaH/hzVweCWDpvjuK8IfCwmmx/tQ6eqq5/Z5TAe+g/3DHw B745UP0hlD2DF9cEzcEEVYZlVpAbeOr+P6nRlikQHi4Xbb1zqJlGj8MwUK1pNeqEi9ix YTKXJJNyFi0R5tY74SjkuzAla55Q4iyHcVdxEX1utYYntatQCdPf57nJLeSK5/eoQ4yf +ekAJn6UrpBHcgoreqmRg6KxQirEefPRioVzNfO2DeDRk0VT3adQsvyApIWxrMY998l9 PDlg== 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 n21si350927oic.0.2020.01.24.13.01.40; Fri, 24 Jan 2020 13:01:52 -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 S2392204AbgAXTM7 (ORCPT + 99 others); Fri, 24 Jan 2020 14:12:59 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:43000 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389363AbgAXTLN (ORCPT ); Fri, 24 Jan 2020 14:11:13 -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 1iv4MI-0007bR-1G; Fri, 24 Jan 2020 20:11:10 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id B10CC1C1A62; Fri, 24 Jan 2020 20:11:08 +0100 (CET) Date: Fri, 24 Jan 2020 19:11:08 -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-v4.1: Don't use the VPE proxy if RVPEID is set Cc: Marc Zyngier , Zenghui Yu , x86 , LKML In-Reply-To: <20191224111055.11836-8-maz@kernel.org> References: <20191224111055.11836-8-maz@kernel.org> MIME-Version: 1.0 Message-ID: <157989306847.396.9104611654547024981.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: 0684c7046590dd1e8047e187aaf4c7910cc35bce Gitweb: https://git.kernel.org/tip/0684c7046590dd1e8047e187aaf4c7910cc35bce Author: Marc Zyngier AuthorDate: Tue, 24 Dec 2019 11:10:30 Committer: Marc Zyngier CommitterDate: Wed, 22 Jan 2020 14:22:20 irqchip/gic-v4.1: Don't use the VPE proxy if RVPEID is set The infamous VPE proxy device isn't used with GICv4.1 because: - we can invalidate any LPI from the DirectLPI MMIO interface - the ITS and redistributors understand the life cycle of the doorbell, so we don't need to enable/disable it all the time So let's escape early from the proxy related functions. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-8-maz@kernel.org --- drivers/irqchip/irq-gic-v3-its.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index fbf4ca7..9bc8adf 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -3212,7 +3212,7 @@ static const struct irq_domain_ops its_domain_ops = { /* * This is insane. * - * If a GICv4 doesn't implement Direct LPIs (which is extremely + * If a GICv4.0 doesn't implement Direct LPIs (which is extremely * likely), the only way to perform an invalidate is to use a fake * device to issue an INV command, implying that the LPI has first * been mapped to some event on that device. Since this is not exactly @@ -3220,9 +3220,20 @@ static const struct irq_domain_ops its_domain_ops = { * only issue an UNMAP if we're short on available slots. * * Broken by design(tm). + * + * GICv4.1, on the other hand, mandates that we're able to invalidate + * by writing to a MMIO register. It doesn't implement the whole of + * DirectLPI, but that's good enough. And most of the time, we don't + * even have to invalidate anything, as the redistributor can be told + * whether to generate a doorbell or not (we thus leave it enabled, + * always). */ static void its_vpe_db_proxy_unmap_locked(struct its_vpe *vpe) { + /* GICv4.1 doesn't use a proxy, so nothing to do here */ + if (gic_rdists->has_rvpeid) + return; + /* Already unmapped? */ if (vpe->vpe_proxy_event == -1) return; @@ -3245,6 +3256,10 @@ static void its_vpe_db_proxy_unmap_locked(struct its_vpe *vpe) static void its_vpe_db_proxy_unmap(struct its_vpe *vpe) { + /* GICv4.1 doesn't use a proxy, so nothing to do here */ + if (gic_rdists->has_rvpeid) + return; + if (!gic_rdists->has_direct_lpi) { unsigned long flags; @@ -3256,6 +3271,10 @@ static void its_vpe_db_proxy_unmap(struct its_vpe *vpe) static void its_vpe_db_proxy_map_locked(struct its_vpe *vpe) { + /* GICv4.1 doesn't use a proxy, so nothing to do here */ + if (gic_rdists->has_rvpeid) + return; + /* Already mapped? */ if (vpe->vpe_proxy_event != -1) return; @@ -3278,6 +3297,10 @@ static void its_vpe_db_proxy_move(struct its_vpe *vpe, int from, int to) unsigned long flags; struct its_collection *target_col; + /* GICv4.1 doesn't use a proxy, so nothing to do here */ + if (gic_rdists->has_rvpeid) + return; + if (gic_rdists->has_direct_lpi) { void __iomem *rdbase;