re: Fast Data Access MMU Miss
matthew green <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.sparc64 |
|---|---|
| Message-ID | <[email protected]> |
> --- subr_prf.c 10 Aug 2014 16:44:36 -0000 1.154 > +++ subr_prf.c 14 Aug 2014 03:34:53 -0000 > @@ -1200,7 +1200,9 @@ > const char *xdigs; /* digits for [xX] conversion */ > char bf[KPRINTF_BUFSIZE]; /* space for %c, %[diouxX] */ > char *tailp; /* tail pointer for snprintf */ > +#ifdef RND_PRINTF > struct timespec ts; > +#endif > > if (oflags == TOBUFONLY && (vp != NULL)) > tailp = *(char **)vp; > @@ -1549,8 +1551,8 @@ > *(char **)vp = sbuf; > (*v_flush)(); > > - (void)nanotime(&ts); > #ifdef RND_PRINTF > + (void)nanotime(&ts); > SHA512_Update(&kprnd_sha, (char *)&ts, sizeof(ts)); > #endif > return ret; nice find. i think in addition to this, we shouldn't be doing this if (!cold). clocks aren't active and shouldn't be called upon before !cold. it would be nice to fix this, but until then i think my suggestion is necessary. thanks. .mrg.