public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pps: Make pps_gen_parport depend on BROKEN
@ 2011-02-18 21:16 Thomas Gleixner
  2011-02-18 21:34 ` john stultz
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2011-02-18 21:16 UTC (permalink / raw)
  To: LKML
  Cc: Alexander Gordeev, Rodolfo Giometti, Andrew Morton, John Stultz,
	Ingo Molnar

This driver causes hard lockups, when the active clock soure is
jiffies. The reason is that it loops with interrupts disabled waiting
for a timestamp to be reached by polling getnstimeofday(). Though with
a jiffies clocksource, when that code runs on the same CPU which is
responsible for updating jiffies, then we loop in circles for ever
simply because the timer interrupt cannot update jiffies. So both UP
and SMP can be affected.

There is no easy fix for that problem so make it depend on BROKEN for
now.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Rodolfo Giometti <giometti@linux.it>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
---
 drivers/pps/generators/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/pps/generators/Kconfig
===================================================================
--- linux-2.6.orig/drivers/pps/generators/Kconfig
+++ linux-2.6/drivers/pps/generators/Kconfig
@@ -6,7 +6,7 @@ comment "PPS generators support"
 
 config PPS_GENERATOR_PARPORT
 	tristate "Parallel port PPS signal generator"
-	depends on PARPORT
+	depends on PARPORT && BROKEN
 	help
 	  If you say yes here you get support for a PPS signal generator which
 	  utilizes STROBE pin of a parallel port to send PPS signals. It uses

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

* Re: [PATCH] pps: Make pps_gen_parport depend on BROKEN
  2011-02-18 21:16 [PATCH] pps: Make pps_gen_parport depend on BROKEN Thomas Gleixner
@ 2011-02-18 21:34 ` john stultz
  2011-02-22 16:20   ` Alexander Gordeev
  0 siblings, 1 reply; 3+ messages in thread
From: john stultz @ 2011-02-18 21:34 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Alexander Gordeev, Rodolfo Giometti, Andrew Morton,
	Ingo Molnar

On Fri, 2011-02-18 at 22:16 +0100, Thomas Gleixner wrote:
> This driver causes hard lockups, when the active clock soure is
> jiffies. The reason is that it loops with interrupts disabled waiting
> for a timestamp to be reached by polling getnstimeofday(). Though with
> a jiffies clocksource, when that code runs on the same CPU which is
> responsible for updating jiffies, then we loop in circles for ever
> simply because the timer interrupt cannot update jiffies. So both UP
> and SMP can be affected.

Yuck.

Alexander, Rodolfo: Instead of polling on gtod, could you take a
timestamp, calculate the delay and then use udelay()?

thanks
-john



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

* Re: [PATCH] pps: Make pps_gen_parport depend on BROKEN
  2011-02-18 21:34 ` john stultz
@ 2011-02-22 16:20   ` Alexander Gordeev
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Gordeev @ 2011-02-22 16:20 UTC (permalink / raw)
  To: john stultz
  Cc: Thomas Gleixner, LKML, Rodolfo Giometti, Andrew Morton,
	Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

Hi John,

В Fri, 18 Feb 2011 13:34:41 -0800
john stultz <johnstul@us.ibm.com> пишет:

> On Fri, 2011-02-18 at 22:16 +0100, Thomas Gleixner wrote:
> > This driver causes hard lockups, when the active clock soure is
> > jiffies. The reason is that it loops with interrupts disabled waiting
> > for a timestamp to be reached by polling getnstimeofday(). Though with
> > a jiffies clocksource, when that code runs on the same CPU which is
> > responsible for updating jiffies, then we loop in circles for ever
> > simply because the timer interrupt cannot update jiffies. So both UP
> > and SMP can be affected.
> 
> Yuck.
> 
> Alexander, Rodolfo: Instead of polling on gtod, could you take a
> timestamp, calculate the delay and then use udelay()?

Sure, it's possible but it would be less precise IMHO. I'll test it.

-- 
  Alexander

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

end of thread, other threads:[~2011-02-22 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-18 21:16 [PATCH] pps: Make pps_gen_parport depend on BROKEN Thomas Gleixner
2011-02-18 21:34 ` john stultz
2011-02-22 16:20   ` Alexander Gordeev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox