Commit 303d72a0 authored by Paul Mackerras's avatar Paul Mackerras

powerpc: Don't limit pmac_get_rtc_time to return only positive values

If the machine's clock is set to a bogus value, this check resulted
in userland waiting effectively forever for the RTC value to change,
so remove the check.
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 6d0124fc
...@@ -113,8 +113,6 @@ static unsigned long cuda_get_time(void) ...@@ -113,8 +113,6 @@ static unsigned long cuda_get_time(void)
req.reply_len); req.reply_len);
now = (req.reply[3] << 24) + (req.reply[4] << 16) now = (req.reply[3] << 24) + (req.reply[4] << 16)
+ (req.reply[5] << 8) + req.reply[6]; + (req.reply[5] << 8) + req.reply[6];
if (now < RTC_OFFSET)
return 0;
return now - RTC_OFFSET; return now - RTC_OFFSET;
} }
...@@ -158,8 +156,6 @@ static unsigned long pmu_get_time(void) ...@@ -158,8 +156,6 @@ static unsigned long pmu_get_time(void)
req.reply_len); req.reply_len);
now = (req.reply[0] << 24) + (req.reply[1] << 16) now = (req.reply[0] << 24) + (req.reply[1] << 16)
+ (req.reply[2] << 8) + req.reply[3]; + (req.reply[2] << 8) + req.reply[3];
if (now < RTC_OFFSET)
return 0;
return now - RTC_OFFSET; return now - RTC_OFFSET;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment