aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc64/kernel/irq.c21
-rw-r--r--include/asm-sparc64/hypervisor.h6
2 files changed, 21 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index c57b1708ae8c..0d3b0ea329c1 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -154,9 +154,16 @@ void enable_irq(unsigned int irq)
154 if (tlb_type == hypervisor) { 154 if (tlb_type == hypervisor) {
155 unsigned int ino = __irq_ino(irq); 155 unsigned int ino = __irq_ino(irq);
156 int cpu = hard_smp_processor_id(); 156 int cpu = hard_smp_processor_id();
157 int err;
157 158
158 sun4v_intr_settarget(ino, cpu); 159 err = sun4v_intr_settarget(ino, cpu);
160 if (err != HV_EOK)
161 printk("sun4v_intr_settarget(%x,%d): err(%d)\n",
162 ino, cpu, err);
159 sun4v_intr_setenabled(ino, HV_INTR_ENABLED); 163 sun4v_intr_setenabled(ino, HV_INTR_ENABLED);
164 if (err != HV_EOK)
165 printk("sun4v_intr_setenabled(%x): err(%d)\n",
166 ino, err);
160 } else { 167 } else {
161 if (tlb_type == cheetah || tlb_type == cheetah_plus) { 168 if (tlb_type == cheetah || tlb_type == cheetah_plus) {
162 unsigned long ver; 169 unsigned long ver;
@@ -216,8 +223,12 @@ void disable_irq(unsigned int irq)
216 if (imap != 0UL) { 223 if (imap != 0UL) {
217 if (tlb_type == hypervisor) { 224 if (tlb_type == hypervisor) {
218 unsigned int ino = __irq_ino(irq); 225 unsigned int ino = __irq_ino(irq);
226 int err;
219 227
220 sun4v_intr_setenabled(ino, HV_INTR_DISABLED); 228 err = sun4v_intr_setenabled(ino, HV_INTR_DISABLED);
229 if (err != HV_EOK)
230 printk("sun4v_intr_setenabled(%x): "
231 "err(%d)\n", ino, err);
221 } else { 232 } else {
222 u32 tmp; 233 u32 tmp;
223 234
@@ -647,8 +658,12 @@ static void process_bucket(int irq, struct ino_bucket *bp, struct pt_regs *regs)
647 if (bp->pil != 0) { 658 if (bp->pil != 0) {
648 if (tlb_type == hypervisor) { 659 if (tlb_type == hypervisor) {
649 unsigned int ino = __irq_ino(bp); 660 unsigned int ino = __irq_ino(bp);
661 int err;
650 662
651 sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE); 663 err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE);
664 if (err != HV_EOK)
665 printk("sun4v_intr_setstate(%x): "
666 "err(%d)\n", ino, err);
652 } else { 667 } else {
653 upa_writel(ICLR_IDLE, bp->iclr); 668 upa_writel(ICLR_IDLE, bp->iclr);
654 /* Test and add entropy */ 669 /* Test and add entropy */
diff --git a/include/asm-sparc64/hypervisor.h b/include/asm-sparc64/hypervisor.h
index 76a9d0fa2724..f14992ab7fec 100644
--- a/include/asm-sparc64/hypervisor.h
+++ b/include/asm-sparc64/hypervisor.h
@@ -1238,7 +1238,7 @@ extern unsigned long sun4v_intr_getenabled(unsigned long sysino);
1238#define HV_FAST_INTR_SETENABLED 0xa2 1238#define HV_FAST_INTR_SETENABLED 0xa2
1239 1239
1240#ifndef __ASSEMBLY__ 1240#ifndef __ASSEMBLY__
1241extern void sun4v_intr_setenabled(unsigned long sysino, unsigned long intr_enabled); 1241extern unsigned long sun4v_intr_setenabled(unsigned long sysino, unsigned long intr_enabled);
1242#endif 1242#endif
1243 1243
1244/* intr_getstate() 1244/* intr_getstate()
@@ -1274,7 +1274,7 @@ extern unsigned long sun4v_intr_getstate(unsigned long sysino);
1274#define HV_FAST_INTR_SETSTATE 0xa4 1274#define HV_FAST_INTR_SETSTATE 0xa4
1275 1275
1276#ifndef __ASSEMBLY__ 1276#ifndef __ASSEMBLY__
1277extern void sun4v_intr_setstate(unsigned long sysino, unsigned long intr_state); 1277extern unsigned long sun4v_intr_setstate(unsigned long sysino, unsigned long intr_state);
1278#endif 1278#endif
1279 1279
1280/* intr_gettarget() 1280/* intr_gettarget()
@@ -1309,7 +1309,7 @@ extern unsigned long sun4v_intr_gettarget(unsigned long sysino);
1309#define HV_FAST_INTR_SETTARGET 0xa6 1309#define HV_FAST_INTR_SETTARGET 0xa6
1310 1310
1311#ifndef __ASSEMBLY__ 1311#ifndef __ASSEMBLY__
1312extern void sun4v_intr_settarget(unsigned long sysino, unsigned long cpuid); 1312extern unsigned long sun4v_intr_settarget(unsigned long sysino, unsigned long cpuid);
1313#endif 1313#endif
1314 1314
1315/* PCI IO services. 1315/* PCI IO services.