2005-12-01 19:39:19

by Zwane Mwaikambo

[permalink] [raw]
Subject: [PATCH] x86_64: Display HPET timer option

Currently the HPET timer option isn't visible in menuconfig.

Signed-off-by: Zwane Mwaikambo <[email protected]>

diff -r f425e4d22fe8 arch/x86_64/Kconfig
--- a/arch/x86_64/Kconfig Fri Dec 2 03:00:04 2005
+++ b/arch/x86_64/Kconfig Thu Dec 1 11:41:06 2005
@@ -317,7 +317,7 @@


config HPET_TIMER
- bool
+ bool "HPET timer"
default y
help
Use the IA-PC HPET (High Precision Event Timer) to manage
@@ -326,6 +326,10 @@
systems, unlike the TSC, but it is more expensive to access,
as it is off-chip. You can find the HPET spec at
<http://www.intel.com/hardwaredesign/hpetspec.htm>.
+
+config HPET_EMULATE_RTC
+ bool "HPET provides RTC interrupt"
+ depends on HPET_TIMER && RTC=y

config X86_PM_TIMER
bool "PM timer"
@@ -342,10 +346,6 @@
The kernel selects the PM timer only as a last resort, so it is
useful to enable just in case.

-config HPET_EMULATE_RTC
- bool "Provide RTC interrupt"
- depends on HPET_TIMER && RTC=y
-
config GART_IOMMU
bool "IOMMU support"
default y


2005-12-01 19:50:46

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option



On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
>
> Currently the HPET timer option isn't visible in menuconfig.

Do you want it to?

Why would you ever compile it out?

Linus

2005-12-01 19:53:41

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

On Thu, Dec 01, 2005 at 11:50:31AM -0800, Linus Torvalds wrote:
>
>
> On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> >
> > Currently the HPET timer option isn't visible in menuconfig.
>
> Do you want it to?
>
> Why would you ever compile it out?

I don't see any reason for it neither. It would probably only
cause problems because such an option would inevitably bitrot
regularly.

Also the HPET code in x86-64 isn't even ifdefed right now,
so you can't do that.

-Andi

2005-12-01 20:24:26

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

On Thu, 1 Dec 2005, Linus Torvalds wrote:

>
>
> On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> >
> > Currently the HPET timer option isn't visible in menuconfig.
>
> Do you want it to?
>
> Why would you ever compile it out?

For timer testing purposes i sometimes would like not to use the HPET.
Would a runtime switch be preferred?

2005-12-01 20:43:49

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

On Thu, Dec 01, 2005 at 12:30:03PM -0800, Zwane Mwaikambo wrote:
> On Thu, 1 Dec 2005, Linus Torvalds wrote:
>
> >
> >
> > On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> > >
> > > Currently the HPET timer option isn't visible in menuconfig.
> >
> > Do you want it to?
> >
> > Why would you ever compile it out?
>
> For timer testing purposes i sometimes would like not to use the HPET.
> Would a runtime switch be preferred?

nohpet already exists.

-Andi

2005-12-01 20:45:31

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:

> On Thu, 1 Dec 2005, Linus Torvalds wrote:
>
> >
> >
> > On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> > >
> > > Currently the HPET timer option isn't visible in menuconfig.
> >
> > Do you want it to?
> >
> > Why would you ever compile it out?
>
> For timer testing purposes i sometimes would like not to use the HPET.
> Would a runtime switch be preferred?

I meant boottime of course.

2005-12-01 21:06:46

by Erwin Rol

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

On Thu, 2005-12-01 at 21:43 +0100, Andi Kleen wrote:
> On Thu, Dec 01, 2005 at 12:30:03PM -0800, Zwane Mwaikambo wrote:
> > On Thu, 1 Dec 2005, Linus Torvalds wrote:
> >
> > > On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> > > >
> > > > Currently the HPET timer option isn't visible in menuconfig.
> > >
> > > Do you want it to?
> > >
> > > Why would you ever compile it out?
> >
> > For timer testing purposes i sometimes would like not to use the HPET.
> > Would a runtime switch be preferred?
>
> nohpet already exists.
>

And luckily it does cause without "nohpet" i can't boot my shuttle
ST20G5, the NMI watchdog kills it because ti hangs when initializing the
hpet. If the nmi watchdog is off it just hangs for ever.

- Erwin



2005-12-01 21:18:50

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

