diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-11-16 02:53:29 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 22:50:11 -0500 |
commit | e199500c6280aadf98c185db99fd24ab61ebe0c7 (patch) | |
tree | 43d7314137408fa18102a3a81384b3cb36e55f1e /arch/powerpc/platforms/iseries | |
parent | 853f828cfd29d3d486d9f4b4df91d99ce509e3b5 (diff) |
powerpc: partly merge iseries do_IRQ
Hide some of the iseries details in iSeries_get_irq.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/powerpc/platforms/iseries')
-rw-r--r-- | arch/powerpc/platforms/iseries/irq.c | 27 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/irq.h | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 10 |
3 files changed, 28 insertions, 10 deletions
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 3bd576ecb288..5e92149b9b96 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -35,13 +35,19 @@ | |||
35 | #include <linux/irq.h> | 35 | #include <linux/irq.h> |
36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
37 | 37 | ||
38 | #include <asm/paca.h> | ||
38 | #include <asm/iseries/hv_types.h> | 39 | #include <asm/iseries/hv_types.h> |
39 | #include <asm/iseries/hv_lp_event.h> | 40 | #include <asm/iseries/hv_lp_event.h> |
40 | #include <asm/iseries/hv_call_xm.h> | 41 | #include <asm/iseries/hv_call_xm.h> |
42 | #include <asm/iseries/it_lp_queue.h> | ||
41 | 43 | ||
42 | #include "irq.h" | 44 | #include "irq.h" |
43 | #include "call_pci.h" | 45 | #include "call_pci.h" |
44 | 46 | ||
47 | #if defined(CONFIG_SMP) | ||
48 | extern void iSeries_smp_message_recv(struct pt_regs *); | ||
49 | #endif | ||
50 | |||
45 | enum pci_event_type { | 51 | enum pci_event_type { |
46 | pe_bus_created = 0, /* PHB has been created */ | 52 | pe_bus_created = 0, /* PHB has been created */ |
47 | pe_bus_error = 1, /* PHB has failed */ | 53 | pe_bus_error = 1, /* PHB has failed */ |
@@ -329,3 +335,24 @@ int __init iSeries_allocate_IRQ(HvBusNumber bus, | |||
329 | irq_desc[virtirq].handler = &iSeries_IRQ_handler; | 335 | irq_desc[virtirq].handler = &iSeries_IRQ_handler; |
330 | return virtirq; | 336 | return virtirq; |
331 | } | 337 | } |
338 | |||
339 | /* | ||
340 | * Get the next pending IRQ. | ||
341 | */ | ||
342 | int iSeries_get_irq(struct pt_regs *regs) | ||
343 | { | ||
344 | struct paca_struct *lpaca; | ||
345 | |||
346 | lpaca = get_paca(); | ||
347 | #ifdef CONFIG_SMP | ||
348 | if (lpaca->lppaca.int_dword.fields.ipi_cnt) { | ||
349 | lpaca->lppaca.int_dword.fields.ipi_cnt = 0; | ||
350 | iSeries_smp_message_recv(regs); | ||
351 | } | ||
352 | #endif /* CONFIG_SMP */ | ||
353 | if (hvlpevent_is_pending()) | ||
354 | process_hvlpevents(regs); | ||
355 | |||
356 | /* -2 means ignore this interrupt */ | ||
357 | return -2; | ||
358 | } | ||
diff --git a/arch/powerpc/platforms/iseries/irq.h b/arch/powerpc/platforms/iseries/irq.h index 5f643f16ecc0..b9c801ba5a47 100644 --- a/arch/powerpc/platforms/iseries/irq.h +++ b/arch/powerpc/platforms/iseries/irq.h | |||
@@ -4,5 +4,6 @@ | |||
4 | extern void iSeries_init_IRQ(void); | 4 | extern void iSeries_init_IRQ(void); |
5 | extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId); | 5 | extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId); |
6 | extern void iSeries_activate_IRQs(void); | 6 | extern void iSeries_activate_IRQs(void); |
7 | extern int iSeries_get_irq(struct pt_regs *); | ||
7 | 8 | ||
8 | #endif /* _ISERIES_IRQ_H */ | 9 | #endif /* _ISERIES_IRQ_H */ |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index da26639190db..ad5ef80500ce 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -571,16 +571,6 @@ static void iSeries_show_cpuinfo(struct seq_file *m) | |||
571 | 571 | ||
572 | /* | 572 | /* |
573 | * Document me. | 573 | * Document me. |
574 | * and Implement me. | ||
575 | */ | ||
576 | static int iSeries_get_irq(struct pt_regs *regs) | ||
577 | { | ||
578 | /* -2 means ignore this interrupt */ | ||
579 | return -2; | ||
580 | } | ||
581 | |||
582 | /* | ||
583 | * Document me. | ||
584 | */ | 574 | */ |
585 | static void iSeries_restart(char *cmd) | 575 | static void iSeries_restart(char *cmd) |
586 | { | 576 | { |