Date: Tue, 03 Jun 2014 14:57:02 -0600 From: Chris Torek <torek@torek.net> To: freebsd-hackers@freebsd.org Subject: kern.timecounter.smp_tsc_adjust Message-ID: <201406032057.s53Kv2YT016755@elf.torek.net>
next in thread | raw e-mail | index | archive | help
In x86/x86/tsc.c we have several routines for checking the TSCs across multiple CPUs in an SMP system, and then optionally adjusting them. We tried turning on the adjustment option and the system promptly crashed. This appears to be the culprit: static int test_tsc(void) { uint32_t *data, *tsc; (note the type of "*data") static void comp_smp_tsc(void *arg) { uint32_t *tsc; (again, uint32_t), but: static void adj_smp_tsc(void *arg) { uint64_t *tsc; The TSC_READ code uses rdtsc32(), so the types are more or less correct there, but maybe everyone should just use 64 bits throughout, and rdtsc()? In any case, at least one, and maybe two, routines need their types changed (and maybe the TSC_READ macro as well). Is it OK to just assume the upper 32 bits are in sync? Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406032057.s53Kv2YT016755>