Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/pseries/platform_chrp.c
Show First 20 Lines • Show All 511 Lines • ▼ Show 20 Lines | for (i = 0; i <= mp_maxid; i++) { | ||||
if (pc == NULL) | if (pc == NULL) | ||||
continue; | continue; | ||||
if (last_pc == NULL || pc->pc_hwref != last_pc->pc_hwref) | if (last_pc == NULL || pc->pc_hwref != last_pc->pc_hwref) | ||||
ncores++; | ncores++; | ||||
last_pc = pc; | last_pc = pc; | ||||
ncpus++; | ncpus++; | ||||
} | } | ||||
mp_ncores = ncores; | |||||
if (ncpus % ncores != 0) { | if (ncpus % ncores != 0) { | ||||
printf("WARNING: Irregular SMP topology. Performance may be " | printf("WARNING: Irregular SMP topology. Performance may be " | ||||
"suboptimal (%d CPUS, %d cores)\n", ncpus, ncores); | "suboptimal (%d CPUS, %d cores)\n", ncpus, ncores); | ||||
return (smp_topo_none()); | return (smp_topo_none()); | ||||
} | } | ||||
/* Don't do anything fancier for non-threaded SMP */ | /* Don't do anything fancier for non-threaded SMP */ | ||||
if (ncpus == ncores) | if (ncpus == ncores) | ||||
return (smp_topo_none()); | return (smp_topo_none()); | ||||
smp_threads_per_core = ncpus / ncores; | |||||
return (smp_topo_1level(CG_SHARE_L1, ncpus / ncores, CG_FLAG_SMT)); | return (smp_topo_1level(CG_SHARE_L1, ncpus / ncores, CG_FLAG_SMT)); | ||||
} | } | ||||
#endif | #endif | ||||
static void | static void | ||||
chrp_reset(platform_t platform) | chrp_reset(platform_t platform) | ||||
{ | { | ||||
OF_reboot(); | OF_reboot(); | ||||
Show All 39 Lines |