From: Marc Zyngier <marc.zyngier@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Shanker Donthineni <shankerd@codeaurora.org>,
Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
Christoffer Dall <cdall@linaro.org>,
Eric Auger <eric.auger@redhat.com>
Subject: [PATCH 07/10] irqchip/gic-v3-its: Make its_send_vmapp operate on a single ITS
Date: Tue, 10 Oct 2017 13:51:34 +0100 [thread overview]
Message-ID: <20171010125137.9464-8-marc.zyngier@arm.com> (raw)
In-Reply-To: <20171010125137.9464-1-marc.zyngier@arm.com>
Currently, its_send_vmapp operates on all ITSs. As we're about
to try and limit the amount of commands we send to ITSs that are
not involved in dealing with a given VM, let's redefine that
primitive so that it takes a target ITS as a parameter.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/irq-gic-v3-its.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 202f43b30bd3..4583af37785b 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -918,21 +918,16 @@ static void its_send_vmovi(struct its_device *dev, u32 id)
its_send_single_vcommand(dev->its, its_build_vmovi_cmd, &desc);
}
-static void its_send_vmapp(struct its_vpe *vpe, bool valid)
+static void its_send_vmapp(struct its_node *its,
+ struct its_vpe *vpe, bool valid)
{
struct its_cmd_desc desc;
- struct its_node *its;
desc.its_vmapp_cmd.vpe = vpe;
desc.its_vmapp_cmd.valid = valid;
+ desc.its_vmapp_cmd.col = &its->collections[vpe->col_idx];
- list_for_each_entry(its, &its_nodes, entry) {
- if (!its->is_v4)
- continue;
-
- desc.its_vmapp_cmd.col = &its->collections[vpe->col_idx];
- its_send_single_vcommand(its, its_build_vmapp_cmd, &desc);
- }
+ its_send_single_vcommand(its, its_build_vmapp_cmd, &desc);
}
static void its_send_vmovp(struct its_vpe *vpe)
@@ -2715,12 +2710,12 @@ static void its_vpe_irq_domain_activate(struct irq_domain *domain,
/* Map the VPE to the first possible CPU */
vpe->col_idx = cpumask_first(cpu_online_mask);
- its_send_vmapp(vpe, true);
list_for_each_entry(its, &its_nodes, entry) {
if (!its->is_v4)
continue;
+ its_send_vmapp(its, vpe, true);
its_send_vinvall(its, vpe);
}
}
@@ -2729,8 +2724,14 @@ static void its_vpe_irq_domain_deactivate(struct irq_domain *domain,
struct irq_data *d)
{
struct its_vpe *vpe = irq_data_get_irq_chip_data(d);
+ struct its_node *its;
+
+ list_for_each_entry(its, &its_nodes, entry) {
+ if (!its->is_v4)
+ continue;
- its_send_vmapp(vpe, false);
+ its_send_vmapp(its, vpe, false);
+ }
}
static const struct irq_domain_ops its_vpe_domain_ops = {
--
2.11.0
next prev parent reply other threads:[~2017-10-10 12:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 12:51 [PATCH 00/10] irqchip: Proposed GICv4 updates for 4.15 Marc Zyngier
2017-10-10 12:51 ` [PATCH 01/10] irqchip/gic-v3-its: Add post-mortem info on command timeout Marc Zyngier
2017-10-10 12:51 ` [PATCH 02/10] irqchip/gic-v3-its: Pass its_node pointer to each command builder Marc Zyngier
2017-10-10 12:51 ` [PATCH 03/10] irqchip/gic-v3-its: Workaround HiSilicon Hip07 redistributor addressing Marc Zyngier
2017-10-10 12:51 ` [PATCH 04/10] irqchip/gic-v3-its: Track per-ITS list number Marc Zyngier
2017-10-10 12:51 ` [PATCH 05/10] irqchip/gic-v3-its: Make GICv4_ITS_LIST_MAX globally available Marc Zyngier
2017-10-10 12:51 ` [PATCH 06/10] irqchip/gic-v3-its: Make its_send_vinvall operate on a single ITS Marc Zyngier
2017-10-10 12:51 ` Marc Zyngier [this message]
2017-10-10 12:51 ` [PATCH 08/10] irqchip/gic-v3-its: Limit scope of VPE mapping to be per ITS Marc Zyngier
2017-10-10 12:51 ` [PATCH 09/10] irqchip/gic-v3-its: Only send VINVALL to a single ITS Marc Zyngier
2017-10-10 12:51 ` [PATCH 10/10] irqchip/gic-v4: Make the doorbells managed affinity interrupts Marc Zyngier
2017-10-12 9:22 ` Thomas Gleixner
2017-10-12 14:38 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171010125137.9464-8-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=cdall@linaro.org \
--cc=eric.auger@redhat.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shankerd@codeaurora.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®