| /linux-6.15/arch/x86/kernel/cpu/ |
| H A D | topology_common.c | 127 apicid : 8; in parse_topology() member 137 c->topo.initial_apicid = ebx.apicid; in parse_topology() 145 c->topo.apicid = c->topo.initial_apicid; in parse_topology() 147 c->topo.apicid = read_apic_id(); in parse_topology() 180 u32 apicid = c->topo.apicid; in topo_set_ids() local 182 c->topo.pkg_id = topo_shift_apicid(apicid, TOPO_PKG_DOMAIN); in topo_set_ids() 183 c->topo.die_id = topo_shift_apicid(apicid, TOPO_DIE_DOMAIN); in topo_set_ids() 209 if (c->topo.initial_apicid != c->topo.apicid) { in cpu_parse_topology() 211 cpu, c->topo.initial_apicid, c->topo.apicid); in cpu_parse_topology() 214 if (c->topo.apicid != cpuid_to_apicid[cpu]) { in cpu_parse_topology() [all …]
|
| H A D | topology.c | 80 if (!(apicid & (__max_threads_per_core - 1))) in cpu_mark_primary_thread() 94 return apicid; in topo_apicid() 328 unsigned int lvlid = topo_apicid(apicid, at_level); in topology_get_logical_id() 361 unsigned int lvlid = topo_apicid(apicid, at_level); in topology_unit_count() 466 u32 apicid, firstid; in topology_init_possible_cpus() local 531 for (apicid = 0; disabled; disabled--, apicid++) { in topology_init_possible_cpus() 533 MAX_LOCAL_APIC, apicid); in topology_init_possible_cpus() 534 if (apicid >= MAX_LOCAL_APIC) in topology_init_possible_cpus() 540 apicid = cpuid_to_apicid[cpu]; in topology_init_possible_cpus() 544 if (apicid == BAD_APICID) in topology_init_possible_cpus() [all …]
|
| H A D | topology.h | 26 static inline u32 topo_shift_apicid(u32 apicid, enum x86_topology_domains dom) in topo_shift_apicid() argument 29 return apicid; in topo_shift_apicid() 30 return apicid >> x86_topo_system.dom_shifts[dom - 1]; in topo_shift_apicid() 33 static inline u32 topo_relative_domain_id(u32 apicid, enum x86_topology_domains dom) in topo_relative_domain_id() argument 36 apicid >>= x86_topo_system.dom_shifts[dom - 1]; in topo_relative_domain_id() 37 return apicid & (x86_topo_system.dom_size[dom] - 1); in topo_relative_domain_id() 57 unsigned int topology_unit_count(u32 apicid, enum x86_topology_domains which_units, 60 static inline unsigned int topology_unit_count(u32 apicid, enum x86_topology_domains which_units, in topology_unit_count() argument
|
| H A D | hygon.c | 26 static int nearby_node(int apicid) in nearby_node() argument 30 for (i = apicid - 1; i >= 0; i--) { in nearby_node() 35 for (i = apicid + 1; i < MAX_LOCAL_APIC; i++) { in nearby_node() 49 unsigned int apicid = c->topo.apicid; in srat_detect_node() local 88 node = nearby_node(apicid); in srat_detect_node()
|
| H A D | cacheinfo.c | 672 c->topo.llc_id = c->topo.apicid >> 3; in cacheinfo_amd_init_llc_id() 688 c->topo.llc_id = c->topo.apicid >> bits; in cacheinfo_amd_init_llc_id() 706 c->topo.llc_id = c->topo.apicid >> 3; in cacheinfo_hygon_init_llc_id() 892 unsigned int apicid, nshared, first, last; in __cache_amd_cpumap_setup() local 895 apicid = cpu_data(cpu).topo.apicid; in __cache_amd_cpumap_setup() 896 first = apicid - (apicid % nshared); in __cache_amd_cpumap_setup() 904 apicid = cpu_data(i).topo.apicid; in __cache_amd_cpumap_setup() 905 if ((apicid < first) || (apicid > last)) in __cache_amd_cpumap_setup() 911 apicid = cpu_data(sibling).topo.apicid; in __cache_amd_cpumap_setup() 912 if ((apicid < first) || (apicid > last)) in __cache_amd_cpumap_setup() [all …]
|
| H A D | amd.c | 282 static int nearby_node(int apicid) in nearby_node() argument 286 for (i = apicid - 1; i >= 0; i--) { in nearby_node() 291 for (i = apicid + 1; i < MAX_LOCAL_APIC; i++) { in nearby_node() 305 unsigned apicid = c->topo.apicid; in srat_detect_node() local 345 node = nearby_node(apicid); in srat_detect_node()
|
| H A D | topology_amd.c | 143 unsigned int apicid = tscan->c->topo.initial_apicid; in legacy_set_llc() local 147 tscan->c->topo.llc_id = apicid >> tscan->dom_shifts[TOPO_CORE_DOMAIN]; in legacy_set_llc()
|
| /linux-6.15/arch/x86/kernel/apic/ |
| H A D | apic_numachip.c | 26 static void (*numachip_apic_icr_write)(int apicid, unsigned int val) __read_mostly; 49 static void numachip1_apic_icr_write(int apicid, unsigned int val) in numachip1_apic_icr_write() argument 51 write_lcsr(CSR_G3_EXT_IRQ_GEN, (apicid << 16) | val); in numachip1_apic_icr_write() 54 static void numachip2_apic_icr_write(int apicid, unsigned int val) in numachip2_apic_icr_write() argument 56 numachip2_write32_lcsr(NUMACHIP2_APIC_ICR, (apicid << 12) | val); in numachip2_apic_icr_write() 70 int local_apicid, apicid = per_cpu(x86_cpu_to_apicid, cpu); in numachip_send_IPI_one() local 77 if (!((apicid ^ local_apicid) >> NUMACHIP_LAPIC_BITS)) { in numachip_send_IPI_one() 81 __default_send_IPI_dest_field(apicid, vector, in numachip_send_IPI_one() 90 numachip_apic_icr_write(apicid, dmode | vector); in numachip_send_IPI_one()
|
| H A D | x2apic_cluster.c | 12 #define apic_cluster(apicid) ((apicid) >> 4) argument 111 u32 apicid = apic->cpu_present_to_apicid(cpu_i); in prefill_clustermask() local 113 if (apicid == BAD_APICID || cpu_i == cpu || apic_cluster(apicid) != cluster) in prefill_clustermask() 147 u32 apicid = apic->cpu_present_to_apicid(cpu_i); in alloc_clustermask() local 149 if (apicid != BAD_APICID && apic_cluster(apicid) == cluster) { in alloc_clustermask()
|
| H A D | x2apic_phys.c | 13 void __init x2apic_set_max_apicid(u32 apicid) in x2apic_set_max_apicid() argument 15 x2apic_max_apicid = apicid; in x2apic_set_max_apicid() 17 apic->max_apic_id = apicid; in x2apic_set_max_apicid() 110 void __x2apic_send_IPI_dest(unsigned int apicid, int vector, unsigned int dest) in __x2apic_send_IPI_dest() argument 113 native_x2apic_icr_write(cfg, apicid); in __x2apic_send_IPI_dest()
|
| H A D | apic_noop.c | 30 static int noop_wakeup_secondary_cpu(u32 apicid, unsigned long start_eip) { return -1; } in noop_wakeup_secondary_cpu() argument 32 static u32 noop_get_apic_id(u32 apicid) { return 0; } in noop_get_apic_id() argument
|
| H A D | x2apic_uv_x.c | 696 unsigned long apicid = per_cpu(x86_cpu_to_apicid, cpu); in uv_send_IPI_one() local 697 int pnode = uv_apicid_to_pnode(apicid); in uv_send_IPI_one() 706 (apicid << UVH_IPI_INT_APIC_ID_SHFT) | in uv_send_IPI_one() 1484 int i, lnid, apicid; in build_socket_tables() local 1535 for (apicid = 0; apicid < ARRAY_SIZE(__apicid_to_node); apicid++) { in build_socket_tables() 1536 int nid = __apicid_to_node[apicid]; in build_socket_tables() 1543 sockid = apicid >> uv_cpuid.socketid_shift; in build_socket_tables() 1553 apicid, in build_socket_tables() 1757 int apicid = per_cpu(x86_cpu_to_apicid, cpu); in uv_system_init_hub() local 1761 pnode = uv_apicid_to_pnode(apicid); in uv_system_init_hub()
|
| /linux-6.15/arch/x86/mm/ |
| H A D | amdtopology.c | 58 unsigned int numnodes, cores, apicid; in amd_numa_init() local 165 apicid = boot_cpu_physical_apicid; in amd_numa_init() 166 if (apicid > 0) in amd_numa_init() 167 pr_info("BSP APIC ID: %02x\n", apicid); in amd_numa_init() 170 for (j = 0; j < cores; j++, apicid++) in amd_numa_init() 171 set_apicid_to_node(apicid, i); in amd_numa_init()
|
| H A D | numa.c | 52 u32 apicid = early_per_cpu(x86_cpu_to_apicid, cpu); in numa_cpu_node() local 54 if (apicid != BAD_APICID) in numa_cpu_node() 55 return __apicid_to_node[apicid]; in numa_cpu_node()
|
| /linux-6.15/arch/x86/include/asm/ |
| H A D | apicdef.h | 170 #define APIC_CLUSTER(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK) argument 171 #define APIC_CLUSTERID(apicid) (APIC_CLUSTER(apicid) >> XAPIC_DEST_CPUS_SHIFT) argument 172 #define APIC_CPUID(apicid) ((apicid) & XAPIC_DEST_CPUS_MASK) argument
|
| H A D | numa.h | 26 static inline void set_apicid_to_node(int apicid, s16 node) in set_apicid_to_node() argument 28 __apicid_to_node[apicid] = node; in set_apicid_to_node() 34 static inline void set_apicid_to_node(int apicid, s16 node) in set_apicid_to_node() argument
|
| H A D | mpspec.h | 66 static inline void reset_phys_cpu_present_map(u32 apicid) in reset_phys_cpu_present_map() argument 69 set_bit(apicid, phys_cpu_present_map); in reset_phys_cpu_present_map()
|
| H A D | apic.h | 246 extern void __init x2apic_set_max_apicid(u32 apicid); 316 int (*wakeup_secondary_cpu)(u32 apicid, unsigned long start_eip); 318 int (*wakeup_secondary_cpu_64)(u32 apicid, unsigned long start_eip); 336 int (*wakeup_secondary_cpu)(u32 apicid, unsigned long start_eip); 337 int (*wakeup_secondary_cpu_64)(u32 apicid, unsigned long start_eip); 523 typedef int (*wakeup_cpu_handler)(int apicid, unsigned long start_eip);
|
| H A D | mpspec_def.h | 70 unsigned char apicid; /* Local APIC number */ member 108 unsigned char apicid; member
|
| /linux-6.15/arch/x86/kernel/ |
| H A D | smpboot.c | 781 static void announce_cpu(int cpu, int apicid) in announce_cpu() argument 814 node, cpu, apicid); in announce_cpu() 845 static int do_boot_cpu(u32 apicid, int cpu, struct task_struct *idle) in do_boot_cpu() argument 869 announce_cpu(cpu, apicid); in do_boot_cpu() 899 ret = apic->wakeup_secondary_cpu_64(apicid, start_ip); in do_boot_cpu() 901 ret = apic->wakeup_secondary_cpu(apicid, start_ip); in do_boot_cpu() 903 ret = wakeup_secondary_cpu_via_init(apicid, start_ip); in do_boot_cpu() 913 u32 apicid = apic->cpu_present_to_apicid(cpu); in native_kick_ap() local 920 if (apicid == BAD_APICID || !apic_id_valid(apicid)) { in native_kick_ap() 925 if (!test_bit(apicid, phys_cpu_present_map)) { in native_kick_ap() [all …]
|
| /linux-6.15/arch/x86/hyperv/ |
| H A D | hv_vtl.c | 241 static int hv_vtl_wakeup_secondary_cpu(u32 apicid, unsigned long start_eip) in hv_vtl_wakeup_secondary_cpu() argument 247 if (arch_match_cpu_phys_id(cpu, apicid)) in hv_vtl_wakeup_secondary_cpu() 253 pr_debug("Bringing up CPU with APIC ID %d in VTL2...\n", apicid); in hv_vtl_wakeup_secondary_cpu() 254 vp_id = hv_vtl_apicid_to_vp_id(apicid); in hv_vtl_wakeup_secondary_cpu() 257 pr_err("Couldn't find CPU with APIC ID %d\n", apicid); in hv_vtl_wakeup_secondary_cpu() 261 pr_err("Invalid CPU id %d for APIC ID %d\n", vp_id, apicid); in hv_vtl_wakeup_secondary_cpu()
|
| /linux-6.15/arch/x86/kernel/acpi/ |
| H A D | madt_wakeup.c | 40 u32 apicid = per_cpu(x86_cpu_to_apicid, cpu); in acpi_mp_cpu_die() local 49 acpi_mp_wake_mailbox->apic_id = apicid; in acpi_mp_cpu_die() 129 static int acpi_wakeup_cpu(u32 apicid, unsigned long start_ip) in acpi_wakeup_cpu() argument 157 acpi_mp_wake_mailbox->apic_id = apicid; in acpi_wakeup_cpu()
|
| /linux-6.15/include/trace/events/ |
| H A D | mce.h | 40 __field( u32, apicid ) 63 __entry->apicid = err->m.apicid; 87 __entry->apicid,
|
| /linux-6.15/arch/x86/platform/uv/ |
| H A D | uv_time.c | 73 unsigned long apicid, val; in uv_rtc_send_IPI() local 76 apicid = cpu_physical_id(cpu); in uv_rtc_send_IPI() 77 pnode = uv_apicid_to_pnode(apicid); in uv_rtc_send_IPI() 79 (apicid << UVH_IPI_INT_APIC_ID_SHFT) | in uv_rtc_send_IPI() 96 unsigned long apicid = cpu_physical_id(cpu); in uv_setup_intr() local 107 ((u64)apicid << UVH_RTC1_INT_CONFIG_APIC_ID_SHFT); in uv_setup_intr()
|
| /linux-6.15/arch/x86/kvm/ |
| H A D | trace.h | 562 TP_ARGS(apicid, dm, tm, vec), 565 __field( __u32, apicid ) 572 __entry->apicid = apicid; 579 __entry->apicid, __entry->vec, 589 __field( __u32, apicid ) 606 __field( __u32, apicid ) 1428 __field( __u32, apicid ) 1435 __entry->apicid = apicid; 1544 TP_ARGS(vcpuid, apicid), 1548 __field(u32, apicid) [all …]
|