Complete r250097:

Do not change the initialization order in pmc_intel_initialize().
This commit is contained in:
Davide Italiano 2013-04-30 14:56:41 +00:00
parent 544e778f1a
commit 1c12d03f5e

View File

@ -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);