On Wed, Mar 02, 2005 at 11:33:30AM -0800, Nishanth Aravamudan wrote:
> Hi,
> 
> Please consider applying.

Sorry, previous patch (not compile-tested) would definitely not have
worked due to missing #include. Fixed below.

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.
 
Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>


--- 2.6.11-kj-v/arch/m68k/atari/time.c  2005-03-01 23:38:18.000000000 -0800
+++ 2.6.11-kj/arch/m68k/atari/time.c    2005-03-02 11:37:56.000000000 -0800
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/rtc.h>
 #include <linux/bcd.h>
+#include <linux/delay.h>
 
 #include <asm/atariints.h>
 
@@ -97,7 +98,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 +213,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 );
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to