From 1245088400c0e5f93b979356e578c9a8825b953a Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 26 Jun 2007 00:13:09 -0700 Subject: [SPARC64]: Fix VIRQ enabling. We were doing the wrong call to turn them on, and also when enabling we need to forcefully set the state to IDLE. Signed-off-by: David S. Miller --- arch/sparc64/kernel/irq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index e60d283..a862d13 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -400,6 +400,12 @@ static void sun4v_virq_enable(unsigned int virt_irq) "err(%d)\n", dev_handle, dev_ino, cpuid, err); err = sun4v_vintr_set_state(dev_handle, dev_ino, + HV_INTR_STATE_IDLE); + if (err != HV_EOK) + printk("sun4v_vintr_set_state(%lx,%lx," + "HV_INTR_STATE_IDLE): err(%d)\n", + dev_handle, dev_ino, err); + err = sun4v_vintr_set_valid(dev_handle, dev_ino, HV_INTR_ENABLED); if (err != HV_EOK) printk("sun4v_vintr_set_state(%lx,%lx," @@ -420,7 +426,7 @@ static void sun4v_virq_disable(unsigned int virt_irq) dev_handle = ino & IMAP_IGN; dev_ino = ino & IMAP_INO; - err = sun4v_vintr_set_state(dev_handle, dev_ino, + err = sun4v_vintr_set_valid(dev_handle, dev_ino, HV_INTR_DISABLED); if (err != HV_EOK) printk("sun4v_vintr_set_state(%lx,%lx," -- cgit v1.1 From a357b8f42e7b85e2522c3ad2b29b685bc28743b4 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 26 Jun 2007 00:13:31 -0700 Subject: [SPARC64]: Need to set state to IDLE during sun4v IRQ enable. This fixes hypervisor console interrupts on LDOM guests. Signed-off-by: David S. Miller --- arch/sparc64/kernel/irq.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch') diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index a862d13..6b6165d3 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -329,6 +329,10 @@ static void sun4v_irq_enable(unsigned int virt_irq) if (err != HV_EOK) printk("sun4v_intr_settarget(%x,%lu): err(%d)\n", ino, cpuid, err); + err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE); + if (err != HV_EOK) + printk("sun4v_intr_setstate(%x): " + "err(%d)\n", ino, err); err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED); if (err != HV_EOK) printk("sun4v_intr_setenabled(%x): err(%d)\n", -- cgit v1.1