* [PATCH -mm] Fix faulty HPET clocksource usage (fix for bug #7062)
@ 2006-08-28 21:32 john stultz
2006-08-28 21:39 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: john stultz @ 2006-08-28 21:32 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml, michael.olbrich
Apparently some systems export valid HPET addresses, but hpet_enable()
fails. Then when the HPET clocksource starts up, it only checks for a
valid HPET address, and the result is a system where time does not
advance.
See http://bugme.osdl.org/show_bug.cgi?id=7062 for details.
This patch just makes sure we better check that the HPET is functional
before registering the HPET clocksource.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
index c6737c3..17647a5 100644
--- a/arch/i386/kernel/hpet.c
+++ b/arch/i386/kernel/hpet.c
@@ -35,7 +35,7 @@ static int __init init_hpet_clocksource(
void __iomem* hpet_base;
u64 tmp;
- if (!hpet_address)
+ if (!is_hpet_enabled())
return -ENODEV;
/* calculate the hpet address: */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -mm] Fix faulty HPET clocksource usage (fix for bug #7062)
2006-08-28 21:32 [PATCH -mm] Fix faulty HPET clocksource usage (fix for bug #7062) john stultz
@ 2006-08-28 21:39 ` Andrew Morton
2006-08-28 21:57 ` john stultz
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2006-08-28 21:39 UTC (permalink / raw)
To: john stultz; +Cc: lkml, michael.olbrich
On Mon, 28 Aug 2006 14:32:39 -0700
john stultz <johnstul@us.ibm.com> wrote:
> Apparently some systems export valid HPET addresses, but hpet_enable()
> fails. Then when the HPET clocksource starts up, it only checks for a
> valid HPET address, and the result is a system where time does not
> advance.
>
> See http://bugme.osdl.org/show_bug.cgi?id=7062 for details.
>
> This patch just makes sure we better check that the HPET is functional
> before registering the HPET clocksource.
>
> Signed-off-by: John Stultz <johnstul@us.ibm.com>
>
> diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
> index c6737c3..17647a5 100644
> --- a/arch/i386/kernel/hpet.c
> +++ b/arch/i386/kernel/hpet.c
> @@ -35,7 +35,7 @@ static int __init init_hpet_clocksource(
> void __iomem* hpet_base;
> u64 tmp;
>
> - if (!hpet_address)
> + if (!is_hpet_enabled())
> return -ENODEV;
>
> /* calculate the hpet address: */
Thanks. This would be a 2.6.18 thing, wouldn't it?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -mm] Fix faulty HPET clocksource usage (fix for bug #7062)
2006-08-28 21:39 ` Andrew Morton
@ 2006-08-28 21:57 ` john stultz
0 siblings, 0 replies; 3+ messages in thread
From: john stultz @ 2006-08-28 21:57 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml, michael.olbrich
On Mon, 2006-08-28 at 14:39 -0700, Andrew Morton wrote:
> On Mon, 28 Aug 2006 14:32:39 -0700
> john stultz <johnstul@us.ibm.com> wrote:
>
> > Apparently some systems export valid HPET addresses, but hpet_enable()
> > fails. Then when the HPET clocksource starts up, it only checks for a
> > valid HPET address, and the result is a system where time does not
> > advance.
> >
> > See http://bugme.osdl.org/show_bug.cgi?id=7062 for details.
> >
> > This patch just makes sure we better check that the HPET is functional
> > before registering the HPET clocksource.
> >
> > Signed-off-by: John Stultz <johnstul@us.ibm.com>
> >
> > diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
> > index c6737c3..17647a5 100644
> > --- a/arch/i386/kernel/hpet.c
> > +++ b/arch/i386/kernel/hpet.c
> > @@ -35,7 +35,7 @@ static int __init init_hpet_clocksource(
> > void __iomem* hpet_base;
> > u64 tmp;
> >
> > - if (!hpet_address)
> > + if (!is_hpet_enabled())
> > return -ENODEV;
> >
> > /* calculate the hpet address: */
>
> Thanks. This would be a 2.6.18 thing, wouldn't it?
I would think so.
thanks
-john
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-08-28 21:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-28 21:32 [PATCH -mm] Fix faulty HPET clocksource usage (fix for bug #7062) john stultz
2006-08-28 21:39 ` Andrew Morton
2006-08-28 21:57 ` john stultz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).