* [PATCH v2 01/12] genirq: Restrict effective affinity to interrupts actually using it
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 8:57 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 02/12] genirq/proc: Use the the accessor to report the effective affinity Marc Zyngier
` (10 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
Just because CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK is selected
doesn't mean that all the interrupts are using the effective
affinity mask. For a number of them, this mask is likely to
be empty.
In order to deal with this, let's restrict the use of the
effective affinity mask to these interrupts that have a non empty
effective affinity.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
include/linux/irq.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index d2d543794093..dcfac6c8ba18 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -781,7 +781,10 @@ static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
static inline
struct cpumask *irq_data_get_effective_affinity_mask(struct irq_data *d)
{
- return d->common->effective_affinity;
+ if (!cpumask_empty(d->common->effective_affinity))
+ return d->common->effective_affinity;
+
+ return d->common->affinity;
}
static inline void irq_data_update_effective_affinity(struct irq_data *d,
const struct cpumask *m)
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] genirq: Restrict effective affinity to interrupts actually using it
2017-08-18 8:39 ` [PATCH v2 01/12] genirq: Restrict effective affinity to interrupts actually using it Marc Zyngier
@ 2017-08-18 8:57 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 8:57 UTC (permalink / raw)
To: linux-tip-commits
Cc: paul.burton, james.hogan, mingo, hpa, matt.redfearn,
gregory.clement, linux-kernel, marc.zyngier, f.fainelli, jason,
sebastian.hesselbarth, tglx, cernekee, chris, jcmvbkbc, andrew,
xuwei5
Commit-ID: 74def747bcd09692bdbf8c6a15350795b0f11ca8
Gitweb: http://git.kernel.org/tip/74def747bcd09692bdbf8c6a15350795b0f11ca8
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:14 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:39 +0200
genirq: Restrict effective affinity to interrupts actually using it
Just because CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK is selected
doesn't mean that all the interrupts are using the effective
affinity mask. For a number of them, this mask is likely to
be empty.
In order to deal with this, let's restrict the use of the
effective affinity mask to these interrupts that have a non empty
effective affinity.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-2-marc.zyngier@arm.com
---
include/linux/irq.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index d2d54379..dcfac6c 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -781,7 +781,10 @@ static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
static inline
struct cpumask *irq_data_get_effective_affinity_mask(struct irq_data *d)
{
- return d->common->effective_affinity;
+ if (!cpumask_empty(d->common->effective_affinity))
+ return d->common->effective_affinity;
+
+ return d->common->affinity;
}
static inline void irq_data_update_effective_affinity(struct irq_data *d,
const struct cpumask *m)
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 02/12] genirq/proc: Use the the accessor to report the effective affinity
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 01/12] genirq: Restrict effective affinity to interrupts actually using it Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 8:58 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 03/12] irqchip/gic: Report that effective affinity is a single target Marc Zyngier
` (9 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
If CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK is defined, but that the
interrupt is not single target, the effective affinity reported in
/proc/irq/x/effective_affinity will be empty, which is not the truth.
Instead, use the accessor to report the affinity, which will pick
the right mask.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
kernel/irq/proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 7f9642a1e267..0534781724d0 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -61,7 +61,7 @@ static int show_irq_affinity(int type, struct seq_file *m)
case EFFECTIVE:
case EFFECTIVE_LIST:
#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
- mask = desc->irq_common_data.effective_affinity;
+ mask = irq_data_get_effective_affinity_mask(&desc->irq_data);
break;
#else
return -EINVAL;
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] genirq/proc: Use the the accessor to report the effective affinity
2017-08-18 8:39 ` [PATCH v2 02/12] genirq/proc: Use the the accessor to report the effective affinity Marc Zyngier
@ 2017-08-18 8:58 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 8:58 UTC (permalink / raw)
To: linux-tip-commits
Cc: xuwei5, hpa, sebastian.hesselbarth, paul.burton, jason, cernekee,
chris, matt.redfearn, f.fainelli, marc.zyngier, linux-kernel,
jcmvbkbc, mingo, andrew, gregory.clement, james.hogan, tglx
Commit-ID: 6bc6d4abd22e890cf69a05554fa8f8f83f351515
Gitweb: http://git.kernel.org/tip/6bc6d4abd22e890cf69a05554fa8f8f83f351515
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:15 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:39 +0200
genirq/proc: Use the the accessor to report the effective affinity
If CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK is defined, but that the
interrupt is not single target, the effective affinity reported in
/proc/irq/x/effective_affinity will be empty, which is not the truth.
Instead, use the accessor to report the affinity, which will pick
the right mask.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-3-marc.zyngier@arm.com
---
kernel/irq/proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 7f9642a..0534781 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -61,7 +61,7 @@ static int show_irq_affinity(int type, struct seq_file *m)
case EFFECTIVE:
case EFFECTIVE_LIST:
#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
- mask = desc->irq_common_data.effective_affinity;
+ mask = irq_data_get_effective_affinity_mask(&desc->irq_data);
break;
#else
return -EINVAL;
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 03/12] irqchip/gic: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 01/12] genirq: Restrict effective affinity to interrupts actually using it Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 02/12] genirq/proc: Use the the accessor to report the effective affinity Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 8:58 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 04/12] irqchip/gic-v3: " Marc Zyngier
` (8 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The GIC driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-gic.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index f1fd5f44d1d4..586929d072ca 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -7,6 +7,7 @@ config ARM_GIC
select IRQ_DOMAIN
select IRQ_DOMAIN_HIERARCHY
select MULTI_IRQ_HANDLER
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config ARM_GIC_PM
bool
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 1b1df4f770bd..20dd2ba3d603 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -344,6 +344,8 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
writel_relaxed(val | bit, reg);
gic_unlock_irqrestore(flags);
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return IRQ_SET_MASK_OK_DONE;
}
#endif
@@ -966,6 +968,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_domain_set_info(d, irq, hw, &gic->chip, d->host_data,
handle_fasteoi_irq, NULL, NULL);
irq_set_probe(irq);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
}
return 0;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/gic: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 03/12] irqchip/gic: Report that effective affinity is a single target Marc Zyngier
@ 2017-08-18 8:58 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 8:58 UTC (permalink / raw)
To: linux-tip-commits
Cc: xuwei5, matt.redfearn, linux-kernel, cernekee, paul.burton, mingo,
hpa, andrew, f.fainelli, jcmvbkbc, marc.zyngier, jason,
gregory.clement, james.hogan, tglx, chris, sebastian.hesselbarth
Commit-ID: 0c9e498286ef9762e0ae62fc8a02b4739796970f
Gitweb: http://git.kernel.org/tip/0c9e498286ef9762e0ae62fc8a02b4739796970f
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:16 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:40 +0200
irqchip/gic: Report that effective affinity is a single target
The GIC driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-4-marc.zyngier@arm.com
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-gic.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index f1fd5f4..586929d 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -7,6 +7,7 @@ config ARM_GIC
select IRQ_DOMAIN
select IRQ_DOMAIN_HIERARCHY
select MULTI_IRQ_HANDLER
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config ARM_GIC_PM
bool
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 1b1df4f..20dd2ba 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -344,6 +344,8 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
writel_relaxed(val | bit, reg);
gic_unlock_irqrestore(flags);
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return IRQ_SET_MASK_OK_DONE;
}
#endif
@@ -966,6 +968,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_domain_set_info(d, irq, hw, &gic->chip, d->host_data,
handle_fasteoi_irq, NULL, NULL);
irq_set_probe(irq);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
}
return 0;
}
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 04/12] irqchip/gic-v3: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
` (2 preceding siblings ...)
2017-08-18 8:39 ` [PATCH v2 03/12] irqchip/gic: Report that effective affinity is a single target Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 8:58 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 05/12] irqchip/gic-v3-its: " Marc Zyngier
` (7 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The GICv3 driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-gic-v3.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 586929d072ca..ce99c1ee6c7d 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -35,6 +35,7 @@ config ARM_GIC_V3
select MULTI_IRQ_HANDLER
select IRQ_DOMAIN_HIERARCHY
select PARTITION_PERCPU
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config ARM_GIC_V3_ITS
bool
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index dbffb7ab6203..511c290c4a26 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -670,6 +670,8 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
else
gic_dist_wait_for_rwp();
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return IRQ_SET_MASK_OK_DONE;
}
#else
@@ -768,6 +770,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_domain_set_info(d, irq, hw, chip, d->host_data,
handle_fasteoi_irq, NULL, NULL);
irq_set_probe(irq);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
}
/* LPIs */
if (hw >= 8192 && hw < GIC_ID_NR) {
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/gic-v3: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 04/12] irqchip/gic-v3: " Marc Zyngier
@ 2017-08-18 8:58 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 8:58 UTC (permalink / raw)
To: linux-tip-commits
Cc: cernekee, linux-kernel, mingo, sebastian.hesselbarth,
gregory.clement, jcmvbkbc, hpa, paul.burton, matt.redfearn,
xuwei5, chris, tglx, marc.zyngier, andrew, jason, f.fainelli,
james.hogan
Commit-ID: 956ae91ae8761f2cd8cd7b8d6cb90fd4d0b8a596
Gitweb: http://git.kernel.org/tip/956ae91ae8761f2cd8cd7b8d6cb90fd4d0b8a596
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:17 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:40 +0200
irqchip/gic-v3: Report that effective affinity is a single target
The GICv3 driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-5-marc.zyngier@arm.com
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-gic-v3.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 586929d..ce99c1e 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -35,6 +35,7 @@ config ARM_GIC_V3
select MULTI_IRQ_HANDLER
select IRQ_DOMAIN_HIERARCHY
select PARTITION_PERCPU
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config ARM_GIC_V3_ITS
bool
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index dbffb7a..511c290 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -670,6 +670,8 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
else
gic_dist_wait_for_rwp();
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return IRQ_SET_MASK_OK_DONE;
}
#else
@@ -768,6 +770,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_domain_set_info(d, irq, hw, chip, d->host_data,
handle_fasteoi_irq, NULL, NULL);
irq_set_probe(irq);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
}
/* LPIs */
if (hw >= 8192 && hw < GIC_ID_NR) {
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 05/12] irqchip/gic-v3-its: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
` (3 preceding siblings ...)
2017-08-18 8:39 ` [PATCH v2 04/12] irqchip/gic-v3: " Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 8:59 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 06/12] irqchip/armada-370-xp: " Marc Zyngier
` (6 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The GICv3 ITS driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/irq-gic-v3-its.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 68932873eebc..22e228500357 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -649,6 +649,7 @@ static int its_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
target_col = &its_dev->its->collections[cpu];
its_send_movi(its_dev, target_col, id);
its_dev->event_map.col_map[id] = cpu;
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
}
return IRQ_SET_MASK_OK_DONE;
@@ -1481,6 +1482,7 @@ static int its_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
irq_domain_set_hwirq_and_chip(domain, virq + i,
hwirq, &its_irq_chip, its_dev);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq + i)));
pr_debug("ID:%d pID:%d vID:%d\n",
(int)(hwirq - its_dev->event_map.lpi_base),
(int) hwirq, virq + i);
@@ -1495,13 +1497,16 @@ static void its_irq_domain_activate(struct irq_domain *domain,
struct its_device *its_dev = irq_data_get_irq_chip_data(d);
u32 event = its_get_event_id(d);
const struct cpumask *cpu_mask = cpu_online_mask;
+ int cpu;
/* get the cpu_mask of local node */
if (its_dev->its->numa_node >= 0)
cpu_mask = cpumask_of_node(its_dev->its->numa_node);
/* Bind the LPI to the first possible CPU */
- its_dev->event_map.col_map[event] = cpumask_first(cpu_mask);
+ cpu = cpumask_first(cpu_mask);
+ its_dev->event_map.col_map[event] = cpu;
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
/* Map the GIC IRQ and event to the device */
its_send_mapti(its_dev, d->hwirq, event);
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/gic-v3-its: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 05/12] irqchip/gic-v3-its: " Marc Zyngier
@ 2017-08-18 8:59 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 8:59 UTC (permalink / raw)
To: linux-tip-commits
Cc: gregory.clement, james.hogan, paul.burton, andrew, cernekee,
linux-kernel, jason, chris, f.fainelli, sebastian.hesselbarth,
mingo, jcmvbkbc, xuwei5, tglx, hpa, marc.zyngier, matt.redfearn
Commit-ID: 0d224d3508f5ba67438b921fc37cf179c9652f20
Gitweb: http://git.kernel.org/tip/0d224d3508f5ba67438b921fc37cf179c9652f20
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:18 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:40 +0200
irqchip/gic-v3-its: Report that effective affinity is a single target
The GICv3 ITS driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-6-marc.zyngier@arm.com
---
drivers/irqchip/irq-gic-v3-its.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 6893287..22e2285 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -649,6 +649,7 @@ static int its_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
target_col = &its_dev->its->collections[cpu];
its_send_movi(its_dev, target_col, id);
its_dev->event_map.col_map[id] = cpu;
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
}
return IRQ_SET_MASK_OK_DONE;
@@ -1481,6 +1482,7 @@ static int its_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
irq_domain_set_hwirq_and_chip(domain, virq + i,
hwirq, &its_irq_chip, its_dev);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq + i)));
pr_debug("ID:%d pID:%d vID:%d\n",
(int)(hwirq - its_dev->event_map.lpi_base),
(int) hwirq, virq + i);
@@ -1495,13 +1497,16 @@ static void its_irq_domain_activate(struct irq_domain *domain,
struct its_device *its_dev = irq_data_get_irq_chip_data(d);
u32 event = its_get_event_id(d);
const struct cpumask *cpu_mask = cpu_online_mask;
+ int cpu;
/* get the cpu_mask of local node */
if (its_dev->its->numa_node >= 0)
cpu_mask = cpumask_of_node(its_dev->its->numa_node);
/* Bind the LPI to the first possible CPU */
- its_dev->event_map.col_map[event] = cpumask_first(cpu_mask);
+ cpu = cpumask_first(cpu_mask);
+ its_dev->event_map.col_map[event] = cpu;
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
/* Map the GIC IRQ and event to the device */
its_send_mapti(its_dev, d->hwirq, event);
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 06/12] irqchip/armada-370-xp: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
` (4 preceding siblings ...)
2017-08-18 8:39 ` [PATCH v2 05/12] irqchip/gic-v3-its: " Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 8:59 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 07/12] irqchip/bcm-6345-l1: " Marc Zyngier
` (5 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The Armada 370 XP driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-armada-370-xp.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index ce99c1ee6c7d..cd688777553c 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -66,6 +66,7 @@ config ARMADA_370_XP_IRQ
bool
select GENERIC_IRQ_CHIP
select PCI_MSI if PCI
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config ALPINE_MSI
bool
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index b207b2c3aa55..eb815676c088 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -330,6 +330,8 @@ static int armada_xp_set_affinity(struct irq_data *d,
writel(reg, main_int_base + ARMADA_370_XP_INT_SOURCE_CTL(hwirq));
raw_spin_unlock(&irq_controller_lock);
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return IRQ_SET_MASK_OK;
}
#endif
@@ -363,6 +365,7 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
} else {
irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
handle_level_irq);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq)));
}
irq_set_probe(virq);
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/armada-370-xp: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 06/12] irqchip/armada-370-xp: " Marc Zyngier
@ 2017-08-18 8:59 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 8:59 UTC (permalink / raw)
To: linux-tip-commits
Cc: f.fainelli, chris, sebastian.hesselbarth, matt.redfearn, mingo,
gregory.clement, james.hogan, cernekee, hpa, jcmvbkbc, xuwei5,
linux-kernel, tglx, andrew, paul.burton, marc.zyngier, jason
Commit-ID: e31793a3e51137a910b827b18e532d6c1fa54514
Gitweb: http://git.kernel.org/tip/e31793a3e51137a910b827b18e532d6c1fa54514
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:19 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:41 +0200
irqchip/armada-370-xp: Report that effective affinity is a single target
The Armada 370 XP driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-7-marc.zyngier@arm.com
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-armada-370-xp.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index ce99c1e..cd68877 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -66,6 +66,7 @@ config ARMADA_370_XP_IRQ
bool
select GENERIC_IRQ_CHIP
select PCI_MSI if PCI
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config ALPINE_MSI
bool
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index b207b2c..eb81567 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -330,6 +330,8 @@ static int armada_xp_set_affinity(struct irq_data *d,
writel(reg, main_int_base + ARMADA_370_XP_INT_SOURCE_CTL(hwirq));
raw_spin_unlock(&irq_controller_lock);
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return IRQ_SET_MASK_OK;
}
#endif
@@ -363,6 +365,7 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
} else {
irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
handle_level_irq);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq)));
}
irq_set_probe(virq);
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 07/12] irqchip/bcm-6345-l1: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
` (5 preceding siblings ...)
2017-08-18 8:39 ` [PATCH v2 06/12] irqchip/armada-370-xp: " Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 9:00 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 08/12] irqchip/bcm-7038-l1: " Marc Zyngier
` (4 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The BCM 6345-L1 driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-bcm6345-l1.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index cd688777553c..b36a55d6833e 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -96,6 +96,7 @@ config BCM6345_L1_IRQ
bool
select GENERIC_IRQ_CHIP
select IRQ_DOMAIN
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config BCM7038_L1_IRQ
bool
diff --git a/drivers/irqchip/irq-bcm6345-l1.c b/drivers/irqchip/irq-bcm6345-l1.c
index daa4ae89e466..43f8abe40878 100644
--- a/drivers/irqchip/irq-bcm6345-l1.c
+++ b/drivers/irqchip/irq-bcm6345-l1.c
@@ -231,6 +231,8 @@ static int bcm6345_l1_set_affinity(struct irq_data *d,
}
raw_spin_unlock_irqrestore(&intc->lock, flags);
+ irq_data_update_effective_affinity(d, cpumask_of(new_cpu));
+
return IRQ_SET_MASK_OK_NOCOPY;
}
@@ -291,6 +293,7 @@ static int bcm6345_l1_map(struct irq_domain *d, unsigned int virq,
irq_set_chip_and_handler(virq,
&bcm6345_l1_irq_chip, handle_percpu_irq);
irq_set_chip_data(virq, d->host_data);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq)));
return 0;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/bcm-6345-l1: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 07/12] irqchip/bcm-6345-l1: " Marc Zyngier
@ 2017-08-18 9:00 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 9:00 UTC (permalink / raw)
To: linux-tip-commits
Cc: f.fainelli, linux-kernel, james.hogan, matt.redfearn, paul.burton,
marc.zyngier, cernekee, mingo, andrew, sebastian.hesselbarth,
jcmvbkbc, gregory.clement, chris, xuwei5, hpa, jason, tglx
Commit-ID: d0ed5e8e14e95fb3b70885be5ae35d0736866f72
Gitweb: http://git.kernel.org/tip/d0ed5e8e14e95fb3b70885be5ae35d0736866f72
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:20 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:41 +0200
irqchip/bcm-6345-l1: Report that effective affinity is a single target
The BCM 6345-L1 driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-8-marc.zyngier@arm.com
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-bcm6345-l1.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index cd68877..b36a55d 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -96,6 +96,7 @@ config BCM6345_L1_IRQ
bool
select GENERIC_IRQ_CHIP
select IRQ_DOMAIN
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config BCM7038_L1_IRQ
bool
diff --git a/drivers/irqchip/irq-bcm6345-l1.c b/drivers/irqchip/irq-bcm6345-l1.c
index daa4ae8..43f8abe 100644
--- a/drivers/irqchip/irq-bcm6345-l1.c
+++ b/drivers/irqchip/irq-bcm6345-l1.c
@@ -231,6 +231,8 @@ static int bcm6345_l1_set_affinity(struct irq_data *d,
}
raw_spin_unlock_irqrestore(&intc->lock, flags);
+ irq_data_update_effective_affinity(d, cpumask_of(new_cpu));
+
return IRQ_SET_MASK_OK_NOCOPY;
}
@@ -291,6 +293,7 @@ static int bcm6345_l1_map(struct irq_domain *d, unsigned int virq,
irq_set_chip_and_handler(virq,
&bcm6345_l1_irq_chip, handle_percpu_irq);
irq_set_chip_data(virq, d->host_data);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq)));
return 0;
}
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 08/12] irqchip/bcm-7038-l1: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
` (6 preceding siblings ...)
2017-08-18 8:39 ` [PATCH v2 07/12] irqchip/bcm-6345-l1: " Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 9:00 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 09/12] irqchip/metag-ext: " Marc Zyngier
` (3 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The BCM 7038-L1 driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-bcm7038-l1.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index b36a55d6833e..39bfa5b25b54 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -102,6 +102,7 @@ config BCM7038_L1_IRQ
bool
select GENERIC_IRQ_CHIP
select IRQ_DOMAIN
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config BCM7120_L2_IRQ
bool
diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c
index c2662a1bfdd3..55cfb986225b 100644
--- a/drivers/irqchip/irq-bcm7038-l1.c
+++ b/drivers/irqchip/irq-bcm7038-l1.c
@@ -212,6 +212,8 @@ static int bcm7038_l1_set_affinity(struct irq_data *d,
__bcm7038_l1_unmask(d, first_cpu);
raw_spin_unlock_irqrestore(&intc->lock, flags);
+ irq_data_update_effective_affinity(d, cpumask_of(first_cpu));
+
return 0;
}
@@ -299,6 +301,7 @@ static int bcm7038_l1_map(struct irq_domain *d, unsigned int virq,
{
irq_set_chip_and_handler(virq, &bcm7038_l1_irq_chip, handle_level_irq);
irq_set_chip_data(virq, d->host_data);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq)));
return 0;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/bcm-7038-l1: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 08/12] irqchip/bcm-7038-l1: " Marc Zyngier
@ 2017-08-18 9:00 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 9:00 UTC (permalink / raw)
To: linux-tip-commits
Cc: xuwei5, james.hogan, hpa, gregory.clement, andrew, linux-kernel,
f.fainelli, tglx, jason, chris, paul.burton,
sebastian.hesselbarth, matt.redfearn, cernekee, marc.zyngier,
mingo, jcmvbkbc
Commit-ID: b8d9884ac6c2c5222ea4a2d23bf9bec613e8eacc
Gitweb: http://git.kernel.org/tip/b8d9884ac6c2c5222ea4a2d23bf9bec613e8eacc
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:21 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:42 +0200
irqchip/bcm-7038-l1: Report that effective affinity is a single target
The BCM 7038-L1 driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-9-marc.zyngier@arm.com
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-bcm7038-l1.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index b36a55d..39bfa5b 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -102,6 +102,7 @@ config BCM7038_L1_IRQ
bool
select GENERIC_IRQ_CHIP
select IRQ_DOMAIN
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config BCM7120_L2_IRQ
bool
diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c
index c2662a1..55cfb98 100644
--- a/drivers/irqchip/irq-bcm7038-l1.c
+++ b/drivers/irqchip/irq-bcm7038-l1.c
@@ -212,6 +212,8 @@ static int bcm7038_l1_set_affinity(struct irq_data *d,
__bcm7038_l1_unmask(d, first_cpu);
raw_spin_unlock_irqrestore(&intc->lock, flags);
+ irq_data_update_effective_affinity(d, cpumask_of(first_cpu));
+
return 0;
}
@@ -299,6 +301,7 @@ static int bcm7038_l1_map(struct irq_domain *d, unsigned int virq,
{
irq_set_chip_and_handler(virq, &bcm7038_l1_irq_chip, handle_level_irq);
irq_set_chip_data(virq, d->host_data);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq)));
return 0;
}
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 09/12] irqchip/metag-ext: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
` (7 preceding siblings ...)
2017-08-18 8:39 ` [PATCH v2 08/12] irqchip/bcm-7038-l1: " Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 9:00 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 10/12] irqchip/hip04: " Marc Zyngier
` (2 subsequent siblings)
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The metag-ext driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/metag/Kconfig | 1 +
drivers/irqchip/irq-metag-ext.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig
index 5b7a45d99cfb..7d8b322e5101 100644
--- a/arch/metag/Kconfig
+++ b/arch/metag/Kconfig
@@ -26,6 +26,7 @@ config METAG
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_UNDERSCORE_SYMBOL_PREFIX
select IRQ_DOMAIN
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
select MODULES_USE_ELF_RELA
select OF
select OF_EARLY_FLATTREE
diff --git a/drivers/irqchip/irq-metag-ext.c b/drivers/irqchip/irq-metag-ext.c
index 0cdd923d1535..be7216bfb8dd 100644
--- a/drivers/irqchip/irq-metag-ext.c
+++ b/drivers/irqchip/irq-metag-ext.c
@@ -518,6 +518,8 @@ static int meta_intc_set_affinity(struct irq_data *data,
metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR2(thread)), vec_addr);
+ irq_data_update_effective_affinity(data, cpumask_of(cpu));
+
return 0;
}
#else
@@ -578,6 +580,8 @@ static int meta_intc_map(struct irq_domain *d, unsigned int irq,
else
irq_set_chip_and_handler(irq, &meta_intc_edge_chip,
handle_edge_irq);
+
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
return 0;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/metag-ext: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 09/12] irqchip/metag-ext: " Marc Zyngier
@ 2017-08-18 9:00 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 9:00 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, linux-kernel, gregory.clement, james.hogan, tglx, xuwei5,
matt.redfearn, paul.burton, f.fainelli, andrew, hpa, jcmvbkbc,
chris, cernekee, jason, sebastian.hesselbarth, marc.zyngier
Commit-ID: 64b5aaad3c743be4f866cfe1ef2c903582e389a3
Gitweb: http://git.kernel.org/tip/64b5aaad3c743be4f866cfe1ef2c903582e389a3
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:22 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:42 +0200
irqchip/metag-ext: Report that effective affinity is a single target
The metag-ext driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-10-marc.zyngier@arm.com
---
arch/metag/Kconfig | 1 +
drivers/irqchip/irq-metag-ext.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig
index 5b7a45d..7d8b322 100644
--- a/arch/metag/Kconfig
+++ b/arch/metag/Kconfig
@@ -26,6 +26,7 @@ config METAG
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_UNDERSCORE_SYMBOL_PREFIX
select IRQ_DOMAIN
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
select MODULES_USE_ELF_RELA
select OF
select OF_EARLY_FLATTREE
diff --git a/drivers/irqchip/irq-metag-ext.c b/drivers/irqchip/irq-metag-ext.c
index 0cdd923..be7216b 100644
--- a/drivers/irqchip/irq-metag-ext.c
+++ b/drivers/irqchip/irq-metag-ext.c
@@ -518,6 +518,8 @@ static int meta_intc_set_affinity(struct irq_data *data,
metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR2(thread)), vec_addr);
+ irq_data_update_effective_affinity(data, cpumask_of(cpu));
+
return 0;
}
#else
@@ -578,6 +580,8 @@ static int meta_intc_map(struct irq_domain *d, unsigned int irq,
else
irq_set_chip_and_handler(irq, &meta_intc_edge_chip,
handle_edge_irq);
+
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
return 0;
}
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 10/12] irqchip/hip04: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
` (8 preceding siblings ...)
2017-08-18 8:39 ` [PATCH v2 09/12] irqchip/metag-ext: " Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 9:01 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 11/12] irqchip/mips-gic: " Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 12/12] irqchip/xtensa-mx: " Marc Zyngier
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The HIP04 driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/mach-hisi/Kconfig | 1 +
drivers/irqchip/irq-hip04.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index a3b091a4d344..65a048fa08ec 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -39,6 +39,7 @@ config ARCH_HIP04
select HAVE_ARM_ARCH_TIMER
select MCPM if SMP
select MCPM_QUAD_CLUSTER if SMP
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
help
Support for Hisilicon HiP04 SoC family
diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c
index c1b4ee955dbe..5b4fd2f4e5f8 100644
--- a/drivers/irqchip/irq-hip04.c
+++ b/drivers/irqchip/irq-hip04.c
@@ -165,6 +165,8 @@ static int hip04_irq_set_affinity(struct irq_data *d,
writel_relaxed(val | bit, reg);
raw_spin_unlock(&irq_controller_lock);
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return IRQ_SET_MASK_OK;
}
#endif
@@ -312,6 +314,7 @@ static int hip04_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_set_chip_and_handler(irq, &hip04_irq_chip,
handle_fasteoi_irq);
irq_set_probe(irq);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
}
irq_set_chip_data(irq, d->host_data);
return 0;
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/hip04: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 10/12] irqchip/hip04: " Marc Zyngier
@ 2017-08-18 9:01 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 9:01 UTC (permalink / raw)
To: linux-tip-commits
Cc: chris, linux-kernel, sebastian.hesselbarth, andrew, paul.burton,
marc.zyngier, matt.redfearn, f.fainelli, jcmvbkbc,
gregory.clement, tglx, xuwei5, jason, mingo, cernekee,
james.hogan, hpa
Commit-ID: 79a0d4d8f1ae9568a952c8e5928ee81b30c8df11
Gitweb: http://git.kernel.org/tip/79a0d4d8f1ae9568a952c8e5928ee81b30c8df11
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:23 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:42 +0200
irqchip/hip04: Report that effective affinity is a single target
The HIP04 driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-11-marc.zyngier@arm.com
---
arch/arm/mach-hisi/Kconfig | 1 +
drivers/irqchip/irq-hip04.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index a3b091a..65a048f 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -39,6 +39,7 @@ config ARCH_HIP04
select HAVE_ARM_ARCH_TIMER
select MCPM if SMP
select MCPM_QUAD_CLUSTER if SMP
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
help
Support for Hisilicon HiP04 SoC family
diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c
index c1b4ee9..5b4fd2f 100644
--- a/drivers/irqchip/irq-hip04.c
+++ b/drivers/irqchip/irq-hip04.c
@@ -165,6 +165,8 @@ static int hip04_irq_set_affinity(struct irq_data *d,
writel_relaxed(val | bit, reg);
raw_spin_unlock(&irq_controller_lock);
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return IRQ_SET_MASK_OK;
}
#endif
@@ -312,6 +314,7 @@ static int hip04_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_set_chip_and_handler(irq, &hip04_irq_chip,
handle_fasteoi_irq);
irq_set_probe(irq);
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
}
irq_set_chip_data(irq, d->host_data);
return 0;
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 11/12] irqchip/mips-gic: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
` (9 preceding siblings ...)
2017-08-18 8:39 ` [PATCH v2 10/12] irqchip/hip04: " Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 9:01 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-08-18 8:39 ` [PATCH v2 12/12] irqchip/xtensa-mx: " Marc Zyngier
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The MIPS GIC driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-mips-gic.c | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 39bfa5b25b54..bca9a88012f0 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -141,6 +141,7 @@ config IRQ_MIPS_CPU
select GENERIC_IRQ_IPI if SYS_SUPPORTS_MULTITHREADING
select IRQ_DOMAIN
select IRQ_DOMAIN_HIERARCHY if GENERIC_IRQ_IPI
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config CLPS711X_IRQCHIP
bool
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 6ab1d3afec02..6461380ff1a4 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -445,24 +445,27 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
unsigned int irq = GIC_HWIRQ_TO_SHARED(d->hwirq);
cpumask_t tmp = CPU_MASK_NONE;
unsigned long flags;
- int i;
+ int i, cpu;
cpumask_and(&tmp, cpumask, cpu_online_mask);
if (cpumask_empty(&tmp))
return -EINVAL;
+ cpu = cpumask_first(&tmp);
+
/* Assumption : cpumask refers to a single CPU */
spin_lock_irqsave(&gic_lock, flags);
/* Re-route this IRQ */
- gic_map_to_vpe(irq, mips_cm_vp_id(cpumask_first(&tmp)));
+ gic_map_to_vpe(irq, mips_cm_vp_id(cpu));
/* Update the pcpu_masks */
for (i = 0; i < min(gic_vpes, NR_CPUS); i++)
clear_bit(irq, pcpu_masks[i].pcpu_mask);
- set_bit(irq, pcpu_masks[cpumask_first(&tmp)].pcpu_mask);
+ set_bit(irq, pcpu_masks[cpu].pcpu_mask);
cpumask_copy(irq_data_get_affinity_mask(d), cpumask);
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
spin_unlock_irqrestore(&gic_lock, flags);
return IRQ_SET_MASK_OK_NOCOPY;
@@ -716,6 +719,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int virq,
if (err)
return err;
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq)));
return gic_shared_irq_domain_map(d, virq, hwirq, 0);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/mips-gic: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 11/12] irqchip/mips-gic: " Marc Zyngier
@ 2017-08-18 9:01 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 9:01 UTC (permalink / raw)
To: linux-tip-commits
Cc: chris, f.fainelli, linux-kernel, james.hogan, tglx, marc.zyngier,
hpa, mingo, sebastian.hesselbarth, jason, jcmvbkbc, cernekee,
matt.redfearn, xuwei5, andrew, gregory.clement, paul.burton
Commit-ID: 18416e45b76189daf37ba53b2bd0b9ac3749e92e
Gitweb: http://git.kernel.org/tip/18416e45b76189daf37ba53b2bd0b9ac3749e92e
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:24 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:43 +0200
irqchip/mips-gic: Report that effective affinity is a single target
The MIPS GIC driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-12-marc.zyngier@arm.com
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-mips-gic.c | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 39bfa5b..bca9a88 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -141,6 +141,7 @@ config IRQ_MIPS_CPU
select GENERIC_IRQ_IPI if SYS_SUPPORTS_MULTITHREADING
select IRQ_DOMAIN
select IRQ_DOMAIN_HIERARCHY if GENERIC_IRQ_IPI
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config CLPS711X_IRQCHIP
bool
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 6ab1d3a..6461380 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -445,24 +445,27 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
unsigned int irq = GIC_HWIRQ_TO_SHARED(d->hwirq);
cpumask_t tmp = CPU_MASK_NONE;
unsigned long flags;
- int i;
+ int i, cpu;
cpumask_and(&tmp, cpumask, cpu_online_mask);
if (cpumask_empty(&tmp))
return -EINVAL;
+ cpu = cpumask_first(&tmp);
+
/* Assumption : cpumask refers to a single CPU */
spin_lock_irqsave(&gic_lock, flags);
/* Re-route this IRQ */
- gic_map_to_vpe(irq, mips_cm_vp_id(cpumask_first(&tmp)));
+ gic_map_to_vpe(irq, mips_cm_vp_id(cpu));
/* Update the pcpu_masks */
for (i = 0; i < min(gic_vpes, NR_CPUS); i++)
clear_bit(irq, pcpu_masks[i].pcpu_mask);
- set_bit(irq, pcpu_masks[cpumask_first(&tmp)].pcpu_mask);
+ set_bit(irq, pcpu_masks[cpu].pcpu_mask);
cpumask_copy(irq_data_get_affinity_mask(d), cpumask);
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
spin_unlock_irqrestore(&gic_lock, flags);
return IRQ_SET_MASK_OK_NOCOPY;
@@ -716,6 +719,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int virq,
if (err)
return err;
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq)));
return gic_shared_irq_domain_map(d, virq, hwirq, 0);
}
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 12/12] irqchip/xtensa-mx: Report that effective affinity is a single target
2017-08-18 8:39 [PATCH v2 00/12] genirq/irqchip: Effective affinity fixups Marc Zyngier
` (10 preceding siblings ...)
2017-08-18 8:39 ` [PATCH v2 11/12] irqchip/mips-gic: " Marc Zyngier
@ 2017-08-18 8:39 ` Marc Zyngier
2017-08-18 9:01 ` [tip:irq/core] " tip-bot for Marc Zyngier
11 siblings, 1 reply; 25+ messages in thread
From: Marc Zyngier @ 2017-08-18 8:39 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Wei Xu, James Hogan, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Kevin Cernekee, Florian Fainelli,
Chris Zankel, Max Filippov, Paul Burton, Matt Redfearn,
linux-kernel
The xtensa-mx driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-xtensa-mx.c | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index bca9a88012f0..1139de9da21a 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -223,6 +223,7 @@ config VERSATILE_FPGA_IRQ_NR
config XTENSA_MX
bool
select IRQ_DOMAIN
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config XILINX_INTC
bool
diff --git a/drivers/irqchip/irq-xtensa-mx.c b/drivers/irqchip/irq-xtensa-mx.c
index 72a391e01011..a15a9510c904 100644
--- a/drivers/irqchip/irq-xtensa-mx.c
+++ b/drivers/irqchip/irq-xtensa-mx.c
@@ -32,6 +32,7 @@ static int xtensa_mx_irq_map(struct irq_domain *d, unsigned int irq,
irq_set_status_flags(irq, IRQ_LEVEL);
return 0;
}
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
return xtensa_irq_map(d, irq, hw);
}
@@ -121,9 +122,12 @@ static int xtensa_mx_irq_retrigger(struct irq_data *d)
static int xtensa_mx_irq_set_affinity(struct irq_data *d,
const struct cpumask *dest, bool force)
{
- unsigned mask = 1u << cpumask_any_and(dest, cpu_online_mask);
+ int cpu = cpumask_any_and(dest, cpu_online_mask);
+ unsigned mask = 1u << cpu;
set_er(mask, MIROUT(d->hwirq - HW_IRQ_MX_BASE));
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return 0;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* [tip:irq/core] irqchip/xtensa-mx: Report that effective affinity is a single target
2017-08-18 8:39 ` [PATCH v2 12/12] irqchip/xtensa-mx: " Marc Zyngier
@ 2017-08-18 9:01 ` tip-bot for Marc Zyngier
0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for Marc Zyngier @ 2017-08-18 9:01 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, paul.burton, matt.redfearn, chris, jcmvbkbc, mingo,
andrew, gregory.clement, jason, hpa, james.hogan, tglx, xuwei5,
marc.zyngier, sebastian.hesselbarth, cernekee, f.fainelli
Commit-ID: 500912121411e0175d44b69a7810ac6068e78326
Gitweb: http://git.kernel.org/tip/500912121411e0175d44b69a7810ac6068e78326
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 18 Aug 2017 09:39:25 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 10:54:43 +0200
irqchip/xtensa-mx: Report that effective affinity is a single target
The xtensa-mx driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-13-marc.zyngier@arm.com
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-xtensa-mx.c | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index bca9a88..1139de9 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -223,6 +223,7 @@ config VERSATILE_FPGA_IRQ_NR
config XTENSA_MX
bool
select IRQ_DOMAIN
+ select GENERIC_IRQ_EFFECTIVE_AFF_MASK
config XILINX_INTC
bool
diff --git a/drivers/irqchip/irq-xtensa-mx.c b/drivers/irqchip/irq-xtensa-mx.c
index 72a391e..a15a951 100644
--- a/drivers/irqchip/irq-xtensa-mx.c
+++ b/drivers/irqchip/irq-xtensa-mx.c
@@ -32,6 +32,7 @@ static int xtensa_mx_irq_map(struct irq_domain *d, unsigned int irq,
irq_set_status_flags(irq, IRQ_LEVEL);
return 0;
}
+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
return xtensa_irq_map(d, irq, hw);
}
@@ -121,9 +122,12 @@ static int xtensa_mx_irq_retrigger(struct irq_data *d)
static int xtensa_mx_irq_set_affinity(struct irq_data *d,
const struct cpumask *dest, bool force)
{
- unsigned mask = 1u << cpumask_any_and(dest, cpu_online_mask);
+ int cpu = cpumask_any_and(dest, cpu_online_mask);
+ unsigned mask = 1u << cpu;
set_er(mask, MIROUT(d->hwirq - HW_IRQ_MX_BASE));
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return 0;
}
^ permalink raw reply related [flat|nested] 25+ messages in thread