x86: C1E late detection fix. Really switch off lapic timer
Doh, I completely missed that devices marked DUMMY are not running the set_mode function. So we force broadcasting, but we keep the local APIC timer running. Let the clock event layer mark the device _after_ switching it off. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Thomas Gleixner
parent
e6d5a11dad
commit
3dfbc88464
@@ -974,15 +974,12 @@ void __init setup_boot_APIC_clock (void)
|
|||||||
*/
|
*/
|
||||||
void __cpuinit check_boot_apic_timer_broadcast(void)
|
void __cpuinit check_boot_apic_timer_broadcast(void)
|
||||||
{
|
{
|
||||||
struct clock_event_device *levt = &per_cpu(lapic_events, boot_cpu_id);
|
|
||||||
|
|
||||||
if (!disable_apic_timer ||
|
if (!disable_apic_timer ||
|
||||||
(lapic_clockevent.features & CLOCK_EVT_FEAT_DUMMY))
|
(lapic_clockevent.features & CLOCK_EVT_FEAT_DUMMY))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printk(KERN_INFO "AMD C1E detected late. Force timer broadcast.\n");
|
printk(KERN_INFO "AMD C1E detected late. Force timer broadcast.\n");
|
||||||
lapic_clockevent.features |= CLOCK_EVT_FEAT_DUMMY;
|
lapic_clockevent.features |= CLOCK_EVT_FEAT_DUMMY;
|
||||||
levt->features |= CLOCK_EVT_FEAT_DUMMY;
|
|
||||||
|
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE, &boot_cpu_id);
|
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE, &boot_cpu_id);
|
||||||
|
@@ -222,20 +222,8 @@ static void tick_do_broadcast_on_off(void *why)
|
|||||||
if (!dev || !(dev->features & CLOCK_EVT_FEAT_C3STOP))
|
if (!dev || !(dev->features & CLOCK_EVT_FEAT_C3STOP))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/*
|
if (!tick_device_is_functional(dev))
|
||||||
* Defect device ?
|
goto out;
|
||||||
*/
|
|
||||||
if (!tick_device_is_functional(dev)) {
|
|
||||||
/*
|
|
||||||
* AMD C1E wreckage fixup:
|
|
||||||
*
|
|
||||||
* Device was registered functional in the first
|
|
||||||
* place. Now the secondary CPU detected the C1E
|
|
||||||
* misfeature and notifies us to fix it up
|
|
||||||
*/
|
|
||||||
if (*reason != CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (*reason) {
|
switch (*reason) {
|
||||||
case CLOCK_EVT_NOTIFY_BROADCAST_ON:
|
case CLOCK_EVT_NOTIFY_BROADCAST_ON:
|
||||||
@@ -246,6 +234,8 @@ static void tick_do_broadcast_on_off(void *why)
|
|||||||
clockevents_set_mode(dev,
|
clockevents_set_mode(dev,
|
||||||
CLOCK_EVT_MODE_SHUTDOWN);
|
CLOCK_EVT_MODE_SHUTDOWN);
|
||||||
}
|
}
|
||||||
|
if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
|
||||||
|
dev->features |= CLOCK_EVT_FEAT_DUMMY;
|
||||||
break;
|
break;
|
||||||
case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
|
case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
|
||||||
if (cpu_isset(cpu, tick_broadcast_mask)) {
|
if (cpu_isset(cpu, tick_broadcast_mask)) {
|
||||||
|
Reference in New Issue
Block a user