linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: marc.zyngier@arm.com, tglx@linutronix.de, jason@lakedaemon.net,
	catalin.marinas@arm.com, will.deacon@arm.com,
	jnair@caviumnetworks.com, Robert.Richter@cavium.com,
	Jan.Glauber@cavium.com, gklkml16@gmail.com
Subject: [PATCH] irqchip/gic-v3-its: Flush GICR caching for a cross node collection move of an irq
Date: Wed, 20 Dec 2017 14:45:44 +0530	[thread overview]
Message-ID: <20171220091544.4467-1-ganapatrao.kulkarni@cavium.com> (raw)

When an interrupt is moved, it is possible that an implementation that
supports caching might still have cached data for a previous
(no longer valid) mapping of the interrupt. In particular, in a distributed
GIC implementation like multi-socket SoC platfroms. Hence it is necessary
to flush cached entries after cross node collection migration.

Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
---
 drivers/irqchip/irq-gic-v3-its.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 4039e64..ea849a1 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1119,6 +1119,12 @@ static int its_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
 	if (cpu != its_dev->event_map.col_map[id]) {
 		target_col = &its_dev->its->collections[cpu];
 		its_send_movi(its_dev, target_col, id);
+		/* Issue INV for cross node collection move on
+		 * multi socket systems.
+		 */
+		if (cpu_to_node(cpu) !=
+				cpu_to_node(its_dev->event_map.col_map[id]))
+			its_send_inv(its_dev, id);
 		its_dev->event_map.col_map[id] = cpu;
 		irq_data_update_effective_affinity(d, cpumask_of(cpu));
 	}
-- 
2.9.4

             reply	other threads:[~2017-12-20  9:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20  9:15 Ganapatrao Kulkarni [this message]
2017-12-20  9:26 ` [PATCH] irqchip/gic-v3-its: Flush GICR caching for a cross node collection move of an irq Marc Zyngier
2017-12-20  9:34   ` Ganapatrao Kulkarni
2017-12-20  9:49     ` Marc Zyngier
2017-12-20 13:12     ` Marc Zyngier
2017-12-21  6:49       ` Ganapatrao Kulkarni

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=20171220091544.4467-1-ganapatrao.kulkarni@cavium.com \
    --to=ganapatrao.kulkarni@cavium.com \
    --cc=Jan.Glauber@cavium.com \
    --cc=Robert.Richter@cavium.com \
    --cc=catalin.marinas@arm.com \
    --cc=gklkml16@gmail.com \
    --cc=jason@lakedaemon.net \
    --cc=jnair@caviumnetworks.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).