linux/arch/x86/kernel/apic
Cyrill Gorcunov 3f4c3955ea x86, ioapic: Don't call disconnect_bsp_APIC if no APIC present
Vegard Nossum reported:

[  503.576724] ACPI: Preparing to enter system sleep state S5
[  503.710857] Disabling non-boot CPUs ...
[  503.716853] Power down.
[  503.717770] ------------[ cut here ]------------
[  503.717770] WARNING: at arch/x86/kernel/apic/apic.c:249 native_apic_write_du)
[  503.717770] Hardware name: OptiPlex GX100
[  503.717770] Modules linked in:
[  503.717770] Pid: 2136, comm: halt Not tainted 2.6.30 #443
[  503.717770] Call Trace:
[  503.717770]  [<c154d327>] ? printk+0x18/0x1a
[  503.717770]  [<c1017358>] ? native_apic_write_dummy+0x38/0x50
[  503.717770]  [<c10360fc>] warn_slowpath_common+0x6c/0xc0
[  503.717770]  [<c1017358>] ? native_apic_write_dummy+0x38/0x50
[  503.717770]  [<c1036165>] warn_slowpath_null+0x15/0x20
[  503.717770]  [<c1017358>] native_apic_write_dummy+0x38/0x50
[  503.717770]  [<c1017173>] disconnect_bsp_APIC+0x63/0x100
[  503.717770]  [<c1019e48>] disable_IO_APIC+0xb8/0xc0
[  503.717770]  [<c1214231>] ? acpi_power_off+0x0/0x29
[  503.717770]  [<c1015e55>] native_machine_shutdown+0x65/0x80
[  503.717770]  [<c1015c36>] native_machine_power_off+0x26/0x30
[  503.717770]  [<c1015c49>] machine_power_off+0x9/0x10
[  503.717770]  [<c1046596>] kernel_power_off+0x36/0x40
[  503.717770]  [<c104680d>] sys_reboot+0xfd/0x1f0
[  503.717770]  [<c109daa0>] ? perf_swcounter_event+0xb0/0x130
[  503.717770]  [<c109db7d>] ? perf_counter_task_sched_out+0x5d/0x120
[  503.717770]  [<c102dfc6>] ? finish_task_switch+0x56/0xd0
[  503.717770]  [<c154da1e>] ? schedule+0x49e/0xb40
[  503.717770]  [<c10444b0>] ? sys_kill+0x70/0x160
[  503.717770]  [<c119d9db>] ? selinux_file_ioctl+0x3b/0x50
[  503.717770]  [<c10dd443>] ? sys_ioctl+0x63/0x70
[  503.717770]  [<c1003024>] sysenter_do_call+0x12/0x22
[  503.717770] ---[ end trace 8157b5d0ed378f15 ]---

|
| That's including this commit:
|
| commit 103428e57b
|Author: Cyrill Gorcunov <gorcunov@openvz.org>
|Date:   Sun Jun 7 16:48:40 2009 +0400
|
|    x86, apic: Fix dummy apic read operation together with broken MP handling
|

If we have apic disabled we don't even switch to APIC mode and do not
calling for connect_bsp_APIC. Though on SMP compiled kernel the
native_machine_shutdown does try to write the apic register anyway.

Fix it with explicit check if we really should touch apic registers.

Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <20090617181322.GG10822@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-06-17 20:24:39 +02:00
..
Makefile x86, apic: separate 32-bit setup functionality out of apic_32.c 2009-02-17 23:12:48 +01:00
apic.c Merge branch 'linus' into x86/mce3 2009-06-11 23:31:52 +02:00
apic_flat_64.c x86: don't call read_apic_id if !cpu_has_apic 2009-05-18 08:43:25 +02:00
bigsmp_32.c cpumask: use new cpumask functions throughout x86 2009-03-13 14:49:54 +10:30
es7000_32.c Merge branch 'linus' into irq/numa 2009-06-01 21:06:21 +02:00
io_apic.c x86, ioapic: Don't call disconnect_bsp_APIC if no APIC present 2009-06-17 20:24:39 +02:00
ipi.c x86, apic: move APIC drivers to arch/x86/kernel/apic/* 2009-02-17 18:17:36 +01:00
nmi.c Merge branch 'linus' into x86/mce3 2009-06-11 23:31:52 +02:00
numaq_32.c cpumask: remove x86 cpumask_t uses. 2009-03-13 14:49:57 +10:30
probe_32.c x86: Remove duplicated #include's 2009-06-17 19:02:35 +02:00
probe_64.c x86: x2apic, IR: Clean up X86_X2APIC and INTR_REMAP config checks 2009-04-21 09:08:25 +02:00
summit_32.c x86: Remove duplicated #include's 2009-06-17 19:02:35 +02:00
x2apic_cluster.c x86: apic/x2apic_cluster.c x86_cpu_to_logical_apicid should be static 2009-04-12 12:39:24 +02:00
x2apic_phys.c x86: add x2apic_wrmsr_fence() to x2apic flush tlb paths 2009-03-18 09:36:14 +01:00
x2apic_uv_x.c Merge branch 'timers-for-linus-migration' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-15 10:06:19 -07:00