All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: i386 HPET code
@ 2005-02-03 14:28 Pallipadi, Venkatesh
  2005-02-03 19:30 ` john stultz
  2005-02-03 21:30 ` Andi Kleen
  0 siblings, 2 replies; 13+ messages in thread
From: Pallipadi, Venkatesh @ 2005-02-03 14:28 UTC (permalink / raw)
  To: john stultz; +Cc: Andi Kleen, lkml, keith maanthey, Max Asbock, Chris McDermott


Hi John, Andrew,


Can you check whether only the following change makes the problem go
away. If yes, then it looks like a hardware issue.

>	hpet_writel(hpet_tick, HPET_T0_CMP);
>+	hpet_writel(hpet_tick, HPET_T0_CMP); /* AK: why twice? */
>

Thanks,
Venki

>-----Original Message-----
>From: john stultz [mailto:johnstul@us.ibm.com] 
>Sent: Wednesday, February 02, 2005 6:05 PM
>To: Pallipadi, Venkatesh
>Cc: Andi Kleen; lkml; keith maanthey; Max Asbock; Chris McDermott
>Subject: i386 HPET code
>
>Hey Venkatesh,
>	I've been looking into a bug where i386 2.6 kernels do 
>not boot on IBM
>e325s if HPET_TIMER is enabled (hpet=disable works around the issue).
>When running x86-64 kernels, the issue isn't seen. It appears 
>that after
>the hpet is enabled, we stop receiving timer ticks. I've not played on
>any other HPET enabled systems, nor have I looked at the HPET spec, so
>I'm not sure if this is a hardware issue or not.
>
>The following patch, which uses the x86-64 code for
>hpet_timer_stop_set_go() seems to fix the issue.
>
>Your thoughts?
>
>thanks
>-john
>
>
>===== arch/i386/kernel/time_hpet.c 1.10 vs edited =====
>--- 1.10/arch/i386/kernel/time_hpet.c	2004-11-02 06:40:42 -08:00
>+++ edited/arch/i386/kernel/time_hpet.c	2005-02-02 
>17:59:27 -08:00
>@@ -64,29 +64,30 @@
> {
> 	unsigned int cfg;
> 
>-	/*
>-	 * Stop the timers and reset the main counter.
>-	 */
>+/*
>+ * Stop the timers and reset the main counter.
>+ */
>+
> 	cfg = hpet_readl(HPET_CFG);
>-	cfg &= ~HPET_CFG_ENABLE;
>+	cfg &= ~(HPET_CFG_ENABLE | HPET_CFG_LEGACY);
> 	hpet_writel(cfg, HPET_CFG);
> 	hpet_writel(0, HPET_COUNTER);
> 	hpet_writel(0, HPET_COUNTER + 4);
> 
>-	/*
>-	 * Set up timer 0, as periodic with first interrupt to happen at
>-	 * hpet_tick, and period also hpet_tick.
>-	 */
>-	cfg = hpet_readl(HPET_T0_CFG);
>-	cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
>-	       HPET_TN_SETVAL | HPET_TN_32BIT;
>-	hpet_writel(cfg, HPET_T0_CFG);
>-	hpet_writel(tick, HPET_T0_CMP);
>+/*
>+ * Set up timer 0, as periodic with first interrupt to happen 
>at hpet_tick,
>+ * and period also hpet_tick.
>+ */
>+
>+	hpet_writel(HPET_TN_ENABLE | HPET_TN_PERIODIC | HPET_TN_SETVAL |
>+		    HPET_TN_32BIT, HPET_T0_CFG);
>+	hpet_writel(hpet_tick, HPET_T0_CMP);
>+	hpet_writel(hpet_tick, HPET_T0_CMP); /* AK: why twice? */
>+
>+/*
>+ * Go!
>+ */
> 
>-	/*
>- 	 * Go!
>- 	 */
>-	cfg = hpet_readl(HPET_CFG);
> 	cfg |= HPET_CFG_ENABLE | HPET_CFG_LEGACY;
> 	hpet_writel(cfg, HPET_CFG);
> 
>
>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread
* RE: [PATCH][i386] HPET setup, duplicate HPET_T0_CMP needed for some platforms
@ 2005-02-07 19:47 Pallipadi, Venkatesh
  0 siblings, 0 replies; 13+ messages in thread
From: Pallipadi, Venkatesh @ 2005-02-07 19:47 UTC (permalink / raw)
  To: Giuseppe Bilotta, linux-kernel


>-----Original Message-----
>From: linux-kernel-owner@vger.kernel.org 
>[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of 
>Giuseppe Bilotta
>Sent: Sunday, February 06, 2005 7:59 AM
>To: linux-kernel@vger.kernel.org
>Subject: Re: [PATCH][i386] HPET setup, duplicate HPET_T0_CMP 
>needed for some platforms
>
>Venkatesh Pallipadi wrote:
>> +	/* 
>> +	 * Some systems seems to need two writes to HPET_T0_CMP, 
>> +	 * to get interrupts working
>> +	 */
>> +	hpet_writel(tick, HPET_T0_CMP);
>>  	hpet_writel(tick, HPET_T0_CMP);
>
>Is it known which platforms require two, and which ones require 
>one write? Is it cost-effective to #if CONFIG_ the second 
>write?

Additional write should not be performace critical, as this code is
called
only once, during boot up (and again during system suspend-resume).

Thanks,
Venki

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-02-07 20:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-03 14:28 i386 HPET code Pallipadi, Venkatesh
2005-02-03 19:30 ` john stultz
2005-02-03 20:02   ` Venkatesh Pallipadi
2005-02-03 21:22     ` Andi Kleen
2005-02-04 17:22     ` Andrew Walrond
2005-02-03 21:30 ` Andi Kleen
2005-02-04 19:28   ` Vojtech Pavlik
2005-02-04 20:02   ` Vojtech Pavlik
2005-02-04 20:03     ` Vojtech Pavlik
2005-02-04 23:41     ` [PATCH][i386] HPET setup, duplicate HPET_T0_CMP needed for some platforms Venkatesh Pallipadi
2005-02-05 10:55       ` Andrew Walrond
2005-02-06 15:58       ` Giuseppe Bilotta
  -- strict thread matches above, loose matches on Subject: below --
2005-02-07 19:47 Pallipadi, Venkatesh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.