Hi, Patch applied. After a ``reboot``, everything seems fine. Then I shut down the system with "shutdown -hp now". After a few minute, I restart the computer, and the issue is still here.
* Paul Irofti <[email protected]> le [25-08-2019 18:33:18 +0300]: > Hi, > > Can you guys test this diff for me and let me know what happens or if it > fixes your issue? > > This is supposed to be applied on top of a clean current source tree. > > > Thank you, > Paul > > > Index: arch/amd64/amd64/tsc.c > =================================================================== > RCS file: /cvs/src/sys/arch/amd64/amd64/tsc.c,v > retrieving revision 1.13 > diff -u -p -u -p -r1.13 tsc.c > --- arch/amd64/amd64/tsc.c 9 Aug 2019 15:20:05 -0000 1.13 > +++ arch/amd64/amd64/tsc.c 25 Aug 2019 15:25:40 -0000 > @@ -210,7 +210,7 @@ cpu_recalibrate_tsc(struct timecounter * > uint > tsc_get_timecount(struct timecounter *tc) > { > - return rdtsc() + curcpu()->ci_tsc_skew; > + return rdtsc(); > } > > void > Index: arch/amd64/include/cpufunc.h > =================================================================== > RCS file: /cvs/src/sys/arch/amd64/include/cpufunc.h,v > retrieving revision 1.34 > diff -u -p -u -p -r1.34 cpufunc.h > --- arch/amd64/include/cpufunc.h 28 Jun 2019 21:54:05 -0000 1.34 > +++ arch/amd64/include/cpufunc.h 25 Aug 2019 15:25:40 -0000 > @@ -283,13 +283,14 @@ mfence(void) > } > > static __inline u_int64_t > -rdtsc(void) > +rdtsc_(void) > { > uint32_t hi, lo; > > __asm volatile("rdtsc" : "=d" (hi), "=a" (lo)); > return (((uint64_t)hi << 32) | (uint64_t) lo); > } > +#define rdtsc() (rdtsc_() + curcpu()->ci_tsc_skew) > > static __inline u_int64_t > rdpmc(u_int pmc) > Index: arch/amd64/include/pctr.h > =================================================================== > RCS file: /cvs/src/sys/arch/amd64/include/pctr.h,v > retrieving revision 1.6 > diff -u -p -u -p -r1.6 pctr.h > --- arch/amd64/include/pctr.h 25 Mar 2019 18:48:12 -0000 1.6 > +++ arch/amd64/include/pctr.h 25 Aug 2019 15:25:40 -0000 > @@ -51,7 +51,7 @@ struct pctrst { > > #define _PATH_PCTR "/dev/pctr" > > -#define rdtsc() \ > +#define rdtsc1() \ > ({ \ > u_int32_t hi, lo; \ > __asm volatile("rdtsc" : "=d" (hi), "=a" (lo)); \ -- prx
