x86: lindent mpparse_32.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
31d2092eb0
commit
4ef81297f7
@@ -41,10 +41,10 @@ int smp_found_config;
|
||||
* MP-table.
|
||||
*/
|
||||
#if defined (CONFIG_MCA) || defined (CONFIG_EISA)
|
||||
int mp_bus_id_to_type [MAX_MP_BUSSES];
|
||||
int mp_bus_id_to_type[MAX_MP_BUSSES];
|
||||
#endif
|
||||
DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
|
||||
int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 };
|
||||
int mp_bus_id_to_pci_bus[MAX_MP_BUSSES] = {[0 ... MAX_MP_BUSSES - 1] = -1 };
|
||||
static int mp_current_pci_id;
|
||||
|
||||
int pic_mode;
|
||||
@@ -53,7 +53,6 @@ int pic_mode;
|
||||
* Intel MP BIOS table parsing routines:
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Checksum an MP configuration block.
|
||||
*/
|
||||
@@ -76,7 +75,8 @@ static int __init mpf_checksum(unsigned char *mp, int len)
|
||||
*/
|
||||
|
||||
static int mpc_record;
|
||||
static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __cpuinitdata;
|
||||
static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY]
|
||||
__cpuinitdata;
|
||||
#endif
|
||||
|
||||
static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
|
||||
@@ -87,66 +87,63 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
|
||||
disabled_cpus++;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_NUMAQ
|
||||
apicid = mpc_apic_id(m, translation_table[mpc_record]);
|
||||
#else
|
||||
Dprintk("Processor #%d %u:%u APIC version %d\n",
|
||||
m->mpc_apicid,
|
||||
(m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
|
||||
(m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
|
||||
m->mpc_apicver);
|
||||
(m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, m->mpc_apicver);
|
||||
apicid = m->mpc_apicid;
|
||||
#endif
|
||||
|
||||
if (m->mpc_featureflag&(1<<0))
|
||||
if (m->mpc_featureflag & (1 << 0))
|
||||
Dprintk(" Floating point unit present.\n");
|
||||
if (m->mpc_featureflag&(1<<7))
|
||||
if (m->mpc_featureflag & (1 << 7))
|
||||
Dprintk(" Machine Exception supported.\n");
|
||||
if (m->mpc_featureflag&(1<<8))
|
||||
if (m->mpc_featureflag & (1 << 8))
|
||||
Dprintk(" 64 bit compare & exchange supported.\n");
|
||||
if (m->mpc_featureflag&(1<<9))
|
||||
if (m->mpc_featureflag & (1 << 9))
|
||||
Dprintk(" Internal APIC present.\n");
|
||||
if (m->mpc_featureflag&(1<<11))
|
||||
if (m->mpc_featureflag & (1 << 11))
|
||||
Dprintk(" SEP present.\n");
|
||||
if (m->mpc_featureflag&(1<<12))
|
||||
if (m->mpc_featureflag & (1 << 12))
|
||||
Dprintk(" MTRR present.\n");
|
||||
if (m->mpc_featureflag&(1<<13))
|
||||
if (m->mpc_featureflag & (1 << 13))
|
||||
Dprintk(" PGE present.\n");
|
||||
if (m->mpc_featureflag&(1<<14))
|
||||
if (m->mpc_featureflag & (1 << 14))
|
||||
Dprintk(" MCA present.\n");
|
||||
if (m->mpc_featureflag&(1<<15))
|
||||
if (m->mpc_featureflag & (1 << 15))
|
||||
Dprintk(" CMOV present.\n");
|
||||
if (m->mpc_featureflag&(1<<16))
|
||||
if (m->mpc_featureflag & (1 << 16))
|
||||
Dprintk(" PAT present.\n");
|
||||
if (m->mpc_featureflag&(1<<17))
|
||||
if (m->mpc_featureflag & (1 << 17))
|
||||
Dprintk(" PSE present.\n");
|
||||
if (m->mpc_featureflag&(1<<18))
|
||||
if (m->mpc_featureflag & (1 << 18))
|
||||
Dprintk(" PSN present.\n");
|
||||
if (m->mpc_featureflag&(1<<19))
|
||||
if (m->mpc_featureflag & (1 << 19))
|
||||
Dprintk(" Cache Line Flush Instruction present.\n");
|
||||
/* 20 Reserved */
|
||||
if (m->mpc_featureflag&(1<<21))
|
||||
if (m->mpc_featureflag & (1 << 21))
|
||||
Dprintk(" Debug Trace and EMON Store present.\n");
|
||||
if (m->mpc_featureflag&(1<<22))
|
||||
if (m->mpc_featureflag & (1 << 22))
|
||||
Dprintk(" ACPI Thermal Throttle Registers present.\n");
|
||||
if (m->mpc_featureflag&(1<<23))
|
||||
if (m->mpc_featureflag & (1 << 23))
|
||||
Dprintk(" MMX present.\n");
|
||||
if (m->mpc_featureflag&(1<<24))
|
||||
if (m->mpc_featureflag & (1 << 24))
|
||||
Dprintk(" FXSR present.\n");
|
||||
if (m->mpc_featureflag&(1<<25))
|
||||
if (m->mpc_featureflag & (1 << 25))
|
||||
Dprintk(" XMM present.\n");
|
||||
if (m->mpc_featureflag&(1<<26))
|
||||
if (m->mpc_featureflag & (1 << 26))
|
||||
Dprintk(" Willamette New Instructions present.\n");
|
||||
if (m->mpc_featureflag&(1<<27))
|
||||
if (m->mpc_featureflag & (1 << 27))
|
||||
Dprintk(" Self Snoop present.\n");
|
||||
if (m->mpc_featureflag&(1<<28))
|
||||
if (m->mpc_featureflag & (1 << 28))
|
||||
Dprintk(" HT present.\n");
|
||||
if (m->mpc_featureflag&(1<<29))
|
||||
if (m->mpc_featureflag & (1 << 29))
|
||||
Dprintk(" Thermal Monitor present.\n");
|
||||
/* 30, 31 Reserved */
|
||||
|
||||
|
||||
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
|
||||
Dprintk(" Bootup CPU\n");
|
||||
boot_cpu_physical_apicid = m->mpc_apicid;
|
||||
@@ -155,7 +152,7 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
|
||||
generic_processor_info(apicid, m->mpc_apicver);
|
||||
}
|
||||
|
||||
static void __init MP_bus_info (struct mpc_config_bus *m)
|
||||
static void __init MP_bus_info(struct mpc_config_bus *m)
|
||||
{
|
||||
char str[7];
|
||||
|
||||
@@ -178,7 +175,7 @@ static void __init MP_bus_info (struct mpc_config_bus *m)
|
||||
#endif
|
||||
|
||||
set_bit(m->mpc_busid, mp_bus_not_pci);
|
||||
if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI)-1) == 0) {
|
||||
if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) {
|
||||
#ifdef CONFIG_X86_NUMAQ
|
||||
mpc_oem_pci_bus(m, translation_table[mpc_record]);
|
||||
#endif
|
||||
@@ -187,11 +184,11 @@ static void __init MP_bus_info (struct mpc_config_bus *m)
|
||||
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_ISA, sizeof(BUSTYPE_ISA)-1) == 0) {
|
||||
} else 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) {
|
||||
} 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) {
|
||||
} else if (strncmp(str, BUSTYPE_MCA, sizeof(BUSTYPE_MCA) - 1) == 0) {
|
||||
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA;
|
||||
} else {
|
||||
printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str);
|
||||
@@ -216,7 +213,7 @@ static int bad_ioapic(unsigned long address)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __init MP_ioapic_info (struct mpc_config_ioapic *m)
|
||||
static void __init MP_ioapic_info(struct mpc_config_ioapic *m)
|
||||
{
|
||||
if (!(m->mpc_flags & MPC_APIC_USABLE))
|
||||
return;
|
||||
@@ -231,9 +228,9 @@ static void __init MP_ioapic_info (struct mpc_config_ioapic *m)
|
||||
nr_ioapics++;
|
||||
}
|
||||
|
||||
static void __init MP_intsrc_info (struct mpc_config_intsrc *m)
|
||||
static void __init MP_intsrc_info(struct mpc_config_intsrc *m)
|
||||
{
|
||||
mp_irqs [mp_irq_entries] = *m;
|
||||
mp_irqs[mp_irq_entries] = *m;
|
||||
Dprintk("Int: type %d, pol %d, trig %d, bus %d,"
|
||||
" IRQ %02x, APIC ID %x, APIC INT %02x\n",
|
||||
m->mpc_irqtype, m->mpc_irqflag & 3,
|
||||
@@ -245,19 +242,22 @@ static void __init MP_intsrc_info (struct mpc_config_intsrc *m)
|
||||
|
||||
#endif
|
||||
|
||||
static void __init MP_lintsrc_info (struct mpc_config_lintsrc *m)
|
||||
static void __init MP_lintsrc_info(struct mpc_config_lintsrc *m)
|
||||
{
|
||||
Dprintk("Lint: type %d, pol %d, trig %d, bus %d,"
|
||||
" IRQ %02x, APIC ID %x, APIC LINT %02x\n",
|
||||
m->mpc_irqtype, m->mpc_irqflag & 3,
|
||||
(m->mpc_irqflag >> 2) &3, m->mpc_srcbusid,
|
||||
(m->mpc_irqflag >> 2) & 3, m->mpc_srcbusid,
|
||||
m->mpc_srcbusirq, m->mpc_destapic, m->mpc_destapiclint);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_NUMAQ
|
||||
static void __init MP_translation_info (struct mpc_config_translation *m)
|
||||
static void __init MP_translation_info(struct mpc_config_translation *m)
|
||||
{
|
||||
printk(KERN_INFO "Translation: record %d, type %d, quad %d, global %d, local %d\n", mpc_record, m->trans_type, m->trans_quad, m->trans_global, m->trans_local);
|
||||
printk(KERN_INFO
|
||||
"Translation: record %d, type %d, quad %d, global %d, local %d\n",
|
||||
mpc_record, m->trans_type, m->trans_quad, m->trans_global,
|
||||
m->trans_local);
|
||||
|
||||
if (mpc_record >= MAX_MPC_ENTRY)
|
||||
printk(KERN_ERR "MAX_MPC_ENTRY exceeded!\n");
|
||||
@@ -271,25 +271,23 @@ static void __init MP_translation_info (struct mpc_config_translation *m)
|
||||
* Read/parse the MPC oem tables
|
||||
*/
|
||||
|
||||
static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable, \
|
||||
static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable,
|
||||
unsigned short oemsize)
|
||||
{
|
||||
int count = sizeof (*oemtable); /* the header size */
|
||||
unsigned char *oemptr = ((unsigned char *)oemtable)+count;
|
||||
int count = sizeof(*oemtable); /* the header size */
|
||||
unsigned char *oemptr = ((unsigned char *)oemtable) + count;
|
||||
|
||||
mpc_record = 0;
|
||||
printk(KERN_INFO "Found an OEM MPC table at %8p - parsing it ... \n", oemtable);
|
||||
if (memcmp(oemtable->oem_signature,MPC_OEM_SIGNATURE,4))
|
||||
{
|
||||
printk(KERN_WARNING "SMP mpc oemtable: bad signature [%c%c%c%c]!\n",
|
||||
oemtable->oem_signature[0],
|
||||
oemtable->oem_signature[1],
|
||||
oemtable->oem_signature[2],
|
||||
oemtable->oem_signature[3]);
|
||||
printk(KERN_INFO "Found an OEM MPC table at %8p - parsing it ... \n",
|
||||
oemtable);
|
||||
if (memcmp(oemtable->oem_signature, MPC_OEM_SIGNATURE, 4)) {
|
||||
printk(KERN_WARNING
|
||||
"SMP mpc oemtable: bad signature [%c%c%c%c]!\n",
|
||||
oemtable->oem_signature[0], oemtable->oem_signature[1],
|
||||
oemtable->oem_signature[2], oemtable->oem_signature[3]);
|
||||
return;
|
||||
}
|
||||
if (mpf_checksum((unsigned char *)oemtable,oemtable->oem_length))
|
||||
{
|
||||
if (mpf_checksum((unsigned char *)oemtable, oemtable->oem_length)) {
|
||||
printk(KERN_WARNING "SMP oem mptable: checksum error!\n");
|
||||
return;
|
||||
}
|
||||
@@ -297,7 +295,7 @@ static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable, \
|
||||
switch (*oemptr) {
|
||||
case MP_TRANSLATION:
|
||||
{
|
||||
struct mpc_config_translation *m=
|
||||
struct mpc_config_translation *m =
|
||||
(struct mpc_config_translation *)oemptr;
|
||||
MP_translation_info(m);
|
||||
oemptr += sizeof(*m);
|
||||
@@ -307,7 +305,9 @@ static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable, \
|
||||
}
|
||||
default:
|
||||
{
|
||||
printk(KERN_WARNING "Unrecognised OEM table entry type! - %d\n", (int) *oemptr);
|
||||
printk(KERN_WARNING
|
||||
"Unrecognised OEM table entry type! - %d\n",
|
||||
(int)*oemptr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -320,7 +320,7 @@ static inline void mps_oem_check(struct mp_config_table *mpc, char *oem,
|
||||
if (strncmp(oem, "IBM NUMA", 8))
|
||||
printk("Warning! May not be a NUMA-Q system!\n");
|
||||
if (mpc->mpc_oemptr)
|
||||
smp_read_mpc_oem((struct mp_config_oemtable *) mpc->mpc_oemptr,
|
||||
smp_read_mpc_oem((struct mp_config_oemtable *)mpc->mpc_oemptr,
|
||||
mpc->mpc_oemsize);
|
||||
}
|
||||
#endif /* CONFIG_X86_NUMAQ */
|
||||
@@ -333,19 +333,19 @@ static int __init smp_read_mpc(struct mp_config_table *mpc)
|
||||
{
|
||||
char str[16];
|
||||
char oem[10];
|
||||
int count=sizeof(*mpc);
|
||||
unsigned char *mpt=((unsigned char *)mpc)+count;
|
||||
int count = sizeof(*mpc);
|
||||
unsigned char *mpt = ((unsigned char *)mpc) + count;
|
||||
|
||||
if (memcmp(mpc->mpc_signature,MPC_SIGNATURE,4)) {
|
||||
if (memcmp(mpc->mpc_signature, MPC_SIGNATURE, 4)) {
|
||||
printk(KERN_ERR "SMP mptable: bad signature [0x%x]!\n",
|
||||
*(u32 *)mpc->mpc_signature);
|
||||
*(u32 *) mpc->mpc_signature);
|
||||
return 0;
|
||||
}
|
||||
if (mpf_checksum((unsigned char *)mpc,mpc->mpc_length)) {
|
||||
if (mpf_checksum((unsigned char *)mpc, mpc->mpc_length)) {
|
||||
printk(KERN_ERR "SMP mptable: checksum error!\n");
|
||||
return 0;
|
||||
}
|
||||
if (mpc->mpc_spec!=0x01 && mpc->mpc_spec!=0x04) {
|
||||
if (mpc->mpc_spec != 0x01 && mpc->mpc_spec != 0x04) {
|
||||
printk(KERN_ERR "SMP mptable: bad table version (%d)!!\n",
|
||||
mpc->mpc_spec);
|
||||
return 0;
|
||||
@@ -354,13 +354,13 @@ static int __init smp_read_mpc(struct mp_config_table *mpc)
|
||||
printk(KERN_ERR "SMP mptable: null local APIC address!\n");
|
||||
return 0;
|
||||
}
|
||||
memcpy(oem,mpc->mpc_oem,8);
|
||||
oem[8]=0;
|
||||
printk(KERN_INFO "OEM ID: %s ",oem);
|
||||
memcpy(oem, mpc->mpc_oem, 8);
|
||||
oem[8] = 0;
|
||||
printk(KERN_INFO "OEM ID: %s ", oem);
|
||||
|
||||
memcpy(str,mpc->mpc_productid,12);
|
||||
str[12]=0;
|
||||
printk("Product ID: %s ",str);
|
||||
memcpy(str, mpc->mpc_productid, 12);
|
||||
str[12] = 0;
|
||||
printk("Product ID: %s ", str);
|
||||
|
||||
mps_oem_check(mpc, oem, str);
|
||||
|
||||
@@ -380,10 +380,10 @@ static int __init smp_read_mpc(struct mp_config_table *mpc)
|
||||
mpc_record = 0;
|
||||
#endif
|
||||
while (count < mpc->mpc_length) {
|
||||
switch(*mpt) {
|
||||
switch (*mpt) {
|
||||
case MP_PROCESSOR:
|
||||
{
|
||||
struct mpc_config_processor *m=
|
||||
struct mpc_config_processor *m =
|
||||
(struct mpc_config_processor *)mpt;
|
||||
/* ACPI may have already provided this data */
|
||||
if (!acpi_lapic)
|
||||
@@ -394,7 +394,7 @@ static int __init smp_read_mpc(struct mp_config_table *mpc)
|
||||
}
|
||||
case MP_BUS:
|
||||
{
|
||||
struct mpc_config_bus *m=
|
||||
struct mpc_config_bus *m =
|
||||
(struct mpc_config_bus *)mpt;
|
||||
MP_bus_info(m);
|
||||
mpt += sizeof(*m);
|
||||
@@ -404,33 +404,33 @@ static int __init smp_read_mpc(struct mp_config_table *mpc)
|
||||
case MP_IOAPIC:
|
||||
{
|
||||
#ifdef CONFIG_X86_IO_APIC
|
||||
struct mpc_config_ioapic *m=
|
||||
struct mpc_config_ioapic *m =
|
||||
(struct mpc_config_ioapic *)mpt;
|
||||
MP_ioapic_info(m);
|
||||
#endif
|
||||
mpt+=sizeof(struct mpc_config_ioapic);
|
||||
count+=sizeof(struct mpc_config_ioapic);
|
||||
mpt += sizeof(struct mpc_config_ioapic);
|
||||
count += sizeof(struct mpc_config_ioapic);
|
||||
break;
|
||||
}
|
||||
case MP_INTSRC:
|
||||
{
|
||||
#ifdef CONFIG_X86_IO_APIC
|
||||
struct mpc_config_intsrc *m=
|
||||
struct mpc_config_intsrc *m =
|
||||
(struct mpc_config_intsrc *)mpt;
|
||||
|
||||
MP_intsrc_info(m);
|
||||
#endif
|
||||
mpt+=sizeof(struct mpc_config_intsrc);
|
||||
count+=sizeof(struct mpc_config_intsrc);
|
||||
mpt += sizeof(struct mpc_config_intsrc);
|
||||
count += sizeof(struct mpc_config_intsrc);
|
||||
break;
|
||||
}
|
||||
case MP_LINTSRC:
|
||||
{
|
||||
struct mpc_config_lintsrc *m=
|
||||
struct mpc_config_lintsrc *m =
|
||||
(struct mpc_config_lintsrc *)mpt;
|
||||
MP_lintsrc_info(m);
|
||||
mpt+=sizeof(*m);
|
||||
count+=sizeof(*m);
|
||||
mpt += sizeof(*m);
|
||||
count += sizeof(*m);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -481,12 +481,16 @@ static void __init construct_default_ioirq_mptable(int mpc_default_type)
|
||||
* If it does, we assume it's valid.
|
||||
*/
|
||||
if (mpc_default_type == 5) {
|
||||
printk(KERN_INFO "ISA/PCI bus type with no IRQ information... falling back to ELCR\n");
|
||||
printk(KERN_INFO
|
||||
"ISA/PCI bus type with no IRQ information... falling back to ELCR\n");
|
||||
|
||||
if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2) || ELCR_trigger(13))
|
||||
printk(KERN_WARNING "ELCR contains invalid data... not using ELCR\n");
|
||||
if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2)
|
||||
|| ELCR_trigger(13))
|
||||
printk(KERN_WARNING
|
||||
"ELCR contains invalid data... not using ELCR\n");
|
||||
else {
|
||||
printk(KERN_INFO "Using ELCR to identify PCI interrupts\n");
|
||||
printk(KERN_INFO
|
||||
"Using ELCR to identify PCI interrupts\n");
|
||||
ELCR_fallback = 1;
|
||||
}
|
||||
}
|
||||
@@ -551,8 +555,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
|
||||
processor.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01;
|
||||
processor.mpc_cpuflag = CPU_ENABLED;
|
||||
processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) |
|
||||
(boot_cpu_data.x86_model << 4) |
|
||||
boot_cpu_data.x86_mask;
|
||||
(boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask;
|
||||
processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
|
||||
processor.mpc_reserved[0] = 0;
|
||||
processor.mpc_reserved[1] = 0;
|
||||
@@ -619,7 +622,7 @@ static struct intel_mp_floating *mpf_found;
|
||||
/*
|
||||
* Scan the memory blocks for an SMP configuration block.
|
||||
*/
|
||||
void __init get_smp_config (void)
|
||||
void __init get_smp_config(void)
|
||||
{
|
||||
struct intel_mp_floating *mpf = mpf_found;
|
||||
|
||||
@@ -628,14 +631,16 @@ void __init get_smp_config (void)
|
||||
* processors, where MPS only supports physical.
|
||||
*/
|
||||
if (acpi_lapic && acpi_ioapic) {
|
||||
printk(KERN_INFO "Using ACPI (MADT) for SMP configuration information\n");
|
||||
printk(KERN_INFO
|
||||
"Using ACPI (MADT) for SMP configuration information\n");
|
||||
return;
|
||||
}
|
||||
else if (acpi_lapic)
|
||||
printk(KERN_INFO "Using ACPI for processor (LAPIC) configuration information\n");
|
||||
} else if (acpi_lapic)
|
||||
printk(KERN_INFO
|
||||
"Using ACPI for processor (LAPIC) configuration information\n");
|
||||
|
||||
printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n", mpf->mpf_specification);
|
||||
if (mpf->mpf_feature2 & (1<<7)) {
|
||||
printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n",
|
||||
mpf->mpf_specification);
|
||||
if (mpf->mpf_feature2 & (1 << 7)) {
|
||||
printk(KERN_INFO " IMCR and PIC compatibility mode.\n");
|
||||
pic_mode = 1;
|
||||
} else {
|
||||
@@ -648,7 +653,8 @@ void __init get_smp_config (void)
|
||||
*/
|
||||
if (mpf->mpf_feature1 != 0) {
|
||||
|
||||
printk(KERN_INFO "Default MP configuration #%d\n", mpf->mpf_feature1);
|
||||
printk(KERN_INFO "Default MP configuration #%d\n",
|
||||
mpf->mpf_feature1);
|
||||
construct_default_ISA_mptable(mpf->mpf_feature1);
|
||||
|
||||
} else if (mpf->mpf_physptr) {
|
||||
@@ -659,8 +665,10 @@ void __init get_smp_config (void)
|
||||
*/
|
||||
if (!smp_read_mpc(phys_to_virt(mpf->mpf_physptr))) {
|
||||
smp_found_config = 0;
|
||||
printk(KERN_ERR "BIOS bug, MP table errors detected!...\n");
|
||||
printk(KERN_ERR "... disabling SMP support. (tell your hw vendor)\n");
|
||||
printk(KERN_ERR
|
||||
"BIOS bug, MP table errors detected!...\n");
|
||||
printk(KERN_ERR
|
||||
"... disabling SMP support. (tell your hw vendor)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -673,7 +681,8 @@ void __init get_smp_config (void)
|
||||
if (!mp_irq_entries) {
|
||||
struct mpc_config_bus bus;
|
||||
|
||||
printk(KERN_ERR "BIOS bug, no explicit IRQ entries, using default mptable. (tell your hw vendor)\n");
|
||||
printk(KERN_ERR
|
||||
"BIOS bug, no explicit IRQ entries, using default mptable. (tell your hw vendor)\n");
|
||||
|
||||
bus.mpc_type = MP_BUS;
|
||||
bus.mpc_busid = 0;
|
||||
@@ -692,12 +701,12 @@ void __init get_smp_config (void)
|
||||
*/
|
||||
}
|
||||
|
||||
static int __init smp_scan_config (unsigned long base, unsigned long length)
|
||||
static int __init smp_scan_config(unsigned long base, unsigned long length)
|
||||
{
|
||||
unsigned long *bp = phys_to_virt(base);
|
||||
struct intel_mp_floating *mpf;
|
||||
|
||||
printk(KERN_INFO "Scan SMP from %p for %ld bytes.\n", bp,length);
|
||||
printk(KERN_INFO "Scan SMP from %p for %ld bytes.\n", bp, length);
|
||||
if (sizeof(*mpf) != 16)
|
||||
printk("Error: MPF size\n");
|
||||
|
||||
@@ -707,7 +716,7 @@ static int __init smp_scan_config (unsigned long base, unsigned long length)
|
||||
(mpf->mpf_length == 1) &&
|
||||
!mpf_checksum((unsigned char *)bp, 16) &&
|
||||
((mpf->mpf_specification == 1)
|
||||
|| (mpf->mpf_specification == 4)) ) {
|
||||
|| (mpf->mpf_specification == 4))) {
|
||||
|
||||
smp_found_config = 1;
|
||||
printk(KERN_INFO "found SMP MP-table at [%p] %08lx\n",
|
||||
@@ -741,7 +750,7 @@ static int __init smp_scan_config (unsigned long base, unsigned long length)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __init find_smp_config (void)
|
||||
void __init find_smp_config(void)
|
||||
{
|
||||
unsigned int address;
|
||||
|
||||
@@ -753,9 +762,9 @@ void __init find_smp_config (void)
|
||||
* 2) Scan the top 1K of base RAM
|
||||
* 3) Scan the 64K of bios
|
||||
*/
|
||||
if (smp_scan_config(0x0,0x400) ||
|
||||
smp_scan_config(639*0x400,0x400) ||
|
||||
smp_scan_config(0xF0000,0x10000))
|
||||
if (smp_scan_config(0x0, 0x400) ||
|
||||
smp_scan_config(639 * 0x400, 0x400) ||
|
||||
smp_scan_config(0xF0000, 0x10000))
|
||||
return;
|
||||
/*
|
||||
* If it is an SMP machine we should know now, unless the
|
||||
@@ -792,7 +801,7 @@ void __init find_smp_config (void)
|
||||
|
||||
extern struct mp_ioapic_routing mp_ioapic_routing[MAX_IO_APICS];
|
||||
|
||||
static int mp_find_ioapic (int gsi)
|
||||
static int mp_find_ioapic(int gsi)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@@ -847,14 +856,12 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
|
||||
"GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid,
|
||||
mp_ioapics[idx].mpc_apicver,
|
||||
mp_ioapics[idx].mpc_apicaddr,
|
||||
mp_ioapic_routing[idx].gsi_base,
|
||||
mp_ioapic_routing[idx].gsi_end);
|
||||
mp_ioapic_routing[idx].gsi_base, mp_ioapic_routing[idx].gsi_end);
|
||||
|
||||
nr_ioapics++;
|
||||
}
|
||||
|
||||
void __init
|
||||
mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
|
||||
void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
|
||||
{
|
||||
struct mpc_config_intsrc intsrc;
|
||||
int ioapic = -1;
|
||||
@@ -896,7 +903,7 @@ mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
|
||||
|
||||
int es7000_plat;
|
||||
|
||||
void __init mp_config_acpi_legacy_irqs (void)
|
||||
void __init mp_config_acpi_legacy_irqs(void)
|
||||
{
|
||||
struct mpc_config_intsrc intsrc;
|
||||
int i = 0;
|
||||
@@ -941,7 +948,8 @@ void __init mp_config_acpi_legacy_irqs (void)
|
||||
struct mpc_config_intsrc *irq = mp_irqs + idx;
|
||||
|
||||
/* Do we already have a mapping for this ISA IRQ? */
|
||||
if (irq->mpc_srcbus == MP_ISA_BUS && irq->mpc_srcbusirq == i)
|
||||
if (irq->mpc_srcbus == MP_ISA_BUS
|
||||
&& irq->mpc_srcbusirq == i)
|
||||
break;
|
||||
|
||||
/* Do we already have a mapping for this IOAPIC pin */
|
||||
@@ -1015,13 +1023,13 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
|
||||
ioapic_pin);
|
||||
return gsi;
|
||||
}
|
||||
if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
|
||||
if ((1 << bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
|
||||
Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
|
||||
mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
|
||||
return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]);
|
||||
}
|
||||
|
||||
mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
|
||||
mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1 << bit);
|
||||
|
||||
/*
|
||||
* For GSI >= 64, use IRQ compression
|
||||
|
Reference in New Issue
Block a user