static int __init visws_find_smp_config(unsigned int reserve) { struct mpc_config_processor *mp = phys_to_virt(CO_CPU_TAB_PHYS); unsigned short ncpus = readw(phys_to_virt(CO_CPU_NUM_PHYS)); if (ncpus > CO_CPU_MAX) { printk(KERN_WARNING "find_visws_smp: got cpu count of %d at %p\n", ncpus, mp); ncpus = CO_CPU_MAX; } if (ncpus > setup_max_cpus) ncpus = setup_max_cpus; #ifdef CONFIG_X86_LOCAL_APIC smp_found_config = 1; #endif while (ncpus--) MP_processor_info(mp++); mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; return 1; }
static void __init acpi_parse_lapic(struct acpi_table_lapic *local_apic) { struct mpc_config_processor proc_entry; int ix = 0; if (!local_apic) return; printk(KERN_INFO "LAPIC (acpi_id[0x%04x] id[0x%x] enabled[%d])\n", local_apic->acpi_id, local_apic->id, local_apic->flags.enabled); printk(KERN_INFO "CPU %d (0x%02x00)", total_cpus, local_apic->id); if (local_apic->flags.enabled) { printk(" enabled"); ix = local_apic->id; if (ix >= MAX_APICS) { printk(KERN_WARNING "Processor #%d INVALID - (Max ID: %d).\n", ix, MAX_APICS); return; } /* * Fill in the info we want to save. Not concerned about * the processor ID. Processor features aren't present in * the table. */ proc_entry.mpc_type = MP_PROCESSOR; proc_entry.mpc_apicid = local_apic->id; proc_entry.mpc_cpuflag = CPU_ENABLED; if (proc_entry.mpc_apicid == boot_cpu_physical_apicid) { printk(" (BSP)"); proc_entry.mpc_cpuflag |= CPU_BOOTPROCESSOR; } proc_entry.mpc_cpufeature = (boot_cpu_data.x86 << 8) | (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask; proc_entry.mpc_featureflag = boot_cpu_data.x86_capability[0]; proc_entry.mpc_reserved[0] = 0; proc_entry.mpc_reserved[1] = 0; proc_entry.mpc_apicver = 0x10; /* integrated APIC */ MP_processor_info(&proc_entry); } else { printk(" disabled"); } printk("\n"); total_cpus++; return; }