[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1101141701360.2678@localhost6.localdomain6>
Date: Fri, 14 Jan 2011 17:02:14 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: john stultz <johnstul@...ibm.com>
cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Jeremy Fitzhardinge <jeremy@...p.org>,
Stefano Stabellini <stefano.stabellini@...citrix.com>,
Ian Campbell <Ian.Campbell@...citrix.com>, mingo@...hat.com,
hpa@...or.com, linux-kernel@...r.kernel.org, andi@...stfloor.org,
williams@...hat.com, schwidefsky@...ibm.com, mingo@...e.hu,
linux-tip-commits@...r.kernel.org
Subject: Re: [PATCH] acpi/pm: If failed at validating ACPI PM timer, inhibit
future reads.
On Fri, 14 Jan 2011, 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@...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 */
That makes sense, though we really should kill pmtimer when we detect
that it's crappy.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists