Lines Matching +full:4 +full:- +full:cores
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
12 #include "hw/s390x/cpu-topology.h"
30 tle->nl = level; in fill_container()
31 tle->id = id; in fill_container()
46 S390TopologyId topology_id = entry->id; in fill_tle_cpu()
48 tle->nl = 0; in fill_tle_cpu()
49 tle->flags = 0; in fill_tle_cpu()
51 tle->flags |= topology_id.entitlement; in fill_tle_cpu()
54 tle->flags |= SYSIB_TLE_DEDICATED; in fill_tle_cpu()
56 tle->type = topology_id.type; in fill_tle_cpu()
57 tle->origin = cpu_to_be16(topology_id.origin * 64); in fill_tle_cpu()
58 tle->mask = cpu_to_be64(entry->mask); in fill_tle_cpu()
90 int last_drawer = -1; in stsi_topology_fill_sysib()
91 int last_book = -1; in stsi_topology_fill_sysib()
92 int last_socket = -1; in stsi_topology_fill_sysib()
99 bool drawer_change = last_drawer != entry->id.drawer; in stsi_topology_fill_sysib()
100 bool book_change = drawer_change || last_book != entry->id.book; in stsi_topology_fill_sysib()
101 bool socket_change = book_change || last_socket != entry->id.socket; in stsi_topology_fill_sysib()
120 last_drawer = entry->id.drawer; in stsi_topology_fill_sysib()
121 last_book = entry->id.book; in stsi_topology_fill_sysib()
122 last_socket = entry->id.socket; in stsi_topology_fill_sysib()
140 sysib->mnest = level; in setup_stsi()
142 case 4: in setup_stsi()
143 sysib->mag[S390_TOPOLOGY_MAG4] = current_machine->smp.drawers; in setup_stsi()
144 sysib->mag[S390_TOPOLOGY_MAG3] = current_machine->smp.books; in setup_stsi()
145 sysib->mag[S390_TOPOLOGY_MAG2] = current_machine->smp.sockets; in setup_stsi()
146 sysib->mag[S390_TOPOLOGY_MAG1] = current_machine->smp.cores; in setup_stsi()
149 sysib->mag[S390_TOPOLOGY_MAG3] = current_machine->smp.drawers * in setup_stsi()
150 current_machine->smp.books; in setup_stsi()
151 sysib->mag[S390_TOPOLOGY_MAG2] = current_machine->smp.sockets; in setup_stsi()
152 sysib->mag[S390_TOPOLOGY_MAG1] = current_machine->smp.cores; in setup_stsi()
155 sysib->mag[S390_TOPOLOGY_MAG2] = current_machine->smp.drawers * in setup_stsi()
156 current_machine->smp.books * in setup_stsi()
157 current_machine->smp.sockets; in setup_stsi()
158 sysib->mag[S390_TOPOLOGY_MAG1] = current_machine->smp.cores; in setup_stsi()
162 return stsi_topology_fill_sysib(topology_list, sysib->tle, level); in setup_stsi()
175 set_bit(63 - (cpu->env.core_id % 64), &entry->mask); in s390_topology_add_cpu_to_entry()
187 .drawer = cpu->env.drawer_id, in s390_topology_from_cpu()
188 .book = cpu->env.book_id, in s390_topology_from_cpu()
189 .socket = cpu->env.socket_id, in s390_topology_from_cpu()
192 .entitlement = cpu->env.entitlement, in s390_topology_from_cpu()
193 .dedicated = cpu->env.dedicated, in s390_topology_from_cpu()
194 .origin = cpu->env.core_id / 64, in s390_topology_from_cpu()
213 int l_polarization = l->vertical ? l->entitlement : 0; in s390_topology_id_cmp()
214 int r_polarization = r->vertical ? r->entitlement : 0; in s390_topology_id_cmp()
220 return l->sentinel - r->sentinel ?: in s390_topology_id_cmp()
221 l->drawer - r->drawer ?: in s390_topology_id_cmp()
222 l->book - r->book ?: in s390_topology_id_cmp()
223 l->socket - r->socket ?: in s390_topology_id_cmp()
224 l->type - r->type ?: in s390_topology_id_cmp()
226 r_polarization - l_polarization ?: in s390_topology_id_cmp()
227 r->dedicated - l->dedicated ?: in s390_topology_id_cmp()
228 l->origin - r->origin; in s390_topology_id_cmp()
264 if (s390_topology_id_eq(&id, &tmp->id)) { in s390_topology_fill_list_sorted()
267 } else if (s390_topology_id_lt(&id, &tmp->id)) { in s390_topology_fill_list_sorted()
269 entry->id = id; in s390_topology_fill_list_sorted()