aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/ps3/interrupt.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-03-08 17:26:56 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-09 19:04:00 -0500
commit8126708ae8f2bb7cf98a38ca89b5cfd96d897a05 (patch)
tree004a381070b5e646e735bc175ddb1971be7f4efd /arch/powerpc/platforms/ps3/interrupt.c
parentd8c94aca574b16b837db9441ee4643cd329b2036 (diff)
powerpc: platforms/ps3 irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/ps3/interrupt.c')
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 92290ff4761..3988c86682a 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -99,16 +99,16 @@ static DEFINE_PER_CPU(struct ps3_private, ps3_private);
99 * Sets ps3_bmp.mask and calls lv1_did_update_interrupt_mask(). 99 * Sets ps3_bmp.mask and calls lv1_did_update_interrupt_mask().
100 */ 100 */
101 101
102static void ps3_chip_mask(unsigned int virq) 102static void ps3_chip_mask(struct irq_data *d)
103{ 103{
104 struct ps3_private *pd = get_irq_chip_data(virq); 104 struct ps3_private *pd = irq_data_get_irq_chip_data(d);
105 unsigned long flags; 105 unsigned long flags;
106 106
107 pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__, 107 pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__,
108 pd->thread_id, virq); 108 pd->thread_id, d->irq);
109 109
110 local_irq_save(flags); 110 local_irq_save(flags);
111 clear_bit(63 - virq, &pd->bmp.mask); 111 clear_bit(63 - d->irq, &pd->bmp.mask);
112 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id); 112 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
113 local_irq_restore(flags); 113 local_irq_restore(flags);
114} 114}
@@ -120,16 +120,16 @@ static void ps3_chip_mask(unsigned int virq)
120 * Clears ps3_bmp.mask and calls lv1_did_update_interrupt_mask(). 120 * Clears ps3_bmp.mask and calls lv1_did_update_interrupt_mask().
121 */ 121 */
122 122
123static void ps3_chip_unmask(unsigned int virq) 123static void ps3_chip_unmask(struct irq_data *d)
124{ 124{
125 struct ps3_private *pd = get_irq_chip_data(virq); 125 struct ps3_private *pd = irq_data_get_irq_chip_data(d);
126 unsigned long flags; 126 unsigned long flags;
127 127
128 pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__, 128 pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__,
129 pd->thread_id, virq); 129 pd->thread_id, d->irq);
130 130
131 local_irq_save(flags); 131 local_irq_save(flags);
132 set_bit(63 - virq, &pd->bmp.mask); 132 set_bit(63 - d->irq, &pd->bmp.mask);
133 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id); 133 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
134 local_irq_restore(flags); 134 local_irq_restore(flags);
135} 135}
@@ -141,10 +141,10 @@ static void ps3_chip_unmask(unsigned int virq)
141 * Calls lv1_end_of_interrupt_ext(). 141 * Calls lv1_end_of_interrupt_ext().
142 */ 142 */
143 143
144static void ps3_chip_eoi(unsigned int virq) 144static void ps3_chip_eoi(struct irq_data *d)
145{ 145{
146 const struct ps3_private *pd = get_irq_chip_data(virq); 146 const struct ps3_private *pd = irq_data_get_irq_chip_data(d);
147 lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, virq); 147 lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq);
148} 148}
149 149
150/** 150/**
@@ -153,9 +153,9 @@ static void ps3_chip_eoi(unsigned int virq)
153 153
154static struct irq_chip ps3_irq_chip = { 154static struct irq_chip ps3_irq_chip = {
155 .name = "ps3", 155 .name = "ps3",
156 .mask = ps3_chip_mask, 156 .irq_mask = ps3_chip_mask,
157 .unmask = ps3_chip_unmask, 157 .irq_unmask = ps3_chip_unmask,
158 .eoi = ps3_chip_eoi, 158 .irq_eoi = ps3_chip_eoi,
159}; 159};
160 160
161/** 161/**
@@ -202,7 +202,7 @@ static int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
202 goto fail_set; 202 goto fail_set;
203 } 203 }
204 204
205 ps3_chip_mask(*virq); 205 ps3_chip_mask(irq_get_irq_data(*virq));
206 206
207 return result; 207 return result;
208 208
@@ -296,7 +296,7 @@ int ps3_irq_plug_destroy(unsigned int virq)
296 pr_debug("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__, 296 pr_debug("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__,
297 __LINE__, pd->ppe_id, pd->thread_id, virq); 297 __LINE__, pd->ppe_id, pd->thread_id, virq);
298 298
299 ps3_chip_mask(virq); 299 ps3_chip_mask(irq_get_irq_data(virq));
300 300
301 result = lv1_disconnect_irq_plug_ext(pd->ppe_id, pd->thread_id, virq); 301 result = lv1_disconnect_irq_plug_ext(pd->ppe_id, pd->thread_id, virq);
302 302
@@ -357,7 +357,7 @@ int ps3_event_receive_port_destroy(unsigned int virq)
357 357
358 pr_debug(" -> %s:%d virq %u\n", __func__, __LINE__, virq); 358 pr_debug(" -> %s:%d virq %u\n", __func__, __LINE__, virq);
359 359
360 ps3_chip_mask(virq); 360 ps3_chip_mask(irq_get_irq_data(virq));
361 361
362 result = lv1_destruct_event_receive_port(virq_to_hw(virq)); 362 result = lv1_destruct_event_receive_port(virq_to_hw(virq));
363 363
@@ -492,7 +492,7 @@ int ps3_io_irq_destroy(unsigned int virq)
492 int result; 492 int result;
493 unsigned long outlet = virq_to_hw(virq); 493 unsigned long outlet = virq_to_hw(virq);
494 494
495 ps3_chip_mask(virq); 495 ps3_chip_mask(irq_get_irq_data(virq));
496 496
497 /* 497 /*
498 * lv1_destruct_io_irq_outlet() will destroy the IRQ plug, 498 * lv1_destruct_io_irq_outlet() will destroy the IRQ plug,
@@ -553,7 +553,7 @@ int ps3_vuart_irq_destroy(unsigned int virq)
553{ 553{
554 int result; 554 int result;
555 555
556 ps3_chip_mask(virq); 556 ps3_chip_mask(irq_get_irq_data(virq));
557 result = lv1_deconfigure_virtual_uart_irq(); 557 result = lv1_deconfigure_virtual_uart_irq();
558 558
559 if (result) { 559 if (result) {
@@ -605,7 +605,7 @@ int ps3_spe_irq_destroy(unsigned int virq)
605{ 605{
606 int result; 606 int result;
607 607
608 ps3_chip_mask(virq); 608 ps3_chip_mask(irq_get_irq_data(virq));
609 609
610 result = ps3_irq_plug_destroy(virq); 610 result = ps3_irq_plug_destroy(virq);
611 BUG_ON(result); 611 BUG_ON(result);