lkml.org 
[lkml]   [1999]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] arch/alpha/kernel/time.c kernel 2.2.1 (ARC +20 years bug)
This is a patch for 2.2.* kernels for Alphas
With this patch, the kernel reads the correct time from BIOS when
booting from ARC/AlphaBIOS console (detection of starting epoch 1980 as
oposed to 1900 for SRM console
Please test and CC: any replies to rhomberg@ife.ee.ethz.ch
--
_________________________________________________________________
/ \
| Alex Rhomberg Tel: +41 1 632 49 18 |
| Institut fuer Elektronik Fax: +41 1 632 12 10 |
| ETH Zuerich Zentrale: +41 1 632 11 11 |
| Gloriastrasse 35 |
| 8092 Zuerich email: rhomberg@ife.ee.ethz.ch |
\_________________________________________________________________/--- linux/arch/alpha/kernel/time.c.old Mon Feb 8 13:34:29 1999
+++ linux/arch/alpha/kernel/time.c Mon Feb 8 13:40:18 1999
@@ -282,8 +282,17 @@
*/
year -= 42;
#endif
- if ((year += 1900) < 1970)
- year += 100;
+ /*
+ * set start of epoch to 1980 if running under ARC console
+ * This is indicated by MILO in the system serial number
+ */
+
+ if(strncmp((const char *)hwrpb->ssn, "MILO", 4) == 0)
+ year += 1980; /* assume ARC/AlphaBIOS */
+ else
+ if ((year += 1900) < 1970)
+ year += 100; /* assume SRM */
+
xtime.tv_sec = mktime(year, mon, day, hour, min, sec);
xtime.tv_usec = 0;
\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.038 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site