diff options
author | James Bottomley <jejb@hobholes.localdomain> | 2006-10-12 23:21:16 -0400 |
---|---|---|
committer | James Bottomley <jejb@hobholes.localdomain> | 2006-10-12 23:21:16 -0400 |
commit | c771746ef6ad64357897a90da42908d5c800a2c5 (patch) | |
tree | f8cbcb37440e6c9260cf57424b008aac374d6d89 /arch/i386/mach-voyager/voyager_smp.c | |
parent | 1baaf0b424fe611a99cf3e2e59e84df0561d679a (diff) |
[VOYAGER] fix genirq mess
The implementation of genirq in x86 completely broke voyager (and
presumably visws). Since it's plugged into so much of the x86
infrastructure, you can't expect it to work unconverted.
This patch introduces a voyager IRQ handler type and switches voyager
to the genirq infrastructure.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'arch/i386/mach-voyager/voyager_smp.c')
-rw-r--r-- | arch/i386/mach-voyager/voyager_smp.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index d42422fc4af3..2e73f353f165 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c | |||
@@ -85,8 +85,8 @@ static int ack_QIC_CPI(__u8 cpi); | |||
85 | static void ack_special_QIC_CPI(__u8 cpi); | 85 | static void ack_special_QIC_CPI(__u8 cpi); |
86 | static void ack_VIC_CPI(__u8 cpi); | 86 | static void ack_VIC_CPI(__u8 cpi); |
87 | static void send_CPI_allbutself(__u8 cpi); | 87 | static void send_CPI_allbutself(__u8 cpi); |
88 | static void enable_vic_irq(unsigned int irq); | 88 | static void mask_vic_irq(unsigned int irq); |
89 | static void disable_vic_irq(unsigned int irq); | 89 | static void unmask_vic_irq(unsigned int irq); |
90 | static unsigned int startup_vic_irq(unsigned int irq); | 90 | static unsigned int startup_vic_irq(unsigned int irq); |
91 | static void enable_local_vic_irq(unsigned int irq); | 91 | static void enable_local_vic_irq(unsigned int irq); |
92 | static void disable_local_vic_irq(unsigned int irq); | 92 | static void disable_local_vic_irq(unsigned int irq); |
@@ -205,15 +205,12 @@ ack_CPI(__u8 cpi) | |||
205 | /* The VIC IRQ descriptors -- these look almost identical to the | 205 | /* The VIC IRQ descriptors -- these look almost identical to the |
206 | * 8259 IRQs except that masks and things must be kept per processor | 206 | * 8259 IRQs except that masks and things must be kept per processor |
207 | */ | 207 | */ |
208 | static struct hw_interrupt_type vic_irq_type = { | 208 | static struct irq_chip vic_chip = { |
209 | .typename = "VIC-level", | 209 | .name = "VIC", |
210 | .startup = startup_vic_irq, | 210 | .startup = startup_vic_irq, |
211 | .shutdown = disable_vic_irq, | 211 | .mask = mask_vic_irq, |
212 | .enable = enable_vic_irq, | 212 | .unmask = unmask_vic_irq, |
213 | .disable = disable_vic_irq, | 213 | .set_affinity = set_vic_irq_affinity, |
214 | .ack = before_handle_vic_irq, | ||
215 | .end = after_handle_vic_irq, | ||
216 | .set_affinity = set_vic_irq_affinity, | ||
217 | }; | 214 | }; |
218 | 215 | ||
219 | /* used to count up as CPUs are brought on line (starts at 0) */ | 216 | /* used to count up as CPUs are brought on line (starts at 0) */ |
@@ -1397,6 +1394,17 @@ setup_profiling_timer(unsigned int multiplier) | |||
1397 | return 0; | 1394 | return 0; |
1398 | } | 1395 | } |
1399 | 1396 | ||
1397 | /* This is a bit of a mess, but forced on us by the genirq changes | ||
1398 | * there's no genirq handler that really does what voyager wants | ||
1399 | * so hack it up with the simple IRQ handler */ | ||
1400 | static void fastcall | ||
1401 | handle_vic_irq(unsigned int irq, struct irq_desc *desc) | ||
1402 | { | ||
1403 | before_handle_vic_irq(irq); | ||
1404 | handle_simple_irq(irq, desc); | ||
1405 | after_handle_vic_irq(irq); | ||
1406 | } | ||
1407 | |||
1400 | 1408 | ||
1401 | /* The CPIs are handled in the per cpu 8259s, so they must be | 1409 | /* The CPIs are handled in the per cpu 8259s, so they must be |
1402 | * enabled to be received: FIX: enabling the CPIs in the early | 1410 | * enabled to be received: FIX: enabling the CPIs in the early |
@@ -1433,7 +1441,7 @@ smp_intr_init(void) | |||
1433 | * This is for later: first 16 correspond to PC IRQs; next 16 | 1441 | * This is for later: first 16 correspond to PC IRQs; next 16 |
1434 | * are Primary MC IRQs and final 16 are Secondary MC IRQs */ | 1442 | * are Primary MC IRQs and final 16 are Secondary MC IRQs */ |
1435 | for(i = 0; i < 48; i++) | 1443 | for(i = 0; i < 48; i++) |
1436 | irq_desc[i].chip = &vic_irq_type; | 1444 | set_irq_chip_and_handler(i, &vic_chip, handle_vic_irq); |
1437 | } | 1445 | } |
1438 | 1446 | ||
1439 | /* send a CPI at level cpi to a set of cpus in cpuset (set 1 bit per | 1447 | /* send a CPI at level cpi to a set of cpus in cpuset (set 1 bit per |
@@ -1531,7 +1539,7 @@ ack_VIC_CPI(__u8 cpi) | |||
1531 | static unsigned int | 1539 | static unsigned int |
1532 | startup_vic_irq(unsigned int irq) | 1540 | startup_vic_irq(unsigned int irq) |
1533 | { | 1541 | { |
1534 | enable_vic_irq(irq); | 1542 | unmask_vic_irq(irq); |
1535 | 1543 | ||
1536 | return 0; | 1544 | return 0; |
1537 | } | 1545 | } |
@@ -1558,7 +1566,7 @@ startup_vic_irq(unsigned int irq) | |||
1558 | * adjust their masks accordingly. */ | 1566 | * adjust their masks accordingly. */ |
1559 | 1567 | ||
1560 | static void | 1568 | static void |
1561 | enable_vic_irq(unsigned int irq) | 1569 | unmask_vic_irq(unsigned int irq) |
1562 | { | 1570 | { |
1563 | /* linux doesn't to processor-irq affinity, so enable on | 1571 | /* linux doesn't to processor-irq affinity, so enable on |
1564 | * all CPUs we know about */ | 1572 | * all CPUs we know about */ |
@@ -1567,7 +1575,7 @@ enable_vic_irq(unsigned int irq) | |||
1567 | __u32 processorList = 0; | 1575 | __u32 processorList = 0; |
1568 | unsigned long flags; | 1576 | unsigned long flags; |
1569 | 1577 | ||
1570 | VDEBUG(("VOYAGER: enable_vic_irq(%d) CPU%d affinity 0x%lx\n", | 1578 | VDEBUG(("VOYAGER: unmask_vic_irq(%d) CPU%d affinity 0x%lx\n", |
1571 | irq, cpu, cpu_irq_affinity[cpu])); | 1579 | irq, cpu, cpu_irq_affinity[cpu])); |
1572 | spin_lock_irqsave(&vic_irq_lock, flags); | 1580 | spin_lock_irqsave(&vic_irq_lock, flags); |
1573 | for_each_online_cpu(real_cpu) { | 1581 | for_each_online_cpu(real_cpu) { |
@@ -1591,7 +1599,7 @@ enable_vic_irq(unsigned int irq) | |||
1591 | } | 1599 | } |
1592 | 1600 | ||
1593 | static void | 1601 | static void |
1594 | disable_vic_irq(unsigned int irq) | 1602 | mask_vic_irq(unsigned int irq) |
1595 | { | 1603 | { |
1596 | /* lazy disable, do nothing */ | 1604 | /* lazy disable, do nothing */ |
1597 | } | 1605 | } |
@@ -1819,7 +1827,7 @@ set_vic_irq_affinity(unsigned int irq, cpumask_t mask) | |||
1819 | * disabled again as it comes in (voyager lazy disable). If | 1827 | * disabled again as it comes in (voyager lazy disable). If |
1820 | * the affinity map is tightened to disable the interrupt on a | 1828 | * the affinity map is tightened to disable the interrupt on a |
1821 | * cpu, it will be pushed off when it comes in */ | 1829 | * cpu, it will be pushed off when it comes in */ |
1822 | enable_vic_irq(irq); | 1830 | unmask_vic_irq(irq); |
1823 | } | 1831 | } |
1824 | 1832 | ||
1825 | static void | 1833 | static void |