Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2953315 authored by Alexey Starikovskiy's avatar Alexey Starikovskiy Committed by Ingo Molnar
Browse files

x86: lindent mpparse_64.c

parent 4cedb334
Loading
Loading
Loading
Loading
+141 −136
Original line number Diff line number Diff line
@@ -56,8 +56,6 @@ int mp_irq_entries;
int nr_ioapics;
unsigned long mp_lapic_addr = 0;



/* Processor that is doing the boot up */
unsigned int boot_cpu_physical_apicid = -1U;
EXPORT_SYMBOL(boot_cpu_physical_apicid);
@@ -76,7 +74,6 @@ void *x86_bios_cpu_apicid_early_ptr;
DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
EXPORT_PER_CPU_SYMBOL(x86_bios_cpu_apicid);


/*
 * Intel MP BIOS table parsing routines:
 */
@@ -192,8 +189,8 @@ static void __init MP_ioapic_info (struct mpc_config_ioapic *m)
	if (!(m->mpc_flags & MPC_APIC_USABLE))
		return;

	printk("I/O APIC #%d at 0x%X.\n",
		m->mpc_apicid, m->mpc_apicaddr);
	printk(KERN_INFO "I/O APIC #%d at 0x%X.\n", m->mpc_apicid,
	       m->mpc_apicaddr);

	if (bad_ioapic(m->mpc_apicaddr))
		return;
@@ -233,15 +230,14 @@ static int __init smp_read_mpc(struct mp_config_table *mpc, unsigned early)
	unsigned char *mpt = ((unsigned char *)mpc) + count;

	if (memcmp(mpc->mpc_signature, MPC_SIGNATURE, 4)) {
		printk("MPTABLE: bad signature [%c%c%c%c]!\n",
		printk(KERN_ERR "MPTABLE: bad signature [%c%c%c%c]!\n",
		       mpc->mpc_signature[0],
		       mpc->mpc_signature[1],
			mpc->mpc_signature[2],
			mpc->mpc_signature[3]);
		       mpc->mpc_signature[2], mpc->mpc_signature[3]);
		return 0;
	}
	if (mpf_checksum((unsigned char *)mpc, mpc->mpc_length)) {
		printk("MPTABLE: checksum error!\n");
		printk(KERN_ERR "MPTABLE: checksum error!\n");
		return 0;
	}
	if (mpc->mpc_spec != 0x01 && mpc->mpc_spec != 0x04) {
@@ -259,9 +255,9 @@ static int __init smp_read_mpc(struct mp_config_table *mpc, unsigned early)

	memcpy(str, mpc->mpc_productid, 12);
	str[12] = 0;
	printk("MPTABLE: Product ID: %s ",str);
	printk(KERN_INFO "MPTABLE: Product ID: %s ", str);

	printk("MPTABLE: APIC at: 0x%X\n",mpc->mpc_lapic);
	printk(KERN_INFO "MPTABLE: APIC at: 0x%X\n", mpc->mpc_lapic);

	/* save the local APIC address, it might be non-default */
	if (!acpi_lapic)
@@ -360,12 +356,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_ERR "ELCR contains invalid data... not using ELCR\n");
		if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2) ||
		    ELCR_trigger(13))
			printk(KERN_ERR "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;
		}
	}
@@ -514,7 +514,8 @@ static void __init __get_smp_config(unsigned early)
			return;
		}

		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) {
@@ -525,8 +526,10 @@ static void __init __get_smp_config(unsigned early)
		 */
		if (!smp_read_mpc(phys_to_virt(mpf->mpf_physptr), early)) {
			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;
		}

@@ -540,7 +543,9 @@ static void __init __get_smp_config(unsigned early)
		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;
@@ -764,8 +769,7 @@ void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
	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;
@@ -839,7 +843,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 */