Commit 6c80a21c authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] ppc64: global interrupt queue cleanup

Move the code to set global interrupt queue membership to xics.c,
and remove no longer needed extern declarations.  Also call it on
all cpus (even the boot cpu) to prepare for kexec.
Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
Signed-off-by: default avatarR Sharada <sharada@in.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 25128092
...@@ -326,13 +326,6 @@ static void __devinit smp_xics_setup_cpu(int cpu) ...@@ -326,13 +326,6 @@ static void __devinit smp_xics_setup_cpu(int cpu)
cpu_clear(cpu, of_spin_map); cpu_clear(cpu, of_spin_map);
/*
* Put the calling processor into the GIQ. This is really only
* necessary from a secondary thread as the OF start-cpu interface
* performs this function for us on primary threads.
*/
rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
} }
static DEFINE_SPINLOCK(timebase_lock); static DEFINE_SPINLOCK(timebase_lock);
......
...@@ -432,6 +432,7 @@ void xics_cause_IPI(int cpu) ...@@ -432,6 +432,7 @@ void xics_cause_IPI(int cpu)
{ {
ops->qirr_info(cpu, IPI_PRIORITY); ops->qirr_info(cpu, IPI_PRIORITY);
} }
#endif /* CONFIG_SMP */
void xics_setup_cpu(void) void xics_setup_cpu(void)
{ {
...@@ -439,9 +440,17 @@ void xics_setup_cpu(void) ...@@ -439,9 +440,17 @@ void xics_setup_cpu(void)
ops->cppr_info(cpu, 0xff); ops->cppr_info(cpu, 0xff);
iosync(); iosync();
}
#endif /* CONFIG_SMP */ /*
* Put the calling processor into the GIQ. This is really only
* necessary from a secondary thread as the OF start-cpu interface
* performs this function for us on primary threads.
*
* XXX: undo of teardown on kexec needs this too, as may hotplug
*/
rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
}
void xics_init_IRQ(void) void xics_init_IRQ(void)
{ {
...@@ -563,8 +572,7 @@ void xics_init_IRQ(void) ...@@ -563,8 +572,7 @@ void xics_init_IRQ(void)
for (; i < NR_IRQS; ++i) for (; i < NR_IRQS; ++i)
get_irq_desc(i)->handler = &xics_pic; get_irq_desc(i)->handler = &xics_pic;
ops->cppr_info(boot_cpuid, 0xff); xics_setup_cpu();
iosync();
ppc64_boot_msg(0x21, "XICS Done"); ppc64_boot_msg(0x21, "XICS Done");
} }
......
...@@ -30,7 +30,4 @@ struct xics_ipi_struct { ...@@ -30,7 +30,4 @@ struct xics_ipi_struct {
extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
extern unsigned int default_distrib_server;
extern unsigned int interrupt_server_size;
#endif /* _PPC64_KERNEL_XICS_H */ #endif /* _PPC64_KERNEL_XICS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment