aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@dreadnought.i.jkkm.org>2010-10-14 00:12:23 -0400
committerKyle McMartin <kyle@dreadnought.i.jkkm.org>2010-10-14 01:30:13 -0400
commit4d4f681dc43a06167763ec698f5de4f2b3119ad6 (patch)
tree1d0af30ce981c2bcc9e5622541fab3c9bd4359f4 /arch/parisc
parentba20085c20f1c9e8af546dea6ad0efa421bdef32 (diff)
parisc: convert cpu interrupts to proper flow handlers
Only major change is renaming functions to match the conventions expected by the generic irq code. Signed-off-by: Kyle McMartin <kyle@redhat.com>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/include/asm/irq.h2
-rw-r--r--arch/parisc/kernel/irq.c25
2 files changed, 10 insertions, 17 deletions
diff --git a/arch/parisc/include/asm/irq.h b/arch/parisc/include/asm/irq.h
index 47041d448d32..3a9b2498fd1c 100644
--- a/arch/parisc/include/asm/irq.h
+++ b/arch/parisc/include/asm/irq.h
@@ -43,7 +43,7 @@ extern void parisc_do_IRQ(unsigned int irq, struct irq_desc *desc);
43void no_ack_irq(unsigned int irq); 43void no_ack_irq(unsigned int irq);
44void no_end_irq(unsigned int irq); 44void no_end_irq(unsigned int irq);
45void cpu_ack_irq(unsigned int irq); 45void cpu_ack_irq(unsigned int irq);
46void cpu_end_irq(unsigned int irq); 46void cpu_eoi_irq(unsigned int irq);
47 47
48extern int txn_alloc_irq(unsigned int nbits); 48extern int txn_alloc_irq(unsigned int nbits);
49extern int txn_claim_irq(int); 49extern int txn_claim_irq(int);
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 272c29a44f2a..13bfa9702fd3 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -52,7 +52,7 @@ static volatile unsigned long cpu_eiem = 0;
52*/ 52*/
53static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; 53static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
54 54
55static void cpu_disable_irq(unsigned int irq) 55static void cpu_mask_irq(unsigned int irq)
56{ 56{
57 unsigned long eirr_bit = EIEM_MASK(irq); 57 unsigned long eirr_bit = EIEM_MASK(irq);
58 58
@@ -63,7 +63,7 @@ static void cpu_disable_irq(unsigned int irq)
63 * then gets disabled */ 63 * then gets disabled */
64} 64}
65 65
66static void cpu_enable_irq(unsigned int irq) 66static void cpu_unmask_irq(unsigned int irq)
67{ 67{
68 unsigned long eirr_bit = EIEM_MASK(irq); 68 unsigned long eirr_bit = EIEM_MASK(irq);
69 69
@@ -75,12 +75,6 @@ static void cpu_enable_irq(unsigned int irq)
75 smp_send_all_nop(); 75 smp_send_all_nop();
76} 76}
77 77
78static unsigned int cpu_startup_irq(unsigned int irq)
79{
80 cpu_enable_irq(irq);
81 return 0;
82}
83
84void no_ack_irq(unsigned int irq) { } 78void no_ack_irq(unsigned int irq) { }
85void no_end_irq(unsigned int irq) { } 79void no_end_irq(unsigned int irq) { }
86 80
@@ -99,7 +93,7 @@ void cpu_ack_irq(unsigned int irq)
99 mtctl(mask, 23); 93 mtctl(mask, 23);
100} 94}
101 95
102void cpu_end_irq(unsigned int irq) 96void cpu_eoi_irq(unsigned int irq)
103{ 97{
104 unsigned long mask = EIEM_MASK(irq); 98 unsigned long mask = EIEM_MASK(irq);
105 int cpu = smp_processor_id(); 99 int cpu = smp_processor_id();
@@ -146,12 +140,10 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
146 140
147static struct irq_chip cpu_interrupt_type = { 141static struct irq_chip cpu_interrupt_type = {
148 .name = "CPU", 142 .name = "CPU",
149 .startup = cpu_startup_irq, 143 .mask = cpu_mask_irq,
150 .shutdown = cpu_disable_irq, 144 .unmask = cpu_unmask_irq,
151 .enable = cpu_enable_irq,
152 .disable = cpu_disable_irq,
153 .ack = cpu_ack_irq, 145 .ack = cpu_ack_irq,
154 .eoi = cpu_end_irq, 146 .eoi = cpu_eoi_irq,
155#ifdef CONFIG_SMP 147#ifdef CONFIG_SMP
156 .set_affinity = cpu_set_affinity_irq, 148 .set_affinity = cpu_set_affinity_irq,
157#endif 149#endif
@@ -251,7 +243,7 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
251 if (type) { 243 if (type) {
252 set_irq_chip_and_handler(irq, type, parisc_do_IRQ); 244 set_irq_chip_and_handler(irq, type, parisc_do_IRQ);
253 set_irq_chip_data(irq, data); 245 set_irq_chip_data(irq, data);
254 cpu_enable_irq(irq); 246 cpu_unmask_irq(irq);
255 } 247 }
256 return 0; 248 return 0;
257} 249}
@@ -399,7 +391,8 @@ static void claim_cpu_irqs(void)
399{ 391{
400 int i; 392 int i;
401 for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) { 393 for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
402 set_irq_chip_and_handler(i, &cpu_interrupt_type, parisc_do_IRQ); 394 set_irq_chip_and_handler(i, &cpu_interrupt_type,
395 handle_level_irq);
403 } 396 }
404 397
405 set_irq_handler(TIMER_IRQ, handle_percpu_irq); 398 set_irq_handler(TIMER_IRQ, handle_percpu_irq);