• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/osfmk/i386/

Lines Matching defs:core

207      * Compute the number of threads (logical CPUs) per core.
376 lcpu->core = NULL;
393 x86_core_t *core;
400 core = free_cores;
401 free_cores = core->next_in_die;
402 core->next_in_die = NULL;
406 core = kalloc(sizeof(x86_core_t));
407 if (core == NULL)
411 bzero((void *) core, sizeof(x86_core_t));
413 core->pcore_num = cpup->cpu_phys_number / topoParms.nPThreadsPerCore;
414 core->lcore_num = core->pcore_num % topoParms.nPCoresPerPackage;
416 core->flags = X86CORE_FL_PRESENT | X86CORE_FL_READY
419 return(core);
423 x86_core_free(x86_core_t *core)
426 core->next_in_die = free_cores;
427 free_cores = core;
481 x86_core_t *core;
494 core = die->cores;
495 while (core != NULL) {
496 if (core->pcore_num == core_num)
498 core = core->next_in_die;
501 return(core);
511 x86_set_core_numbers(x86_core_t *core, x86_lcpu_t *lcpu)
513 core->pcore_num = lcpu->cpu_num / topoParms.nLThreadsPerCore;
514 core->lcore_num = core->pcore_num % topoParms.nLCoresPerDie;
643 x86_core_t *core;
691 * Assume that L{LLC-1} are all at the core level and that
696 * Shared at the core.
698 core = lcpu->core;
699 cur_lcpu = core->lcpus;
767 x86_core_add_lcpu(x86_core_t *core, x86_lcpu_t *lcpu)
769 assert(core != NULL);
774 lcpu->next_in_core = core->lcpus;
775 lcpu->core = core;
776 core->lcpus = lcpu;
777 core->num_lcpus += 1;
793 x86_die_add_core(x86_die_t *die, x86_core_t *core)
796 assert(core != NULL);
798 core->next_in_die = die->cores;
799 core->die = die;
800 die->cores = core;
816 x86_package_add_core(x86_pkg_t *pkg, x86_core_t *core)
819 assert(core != NULL);
821 core->next_in_pkg = pkg->cores;
822 core->package = pkg;
823 pkg->cores = core;
841 x86_core_t *core = NULL;
930 * Get the core for this logical CPU.
933 core = x86_core_find(cpu);
934 if (core == NULL) {
936 * Allocate the core structure now.
939 core = x86_core_alloc(cpu);
942 x86_core_free(core);
947 * Add the core to the die & package.
949 x86_die_add_core(die, core);
950 x86_package_add_core(pkg, core);
953 } while (core == NULL);
965 x86_core_add_lcpu(core, &cpup->lcpu);
966 x86_die_add_lcpu(core->die, &cpup->lcpu);
967 x86_package_add_lcpu(core->package, &cpup->lcpu);
970 return (void *) core;
978 x86_core_t *core;
991 cpup->lcpu.core = cpu_thread_alloc(my_cpu);
999 core = cpup->lcpu.core;
1002 if (core->active_lcpus == 0)
1004 core->active_lcpus += 1;
1018 x86_core_t *core;
1023 core = cpup->lcpu.core;
1024 core->active_lcpus -= 1;
1025 if (core->active_lcpus == 0)
1049 x86_core_t *core;
1094 core = die->cores;
1095 while (core != NULL) {
1096 if (core->die == NULL)
1098 core->pcore_num);
1099 if (core->die != die)
1101 core->pcore_num, core->die->pdie_num, die->pdie_num);
1103 DBG("%d ", core->pcore_num);
1104 core = core->next_in_die;
1147 core = pkg->cores;
1148 while (core != NULL) {
1149 if (core->package == NULL)
1151 core->pcore_num);
1152 if (core->package != pkg)
1154 core->pcore_num, core->package->lpkg_num, pkg->lpkg_num);
1156 core->pcore_num, pkg->lpkg_num);
1159 * Make sure that the core has the correct number of CPUs.
1162 lcpu = core->lcpus;
1165 if (lcpu->core == NULL)
1166 panic("CPU(%d)->core is NULL",
1168 if (lcpu->core != core)
1169 panic("CPU %d points to core %d, should be %d",
1170 lcpu->cpu_num, lcpu->core->pcore_num, core->pcore_num);
1179 topoParms.nLThreadsPerCore, nCPUs, core->pcore_num);
1181 core = core->next_in_pkg;
1223 x86_core_t *core;
1238 core = die->cores;
1239 while (core != NULL) {
1241 kprintf(" Physical: %d\n", core->pcore_num);
1242 kprintf(" Logical: %d\n", core->lcore_num);
1244 cpu = core->lcpus;
1262 core = core->next_in_die;