x64, x2apic/intr-remap: Interrupt-remapping and x2apic support, fix
x64, x2apic/intr-remap: Interrupt-remapping and x2apic support, fix

Yinghai Lu wrote:

> Setting APIC routing to physical flat
> Kernel panic - not syncing: Boot APIC ID in local APIC unexpected (0 vs 4)
> Pid: 1, comm: swapper Not tainted 2.6.26-rc9-tip-01763-g74f94b1-dirty #320
>
> Call Trace:
>  [<ffffffff80a21505>] ? set_cpu_sibling_map+0x38c/0x3bd
>  [<ffffffff80245215>] ? read_xapic_id+0x25/0x3e
>  [<ffffffff80e5a2c3>] ? verify_local_APIC+0x139/0x1b9
>  [<ffffffff80245215>] ? read_xapic_id+0x25/0x3e
>  [<ffffffff80e589af>] ? native_smp_prepare_cpus+0x224/0x2e9
>  [<ffffffff80e4881a>] ? kernel_init+0x64/0x341
>  [<ffffffff8022a439>] ? child_rip+0xa/0x11
>  [<ffffffff80e487b6>] ? kernel_init+0x0/0x341
>  [<ffffffff8022a42f>] ? child_rip+0x0/0x11
>
>
> guess read_apic_id changing cuase some problem...

genapic's read_apic_id() returns the actual apic id extracted from
the APIC_ID register. And in some cases like UV, read_apic_id()
returns completely different values from APIC ID register.

Use the native apic register read, rather than genapic read_apic_id()
in verify_local_APIC()

And also, lapic_suspend() should also use native apic register read.

Reported-by: Yinghai Lu <086d370ab7099a37fc1e7d4667336777772c5d99@gmail.com>
Signed-off-by: Suresh Siddha <a42fd12510d3895be740fb89f87586733ee62f57@intel.com>
Cc: "5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org" <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Cc: "9043bf4b08f6c93a2cb55d98c3494b123858348f@linux.intel.com" <9043bf4b08f6c93a2cb55d98c3494b123858348f@linux.intel.com>
Cc: "dbd122ef7b6a09ffecf5db9c9296320f3c94e707@firstfloor.org" <dbd122ef7b6a09ffecf5db9c9296320f3c94e707@firstfloor.org>
Cc: "8a741aa8cbd77ebc4a56ddb528ce9fd15d42f034@xmission.com" <8a741aa8cbd77ebc4a56ddb528ce9fd15d42f034@xmission.com>
Cc: "bc7add126c2dbb8382bf1c28ac262b9363a32706@virtuousgeek.org" <bc7add126c2dbb8382bf1c28ac262b9363a32706@virtuousgeek.org>
Cc: "9fc09c92f9d4898dd6e5af3e81679b627e939258@sgi.com" <9fc09c92f9d4898dd6e5af3e81679b627e939258@sgi.com>
Cc: "b3f594e10a9edcf5413cf1190121d45078c62290@goop.org" <b3f594e10a9edcf5413cf1190121d45078c62290@goop.org>
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs