Example #1
0
static void __init MP_bus_info (struct mpc_config_bus *m)
{
	char str[7];

	memcpy(str, m->mpc_bustype, 6);
	str[6] = 0;

	mpc_oem_bus_info(m, str, translation_table[mpc_record]);

	if (m->mpc_busid >= MAX_MP_BUSSES) {
		printk(KERN_WARNING "MP table busid value (%d) for bustype %s "
			" is too large, max. supported is %d\n",
			m->mpc_busid, str, MAX_MP_BUSSES - 1);
		return;
	}

	if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA)-1) == 0) {
		mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA;
	} else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA)-1) == 0) {
		mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA;
	} else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI)-1) == 0) {
		mpc_oem_pci_bus(m, translation_table[mpc_record]);
		mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI;
		mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id;
		mp_current_pci_id++;
	} else if (strncmp(str, BUSTYPE_MCA, sizeof(BUSTYPE_MCA)-1) == 0) {
		mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA;
	} else if (strncmp(str, BUSTYPE_NEC98, sizeof(BUSTYPE_NEC98)-1) == 0) {
		mp_bus_id_to_type[m->mpc_busid] = MP_BUS_NEC98;
	} else {
		printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str);
	}
}
Example #2
0
static void __init MP_bus_info(struct mpc_config_bus *m)
{
    char str[7];

    memcpy(str, m->mpc_bustype, 6);
    str[6] = 0;

#ifdef CONFIG_X86_NUMAQ
    mpc_oem_bus_info(m, str, translation_table[mpc_record]);
#else
    Dprintk("Bus #%d is %s\n", m->mpc_busid, str);
#endif

#if MAX_MP_BUSSES < 256
    if (m->mpc_busid >= MAX_MP_BUSSES) {
        printk(KERN_WARNING "MP table busid value (%d) for bustype %s "
               " is too large, max. supported is %d\n",
               m->mpc_busid, str, MAX_MP_BUSSES - 1);
        return;
    }
#endif

    if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) {
         set_bit(m->mpc_busid, mp_bus_not_pci);
#if defined(CONFIG_EISA) || defined (CONFIG_MCA)
        mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA;
#endif
    } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) {
#ifdef CONFIG_X86_NUMAQ
        mpc_oem_pci_bus(m, translation_table[mpc_record]);
#endif
        clear_bit(m->mpc_busid, mp_bus_not_pci);
        mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id;
        mp_current_pci_id++;
#if defined(CONFIG_EISA) || defined (CONFIG_MCA)
        mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI;
    } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA) - 1) == 0) {
        mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA;
    } else if (strncmp(str, BUSTYPE_MCA, sizeof(BUSTYPE_MCA) - 1) == 0) {
        mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA;
#endif
    } else
        printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str);
}