Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7496374ybl; Tue, 24 Dec 2019 03:42:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyGKS6x2kiSUH5gDq7ZSSJMMR/6oji9QexpNQSoWbUc/quxB4/NFTLAZvy6widAVNuhbJ1W X-Received: by 2002:a05:6830:3c2:: with SMTP id p2mr15844767otc.213.1577187762471; Tue, 24 Dec 2019 03:42:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577187762; cv=none; d=google.com; s=arc-20160816; b=XUr7HSRVkQuRs53NM3OkveCq3tWu01KWUy0T8DBURuHKUYWRpowaV/fzjHIPaofvlp j0H3cBsrNLqaDUN6UjOREO4L7T/VgE8a2fuZfpFqKwjdkUn97jlO04FtTHwAC0y7Vorj 4GFXXanKqlSKMJwys8yXkWQ65IpAvwFR/e9gktDKGz8YqfAkVcIlaNI9TROx2T6EMO8C Wrztr18I4m3htex2fIE+CbgMutMHoUGXe+Lyi3lxIdMzaygXQrNkO/Vsg4Tfqf6FzDi9 1xwVtvw8ttas4JGDmyC51N9QtEWeH4sK0Lu75eB0IrXOWjHZntVs4HTc594lPKfEkGLE ybgg== 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=9WKNUnOXSA2V/Sbo3nwMgG1qk53EGAlkaqThhz1Bp3k=; b=SzzKnUkC1WwKLem7TIm64Dp5v/z1SGAUDFwuOYHaMprzMzMGCYwhryv/ym25Mk7jHG lWhkw6hwAr8oe9lrETUqj2bfyyfEvuxyw8SpZyNWskmIP7+LKfNabczHF0/X+uU5qArl 8gE2i5Y55nB4YQJM9yF705sG/hEr1Alyco6RnhG7qOKuuUbKavZDQzWEAd3OXxSEqjvE J4Ek3W05FRxeQa8VrInfCTVxaSoQQDNQzgeyvQ/ZRcgBA4TuMzg+Zxb5JNOVU+PvpCt6 7pjDOGdqaDpGAEMQDTT2JL7xIje8+x4Xm8EIca6pbl9/oL2XQWrrl8aqbsZcQhaNb5Y3 sP1w== 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 j70si11148031oib.219.2019.12.24.03.42.30; Tue, 24 Dec 2019 03:42:42 -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 S1727076AbfLXLlb (ORCPT + 99 others); Tue, 24 Dec 2019 06:41:31 -0500 Received: from inca-roads.misterjones.org ([213.251.177.50]:44172 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbfLXLla (ORCPT ); Tue, 24 Dec 2019 06:41:30 -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 1iji65-000169-Jr; Tue, 24 Dec 2019 12:11:29 +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 20/32] irqchip/gic-v4.1: Plumb mask/unmask SGI callbacks Date: Tue, 24 Dec 2019 11:10:43 +0000 Message-Id: <20191224111055.11836-21-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 Implement mask/unmask for virtual SGIs by calling into the configuration helper. Signed-off-by: Marc Zyngier --- drivers/irqchip/irq-gic-v3-its.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 9ca2ad6000d8..c13c889553c5 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -3809,6 +3809,22 @@ static void its_configure_sgi(struct irq_data *d, bool clear) its_send_single_vcommand(find_4_1_its(), its_build_vsgi_cmd, &desc); } +static void its_sgi_mask_irq(struct irq_data *d) +{ + struct its_vpe *vpe = irq_data_get_irq_chip_data(d); + + vpe->sgi_config[d->hwirq].enabled = false; + its_configure_sgi(d, false); +} + +static void its_sgi_unmask_irq(struct irq_data *d) +{ + struct its_vpe *vpe = irq_data_get_irq_chip_data(d); + + vpe->sgi_config[d->hwirq].enabled = true; + its_configure_sgi(d, false); +} + static int its_sgi_set_affinity(struct irq_data *d, const struct cpumask *mask_val, bool force) @@ -3818,6 +3834,8 @@ static int its_sgi_set_affinity(struct irq_data *d, static struct irq_chip its_sgi_irq_chip = { .name = "GICv4.1-sgi", + .irq_mask = its_sgi_mask_irq, + .irq_unmask = its_sgi_unmask_irq, .irq_set_affinity = its_sgi_set_affinity, }; -- 2.20.1