* [PATCH RESEND] irqchip: gic: fix boot for chained gics
@ 2013-11-28 14:21 ` Mark Rutland
0 siblings, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2013-11-28 14:21 UTC (permalink / raw)
To: tglx
Cc: linux-arm-kernel, linux-kernel, marc.zyngier, rob.herring, olof,
Mark Rutland
Thomas,
Could you please pick up this patch? It's the only thing preventing my Realview
EB ARM11MPCore from booting v3.13-rc1.
I've posted the patch a couple of times previously [1,2], but it seems to have
slipped through the cracks. I'm happy to rework the patch if there are any
comments.
Thanks,
Mark.
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/191586.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/191630.html
---->8----
As of c0114709ed: "irqchip: gic: Perform the gic_secondary_init() call
via CPU notifier", booting on a platform with chained gics (e.g.
Realview EB ARM11MPCore) will result in the gic_cpu_notifier being
registered twice, corrupting the cpu notifier list and rendering the
platform unbootable.
This patch ensures that we only register the notifier for the first gic,
allowing platforms with chained gics to boot. At the same time we limit
the pointlessly duplicated calls to set_smp_cross_call and
set_handle_irq to the first gic registered.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-gic.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 9031171..341c601 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -957,12 +957,13 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
if (WARN_ON(!gic->domain))
return;
+ if (gic_nr == 0) {
#ifdef CONFIG_SMP
- set_smp_cross_call(gic_raise_softirq);
- register_cpu_notifier(&gic_cpu_notifier);
+ set_smp_cross_call(gic_raise_softirq);
+ register_cpu_notifier(&gic_cpu_notifier);
#endif
-
- set_handle_irq(gic_handle_irq);
+ set_handle_irq(gic_handle_irq);
+ }
gic_chip.flags |= gic_arch_extn.flags;
gic_dist_init(gic);
--
1.8.1.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RESEND] irqchip: gic: fix boot for chained gics
@ 2013-11-28 14:21 ` Mark Rutland
0 siblings, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2013-11-28 14:21 UTC (permalink / raw)
To: linux-arm-kernel
Thomas,
Could you please pick up this patch? It's the only thing preventing my Realview
EB ARM11MPCore from booting v3.13-rc1.
I've posted the patch a couple of times previously [1,2], but it seems to have
slipped through the cracks. I'm happy to rework the patch if there are any
comments.
Thanks,
Mark.
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/191586.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/191630.html
---->8----
As of c0114709ed: "irqchip: gic: Perform the gic_secondary_init() call
via CPU notifier", booting on a platform with chained gics (e.g.
Realview EB ARM11MPCore) will result in the gic_cpu_notifier being
registered twice, corrupting the cpu notifier list and rendering the
platform unbootable.
This patch ensures that we only register the notifier for the first gic,
allowing platforms with chained gics to boot. At the same time we limit
the pointlessly duplicated calls to set_smp_cross_call and
set_handle_irq to the first gic registered.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-gic.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 9031171..341c601 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -957,12 +957,13 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
if (WARN_ON(!gic->domain))
return;
+ if (gic_nr == 0) {
#ifdef CONFIG_SMP
- set_smp_cross_call(gic_raise_softirq);
- register_cpu_notifier(&gic_cpu_notifier);
+ set_smp_cross_call(gic_raise_softirq);
+ register_cpu_notifier(&gic_cpu_notifier);
#endif
-
- set_handle_irq(gic_handle_irq);
+ set_handle_irq(gic_handle_irq);
+ }
gic_chip.flags |= gic_arch_extn.flags;
gic_dist_init(gic);
--
1.8.1.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:irq/urgent] irqchip: Gic: fix boot for chained gics
2013-11-28 14:21 ` Mark Rutland
(?)
@ 2013-11-28 14:46 ` tip-bot for Mark Rutland
-1 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Mark Rutland @ 2013-11-28 14:46 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, catalin.marinas, mark.rutland, tglx
Commit-ID: 08332dff8adebb74171e98e008d6c20de6658c42
Gitweb: http://git.kernel.org/tip/08332dff8adebb74171e98e008d6c20de6658c42
Author: Mark Rutland <mark.rutland@arm.com>
AuthorDate: Thu, 28 Nov 2013 14:21:40 +0000
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 28 Nov 2013 15:41:53 +0100
irqchip: Gic: fix boot for chained gics
As of c0114709ed: "irqchip: gic: Perform the gic_secondary_init() call
via CPU notifier", booting on a platform with chained gics (e.g.
Realview EB ARM11MPCore) will result in the gic_cpu_notifier being
registered twice, corrupting the cpu notifier list and rendering the
platform unbootable.
This patch ensures that we only register the notifier for the first
gic, allowing platforms with chained gics to boot. At the same time we
limit the pointlessly duplicated calls to set_smp_cross_call and
set_handle_irq to the first gic registered.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: marc.zyngier@arm.com
Cc: rob.herring@calxeda.com
Cc: olof@lixom.net
Link: http://lkml.kernel.org/r/1385648500-29048-1-git-send-email-mark.rutland@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-gic.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index d0e9480..e219a5bf 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -814,12 +814,13 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
if (WARN_ON(!gic->domain))
return;
+ if (gic_nr == 0) {
#ifdef CONFIG_SMP
- set_smp_cross_call(gic_raise_softirq);
- register_cpu_notifier(&gic_cpu_notifier);
+ set_smp_cross_call(gic_raise_softirq);
+ register_cpu_notifier(&gic_cpu_notifier);
#endif
-
- set_handle_irq(gic_handle_irq);
+ set_handle_irq(gic_handle_irq);
+ }
gic_chip.flags |= gic_arch_extn.flags;
gic_dist_init(gic);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RESEND] irqchip: gic: fix boot for chained gics
@ 2013-08-13 13:18 Mark Rutland
0 siblings, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2013-08-13 13:18 UTC (permalink / raw)
To: linux-arm-kernel
Thomas, would you be able to take this patch? It's a resend of the version I
sent back in June [1], with the addition of Catalin's Reviewed-by.
Sudeep has just been hit by the bug [2]. I've tested the patch against
v3.11-rc5 and it still applies cleanly and solves the issue.
I'm happy to rework it if you have any comments?
Cheers,
Mark
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/176550.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/191586.html
---->8----
As of c0114709ed: "irqchip: gic: Perform the gic_secondary_init() call
via CPU notifier", booting on a platform with chained gics (e.g.
Realview EB ARM11MPCore) will result in the gic_cpu_notifier being
registered twice, corrupting the cpu notifier list and rendering the
platform unbootable.
This patch ensures that we only register the notifier for the first gic,
allowing platforms with chained gics to boot. At the same time we limit
the pointlessly duplicated calls to set_smp_cross_call and
set_handle_irq to the first gic registered.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-gic.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index ee7c503..810b117 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -808,12 +808,13 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
if (WARN_ON(!gic->domain))
return;
+ if (gic_nr == 0) {
#ifdef CONFIG_SMP
- set_smp_cross_call(gic_raise_softirq);
- register_cpu_notifier(&gic_cpu_notifier);
+ set_smp_cross_call(gic_raise_softirq);
+ register_cpu_notifier(&gic_cpu_notifier);
#endif
-
- set_handle_irq(gic_handle_irq);
+ set_handle_irq(gic_handle_irq);
+ }
gic_chip.flags |= gic_arch_extn.flags;
gic_dist_init(gic);
--
1.8.1.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-28 14:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28 14:21 [PATCH RESEND] irqchip: gic: fix boot for chained gics Mark Rutland
2013-11-28 14:21 ` Mark Rutland
2013-11-28 14:46 ` [tip:irq/urgent] irqchip: Gic: " tip-bot for Mark Rutland
-- strict thread matches above, loose matches on Subject: below --
2013-08-13 13:18 [PATCH RESEND] irqchip: gic: " Mark Rutland
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.