diff options
author | Daniel Schaeffer <daniel@dschaeffer.localdomain> | 2008-02-01 12:27:23 -0500 |
---|---|---|
committer | Daniel Schaeffer <daniel@dschaeffer.localdomain> | 2008-02-01 12:27:23 -0500 |
commit | 50c8843a4a66f7b3005d1d1267413a88c63e2103 (patch) | |
tree | bdb9dce43fd926a451f3b890c002cc173f8caf22 /arch/x86/mach-visws/mpparse.c | |
parent | 0f7efc5cb585cf74868de2232fc6c34b94c70d20 (diff) | |
parent | 49914084e797530d9baaf51df9eda77babc98fa8 (diff) |
Merge branch '2.6.24' into 2.6.24-imx27
Conflicts:
MAINTAINERS
Makefile
arch/arm/Kconfig
arch/arm/oprofile/Kconfig
drivers/Makefile
drivers/ata/Kconfig
drivers/ata/Makefile
drivers/char/watchdog/Kconfig
drivers/char/watchdog/Makefile
drivers/ide/Kconfig
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Makefile
drivers/mmc/card/block.c
drivers/mmc/card/sdio_uart.c
drivers/mmc/core/Makefile
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/sdio.c
drivers/mmc/core/sdio_bus.c
drivers/mmc/core/sdio_cis.c
drivers/mmc/core/sdio_io.c
drivers/mmc/core/sdio_irq.c
drivers/mmc/core/sdio_ops.c
drivers/mmc/host/Kconfig
drivers/mmc/host/Makefile
drivers/mmc/host/au1xmmc.c
drivers/mmc/host/tifm_sd.c
drivers/mtd/maps/Makefile
drivers/pcmcia/Kconfig
drivers/pcmcia/Makefile
fs/exec.c
include/linux/mmc/card.h
include/linux/mmc/host.h
include/linux/mmc/sdio_func.h
include/linux/mmc/sdio_ids.h
include/linux/mod_devicetable.h
mm/hugetlb.c
scripts/mod/file2alias.c
Diffstat (limited to 'arch/x86/mach-visws/mpparse.c')
-rw-r--r-- | arch/x86/mach-visws/mpparse.c | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/arch/x86/mach-visws/mpparse.c b/arch/x86/mach-visws/mpparse.c new file mode 100644 index 000000000000..f3c74fab8b95 --- /dev/null +++ b/arch/x86/mach-visws/mpparse.c @@ -0,0 +1,101 @@ + +#include <linux/init.h> +#include <linux/smp.h> + +#include <asm/smp.h> +#include <asm/io.h> + +#include "cobalt.h" +#include "mach_apic.h" + +/* Have we found an MP table */ +int smp_found_config; + +/* + * Various Linux-internal data structures created from the + * MP-table. + */ +int apic_version [MAX_APICS]; + +int pic_mode; +unsigned long mp_lapic_addr; + +/* Processor that is doing the boot up */ +unsigned int boot_cpu_physical_apicid = -1U; + +/* Bitmask of physically existing CPUs */ +physid_mask_t phys_cpu_present_map; + +unsigned int __initdata maxcpus = NR_CPUS; + +/* + * The Visual Workstation is Intel MP compliant in the hardware + * sense, but it doesn't have a BIOS(-configuration table). + * No problem for Linux. + */ + +static void __init MP_processor_info (struct mpc_config_processor *m) +{ + int ver, logical_apicid; + physid_mask_t apic_cpus; + + if (!(m->mpc_cpuflag & CPU_ENABLED)) + return; + + logical_apicid = m->mpc_apicid; + printk(KERN_INFO "%sCPU #%d %ld:%ld APIC version %d\n", + m->mpc_cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "", + m->mpc_apicid, + (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, + (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, + m->mpc_apicver); + + if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) + boot_cpu_physical_apicid = m->mpc_apicid; + + ver = m->mpc_apicver; + if ((ver >= 0x14 && m->mpc_apicid >= 0xff) || m->mpc_apicid >= 0xf) { + printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", + m->mpc_apicid, MAX_APICS); + return; + } + + apic_cpus = apicid_to_cpu_present(m->mpc_apicid); + physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus); + /* + * Validate version + */ + if (ver == 0x0) { + printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! " + "fixing up to 0x10. (tell your hw vendor)\n", + m->mpc_apicid); + ver = 0x10; + } + apic_version[m->mpc_apicid] = ver; +} + +void __init find_smp_config(void) +{ + 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 > maxcpus) + ncpus = maxcpus; + + smp_found_config = 1; + while (ncpus--) + MP_processor_info(mp++); + + mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; +} + +void __init get_smp_config (void) +{ +} |