lkml.org 
[lkml]   [2011]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] acpi/pm: If failed at validating ACPI PM timer, inhibit future reads.
On Fri, Jan 14, 2011 at 07:54:47AM -0800, john stultz wrote:
> 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>

Works great. (I pulled out my patch to test this).

Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.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 17:33    [W:0.114 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site