Author: ian Date: Sun Jun 18 17:26:54 2017 New Revision: 320074 URL: https://svnweb.freebsd.org/changeset/base/320074
Log: Only register as the platform DELAY() implementation if the setup of the global timer was successful, since the implementation tries to read it. Notably, if the platform has a variable-frequency global timer (because of dynamic frequency scaling), it doesn't set up the global timer for use as a system timecounter, and in that case it also can't use it for DELAY. Such platforms use different timer hardware for both timecounter and DELAY. Modified: head/sys/arm/arm/mpcore_timer.c Modified: head/sys/arm/arm/mpcore_timer.c ============================================================================== --- head/sys/arm/arm/mpcore_timer.c Sun Jun 18 17:20:48 2017 (r320073) +++ head/sys/arm/arm/mpcore_timer.c Sun Jun 18 17:26:54 2017 (r320074) @@ -439,7 +439,12 @@ arm_tmr_attach(device_t dev) } #ifdef MULTIDELAY - arm_set_delay(arm_tmr_delay, sc); + /* + * We can register as the DELAY() implementation only if we successfully + * set up the global timer. + */ + if (tc_err == 0) + arm_set_delay(arm_tmr_delay, sc); #endif return (0); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"