Re: [PATCH] acpi/pm: If failed at validating ACPI PM timer, inhibit future reads.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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

Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

> 
> 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 */
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux