Date: Tue, 30 Apr 2013 14:56:41 +0000 (UTC) From: Davide Italiano <davide@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250101 - head/sys/dev/hwpmc Message-ID: <201304301456.r3UEufcC072225@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: davide Date: Tue Apr 30 14:56:41 2013 New Revision: 250101 URL: http://svnweb.freebsd.org/changeset/base/250101 Log: Complete r250097: Do not change the initialization order in pmc_intel_initialize(). Modified: head/sys/dev/hwpmc/hwpmc_intel.c Modified: head/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_intel.c Tue Apr 30 13:20:11 2013 (r250100) +++ head/sys/dev/hwpmc/hwpmc_intel.c Tue Apr 30 14:56:41 2013 (r250101) @@ -191,7 +191,9 @@ pmc_intel_initialize(void) pmc_mdep->pmd_switch_out = intel_switch_out; ncpus = pmc_cpu_max(); - + error = pmc_tsc_initialize(pmc_mdep, ncpus); + if (error) + goto error; switch (cputype) { #if defined(__i386__) || defined(__amd64__) /* @@ -246,8 +248,10 @@ pmc_intel_initialize(void) KASSERT(0, ("[intel,%d] Unknown CPU type", __LINE__)); } - if (error) + if (error) { + pmc_tsc_finalize(pmc_mdep); goto error; + } /* * Init the uncore class. @@ -267,7 +271,6 @@ pmc_intel_initialize(void) break; } #endif - error = pmc_tsc_initialize(pmc_mdep, ncpus); error: if (error) { pmc_mdep_free(pmc_mdep);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304301456.r3UEufcC072225>