Skip to contentSkip to conversation

pps: Make pps_gen_parport depend on BROKEN

PATCH In review Thomas Gleixner 3 participants 3 messages Feb 18, 2011 – Feb 22, 2011 PPS support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pps: Make pps_gen_parport depend on BROKEN

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.

Cc Alexander Gordeev <[email protected]>
Cc Rodolfo Giometti <[email protected]>
Cc john stultz <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Ingo Molnar <[email protected]>
---
 drivers/pps/generators/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pps/generators/Kconfig +1 -1
Index: 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
#1 lore raw
Quoted 7 lines · Thomas Gleixner

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

#2 lore raw

Hi John,

В Fri, 18 Feb 2011 13:34:41 -0800
john stultz <[email protected]> пишет:

Quoted 9 lines · Thomas Gleixner
Quoted 7 lines

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.

Quoted 4 lines

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.

Signature · 1 line
  Alexander