From 79f75008296af2f24ee5c4f051483adcdd3920e0 Mon Sep 17 00:00:00 2001 From: tegge Date: Wed, 17 Apr 2002 18:27:10 +0000 Subject: [PATCH] Update io_apic_ints array properly when revoking an irq mapping. Adjust panic message. Submitted by: David Xu --- sys/amd64/amd64/mp_machdep.c | 4 ++-- sys/amd64/amd64/mptable.c | 4 ++-- sys/amd64/include/mptable.h | 4 ++-- sys/i386/i386/mp_machdep.c | 4 ++-- sys/i386/i386/mptable.c | 4 ++-- sys/i386/include/mptable.h | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 2b5ac5a188ee..05917ee19316 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -1025,7 +1025,7 @@ revoke_apic_irq(int irq) int oldintpin; if (int_to_apicintpin[irq].ioapic == -1) - panic("assign_apic_irq: inconsistent table"); + panic("revoke_apiq_irq: inconsistent table"); oldapic = int_to_apicintpin[irq].ioapic; oldintpin = int_to_apicintpin[irq].int_pin; @@ -1038,7 +1038,7 @@ revoke_apic_irq(int irq) for (x = 0; x < nintrs; x++) { if ((io_apic_ints[x].int_type == 0 || io_apic_ints[x].int_type == 3) && - io_apic_ints[x].int_vector == 0xff && + io_apic_ints[x].int_vector != 0xff && io_apic_ints[x].dst_apic_id == IO_TO_ID(oldapic) && io_apic_ints[x].dst_apic_int == oldintpin) io_apic_ints[x].int_vector = 0xff; diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index 2b5ac5a188ee..05917ee19316 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -1025,7 +1025,7 @@ revoke_apic_irq(int irq) int oldintpin; if (int_to_apicintpin[irq].ioapic == -1) - panic("assign_apic_irq: inconsistent table"); + panic("revoke_apiq_irq: inconsistent table"); oldapic = int_to_apicintpin[irq].ioapic; oldintpin = int_to_apicintpin[irq].int_pin; @@ -1038,7 +1038,7 @@ revoke_apic_irq(int irq) for (x = 0; x < nintrs; x++) { if ((io_apic_ints[x].int_type == 0 || io_apic_ints[x].int_type == 3) && - io_apic_ints[x].int_vector == 0xff && + io_apic_ints[x].int_vector != 0xff && io_apic_ints[x].dst_apic_id == IO_TO_ID(oldapic) && io_apic_ints[x].dst_apic_int == oldintpin) io_apic_ints[x].int_vector = 0xff; diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index 2b5ac5a188ee..05917ee19316 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -1025,7 +1025,7 @@ revoke_apic_irq(int irq) int oldintpin; if (int_to_apicintpin[irq].ioapic == -1) - panic("assign_apic_irq: inconsistent table"); + panic("revoke_apiq_irq: inconsistent table"); oldapic = int_to_apicintpin[irq].ioapic; oldintpin = int_to_apicintpin[irq].int_pin; @@ -1038,7 +1038,7 @@ revoke_apic_irq(int irq) for (x = 0; x < nintrs; x++) { if ((io_apic_ints[x].int_type == 0 || io_apic_ints[x].int_type == 3) && - io_apic_ints[x].int_vector == 0xff && + io_apic_ints[x].int_vector != 0xff && io_apic_ints[x].dst_apic_id == IO_TO_ID(oldapic) && io_apic_ints[x].dst_apic_int == oldintpin) io_apic_ints[x].int_vector = 0xff; diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index 2b5ac5a188ee..05917ee19316 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -1025,7 +1025,7 @@ revoke_apic_irq(int irq) int oldintpin; if (int_to_apicintpin[irq].ioapic == -1) - panic("assign_apic_irq: inconsistent table"); + panic("revoke_apiq_irq: inconsistent table"); oldapic = int_to_apicintpin[irq].ioapic; oldintpin = int_to_apicintpin[irq].int_pin; @@ -1038,7 +1038,7 @@ revoke_apic_irq(int irq) for (x = 0; x < nintrs; x++) { if ((io_apic_ints[x].int_type == 0 || io_apic_ints[x].int_type == 3) && - io_apic_ints[x].int_vector == 0xff && + io_apic_ints[x].int_vector != 0xff && io_apic_ints[x].dst_apic_id == IO_TO_ID(oldapic) && io_apic_ints[x].dst_apic_int == oldintpin) io_apic_ints[x].int_vector = 0xff; diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index 2b5ac5a188ee..05917ee19316 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -1025,7 +1025,7 @@ revoke_apic_irq(int irq) int oldintpin; if (int_to_apicintpin[irq].ioapic == -1) - panic("assign_apic_irq: inconsistent table"); + panic("revoke_apiq_irq: inconsistent table"); oldapic = int_to_apicintpin[irq].ioapic; oldintpin = int_to_apicintpin[irq].int_pin; @@ -1038,7 +1038,7 @@ revoke_apic_irq(int irq) for (x = 0; x < nintrs; x++) { if ((io_apic_ints[x].int_type == 0 || io_apic_ints[x].int_type == 3) && - io_apic_ints[x].int_vector == 0xff && + io_apic_ints[x].int_vector != 0xff && io_apic_ints[x].dst_apic_id == IO_TO_ID(oldapic) && io_apic_ints[x].dst_apic_int == oldintpin) io_apic_ints[x].int_vector = 0xff; diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index 2b5ac5a188ee..05917ee19316 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -1025,7 +1025,7 @@ revoke_apic_irq(int irq) int oldintpin; if (int_to_apicintpin[irq].ioapic == -1) - panic("assign_apic_irq: inconsistent table"); + panic("revoke_apiq_irq: inconsistent table"); oldapic = int_to_apicintpin[irq].ioapic; oldintpin = int_to_apicintpin[irq].int_pin; @@ -1038,7 +1038,7 @@ revoke_apic_irq(int irq) for (x = 0; x < nintrs; x++) { if ((io_apic_ints[x].int_type == 0 || io_apic_ints[x].int_type == 3) && - io_apic_ints[x].int_vector == 0xff && + io_apic_ints[x].int_vector != 0xff && io_apic_ints[x].dst_apic_id == IO_TO_ID(oldapic) && io_apic_ints[x].dst_apic_int == oldintpin) io_apic_ints[x].int_vector = 0xff;