Skip to contentSkip to conversation

m68k/time: replace schedule_timeout() with

PATCH New Nishanth Aravamudan 1 participant 1 message Mar 2, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k/time: replace schedule_timeout() with

Hi,

Please consider applying.

Description: The comments preceding the schedule_timeout() call in time.c below indicated a 50ms delay is desired. The current code implictly assumes HZ==100 and requests a delay of 5 ticks. This is clearly broken in higher HZ models. Using msleep_interruptible() makes HZ changes transparent. Change the corresponding constant appropriately and add a comment to indicate units.

arch/m68k/atari/time.c +3 -5
@@ -97,7 +97,7 @@ static void mste_write(struct MSTE_RTC *
 	} while(0)
 
 
-#define HWCLK_POLL_INTERVAL	5
+#define HWCLK_POLL_INTERVAL	50	/* ms */
 
 int atari_mste_hwclk( int op, struct rtc_time *t )
 {
@@ -212,10 +212,8 @@ int atari_tt_hwclk( int op, struct rtc_t
      * additionally the RTC_SET bit is set to prevent an update cycle.
      */
 
-    while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) {
-        current->state = TASK_INTERRUPTIBLE;
-        schedule_timeout(HWCLK_POLL_INTERVAL);
-    }
+    while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP )
+	msleep_interruptible(HWCLK_POLL_INTERVAL);
 
     local_irq_save(flags);
     RTC_WRITE( RTC_CONTROL, ctrl | RTC_SET );

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors