Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1788433ybb; Sun, 29 Mar 2020 13:26:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvpbXlR+RntFQXXAZqoKSmJOlxzQXSNANBA+VCGTcadSEiD+ALcCDH9XJM4/xmBKSDLsmUl X-Received: by 2002:a05:6830:22c3:: with SMTP id q3mr7122674otc.152.1585513615710; Sun, 29 Mar 2020 13:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585513615; cv=none; d=google.com; s=arc-20160816; b=cCMPU8xR1sILSzxBCZ+JaDNMbzG98cUx0Jw9XC3MXciAczQKQkAe4NLICQ5Az7VIHb DDOC+BdQdiDC2UJHLhZoF2KD6zATFtakqtVi/Khi3iLMQBzXnR4CVeEJ0wkCdhgfaBSm f/vb1flt502ru4vM3DHBs30SO4jWgCFaIpG+/l+70maUS3cw1zYi+k+UVA1gCzgv2mDM h3Bej6TNN/Nf0P3gP5lVEaUGzqEk6jbWhKGPLT3U9nqovtvmXIdBpRisT83dSHBvvmmH 0eLcdcBepuy23aSMh+M2Im4A/sNYRoxwjmrSTxVTsFbBkwMhHL5r/Fpf8WJSDBTIKXrj 1rdw== 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=08C5JKm2wuh9v/Onku53pWMYip/1KRaJSsyCIiLFwYo=; b=XD1eE/gqLFpZyXy8zOjSxwvCj9kIQpFPjjHcbjUFZ4CaNKlvkxcZLNunW8DVaGAFvn 3ptqfhyJ3Bxa8lR7CX4OeczuKnD0cdQkQ/IIvX0qg2/8iWuxrblm91T/1GIe139hKP4j efxpwL0DER7Yyl5GTQM+JiCnM0BXDvoqHaYdhOOMXv0AIb2kA3ipuYdoGL6t+D6kTieo jq/yktJf5g8/JrYxbLh+dZ+PH/b00mtCA1Y9X7kIzl8s5DC4ln3ZrM4lVgTa8vuyNjTn 4WKq+O04aViksTyKw2xvmYzEUQ9yswB2HxyJl0GmySFFeDWTk7FtPI4AxR9GPssBkfi8 JCXw== 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 u136si5299532oif.197.2020.03.29.13.26.42; Sun, 29 Mar 2020 13:26:55 -0700 (PDT) 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 S1728835AbgC2U0T (ORCPT + 99 others); Sun, 29 Mar 2020 16:26:19 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56924 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728725AbgC2U0O (ORCPT ); Sun, 29 Mar 2020 16:26:14 -0400 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 1jIeVT-0001Jx-Qc; Sun, 29 Mar 2020 22:26:07 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 79EDA1C0450; Sun, 29 Mar 2020 22:26:07 +0200 (CEST) Date: Sun, 29 Mar 2020 20:26:07 -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: Plumb set_vcpu_affinity SGI callbacks Cc: Marc Zyngier , Zenghui Yu , Eric Auger , x86 , LKML In-Reply-To: <20200304203330.4967-13-maz@kernel.org> References: <20200304203330.4967-13-maz@kernel.org> MIME-Version: 1.0 Message-ID: <158551356712.28353.4186925292743494121.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: 05d32df13c6b3c0850b68928048536e9a736d520 Gitweb: https://git.kernel.org/tip/05d32df13c6b3c0850b68928048536e9a736d520 Author: Marc Zyngier AuthorDate: Wed, 04 Mar 2020 20:33:19 Committer: Marc Zyngier CommitterDate: Tue, 24 Mar 2020 12:15:51 irqchip/gic-v4.1: Plumb set_vcpu_affinity SGI callbacks Just like for vLPIs, there is some configuration information that cannot be directly communicated through the normal irqchip API, and we have to use our good old friend set_vcpu_affinity as a side-band communication mechanism. This is used to configure group and priority for a given vSGI. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20200304203330.4967-13-maz@kernel.org --- drivers/irqchip/irq-gic-v3-its.c | 18 ++++++++++++++++++ include/linux/irqchip/arm-gic-v4.h | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index c614f0c..aae5332 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -4047,6 +4047,23 @@ out: return 0; } +static int its_sgi_set_vcpu_affinity(struct irq_data *d, void *vcpu_info) +{ + struct its_vpe *vpe = irq_data_get_irq_chip_data(d); + struct its_cmd_info *info = vcpu_info; + + switch (info->cmd_type) { + case PROP_UPDATE_VSGI: + vpe->sgi_config[d->hwirq].priority = info->priority; + vpe->sgi_config[d->hwirq].group = info->group; + its_configure_sgi(d, false); + return 0; + + default: + return -EINVAL; + } +} + static struct irq_chip its_sgi_irq_chip = { .name = "GICv4.1-sgi", .irq_mask = its_sgi_mask_irq, @@ -4054,6 +4071,7 @@ static struct irq_chip its_sgi_irq_chip = { .irq_set_affinity = its_sgi_set_affinity, .irq_set_irqchip_state = its_sgi_set_irqchip_state, .irq_get_irqchip_state = its_sgi_get_irqchip_state, + .irq_set_vcpu_affinity = its_sgi_set_vcpu_affinity, }; static int its_sgi_irq_domain_alloc(struct irq_domain *domain, diff --git a/include/linux/irqchip/arm-gic-v4.h b/include/linux/irqchip/arm-gic-v4.h index 44e8c19..1b34100 100644 --- a/include/linux/irqchip/arm-gic-v4.h +++ b/include/linux/irqchip/arm-gic-v4.h @@ -103,6 +103,7 @@ enum its_vcpu_info_cmd_type { SCHEDULE_VPE, DESCHEDULE_VPE, INVALL_VPE, + PROP_UPDATE_VSGI, }; struct its_cmd_info { @@ -115,6 +116,10 @@ struct its_cmd_info { bool g0en; bool g1en; }; + struct { + u8 priority; + bool group; + }; }; };