Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp974867ybl; Fri, 24 Jan 2020 13:01:53 -0800 (PST) X-Google-Smtp-Source: APXvYqybW3bYZ1XZLnlMe2Jri5O58Q/+YBBDzaQv/qwj3q90CCy7ub1N90fzJuR/WcyEEeBid/uo X-Received: by 2002:a9d:518b:: with SMTP id y11mr3962188otg.349.1579899713786; Fri, 24 Jan 2020 13:01:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579899713; cv=none; d=google.com; s=arc-20160816; b=uvz+LNzfbd7JlYYlzFEsYK7KlUcOgfSNXAHOFhOjHBrDqin7EptA6I7/cwFaDSPw5s mGeBRS2N3SDq535lk59sQHs22inS7kxFSDmaMRFlkk7gApr/zMSf2sIIMVPmCG26rxIf rQKQWlYdyAXWP9I959J4GKhdTQ8p3aRW1yuS5OY3A5U8oHar/igjEYnLKX8V2cTsULBB 3NjsV3EtFOmQC19iDMquda5hnRzNqS2LVhY10kkWeCqyceX0cySDQKSct8hAuAzwU0aG ZvT/GVvNeOD+erXjUyy7A7ufuqxJjdefbdDWcDZ37b9SizvLBZlsFqDDm++tYY2S4EW4 RCbQ== 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=ZdH6r3k1mEuk64nEprGaNJ2D1yGqFcyId+JMANZ+lkc=; b=tZQQUhYOUOwb8dBhxIhqVhfWU87CdS02VXoH0k3TaePiKSudhF4/L03XiVo90ONx2e XONtsW/A3/Wfj9hfsWglszu6IXx5PkX5F7Tx6QA5AdC3DGClrsF73vmghE1JB8vN9LZ6 zCve01pj2p1rcXUhcYbIAHlNjMuZHmde70PBQ5Ex/uYT/UsK5R/PBPYmAsuUWSOA/cYJ y7YUh/IQ6HbwQsDyedQDO1xzlCEtz/5qCamidm5OT+oRRT6P86x6dH8+CJVlZZznW2ku gi1Qwads1B/eHsESUniiFc6wAJSwts5SIKrB9V2ial5YSF7zUSFIQGh3pxZeDIP7dqun v6QQ== 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 l14si3480133otk.225.2020.01.24.13.01.41; Fri, 24 Jan 2020 13:01: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392216AbgAXTNA (ORCPT + 99 others); Fri, 24 Jan 2020 14:13:00 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:42994 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391879AbgAXTLN (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 1iv4MH-0007a9-3H; Fri, 24 Jan 2020 20:11:09 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 27E241C1A60; Fri, 24 Jan 2020 20:11:08 +0100 (CET) Date: Fri, 24 Jan 2020 19:11: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 skeletal VPE irqchip Cc: Marc Zyngier , Zenghui Yu , x86 , LKML In-Reply-To: <20191224111055.11836-10-maz@kernel.org> References: <20191224111055.11836-10-maz@kernel.org> MIME-Version: 1.0 Message-ID: <157989306791.396.8970880490139867084.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: 29c647f3b5ae1a20221d477442dcdf058cea4a21 Gitweb: https://git.kernel.org/tip/29c647f3b5ae1a20221d477442dcdf058cea4a21 Author: Marc Zyngier AuthorDate: Tue, 24 Dec 2019 11:10:32 Committer: Marc Zyngier CommitterDate: Wed, 22 Jan 2020 14:22:20 irqchip/gic-v4.1: Plumb skeletal VPE irqchip Just like for GICv4.0, each VPE has its own doorbell interrupt, and thus an irqchip that manages them. Since the doorbell management is quite different on GICv4.1, let's introduce an almost empty irqchip the will get populated over the next new patches. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-10-maz@kernel.org --- drivers/irqchip/irq-gic-v3-its.c | 32 ++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 53a7663..2b477e2 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -3553,6 +3553,32 @@ static struct irq_chip its_vpe_irq_chip = { .irq_set_vcpu_affinity = its_vpe_set_vcpu_affinity, }; +static int its_vpe_4_1_set_vcpu_affinity(struct irq_data *d, void *vcpu_info) +{ + struct its_cmd_info *info = vcpu_info; + + switch (info->cmd_type) { + case SCHEDULE_VPE: + return 0; + + case DESCHEDULE_VPE: + return 0; + + case INVALL_VPE: + return 0; + + default: + return -EINVAL; + } +} + +static struct irq_chip its_vpe_4_1_irq_chip = { + .name = "GICv4.1-vpe", + .irq_eoi = irq_chip_eoi_parent, + .irq_set_affinity = its_vpe_set_affinity, + .irq_set_vcpu_affinity = its_vpe_4_1_set_vcpu_affinity, +}; + static int its_vpe_id_alloc(void) { return ida_simple_get(&its_vpeid_ida, 0, ITS_MAX_VPEID, GFP_KERNEL); @@ -3633,6 +3659,7 @@ static void its_vpe_irq_domain_free(struct irq_domain *domain, static int its_vpe_irq_domain_alloc(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs, void *args) { + struct irq_chip *irqchip = &its_vpe_irq_chip; struct its_vm *vm = args; unsigned long *bitmap; struct page *vprop_page; @@ -3660,6 +3687,9 @@ static int its_vpe_irq_domain_alloc(struct irq_domain *domain, unsigned int virq vm->nr_db_lpis = nr_ids; vm->vprop_page = vprop_page; + if (gic_rdists->has_rvpeid) + irqchip = &its_vpe_4_1_irq_chip; + for (i = 0; i < nr_irqs; i++) { vm->vpes[i]->vpe_db_lpi = base + i; err = its_vpe_init(vm->vpes[i]); @@ -3670,7 +3700,7 @@ static int its_vpe_irq_domain_alloc(struct irq_domain *domain, unsigned int virq if (err) break; irq_domain_set_hwirq_and_chip(domain, virq + i, i, - &its_vpe_irq_chip, vm->vpes[i]); + irqchip, vm->vpes[i]); set_bit(i, bitmap); }