Home
last modified time | relevance | path

Searched refs:topo (Results 1 – 25 of 67) sorted by relevance

123

/linux-6.15/drivers/net/phy/
H A Dphy_link_topology.c16 struct phy_link_topology *topo; in netdev_alloc_phy_link_topology() local
18 topo = kzalloc(sizeof(*topo), GFP_KERNEL); in netdev_alloc_phy_link_topology()
19 if (!topo) in netdev_alloc_phy_link_topology()
22 xa_init_flags(&topo->phys, XA_FLAGS_ALLOC1); in netdev_alloc_phy_link_topology()
23 topo->next_phy_index = 1; in netdev_alloc_phy_link_topology()
25 dev->link_topo = topo; in netdev_alloc_phy_link_topology()
38 if (!topo) { in phy_link_topo_add_phy()
43 topo = dev->link_topo; in phy_link_topo_add_phy()
73 xa_limit_32b, &topo->next_phy_index, in phy_link_topo_add_phy()
93 if (!topo) in phy_link_topo_del_phy()
[all …]
/linux-6.15/arch/x86/kernel/cpu/
H A Dtopology_common.c34 switch (c->topo.intel_type) { in get_topology_cpu_type()
40 switch (c->topo.amd_type) { in get_topology_cpu_type()
130 c->topo = topo_defaults; in parse_topology()
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()
168 c->topo.cpu_type = cpuid_eax(0x1a); in parse_topology()
180 u32 apicid = c->topo.apicid; in topo_set_ids()
195 c->topo.amd_node_id = tscan->amd_node_id; in topo_set_ids()
209 if (c->topo.initial_apicid != c->topo.apicid) { in cpu_parse_topology()
[all …]
H A Ddebugfs.c19 seq_printf(m, "initial_apicid: 0x%x\n", c->topo.initial_apicid); in cpu_debug_show()
20 seq_printf(m, "apicid: 0x%x\n", c->topo.apicid); in cpu_debug_show()
21 seq_printf(m, "pkg_id: %u\n", c->topo.pkg_id); in cpu_debug_show()
22 seq_printf(m, "die_id: %u\n", c->topo.die_id); in cpu_debug_show()
23 seq_printf(m, "cu_id: %u\n", c->topo.cu_id); in cpu_debug_show()
24 seq_printf(m, "core_id: %u\n", c->topo.core_id); in cpu_debug_show()
26 seq_printf(m, "logical_pkg_id: %u\n", c->topo.logical_pkg_id); in cpu_debug_show()
27 seq_printf(m, "logical_die_id: %u\n", c->topo.logical_die_id); in cpu_debug_show()
29 seq_printf(m, "llc_id: %u\n", c->topo.llc_id); in cpu_debug_show()
30 seq_printf(m, "l2c_id: %u\n", c->topo.l2c_id); in cpu_debug_show()
[all …]
H A Dtopology_amd.c83 tscan->c->topo.initial_apicid = leaf.ext_apic_id; in parse_8000_001e()
103 tscan->c->topo.cu_id = leaf.core_id; in parse_8000_001e()
138 tscan->c->topo.llc_id = nid.node_id; in parse_fam10h_node_id()
143 unsigned int apicid = tscan->c->topo.initial_apicid; in legacy_set_llc()
146 if (tscan->c->topo.llc_id == BAD_APICID) in legacy_set_llc()
147 tscan->c->topo.llc_id = apicid >> tscan->dom_shifts[TOPO_CORE_DOMAIN]; in legacy_set_llc()
186 tscan->c->topo.cpu_type = cpuid_ebx(0x80000026); in parse_topology_amd()
219 c->topo.core_id %= tscan->dom_ncpus[TOPO_CORE_DOMAIN] / tscan->amd_nodes_per_pkg; in cpu_topology_fixup_amd()
H A Dcacheinfo.c666 c->topo.llc_id = die_id; in cacheinfo_amd_init_llc_id()
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()
842 c->topo.llc_id = l2_id; in init_intel_cacheinfo()
843 c->topo.l2c_id = l2_id; in init_intel_cacheinfo()
848 c->topo.llc_id = l3_id; in init_intel_cacheinfo()
858 if (c->topo.llc_id == BAD_APICID) in init_intel_cacheinfo()
859 c->topo.llc_id = c->topo.pkg_id; in init_intel_cacheinfo()
904 apicid = cpu_data(i).topo.apicid; in __cache_amd_cpumap_setup()
[all …]
H A Dproc.c23 seq_printf(m, "physical id\t: %d\n", c->topo.pkg_id); in show_cpuinfo_core()
26 seq_printf(m, "core id\t\t: %d\n", c->topo.core_id); in show_cpuinfo_core()
28 seq_printf(m, "apicid\t\t: %d\n", c->topo.apicid); in show_cpuinfo_core()
29 seq_printf(m, "initial apicid\t: %d\n", c->topo.initial_apicid); in show_cpuinfo_core()
H A Dtopology_ext.c94 tscan->c->topo.initial_apicid = sl.x2apic_id; in topo_subleaf()
95 } else if (tscan->c->topo.initial_apicid != sl.x2apic_id) { in topo_subleaf()
97 leaf, subleaf, tscan->c->topo.initial_apicid, sl.x2apic_id); in topo_subleaf()
H A Dmatch.c29 return m->type == c->topo.intel_type; in x86_match_vendor_cpu_type()
31 return m->type == c->topo.amd_type; in x86_match_vendor_cpu_type()
H A Dhygon.c49 unsigned int apicid = c->topo.apicid; in srat_detect_node()
53 node = c->topo.llc_id; in srat_detect_node()
82 int ht_nodeid = c->topo.initial_apicid; in srat_detect_node()
/linux-6.15/arch/s390/kernel/
H A Dtopology.c140 topo = &cpu_topology[cpu]; in add_cpus_to_mask()
142 topo->book_id = book->id; in add_cpus_to_mask()
144 topo->core_id = rcore; in add_cpus_to_mask()
145 topo->thread_id = cpu; in add_cpus_to_mask()
263 topo = &cpu_topology[cpu]; in update_cpu_masks()
268 topo->booted_cores = 0; in update_cpu_masks()
271 topo->thread_id = cpu; in update_cpu_masks()
272 topo->core_id = cpu; in update_cpu_masks()
273 topo->socket_id = id; in update_cpu_masks()
274 topo->book_id = id; in update_cpu_masks()
[all …]
/linux-6.15/arch/x86/kernel/
H A Dsmpboot.c349 if (c->topo.pkg_id == o->topo.pkg_id && in match_smt()
350 c->topo.die_id == o->topo.die_id && in match_smt()
351 c->topo.amd_node_id == o->topo.amd_node_id && in match_smt()
353 if (c->topo.core_id == o->topo.core_id) in match_smt()
358 (c->topo.cu_id == o->topo.cu_id)) in match_smt()
362 } else if (c->topo.pkg_id == o->topo.pkg_id && in match_smt()
363 c->topo.die_id == o->topo.die_id && in match_smt()
364 c->topo.core_id == o->topo.core_id) { in match_smt()
373 if (c->topo.pkg_id != o->topo.pkg_id || c->topo.die_id != o->topo.die_id) in match_die()
377 return c->topo.amd_node_id == o->topo.amd_node_id; in match_die()
[all …]
/linux-6.15/arch/x86/include/asm/
H A Dtopology.h143 #define topology_logical_package_id(cpu) (cpu_data(cpu).topo.logical_pkg_id)
144 #define topology_physical_package_id(cpu) (cpu_data(cpu).topo.pkg_id)
145 #define topology_logical_die_id(cpu) (cpu_data(cpu).topo.logical_die_id)
146 #define topology_logical_core_id(cpu) (cpu_data(cpu).topo.logical_core_id)
147 #define topology_die_id(cpu) (cpu_data(cpu).topo.die_id)
148 #define topology_core_id(cpu) (cpu_data(cpu).topo.core_id)
151 #define topology_amd_node_id(cpu) (cpu_data(cpu).topo.amd_node_id)
192 #define topology_cluster_id(cpu) (cpu_data(cpu).topo.l2c_id)
/linux-6.15/drivers/gpu/drm/i915/
H A Di915_query.c36 struct drm_i915_query_topology_info topo; in fill_topology_info() local
53 ret = copy_query_item(&topo, sizeof(topo), total_length, query_item); in fill_topology_info()
58 memset(&topo, 0, sizeof(topo)); in fill_topology_info()
59 topo.max_slices = sseu->max_slices; in fill_topology_info()
60 topo.max_subslices = sseu->max_subslices; in fill_topology_info()
63 topo.subslice_offset = slice_length; in fill_topology_info()
64 topo.subslice_stride = ss_stride; in fill_topology_info()
66 topo.eu_stride = eu_stride; in fill_topology_info()
69 &topo, sizeof(topo))) in fill_topology_info()
77 sizeof(topo) + slice_length), in fill_topology_info()
[all …]
/linux-6.15/drivers/perf/hisilicon/
H A Dhisi_uncore_pmu.c483 struct hisi_pmu_topology *topo = &hisi_pmu->topo; in hisi_pmu_cpu_is_associated_pmu() local
486 if (topo->ccl_id == -1) { in hisi_pmu_cpu_is_associated_pmu()
490 return sccl_id == topo->sccl_id; in hisi_pmu_cpu_is_associated_pmu()
495 return sccl_id == topo->sccl_id && ccl_id == topo->ccl_id; in hisi_pmu_cpu_is_associated_pmu()
577 struct hisi_pmu_topology *topo = &hisi_pmu->topo; in hisi_uncore_pmu_init_topology() local
579 topo->sccl_id = -1; in hisi_uncore_pmu_init_topology()
580 topo->ccl_id = -1; in hisi_uncore_pmu_init_topology()
581 topo->index_id = -1; in hisi_uncore_pmu_init_topology()
582 topo->sub_id = -1; in hisi_uncore_pmu_init_topology()
587 if (device_property_read_u32(dev, "hisilicon,ccl-id", &topo->ccl_id)) in hisi_uncore_pmu_init_topology()
[all …]
H A Dhisi_uncore_ddrc_pmu.c307 &ddrc_pmu->topo.index_id)) { in hisi_ddrc_pmu_init_data()
312 if (ddrc_pmu->topo.sccl_id < 0) { in hisi_ddrc_pmu_init_data()
325 if (ddrc_pmu->topo.sub_id < 0) { in hisi_ddrc_pmu_init_data()
480 ddrc_pmu->topo.sccl_id, ddrc_pmu->topo.index_id, in hisi_ddrc_pmu_probe()
481 ddrc_pmu->topo.sub_id); in hisi_ddrc_pmu_probe()
484 "hisi_sccl%d_ddrc%d", ddrc_pmu->topo.sccl_id, in hisi_ddrc_pmu_probe()
485 ddrc_pmu->topo.index_id); in hisi_ddrc_pmu_probe()
H A Dhisi_uncore_uc_pmu.c375 if (uc_pmu->topo.sccl_id < 0) { in hisi_uc_pmu_init_data()
380 if (uc_pmu->topo.ccl_id < 0) { in hisi_uc_pmu_init_data()
385 if (uc_pmu->topo.sub_id < 0) { in hisi_uc_pmu_init_data()
517 uc_pmu->topo.sccl_id, uc_pmu->topo.ccl_id, in hisi_uc_pmu_probe()
518 uc_pmu->topo.sub_id); in hisi_uc_pmu_probe()
H A Dhisi_uncore_cpa_pmu.c185 if (cpa_pmu->topo.sicl_id < 0) { in hisi_cpa_pmu_init_data()
190 if (cpa_pmu->topo.index_id < 0) { in hisi_cpa_pmu_init_data()
290 cpa_pmu->topo.sicl_id, cpa_pmu->topo.index_id); in hisi_cpa_pmu_probe()
/linux-6.15/arch/s390/pci/
H A Dpci_bus.c242 static struct zpci_bus *zpci_bus_get(int topo, bool topo_is_tid) in zpci_bus_get() argument
250 if (topo_is_tid == zbus->topo_is_tid && topo == zbus->topo) { in zpci_bus_get()
261 static struct zpci_bus *zpci_bus_alloc(int topo, bool topo_is_tid) in zpci_bus_alloc() argument
269 zbus->topo = topo; in zpci_bus_alloc()
375 int topo, rc = -EBADF; in zpci_bus_device_register() local
383 topo = topo_is_tid ? zdev->tid : zdev->pchid; in zpci_bus_device_register()
384 zbus = zpci_bus_get(topo, topo_is_tid); in zpci_bus_device_register()
395 zbus = zpci_bus_alloc(topo, topo_is_tid); in zpci_bus_device_register()
/linux-6.15/drivers/staging/greybus/
H A Daudio_gb.c16 struct gb_audio_topology *topo; in gb_audio_gb_get_topology() local
26 if (size < sizeof(*topo)) in gb_audio_gb_get_topology()
29 topo = kzalloc(size, GFP_KERNEL); in gb_audio_gb_get_topology()
30 if (!topo) in gb_audio_gb_get_topology()
34 topo, size); in gb_audio_gb_get_topology()
36 kfree(topo); in gb_audio_gb_get_topology()
40 *topology = topo; in gb_audio_gb_get_topology()
/linux-6.15/drivers/media/mc/
H A Dmc-device.c254 if (i > topo->num_entities) { in media_device_get_topology()
271 topo->num_entities = i; in media_device_get_topology()
272 topo->reserved1 = 0; in media_device_get_topology()
307 topo->num_interfaces = i; in media_device_get_topology()
308 topo->reserved2 = 0; in media_device_get_topology()
318 if (i > topo->num_pads) { in media_device_get_topology()
335 topo->num_pads = i; in media_device_get_topology()
336 topo->reserved3 = 0; in media_device_get_topology()
350 if (i > topo->num_links) { in media_device_get_topology()
367 topo->num_links = i; in media_device_get_topology()
[all …]
/linux-6.15/include/linux/
H A Dphy_link_topology.h49 struct phy_link_topology *topo = dev->link_topo; in phy_link_topo_get_phy() local
52 if (!topo) in phy_link_topo_get_phy()
55 pdn = xa_load(&topo->phys, phyindex); in phy_link_topo_get_phy()
/linux-6.15/tools/power/x86/turbostat/
H A Dturbostat.c1814 topo.nodes_per_pkg * topo.cores_per_node * topo.threads_per_core) + \
1815 ((node_no) * topo.cores_per_node * topo.threads_per_core) + \
1821 ((pkg_no) * topo.nodes_per_pkg * topo.cores_per_node) + \
2046 } topo; variable
5902 topo.allowed_cpus); in re_initialize()
5933 topo.num_cpus++; in count_cpus()
8570 topo.num_cpus = 0; in topology_probe()
8712 topo.num_cores++; in topology_probe()
8723 topo.num_die = topo.max_die_id + 1; in topology_probe()
8762 int num_cores = topo.cores_per_node * topo.nodes_per_pkg * topo.num_packages; in allocate_counters()
[all …]
/linux-6.15/drivers/gpu/drm/xe/
H A Dxe_query.c485 struct drm_xe_query_topology_mask *topo, in copy_mask() argument
488 topo->num_bytes = mask_size; in copy_mask()
490 if (copy_to_user(*ptr, topo, sizeof(*topo))) in copy_mask()
492 *ptr += sizeof(topo); in copy_mask()
506 struct drm_xe_query_topology_mask topo; in query_gt_topology() local
520 topo.gt_id = id; in query_gt_topology()
522 topo.type = DRM_XE_TOPO_DSS_GEOMETRY; in query_gt_topology()
528 topo.type = DRM_XE_TOPO_DSS_COMPUTE; in query_gt_topology()
540 topo.type = DRM_XE_TOPO_L3_BANK; in query_gt_topology()
547 topo.type = gt->fuse_topo.eu_type == XE_GT_EU_TYPE_SIMD16 ? in query_gt_topology()
[all …]
/linux-6.15/tools/power/cpupower/bindings/python/
H A Dtest_raw_pylibcpupower.py53 topo = p.cpupower_topology() variable
54 total_cpus = p.get_cpu_topology(topo)
/linux-6.15/drivers/ntb/hw/intel/
H A Dntb_hw_gen3.c187 switch (ndev->ntb.topo) { in gen3_init_ntb()
194 if (ndev->ntb.topo == NTB_TOPO_B2B_USD) { in gen3_init_ntb()
243 ndev->ntb.topo = xeon_ppd_topo(ndev, ppd); in gen3_init_dev()
245 ntb_topo_string(ndev->ntb.topo)); in gen3_init_dev()
246 if (ndev->ntb.topo == NTB_TOPO_NONE) in gen3_init_dev()
284 ntb_topo_string(ndev->ntb.topo)); in ndev_ntb3_debugfs_read()
350 if (ntb_topo_is_b2b(ndev->ntb.topo)) { in ndev_ntb3_debugfs_read()

123