Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: Fast Data Access MMU Miss




FWIW, this below works for me.

thor: please look at reports of early kernel boot failure due
to calling nanotime() before time is available, several on
port-sparc64 recently.


.mrg.


Index: sys/kern/subr_prf.c
===================================================================
RCS file: /cvsroot/src/sys/kern/subr_prf.c,v
retrieving revision 1.154
diff -p -u -r1.154 subr_prf.c
--- sys/kern/subr_prf.c 10 Aug 2014 16:44:36 -0000      1.154
+++ sys/kern/subr_prf.c 14 Aug 2014 07:02:07 -0000
@@ -1200,7 +1200,6 @@ kprintf(const char *fmt0, int oflags, vo
        const char *xdigs;      /* digits for [xX] conversion */
        char bf[KPRINTF_BUFSIZE]; /* space for %c, %[diouxX] */
        char *tailp;            /* tail pointer for snprintf */
-       struct timespec ts;
 
        if (oflags == TOBUFONLY && (vp != NULL))
                tailp = *(char **)vp;
@@ -1549,9 +1548,12 @@ done:
                *(char **)vp = sbuf;
        (*v_flush)();
 
-       (void)nanotime(&ts);
 #ifdef RND_PRINTF
-       SHA512_Update(&kprnd_sha, (char *)&ts, sizeof(ts));
+       if (!cold) {
+               struct timespec ts;
+               (void)nanotime(&ts);
+               SHA512_Update(&kprnd_sha, (char *)&ts, sizeof(ts));
+       }
 #endif
        return ret;
 }


Home | Main Index | Thread Index | Old Index