On Thu, Dec 01, 2005 at 10:06:37PM +0100, Erwin Rol wrote:
> On Thu, 2005-12-01 at 21:43 +0100, Andi Kleen wrote:
> > On Thu, Dec 01, 2005 at 12:30:03PM -0800, Zwane Mwaikambo wrote:
> > > On Thu, 1 Dec 2005, Linus Torvalds wrote:
> > >
> > > > On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> > > > >
> > > > > Currently the HPET timer option isn't visible in menuconfig.
> > > >
> > > > Do you want it to?
> > > >
> > > > Why would you ever compile it out?
> > >
> > > For timer testing purposes i sometimes would like not to use the HPET.
> > > Would a runtime switch be preferred?
> >
> > nohpet already exists.
> >
>
> And luckily it does cause without "nohpet" i can't boot my shuttle
> ST20G5, the NMI watchdog kills it because ti hangs when initializing the
> hpet. If the nmi watchdog is off it just hangs for ever.

Can you give details on the machine? lspci, dmidecode, acpidmp output,
boot log from the hang case?

Then perhaps it can be blacklisted or the failure otherwise avoided.

[Looks like I finally need to add DMI decode support to x86-64 too :-/]

-Andi

2005-12-01 23:07:58

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

On Thu, 1 Dec 2005, Andi Kleen wrote:

> On Thu, Dec 01, 2005 at 12:30:03PM -0800, Zwane Mwaikambo wrote:
> > On Thu, 1 Dec 2005, Linus Torvalds wrote:
> >
> > >
> > >
> > > On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> > > >
> > > > Currently the HPET timer option isn't visible in menuconfig.
> > >
> > > Do you want it to?
> > >
> > > Why would you ever compile it out?
> >
> > For timer testing purposes i sometimes would like not to use the HPET.
> > Would a runtime switch be preferred?
>
> nohpet already exists.

Alright, my real intention was being able to change that by specifying
seperate kernel configurations. It's not that pressing i can live with an
external patch.

Thanks,
Zwane

2005-12-08 13:54:10

by Erwin Rol

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

Hey Andi,

bit late but here is the info (or at least part of), since I don't have
a serial port on the computer I need to write down the panic info and
than mail it, so I only wrote down what i thought was important. If you
need other info from the panic let me know.

The NMI watchdog panic give me the following info (when nmi watchdog is
off it just hangs for ever)

RIP: .... hpet_alloc + 882

Call Trace: late_hpet_init + 171
genl_init + 111
init + 541


uname -a
Linux xpc.home.erwinrol.com 2.6.14-1.1743_FC5 #1 SMP Wed Dec 7 13:49:22
EST 2005 x86_64 x86_64 x86_64 GNU/Linux

When there is a hang there is no output in the log files, so the dmesg
is the output of nohpet.

- Erwin


On Thu, 2005-12-01 at 22:18 +0100, Andi Kleen wrote:
> On Thu, Dec 01, 2005 at 10:06:37PM +0100, Erwin Rol wrote:
> > On Thu, 2005-12-01 at 21:43 +0100, Andi Kleen wrote:
> > > On Thu, Dec 01, 2005 at 12:30:03PM -0800, Zwane Mwaikambo wrote:
> > > > On Thu, 1 Dec 2005, Linus Torvalds wrote:
> > > >
> > > > > On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> > > > > >
> > > > > > Currently the HPET timer option isn't visible in menuconfig.
> > > > >
> > > > > Do you want it to?
> > > > >
> > > > > Why would you ever compile it out?
> > > >
> > > > For timer testing purposes i sometimes would like not to use the HPET.
> > > > Would a runtime switch be preferred?
> > >
> > > nohpet already exists.
> > >
> >
> > And luckily it does cause without "nohpet" i can't boot my shuttle
> > ST20G5, the NMI watchdog kills it because ti hangs when initializing the
> > hpet. If the nmi watchdog is off it just hangs for ever.
>
> Can you give details on the machine? lspci, dmidecode, acpidmp output,
> boot log from the hang case?
>
> Then perhaps it can be blacklisted or the failure otherwise avoided.
>
> [Looks like I finally need to add DMI decode support to x86-64 too :-/]
>
> -Andi
>
>


Attachments:
dmesg_output.txt (19.96 kB)
dmidecode.txt (13.33 kB)
lspci.txt (14.57 kB)
Download all attachments

2005-12-08 14:58:42

by Erwin Rol

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

Oops the acpidump attachment was missing, here it is.

- Erwin


