diff mbox

[04/16] qemu-kvm: Drop IRQ0 override test from ioapic_set_irq

Message ID 1f4e95a22a6397729461883d155916be032a9dba.1305288845.git.jan.kiszka@siemens.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka May 13, 2011, 12:13 p.m. UTC
The IRQ0 override is not configurable while using the user space IOAPIC.
When the in-kernel irqchip is active, ioapic_set_irq is never called. So
drop this useless test.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/ioapic.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Avi Kivity May 16, 2011, 10:29 a.m. UTC | #1
On 05/13/2011 03:13 PM, Jan Kiszka wrote:
> The IRQ0 override is not configurable while using the user space IOAPIC.
> When the in-kernel irqchip is active, ioapic_set_irq is never called. So
> drop this useless test.
>

> @@ -146,7 +145,7 @@ static void ioapic_set_irq(void *opaque, int vector, int level)
>        * the cleanest way of doing it but it should work. */
>
>       DPRINTF("%s: %s vec %x\n", __func__, level ? "raise" : "lower", vector);
> -    if (vector == 0&&  irq0override) {
> +    if (vector == 0) {
>           vector = 2;
>       }
>       if (vector>= 0&&  vector<  IOAPIC_NUM_PINS) {

Incidentally, the variable should be called pin, not vector, and 
gsi->ioapic/pic wiring should be done outside the ioapic code.
diff mbox

Patch

diff --git a/hw/ioapic.c b/hw/ioapic.c
index 2ac6127..084d37a 100644
--- a/hw/ioapic.c
+++ b/hw/ioapic.c
@@ -22,7 +22,6 @@ 
 
 #include "hw.h"
 #include "pc.h"
-#include "sysemu.h"
 #include "apic.h"
 #include "ioapic.h"
 #include "qemu-timer.h"
@@ -146,7 +145,7 @@  static void ioapic_set_irq(void *opaque, int vector, int level)
      * the cleanest way of doing it but it should work. */
 
     DPRINTF("%s: %s vec %x\n", __func__, level ? "raise" : "lower", vector);
-    if (vector == 0 && irq0override) {
+    if (vector == 0) {
         vector = 2;
     }
     if (vector >= 0 && vector < IOAPIC_NUM_PINS) {