Lines Matching refs:cpu_map
117 static struct cpu_map_item **cpu_map = NULL;
1552 * if cpu_map itself is NULL, we're a uppc system and
1556 if (cpu_map == NULL) {
1558 if (cpu_map == NULL)
1567 * search object with cpuid in cpu_map
1571 if (cpu_map[i]->cpu_id == cpu_id) {
1575 if (i < cpu_map_count && (cpu_map[i]->obj != NULL)) {
1576 *rh = cpu_map[i]->obj;
1586 if (cpu_map[i]->apic_id == apicid) {
1590 if (i < cpu_map_count && (cpu_map[i]->obj != NULL)) {
1591 *rh = cpu_map[i]->obj;
1945 new_map = kmem_zalloc(sizeof (cpu_map[0]) * cpu_map_count_max,
1948 ASSERT(cpu_map != NULL);
1949 sz = sizeof (cpu_map[0]) * cpu_map_count;
1950 kcopy(cpu_map, new_map, sz);
1951 kmem_free(cpu_map, sz);
1953 cpu_map = new_map;
1992 if (cpu_map == NULL &&
1995 ASSERT(cpu_map != NULL);
2001 cpu_map[0] = item;
2008 if (cpu_map[i]->obj == obj) {
2011 } else if (cpu_map[i]->proc_id == acpi_id) {
2013 item = cpu_map[i];
2034 ASSERT(cpu_map != NULL);
2041 cpu_map[cpu_map_count] = item;
2059 if (cpu_map[i]->proc_id != acpi_id) {
2062 cpu_map[i]->obj = NULL;
2064 if (cpu_map[i]->cpu_id == -1) {
2065 kmem_free(cpu_map[i], sizeof (struct cpu_map_item));
2066 cpu_map[i] = NULL;
2069 cpu_map[i] = cpu_map[cpu_map_count];
2070 cpu_map[cpu_map_count] = NULL;
2096 if (cpu_map[i]->cpu_id == cpuid) {
2099 } else if (cpu_map[i]->proc_id == acpi_id) {
2101 item = cpu_map[i];
2115 ASSERT(cpu_map != NULL);
2122 cpu_map[cpu_map_count] = item;
2144 if (cpu_map[i]->cpu_id != cpuid) {
2147 cpu_map[i]->cpu_id = -1;
2149 if (cpu_map[i]->obj == NULL) {
2150 kmem_free(cpu_map[i], sizeof (struct cpu_map_item));
2151 cpu_map[i] = NULL;
2154 cpu_map[i] = cpu_map[cpu_map_count];
2155 cpu_map[cpu_map_count] = NULL;
2179 if (cpu_map[i]->cpu_id == cpuid && cpu_map[i]->obj != NULL) {
2180 *hdlp = cpu_map[i]->obj;
2198 if (cpu_map[i]->proc_id == procid && cpu_map[i]->obj != NULL) {
2199 *hdlp = cpu_map[i]->obj;
2222 if (cpu_map[i]->apic_id == apicid && cpu_map[i]->obj != NULL) {
2223 *hdlp = cpu_map[i]->obj;
2247 if (cpu_map[i]->obj == hdl && cpu_map[i]->cpu_id != -1) {
2248 *cpuidp = cpu_map[i]->cpu_id;
2272 if (cpu_map[i]->obj == hdl &&
2273 cpu_map[i]->apic_id != UINT32_MAX) {
2274 *rp = cpu_map[i]->apic_id;
2298 if (cpu_map[i]->obj == hdl) {
2299 *rp = cpu_map[i]->proc_id;