提交 e585bef8 编写于 作者: T Thomas Gleixner 提交者: Linus Torvalds

[PATCH] i386: add command line option "local_apic_timer_c2_ok"

It turned out that it is almost impossible to trust ACPI, BIOS & Co.
regarding the C states. This was the reason to switch the local apic
timer off in C2 state already. OTOH there are sane and well behaving
systems, which get punished by that decision.

Allow the user to confirm that the local apic timer is trustworthy in C2
state. This keeps the default behaviour on the safe side.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Acked-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 296d93cd
......@@ -780,6 +780,9 @@ and is between 256 and 4096 characters. It is defined in the file
lapic [IA-32,APIC] Enable the local APIC even if BIOS
disabled it.
lapic_timer_c2_ok [IA-32,APIC] trust the local apic timer in
C2 power state.
lasi= [HW,SCSI] PARISC LASI driver for the 53c700 chip
Format: addr:<io>,irq:<irq>
......
......@@ -64,6 +64,9 @@ static int enable_local_apic __initdata = 0;
static int local_apic_timer_verify_ok;
/* Disable local APIC timer from the kernel commandline or via dmi quirk */
static int local_apic_timer_disabled;
/* Local APIC timer works in C2 */
int local_apic_timer_c2_ok;
EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);
/*
* Debug level, exported for io_apic.c
......@@ -1232,6 +1235,13 @@ static int __init parse_disable_lapic_timer(char *arg)
}
early_param("nolapic_timer", parse_disable_lapic_timer);
static int __init parse_lapic_timer_c2_ok(char *arg)
{
local_apic_timer_c2_ok = 1;
return 0;
}
early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok);
static int __init apic_set_verbosity(char *str)
{
if (strcmp("debug", str) == 0)
......
......@@ -268,6 +268,7 @@ static void acpi_timer_check_state(int state, struct acpi_processor *pr,
struct acpi_processor_cx *cx)
{
struct acpi_processor_power *pwr = &pr->power;
u8 type = local_apic_timer_c2_ok ? ACPI_STATE_C3 : ACPI_STATE_C2;
/*
* Check, if one of the previous states already marked the lapic
......@@ -276,7 +277,7 @@ static void acpi_timer_check_state(int state, struct acpi_processor *pr,
if (pwr->timer_broadcast_on_state < state)
return;
if (cx->type >= ACPI_STATE_C2)
if (cx->type >= type)
pr->power.timer_broadcast_on_state = state;
}
......
......@@ -117,6 +117,7 @@ extern void enable_NMI_through_LVT0 (void * dummy);
#define ARCH_APICTIMER_STOPS_ON_C3 1
extern int timer_over_8254;
extern int local_apic_timer_c2_ok;
#else /* !CONFIG_X86_LOCAL_APIC */
static inline void lapic_shutdown(void) { }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册