From b60119eb02db8b6f7b1aba0fb7b8222d6ce9f9aa Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 16 Nov 2005 20:29:29 +0000 Subject: [PATCH] Fix a typo in the check for an invalid APIC. If we are told about an I/O APIC that doesn't exist, then a read of the version register is going to return -1 which is 0xffffffff not 0xffffff. Tested on: i386 Tested by: Nikos Ntarmos ntarmos at ceid dot upatras dot gr MFC after: 1 week --- sys/amd64/amd64/io_apic.c | 2 +- sys/i386/i386/io_apic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/io_apic.c b/sys/amd64/amd64/io_apic.c index c9777315acaf..46c6cd35a9c3 100644 --- a/sys/amd64/amd64/io_apic.c +++ b/sys/amd64/amd64/io_apic.c @@ -503,7 +503,7 @@ ioapic_create(uintptr_t addr, int32_t apic_id, int intbase) mtx_unlock_spin(&icu_lock); /* If it's version register doesn't seem to work, punt. */ - if (value == 0xffffff) { + if (value == 0xffffffff) { pmap_unmapdev((vm_offset_t)apic, IOAPIC_MEM_REGION); return (NULL); } diff --git a/sys/i386/i386/io_apic.c b/sys/i386/i386/io_apic.c index e4f49c55a02e..b9999e23832d 100644 --- a/sys/i386/i386/io_apic.c +++ b/sys/i386/i386/io_apic.c @@ -506,7 +506,7 @@ ioapic_create(uintptr_t addr, int32_t apic_id, int intbase) mtx_unlock_spin(&icu_lock); /* If it's version register doesn't seem to work, punt. */ - if (value == 0xffffff) { + if (value == 0xffffffff) { pmap_unmapdev((vm_offset_t)apic, IOAPIC_MEM_REGION); return (NULL); }