Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7497287ybl; Tue, 24 Dec 2019 03:43:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyO9Wm1jfaDYQzAqVulhddviqpGYpDj+9FiQ3tE0TjQsiTA82a54V/oQao8Fz7Gwhnzm6Ux X-Received: by 2002:a9d:3b23:: with SMTP id z32mr36274996otb.159.1577187833028; Tue, 24 Dec 2019 03:43:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577187833; cv=none; d=google.com; s=arc-20160816; b=TXD4kFy0+NbWQKdo5Pbr+K7OwW3LuvyfCVZbeJtNS4K5oic5qNMn0Xgxbc2h6dQBiE r4shRL1vNX28iSRCvpEv2s0LgR+XAxcpDLCMftNzSuyvzqGVQLw40w3oTU7yZq0l4OYu 4m2rtPNDGL/10f5oJroLmhsp4/jYB8+tBEyBS9PDBrgrNQDUGdqtzXkr/aFtMPoD9Y+u B9O4+LgkgJ54+zIKdcMqphoA3WsYlQbvF0NRRr9NQNn6oBjwwc2LdFdBf1zebYkaBjuc 9xJWTJPbyjwFbaRw8w5TwpY3bT3EpDW2iIlS4V43RPwhsovWBYLGktZ6b/OFF0qSX1CI R9nA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=q00j21a0j+Ze5UMhnKe0VqjC3FcG1XmW2uj0UYOvnzs=; b=gXbCv+R8xj0DB7TmzZ+HhfUPYk/ihAIODR7tQ3SepeJ2ytVirrTGviApn2Nvz0y21y BdHslxC+WQrXB+gtdvG4KsGbIIXlpf2ApE5s4VQymp3VUhymXsLK84yjou62zkpgvmeP 774HEemDgxZvGyadjKquJsgPQ6efe/+ZVkvHYIetQZIVdz/poQqD92nCMsgFfUdbKb8x YZOmRSI1SvgQp3wRSie4AiCc0yHSYNVnqScEOevxsSKNOjNhi0iFDX7Zom92MPzWRAhf j+2w05q6BJMVqK0XDBr6o7GSQkdsbmc8UsIIO73B6yGPXoRRBoixiX5/ncw8IGqFrvbH +SQw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si2983597oii.195.2019.12.24.03.43.42; Tue, 24 Dec 2019 03:43:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727109AbfLXLnB (ORCPT + 99 others); Tue, 24 Dec 2019 06:43:01 -0500 Received: from inca-roads.misterjones.org ([213.251.177.50]:48063 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726237AbfLXLnB (ORCPT ); Tue, 24 Dec 2019 06:43:01 -0500 Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by cheepnis.misterjones.org with esmtpsa (TLSv1.2:DHE-RSA-AES128-GCM-SHA256:128) (Exim 4.80) (envelope-from ) id 1iji5y-000169-H6; Tue, 24 Dec 2019 12:11:22 +0100 From: Marc Zyngier To: kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Cc: Eric Auger , James Morse , Julien Thierry , Suzuki K Poulose , Thomas Gleixner , Jason Cooper , Lorenzo Pieralisi , Andrew Murray , Zenghui Yu , Robert Richter Subject: [PATCH v3 14/32] irqchip/gic-v4.1: Suppress per-VLPI doorbell Date: Tue, 24 Dec 2019 11:10:37 +0000 Message-Id: <20191224111055.11836-15-maz@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191224111055.11836-1-maz@kernel.org> References: <20191224111055.11836-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, eric.auger@redhat.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, tglx@linutronix.de, jason@lakedaemon.net, lorenzo.pieralisi@arm.com, Andrew.Murray@arm.com, yuzenghui@huawei.com, rrichter@marvell.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since GICv4.1 gives us a per-VPE doorbell, avoid programming anything else on VMOVI/VMAPI/VMAPTI and on any other action that would have otherwise resulted in a per-VLPI doorbell to be programmed. Reviewed-by: Zenghui Yu Signed-off-by: Marc Zyngier --- drivers/irqchip/irq-gic-v3-its.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 403f5753e1ed..f00c8ddd3798 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -719,7 +719,7 @@ static struct its_vpe *its_build_vmapti_cmd(struct its_node *its, { u32 db; - if (desc->its_vmapti_cmd.db_enabled) + if (!is_v4_1(its) && desc->its_vmapti_cmd.db_enabled) db = desc->its_vmapti_cmd.vpe->vpe_db_lpi; else db = 1023; @@ -742,7 +742,7 @@ static struct its_vpe *its_build_vmovi_cmd(struct its_node *its, { u32 db; - if (desc->its_vmovi_cmd.db_enabled) + if (!is_v4_1(its) && desc->its_vmovi_cmd.db_enabled) db = desc->its_vmovi_cmd.vpe->vpe_db_lpi; else db = 1023; @@ -1353,6 +1353,13 @@ static void its_vlpi_set_doorbell(struct irq_data *d, bool enable) u32 event = its_get_event_id(d); struct its_vlpi_map *map; + /* + * GICv4.1 does away with the per-LPI nonsense, nothing to do + * here. + */ + if (is_v4_1(its_dev->its)) + return; + map = dev_event_to_vlpi_map(its_dev, event); if (map->db_enabled == enable) -- 2.20.1