svn commit: r250101 - head/sys/dev/hwpmc
Davide Italiano
davide at FreeBSD.org
Tue Apr 30 14:56:42 UTC 2013
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);
More information about the svn-src-head
mailing list