Lines Matching refs:lcpu
331 x86_lcpu_t *lcpu;
336 lcpu = &cpup->lcpu;
337 lcpu->lcpu = lcpu;
338 lcpu->cpu = cpup;
339 lcpu->next_in_core = NULL;
340 lcpu->next_in_die = NULL;
341 lcpu->next_in_pkg = NULL;
342 lcpu->core = NULL;
343 lcpu->die = NULL;
344 lcpu->package = NULL;
345 lcpu->cpu_num = cpu;
346 lcpu->lnum = cpu;
347 lcpu->pnum = cpup->cpu_phys_number;
348 lcpu->state = LCPU_OFF;
350 lcpu->caches[i] = NULL;
352 lcpu->master = (lcpu->cpu_num == (unsigned int) master_cpu);
353 lcpu->primary = (lcpu->pnum % topoParms.nPThreadsPerPackage) == 0;
471 x86_set_lcpu_numbers(x86_lcpu_t *lcpu)
473 lcpu->lnum = lcpu->cpu_num % topoParms.nLThreadsPerCore;
477 x86_set_core_numbers(x86_core_t *core, x86_lcpu_t *lcpu)
479 core->pcore_num = lcpu->cpu_num / topoParms.nLThreadsPerCore;
484 x86_set_die_numbers(x86_die_t *die, x86_lcpu_t *lcpu)
486 die->pdie_num = lcpu->cpu_num / (topoParms.nLThreadsPerCore * topoParms.nLCoresPerDie);
491 x86_set_pkg_numbers(x86_pkg_t *pkg, x86_lcpu_t *lcpu)
493 pkg->ppkg_num = lcpu->cpu_num / topoParms.nLThreadsPerPackage;
582 x86_cache_add_lcpu(x86_cpu_cache_t *cache, x86_lcpu_t *lcpu)
590 cur_cache = lcpu->caches[cache->level - 1];
591 lcpu->caches[cache->level - 1] = cache;
596 cache->cpus[i] = lcpu;
603 x86_lcpu_add_caches(x86_lcpu_t *lcpu)
614 assert(lcpu != NULL);
637 x86_cache_add_lcpu(cur, lcpu);
646 if (lcpu->caches[level] != NULL) {
664 core = lcpu->core;
670 if (cur_lcpu == lcpu) {
682 x86_cache_add_lcpu(match, lcpu);
693 die = lcpu->die;
699 if (cur_lcpu == lcpu) {
711 x86_cache_add_lcpu(match, lcpu);
725 x86_cache_add_lcpu(cur, lcpu);
733 x86_core_add_lcpu(x86_core_t *core, x86_lcpu_t *lcpu)
736 assert(lcpu != NULL);
740 lcpu->next_in_core = core->lcpus;
741 lcpu->core = core;
742 core->lcpus = lcpu;
748 x86_die_add_lcpu(x86_die_t *die, x86_lcpu_t *lcpu)
751 assert(lcpu != NULL);
753 lcpu->next_in_die = die->lcpus;
754 lcpu->die = die;
755 die->lcpus = lcpu;
771 x86_package_add_lcpu(x86_pkg_t *pkg, x86_lcpu_t *lcpu)
774 assert(lcpu != NULL);
776 lcpu->next_in_pkg = pkg->lcpus;
777 lcpu->package = pkg;
778 pkg->lcpus = lcpu;
924 x86_core_add_lcpu(core, &cpup->lcpu);
925 x86_die_add_lcpu(core->die, &cpup->lcpu);
926 x86_package_add_lcpu(core->package, &cpup->lcpu);
927 x86_lcpu_add_caches(&cpup->lcpu);
950 cpup->lcpu.core = cpu_thread_alloc(my_cpu);
958 core = cpup->lcpu.core;
982 core = cpup->lcpu.core;
1009 x86_lcpu_t *lcpu;
1079 lcpu = die->lcpus;
1080 while (lcpu != NULL) {
1081 if (lcpu->die == NULL)
1083 lcpu->cpu_num);
1084 if (lcpu->die != die)
1086 lcpu->cpu_num, lcpu->die->pdie_num, die->pdie_num);
1088 TOPO_DBG("%d ", lcpu->cpu_num);
1089 lcpu = lcpu->next_in_die;
1124 lcpu = core->lcpus;
1126 while (lcpu != NULL) {
1127 if (lcpu->core == NULL)
1129 lcpu->cpu_num);
1130 if (lcpu->core != core)
1132 lcpu->cpu_num, lcpu->core->pcore_num, core->pcore_num);
1133 TOPO_DBG("%d ", lcpu->cpu_num);
1135 lcpu = lcpu->next_in_core;
1154 lcpu = pkg->lcpus;
1155 while (lcpu != NULL) {
1156 if (lcpu->package == NULL)
1158 lcpu->cpu_num);
1159 if (lcpu->package != pkg)
1161 lcpu->cpu_num, lcpu->package->lpkg_num, pkg->lpkg_num);
1163 lcpu->cpu_num, pkg->lpkg_num);
1165 lcpu = lcpu->next_in_pkg;