On Thu, 2005-12-01 at 22:18 +0100, Andi Kleen wrote:
> On Thu, Dec 01, 2005 at 10:06:37PM +0100, Erwin Rol wrote:
> > On Thu, 2005-12-01 at 21:43 +0100, Andi Kleen wrote:
> > > On Thu, Dec 01, 2005 at 12:30:03PM -0800, Zwane Mwaikambo wrote:
> > > > On Thu, 1 Dec 2005, Linus Torvalds wrote:
> > > >
> > > > > On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> > > > > >
> > > > > > Currently the HPET timer option isn't visible in menuconfig.
> > > > >
> > > > > Do you want it to?
> > > > >
> > > > > Why would you ever compile it out?
> > > >
> > > > For timer testing purposes i sometimes would like not to use the HPET.
> > > > Would a runtime switch be preferred?
> > >
> > > nohpet already exists.
> > >
> >
> > And luckily it does cause without "nohpet" i can't boot my shuttle
> > ST20G5, the NMI watchdog kills it because ti hangs when initializing the
> > hpet. If the nmi watchdog is off it just hangs for ever.
>
> Can you give details on the machine? lspci, dmidecode, acpidmp output,
> boot log from the hang case?
>
> Then perhaps it can be blacklisted or the failure otherwise avoided.
>
> [Looks like I finally need to add DMI decode support to x86-64 too :-/]
>
> -Andi
>
>


Attachments:
acpidump.bin.gz (5.98 kB)

2005-12-08 15:23:16

by Erwin Rol

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

Maybe this dsdt is also useful (probably only to complain at Shuttle
that their BIOS(es) are broken.

- Erwin


On Thu, 2005-12-01 at 22:18 +0100, Andi Kleen wrote:
> On Thu, Dec 01, 2005 at 10:06:37PM +0100, Erwin Rol wrote:
> > On Thu, 2005-12-01 at 21:43 +0100, Andi Kleen wrote:
> > > On Thu, Dec 01, 2005 at 12:30:03PM -0800, Zwane Mwaikambo wrote:
> > > > On Thu, 1 Dec 2005, Linus Torvalds wrote:
> > > >
> > > > > On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> > > > > >
> > > > > > Currently the HPET timer option isn't visible in menuconfig.
> > > > >
> > > > > Do you want it to?
> > > > >
> > > > > Why would you ever compile it out?
> > > >
> > > > For timer testing purposes i sometimes would like not to use the HPET.
> > > > Would a runtime switch be preferred?
> > >
> > > nohpet already exists.
> > >
> >
> > And luckily it does cause without "nohpet" i can't boot my shuttle
> > ST20G5, the NMI watchdog kills it because ti hangs when initializing the
> > hpet. If the nmi watchdog is off it just hangs for ever.
>
> Can you give details on the machine? lspci, dmidecode, acpidmp output,
> boot log from the hang case?
>
> Then perhaps it can be blacklisted or the failure otherwise avoided.
>
> [Looks like I finally need to add DMI decode support to x86-64 too :-/]
>
> -Andi
>
>


Attachments:
dsdt.dsl.gz (11.11 kB)

2005-12-09 19:56:30

by Erwin Rol

[permalink] [raw]
Subject: Re: [PATCH] x86_64: Display HPET timer option

Hey Andi,

I looked a bit better at what happens (by adding a bunch of printk's in
drivers/char/hpet.c) and it seems that read_counter(&hpet->hpet_mc);
always returns -1 and that causes the following loop in
static unsigned long hpet_calibrate(struct hpets *hpetp)
to endlessly loop while having local_irq_save(flags).

do {
m = read_counter(&hpet->hpet_mc);
write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
} while (i++, (m - start) < count);

count is 0xe9 and start and (m - start) is 0.

What could be the reason that read_counter(&hpet->hpet_mc) is and stays
-1 ?


- Erwin

On Thu, 2005-12-01 at 22:18 +0100, Andi Kleen wrote:
> On Thu, Dec 01, 2005 at 10:06:37PM +0100, Erwin Rol wrote:
> > On Thu, 2005-12-01 at 21:43 +0100, Andi Kleen wrote:
> > > On Thu, Dec 01, 2005 at 12:30:03PM -0800, Zwane Mwaikambo wrote:
> > > > On Thu, 1 Dec 2005, Linus Torvalds wrote:
> > > >
> > > > > On Thu, 1 Dec 2005, Zwane Mwaikambo wrote:
> > > > > >
> > > > > > Currently the HPET timer option isn't visible in menuconfig.
> > > > >
> > > > > Do you want it to?
> > > > >
> > > > > Why would you ever compile it out?
> > > >
> > > > For timer testing purposes i sometimes would like not to use the HPET.
> > > > Would a runtime switch be preferred?
> > >
> > > nohpet already exists.
> > >
> >
> > And luckily it does cause without "nohpet" i can't boot my shuttle
> > ST20G5, the NMI watchdog kills it because ti hangs when initializing the
> > hpet. If the nmi watchdog is off it just hangs for ever.
>
> Can you give details on the machine? lspci, dmidecode, acpidmp output,
> boot log from the hang case?
>
> Then perhaps it can be blacklisted or the failure otherwise avoided.
>
> [Looks like I finally need to add DMI decode support to x86-64 too :-/]
>
> -Andi
>
>