i386/madt: Allow systems with only one CPU to boot with SMP kernel
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 13 May 2011 02:14:06 +0000 (10:14 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 13 May 2011 02:17:29 +0000 (10:17 +0800)
sys/platform/pc32/acpica5/acpi_madt.c

index 427bc32..8fddbb6 100644 (file)
@@ -373,7 +373,6 @@ madt_lapic_pass2(int bsp_apic_id)
                panic("madt_iterate_entries(pass2) failed\n");
 
        KKASSERT(arg.bsp_found);
-       KKASSERT(arg.cpu > 1);
        mp_naps = arg.cpu - 1; /* exclude BSP */
 
        sdt_sdth_unmap(&madt->madt_hdr);
@@ -431,9 +430,8 @@ madt_lapic_probe(struct lapic_enumerator *e)
 
        error = madt_iterate_entries(madt, madt_lapic_probe_callback, &arg);
        if (!error) {
-               if (arg.cpu_count <= 1) {
-                       kprintf("madt_lapic_probe: "
-                               "less than 2 CPUs is found\n");
+               if (arg.cpu_count == 0) {
+                       kprintf("madt_lapic_probe: no CPU is found\n");
                        error = EOPNOTSUPP;
                }
                if (arg.lapic_addr == 0) {