Commit 4c9961d5 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar
Browse files

x86: make read_apic_id return final apicid



also remove GET_APIC_ID when read_apic_id is used.

need to apply after
	[PATCH] x86: mach_apicdef.h need to include before smp.h

Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 4696ca5b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -761,7 +761,7 @@ static void __init acpi_register_lapic_address(unsigned long address)

	set_fixmap_nocache(FIX_APIC_BASE, address);
	if (boot_cpu_physical_apicid == -1U) {
		boot_cpu_physical_apicid  = GET_APIC_ID(read_apic_id());
		boot_cpu_physical_apicid  = read_apic_id();
#ifdef CONFIG_X86_32
		apic_version[boot_cpu_physical_apicid] =
			 GET_APIC_VERSION(apic_read(APIC_LVR));
+2 −2
Original line number Diff line number Diff line
@@ -1230,7 +1230,7 @@ void __init init_apic_mappings(void)
	 * default configuration (or the MP table is broken).
	 */
	if (boot_cpu_physical_apicid == -1U)
		boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
		boot_cpu_physical_apicid = read_apic_id();

}

@@ -1270,7 +1270,7 @@ int __init APIC_init_uniprocessor(void)
	 * might be zero if read from MP tables. Get it from LAPIC.
	 */
#ifdef CONFIG_CRASH_DUMP
	boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
	boot_cpu_physical_apicid = read_apic_id();
#endif
	physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map);

+3 −3
Original line number Diff line number Diff line
@@ -1060,7 +1060,7 @@ void __init early_init_lapic_mapping(void)
	 * Fetch the APIC ID of the BSP in case we have a
	 * default configuration (or the MP table is broken).
	 */
	boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
	boot_cpu_physical_apicid = read_apic_id();
}

/**
@@ -1069,7 +1069,7 @@ void __init early_init_lapic_mapping(void)
void __init init_apic_mappings(void)
{
	if (x2apic) {
		boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
		boot_cpu_physical_apicid = read_apic_id();
		return;
	}

@@ -1092,7 +1092,7 @@ void __init init_apic_mappings(void)
	 * Fetch the APIC ID of the BSP in case we have a
	 * default configuration (or the MP table is broken).
	 */
	boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
	boot_cpu_physical_apicid = read_apic_id();
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ static unsigned int read_xapic_id(void)
{
	unsigned int id;

	id = GET_XAPIC_ID(apic_read(APIC_ID));
	id = GET_APIC_ID(apic_read(APIC_ID));
	return id;
}

+2 −3
Original line number Diff line number Diff line
@@ -1501,7 +1501,7 @@ void /*__init*/ print_local_APIC(void *dummy)
		smp_processor_id(), hard_smp_processor_id());
	v = apic_read(APIC_ID);
	printk(KERN_INFO "... APIC ID:      %08x (%01x)\n", v,
			GET_APIC_ID(read_apic_id()));
			GET_APIC_ID(v));
	v = apic_read(APIC_LVR);
	printk(KERN_INFO "... APIC VERSION: %08x\n", v);
	ver = GET_APIC_VERSION(v);
@@ -1709,8 +1709,7 @@ void disable_IO_APIC(void)
		entry.dest_mode       = 0; /* Physical */
		entry.delivery_mode   = dest_ExtINT; /* ExtInt */
		entry.vector          = 0;
		entry.dest.physical.physical_dest =
					GET_APIC_ID(read_apic_id());
		entry.dest.physical.physical_dest = read_apic_id();

		/*
		 * Add it to the IO-APIC irq-routing table:
Loading