diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpi_pad.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 62122134693b..f169e516a1af 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
@@ -43,6 +43,10 @@ static DEFINE_MUTEX(isolated_cpus_lock); | |||
43 | #define CPUID5_ECX_EXTENSIONS_SUPPORTED (0x1) | 43 | #define CPUID5_ECX_EXTENSIONS_SUPPORTED (0x1) |
44 | #define CPUID5_ECX_INTERRUPT_BREAK (0x2) | 44 | #define CPUID5_ECX_INTERRUPT_BREAK (0x2) |
45 | static unsigned long power_saving_mwait_eax; | 45 | static unsigned long power_saving_mwait_eax; |
46 | |||
47 | static unsigned char tsc_detected_unstable; | ||
48 | static unsigned char tsc_marked_unstable; | ||
49 | |||
46 | static void power_saving_mwait_init(void) | 50 | static void power_saving_mwait_init(void) |
47 | { | 51 | { |
48 | unsigned int eax, ebx, ecx, edx; | 52 | unsigned int eax, ebx, ecx, edx; |
@@ -87,8 +91,8 @@ static void power_saving_mwait_init(void) | |||
87 | 91 | ||
88 | /*FALL THROUGH*/ | 92 | /*FALL THROUGH*/ |
89 | default: | 93 | default: |
90 | /* TSC could halt in idle, so notify users */ | 94 | /* TSC could halt in idle */ |
91 | mark_tsc_unstable("TSC halts in idle"); | 95 | tsc_detected_unstable = 1; |
92 | } | 96 | } |
93 | #endif | 97 | #endif |
94 | } | 98 | } |
@@ -178,6 +182,11 @@ static int power_saving_thread(void *data) | |||
178 | expire_time = jiffies + HZ * (100 - idle_pct) / 100; | 182 | expire_time = jiffies + HZ * (100 - idle_pct) / 100; |
179 | 183 | ||
180 | while (!need_resched()) { | 184 | while (!need_resched()) { |
185 | if (tsc_detected_unstable && !tsc_marked_unstable) { | ||
186 | /* TSC could halt in idle, so notify users */ | ||
187 | mark_tsc_unstable("TSC halts in idle"); | ||
188 | tsc_marked_unstable = 1; | ||
189 | } | ||
181 | local_irq_disable(); | 190 | local_irq_disable(); |
182 | cpu = smp_processor_id(); | 191 | cpu = smp_processor_id(); |
183 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, | 192 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, |