diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 999509d28af8..476b564a208b 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -118,6 +118,21 @@ static void __init fwnmi_init(void) | |||
118 | fwnmi_active = 1; | 118 | fwnmi_active = 1; |
119 | } | 119 | } |
120 | 120 | ||
121 | void pSeries_8259_cascade(unsigned int irq, struct irq_desc *desc, | ||
122 | struct pt_regs *regs) | ||
123 | { | ||
124 | unsigned int max = 100; | ||
125 | |||
126 | while(max--) { | ||
127 | int cascade_irq = i8259_irq(regs); | ||
128 | if (max == 99) | ||
129 | desc->chip->eoi(irq); | ||
130 | if (cascade_irq < 0) | ||
131 | break; | ||
132 | generic_handle_irq(cascade_irq, regs); | ||
133 | }; | ||
134 | } | ||
135 | |||
121 | static void __init pSeries_init_mpic(void) | 136 | static void __init pSeries_init_mpic(void) |
122 | { | 137 | { |
123 | unsigned int *addrp; | 138 | unsigned int *addrp; |
@@ -140,7 +155,7 @@ static void __init pSeries_init_mpic(void) | |||
140 | i8259_init(intack, 0); | 155 | i8259_init(intack, 0); |
141 | 156 | ||
142 | /* Hook cascade to mpic */ | 157 | /* Hook cascade to mpic */ |
143 | mpic_setup_cascade(NUM_ISA_INTERRUPTS, i8259_irq_cascade, NULL); | 158 | set_irq_chained_handler(NUM_ISA_INTERRUPTS, pSeries_8259_cascade); |
144 | } | 159 | } |
145 | 160 | ||
146 | static void __init pSeries_setup_mpic(void) | 161 | static void __init pSeries_setup_mpic(void) |
@@ -201,10 +216,8 @@ static void __init pSeries_setup_arch(void) | |||
201 | /* Allocate the mpic now, so that find_and_init_phbs() can | 216 | /* Allocate the mpic now, so that find_and_init_phbs() can |
202 | * fill the ISUs */ | 217 | * fill the ISUs */ |
203 | pSeries_setup_mpic(); | 218 | pSeries_setup_mpic(); |
204 | } else { | 219 | } else |
205 | ppc_md.init_IRQ = xics_init_IRQ; | 220 | ppc_md.init_IRQ = xics_init_IRQ; |
206 | ppc_md.get_irq = xics_get_irq; | ||
207 | } | ||
208 | 221 | ||
209 | #ifdef CONFIG_SMP | 222 | #ifdef CONFIG_SMP |
210 | smp_init_pSeries(); | 223 | smp_init_pSeries(); |
@@ -291,10 +304,7 @@ static void pSeries_mach_cpu_die(void) | |||
291 | { | 304 | { |
292 | local_irq_disable(); | 305 | local_irq_disable(); |
293 | idle_task_exit(); | 306 | idle_task_exit(); |
294 | /* Some hardware requires clearing the CPPR, while other hardware does not | 307 | xics_teardown_cpu(0); |
295 | * it is safe either way | ||
296 | */ | ||
297 | pSeriesLP_cppr_info(0, 0); | ||
298 | rtas_stop_self(); | 308 | rtas_stop_self(); |
299 | /* Should never get here... */ | 309 | /* Should never get here... */ |
300 | BUG(); | 310 | BUG(); |