aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/irq.c')
-rw-r--r--arch/sparc64/kernel/irq.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 6241e3dbbd57..3edc18e1b818 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -279,7 +279,7 @@ static void sun4u_irq_enable(unsigned int virt_irq)
279 struct irq_handler_data *data = get_irq_chip_data(virt_irq); 279 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
280 280
281 if (likely(data)) { 281 if (likely(data)) {
282 unsigned long cpuid, imap; 282 unsigned long cpuid, imap, val;
283 unsigned int tid; 283 unsigned int tid;
284 284
285 cpuid = irq_choose_cpu(virt_irq); 285 cpuid = irq_choose_cpu(virt_irq);
@@ -287,7 +287,11 @@ static void sun4u_irq_enable(unsigned int virt_irq)
287 287
288 tid = sun4u_compute_tid(imap, cpuid); 288 tid = sun4u_compute_tid(imap, cpuid);
289 289
290 upa_writel(tid | IMAP_VALID, imap); 290 val = upa_readq(imap);
291 val &= ~(IMAP_TID_UPA | IMAP_TID_JBUS |
292 IMAP_AID_SAFARI | IMAP_NID_SAFARI);
293 val |= tid | IMAP_VALID;
294 upa_writeq(val, imap);
291 } 295 }
292} 296}
293 297
@@ -297,10 +301,10 @@ static void sun4u_irq_disable(unsigned int virt_irq)
297 301
298 if (likely(data)) { 302 if (likely(data)) {
299 unsigned long imap = data->imap; 303 unsigned long imap = data->imap;
300 u32 tmp = upa_readl(imap); 304 u32 tmp = upa_readq(imap);
301 305
302 tmp &= ~IMAP_VALID; 306 tmp &= ~IMAP_VALID;
303 upa_writel(tmp, imap); 307 upa_writeq(tmp, imap);
304 } 308 }
305} 309}
306 310
@@ -309,7 +313,7 @@ static void sun4u_irq_end(unsigned int virt_irq)
309 struct irq_handler_data *data = get_irq_chip_data(virt_irq); 313 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
310 314
311 if (likely(data)) 315 if (likely(data))
312 upa_writel(ICLR_IDLE, data->iclr); 316 upa_writeq(ICLR_IDLE, data->iclr);
313} 317}
314 318
315static void sun4v_irq_enable(unsigned int virt_irq) 319static void sun4v_irq_enable(unsigned int virt_irq)
@@ -465,7 +469,7 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
465 469
466 BUG_ON(tlb_type == hypervisor); 470 BUG_ON(tlb_type == hypervisor);
467 471
468 ino = (upa_readl(imap) & (IMAP_IGN | IMAP_INO)) + inofixup; 472 ino = (upa_readq(imap) & (IMAP_IGN | IMAP_INO)) + inofixup;
469 bucket = &ivector_table[ino]; 473 bucket = &ivector_table[ino];
470 if (!bucket->virt_irq) { 474 if (!bucket->virt_irq) {
471 bucket->virt_irq = virt_irq_alloc(__irq(bucket)); 475 bucket->virt_irq = virt_irq_alloc(__irq(bucket));