diff options
Diffstat (limited to 'arch/powerpc/sysdev/xics/xics-common.c')
-rw-r--r-- | arch/powerpc/sysdev/xics/xics-common.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index 69d858e51ac7..23efe4e42172 100644 --- a/arch/powerpc/sysdev/xics/xics-common.c +++ b/arch/powerpc/sysdev/xics/xics-common.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/delay.h> | ||
23 | 24 | ||
24 | #include <asm/prom.h> | 25 | #include <asm/prom.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
@@ -198,9 +199,6 @@ void xics_migrate_irqs_away(void) | |||
198 | /* Remove ourselves from the global interrupt queue */ | 199 | /* Remove ourselves from the global interrupt queue */ |
199 | xics_set_cpu_giq(xics_default_distrib_server, 0); | 200 | xics_set_cpu_giq(xics_default_distrib_server, 0); |
200 | 201 | ||
201 | /* Allow IPIs again... */ | ||
202 | icp_ops->set_priority(DEFAULT_PRIORITY); | ||
203 | |||
204 | for_each_irq_desc(virq, desc) { | 202 | for_each_irq_desc(virq, desc) { |
205 | struct irq_chip *chip; | 203 | struct irq_chip *chip; |
206 | long server; | 204 | long server; |
@@ -255,6 +253,19 @@ void xics_migrate_irqs_away(void) | |||
255 | unlock: | 253 | unlock: |
256 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 254 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
257 | } | 255 | } |
256 | |||
257 | /* Allow "sufficient" time to drop any inflight IRQ's */ | ||
258 | mdelay(5); | ||
259 | |||
260 | /* | ||
261 | * Allow IPIs again. This is done at the very end, after migrating all | ||
262 | * interrupts, the expectation is that we'll only get woken up by an IPI | ||
263 | * interrupt beyond this point, but leave externals masked just to be | ||
264 | * safe. If we're using icp-opal this may actually allow all | ||
265 | * interrupts anyway, but that should be OK. | ||
266 | */ | ||
267 | icp_ops->set_priority(DEFAULT_PRIORITY); | ||
268 | |||
258 | } | 269 | } |
259 | #endif /* CONFIG_HOTPLUG_CPU */ | 270 | #endif /* CONFIG_HOTPLUG_CPU */ |
260 | 271 | ||