diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-16 17:37:05 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:13:17 -0500 |
commit | 22780e23c629303474797d17e7f09ad7721ef55b (patch) | |
tree | e005c6475aaeb61a6db0d43424c212d89f77dc40 /arch/sparc64 | |
parent | 94f8762db9a80ed34252e9fe5fa38be87bb7826b (diff) |
[SPARC64]: Set dummy bucket->{imap,iclr} unique on SUN4V.
So that free_irq() disable's the IRQ correctly.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index e1729e5189a3..580b4de8b7c6 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -143,7 +143,6 @@ void enable_irq(unsigned int irq) | |||
143 | { | 143 | { |
144 | struct ino_bucket *bucket = __bucket(irq); | 144 | struct ino_bucket *bucket = __bucket(irq); |
145 | unsigned long imap; | 145 | unsigned long imap; |
146 | unsigned long tid; | ||
147 | 146 | ||
148 | imap = bucket->imap; | 147 | imap = bucket->imap; |
149 | if (imap == 0UL) | 148 | if (imap == 0UL) |
@@ -169,6 +168,8 @@ void enable_irq(unsigned int irq) | |||
169 | printk("sun4v_intr_setstate(%x): " | 168 | printk("sun4v_intr_setstate(%x): " |
170 | "err(%d)\n", ino, err); | 169 | "err(%d)\n", ino, err); |
171 | } else { | 170 | } else { |
171 | unsigned long tid; | ||
172 | |||
172 | if (tlb_type == cheetah || tlb_type == cheetah_plus) { | 173 | if (tlb_type == cheetah || tlb_type == cheetah_plus) { |
173 | unsigned long ver; | 174 | unsigned long ver; |
174 | 175 | ||
@@ -342,9 +343,12 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino, int pil, unsign | |||
342 | /* Catch accidental accesses to these things. IMAP/ICLR handling | 343 | /* Catch accidental accesses to these things. IMAP/ICLR handling |
343 | * is done by hypervisor calls on sun4v platforms, not by direct | 344 | * is done by hypervisor calls on sun4v platforms, not by direct |
344 | * register accesses. | 345 | * register accesses. |
346 | * | ||
347 | * But we need to make them look unique for the disable_irq() logic | ||
348 | * in free_irq(). | ||
345 | */ | 349 | */ |
346 | bucket->imap = ~0UL; | 350 | bucket->imap = ~0UL - sysino; |
347 | bucket->iclr = ~0UL; | 351 | bucket->iclr = ~0UL - sysino; |
348 | 352 | ||
349 | bucket->pil = pil; | 353 | bucket->pil = pil; |
350 | bucket->flags = flags; | 354 | bucket->flags = flags; |
@@ -547,7 +551,6 @@ void free_irq(unsigned int irq, void *dev_id) | |||
547 | bucket = __bucket(irq); | 551 | bucket = __bucket(irq); |
548 | if (bucket != &pil0_dummy_bucket) { | 552 | if (bucket != &pil0_dummy_bucket) { |
549 | struct irq_desc *desc = bucket->irq_info; | 553 | struct irq_desc *desc = bucket->irq_info; |
550 | unsigned long imap = bucket->imap; | ||
551 | int ent, i; | 554 | int ent, i; |
552 | 555 | ||
553 | for (i = 0; i < MAX_IRQ_DESC_ACTION; i++) { | 556 | for (i = 0; i < MAX_IRQ_DESC_ACTION; i++) { |
@@ -560,6 +563,8 @@ void free_irq(unsigned int irq, void *dev_id) | |||
560 | } | 563 | } |
561 | 564 | ||
562 | if (!desc->action_active_mask) { | 565 | if (!desc->action_active_mask) { |
566 | unsigned long imap = bucket->imap; | ||
567 | |||
563 | /* This unique interrupt source is now inactive. */ | 568 | /* This unique interrupt source is now inactive. */ |
564 | bucket->flags &= ~IBF_ACTIVE; | 569 | bucket->flags &= ~IBF_ACTIVE; |
565 | 570 | ||
@@ -803,7 +808,6 @@ EXPORT_SYMBOL(probe_irq_off); | |||
803 | static int retarget_one_irq(struct irqaction *p, int goal_cpu) | 808 | static int retarget_one_irq(struct irqaction *p, int goal_cpu) |
804 | { | 809 | { |
805 | struct ino_bucket *bucket = get_ino_in_irqaction(p) + ivector_table; | 810 | struct ino_bucket *bucket = get_ino_in_irqaction(p) + ivector_table; |
806 | unsigned long imap = bucket->imap; | ||
807 | 811 | ||
808 | while (!cpu_online(goal_cpu)) { | 812 | while (!cpu_online(goal_cpu)) { |
809 | if (++goal_cpu >= NR_CPUS) | 813 | if (++goal_cpu >= NR_CPUS) |
@@ -816,6 +820,7 @@ static int retarget_one_irq(struct irqaction *p, int goal_cpu) | |||
816 | sun4v_intr_settarget(ino, goal_cpu); | 820 | sun4v_intr_settarget(ino, goal_cpu); |
817 | sun4v_intr_setenabled(ino, HV_INTR_ENABLED); | 821 | sun4v_intr_setenabled(ino, HV_INTR_ENABLED); |
818 | } else { | 822 | } else { |
823 | unsigned long imap = bucket->imap; | ||
819 | unsigned int tid; | 824 | unsigned int tid; |
820 | 825 | ||
821 | if (tlb_type == cheetah || tlb_type == cheetah_plus) { | 826 | if (tlb_type == cheetah || tlb_type == cheetah_plus) { |