summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-11-16 20:29:29 +0000
committerjhb <jhb@FreeBSD.org>2005-11-16 20:29:29 +0000
commit83cd89c7416e23a69a6c321be43a678f2567ba90 (patch)
tree6aba08e9758cbe91a507291f27c4ef499fe31ce4 /sys
parentbc23ec6b6fe81612abae6bff8add4d6fbfe9c813 (diff)
downloadFreeBSD-src-83cd89c7416e23a69a6c321be43a678f2567ba90.zip
FreeBSD-src-83cd89c7416e23a69a6c321be43a678f2567ba90.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/io_apic.c2
-rw-r--r--sys/i386/i386/io_apic.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/io_apic.c b/sys/amd64/amd64/io_apic.c
index c977731..46c6cd3 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 e4f49c5..b9999e2 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);
}
OpenPOWER on IntegriCloud