aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-14 01:56:27 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:12:51 -0500
commitc4bea2883974a59ab7a0ac6c01d34f7ae0e8cd8e (patch)
tree3d32f942cd0a62f6ca89fe7781f59708845d7a38 /arch/sparc64/kernel
parent4bf447d6f7c2357dec8bdc24ce0fcffd71cc29c0 (diff)
[SPARC64]: Make error codes available from sun4v_intr_get*().
And check for errors at call sites. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/irq.c21
1 files changed, 18 insertions, 3 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 */