]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/rtas-rtc.c
[PATCH] powerpc: RTC memory corruption
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / rtas-rtc.c
index 7b948662704c9f14b39d3355f5c7922190b2474c..34d073fb60911aff9f672971275bbe8c44e09386 100644 (file)
@@ -15,7 +15,7 @@ unsigned long __init rtas_get_boot_time(void)
 {
        int ret[8];
        int error, wait_time;
-       unsigned long max_wait_tb;
+       u64 max_wait_tb;
 
        max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
        do {
@@ -45,14 +45,14 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm)
 {
         int ret[8];
        int error, wait_time;
-       unsigned long max_wait_tb;
+       u64 max_wait_tb;
 
        max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
        do {
                error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
                if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) {
                        if (in_interrupt() && printk_ratelimit()) {
-                               memset(&rtc_tm, 0, sizeof(struct rtc_time));
+                               memset(rtc_tm, 0, sizeof(struct rtc_time));
                                printk(KERN_WARNING "error: reading clock"
                                       " would delay interrupt\n");
                                return; /* delay not allowed */
@@ -80,7 +80,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm)
 int rtas_set_rtc_time(struct rtc_time *tm)
 {
        int error, wait_time;
-       unsigned long max_wait_tb;
+       u64 max_wait_tb;
 
        max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
        do {