lkml.org 
[lkml]   [2011]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] acpi/pm: If failed at validating ACPI PM timer, inhibit future reads.
From
Date
On Fri, 2011-01-14 at 07:44 -0800, john stultz wrote:
> I'm actually looking at a different fix, as I'm worried by Thomas'
> comment about hitting the same issue on real hardware if we catch the
> same pmtrm value both times.

Konrad: Mind trying the following?


The conditional (!hpet && !ref_start && !ref_stop) doesn't really make
sense. If the refs are null, but hpet is on, we still want to break out.

So checking if both the ref values are the same should handle if we
don't have hardware (both null) or if they are the same value (either by
invalid hardware, or by chance), which can cause a divzero issue.

NOT FOR INCLUSION, I haven't had my coffee yet.
Signed-off-by: John Stultz <johnstul@us.ibm.com>

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 823f79a..fa2cb5e 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -935,7 +935,7 @@ static void tsc_refine_calibration_work(struct work_struct *work)
tsc_stop = tsc_read_refs(&ref_stop, hpet);

/* hpet or pmtimer available ? */
- if (!hpet && !ref_start && !ref_stop)
+ if (ref_start == ref_stop)
goto out;

/* Check, whether the sampling was disturbed by an SMI */





\
 
 \ /
  Last update: 2011-01-14 16:57    [W:0.128 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site