Home
last modified time | relevance | path

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

123

/linux/drivers/net/phy/
H A Dphy_link_topology.c16 struct phy_link_topology *topo; in netdev_alloc_phy_link_topology() local
18 topo = kzalloc_obj(*topo); 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()
34 struct phy_link_topology *topo = dev->link_topo; in phy_link_topo_add_phy() local
38 if (!topo) { in phy_link_topo_add_phy()
43 topo = dev->link_topo; in phy_link_topo_add_phy()
70 ret = xa_insert(&topo->phys, phy->phyindex, pdn, GFP_KERNEL); in phy_link_topo_add_phy()
[all …]
/linux/arch/x86/kernel/
H A Dsmpboot.c346 if (c->topo.pkg_id == o->topo.pkg_id && in match_smt()
347 c->topo.die_id == o->topo.die_id && in match_smt()
348 c->topo.amd_node_id == o->topo.amd_node_id && in match_smt()
350 if (c->topo.core_id == o->topo.core_id) in match_smt()
353 if ((c->topo.cu_id != 0xff) && in match_smt()
354 (o->topo.cu_id != 0xff) && in match_smt()
355 (c->topo.cu_id == o->topo.cu_id)) in match_smt()
359 } else if (c->topo.pkg_id == o->topo.pkg_id && in match_smt()
360 c->topo.die_id == o->topo.die_id && in match_smt()
361 c->topo.core_id == o->topo.core_id) { in match_smt()
[all …]
/linux/arch/x86/kernel/cpu/
H A Dtopology_amd.c89 tscan->c->topo.initial_apicid = leaf.ext_apic_id; in parse_8000_001e()
109 tscan->c->topo.cu_id = leaf.core_id; in parse_8000_001e()
144 tscan->c->topo.llc_id = nid.node_id; in parse_fam10h_node_id()
149 unsigned int apicid = tscan->c->topo.initial_apicid; in legacy_set_llc()
152 if (tscan->c->topo.llc_id == BAD_APICID) in legacy_set_llc()
153 tscan->c->topo.llc_id = apicid >> tscan->dom_shifts[TOPO_CORE_DOMAIN]; in legacy_set_llc()
180 tscan->c->topo.cpu_type = cpuid_ebx(0x80000026); in parse_topology_amd()
226 c->topo.core_id %= tscan->dom_ncpus[TOPO_CORE_DOMAIN] / tscan->amd_nodes_per_pkg; in cpu_topology_fixup_amd()
H A Dcacheinfo.c319 c->topo.llc_id = die_id; in cacheinfo_amd_init_llc_id()
325 c->topo.llc_id = c->topo.apicid >> 3; in cacheinfo_amd_init_llc_id()
335 c->topo.llc_id = get_cache_id(c->topo.apicid, &id4); in cacheinfo_amd_init_llc_id()
348 c->topo.llc_id = c->topo.apicid >> 3; in cacheinfo_hygon_init_llc_id()
378 if (c->topo.llc_id == BAD_APICID) in intel_cacheinfo_done()
379 c->topo.llc_id = c->topo.pkg_id; in intel_cacheinfo_done()
420 return c->topo.apicid & ~((1 << index_msb) - 1); in calc_cache_topo_id()
470 c->topo.l2c_id = l2_id; in intel_cacheinfo_0x4()
471 c->topo.llc_id = (l3_id == BAD_APICID) ? l2_id : l3_id; in intel_cacheinfo_0x4()
516 apicid = cpu_data(cpu).topo.apicid; in __cache_amd_cpumap_setup()
[all …]
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()
/linux/drivers/perf/hisilicon/
H A Dhisi_uncore_pmu.c484 struct hisi_pmu_topology *topo = &hisi_pmu->topo; in hisi_pmu_cpu_is_associated_pmu() local
487 if (topo->ccl_id == -1) { in hisi_pmu_cpu_is_associated_pmu()
491 return sccl_id == topo->sccl_id; in hisi_pmu_cpu_is_associated_pmu()
496 return sccl_id == topo->sccl_id && ccl_id == topo->ccl_id; in hisi_pmu_cpu_is_associated_pmu()
583 struct hisi_pmu_topology *topo = &hisi_pmu->topo; in hisi_uncore_pmu_init_topology() local
585 topo->sccl_id = -1; in hisi_uncore_pmu_init_topology()
586 topo->ccl_id = -1; in hisi_uncore_pmu_init_topology()
587 topo->index_id = -1; in hisi_uncore_pmu_init_topology()
588 topo->sub_id = -1; in hisi_uncore_pmu_init_topology()
590 if (device_property_read_u32(dev, "hisilicon,scl-id", &topo->sccl_id)) in hisi_uncore_pmu_init_topology()
[all …]
H A Dhisi_uncore_ddrc_pmu.c240 &ddrc_pmu->topo.index_id)) { in hisi_ddrc_pmu_init_data()
245 if (ddrc_pmu->topo.sccl_id < 0) { in hisi_ddrc_pmu_init_data()
262 if (ddrc_pmu->topo.sub_id < 0) { in hisi_ddrc_pmu_init_data()
394 ddrc_pmu->topo.sccl_id, ddrc_pmu->topo.index_id, in hisi_ddrc_pmu_probe()
395 ddrc_pmu->topo.sub_id); in hisi_ddrc_pmu_probe()
398 "hisi_sccl%d_ddrc%d", ddrc_pmu->topo.sccl_id, in hisi_ddrc_pmu_probe()
399 ddrc_pmu->topo.index_id); in hisi_ddrc_pmu_probe()
H A Dhisi_uncore_noc_pmu.c294 if (noc_pmu->topo.scl_id < 0) in hisi_noc_pmu_dev_init()
297 if (noc_pmu->topo.index_id < 0) in hisi_noc_pmu_dev_init()
300 if (noc_pmu->topo.sub_id < 0) in hisi_noc_pmu_dev_init()
369 noc_pmu->topo.scl_id, noc_pmu->topo.index_id, in hisi_noc_pmu_probe()
370 noc_pmu->topo.sub_id); in hisi_noc_pmu_probe()
H A Dhisi_uncore_l3c_pmu.c547 if (l3c_pmu->topo.sccl_id < 0) { in hisi_l3c_pmu_init_data()
552 if (l3c_pmu->topo.ccl_id < 0) { in hisi_l3c_pmu_init_data()
838 if (l3c_pmu->topo.sub_id >= 0) in hisi_l3c_pmu_probe()
840 l3c_pmu->topo.sccl_id, l3c_pmu->topo.ccl_id, in hisi_l3c_pmu_probe()
841 l3c_pmu->topo.sub_id); in hisi_l3c_pmu_probe()
844 l3c_pmu->topo.sccl_id, l3c_pmu->topo.ccl_id); in hisi_l3c_pmu_probe()
H A Dhisi_uncore_hha_pmu.c304 if (hha_pmu->topo.sccl_id < 0) { in hisi_hha_pmu_init_data()
313 if (hha_pmu->topo.index_id < 0) { in hisi_hha_pmu_init_data()
321 hha_pmu->topo.index_id = id; in hisi_hha_pmu_init_data()
489 hha_pmu->topo.sccl_id, hha_pmu->topo.index_id); in hisi_hha_pmu_probe()
H A Dhisi_uncore_mn_pmu.c258 if (mn_pmu->topo.scl_id < 0) in hisi_mn_pmu_dev_init()
262 if (mn_pmu->topo.index_id < 0) in hisi_mn_pmu_dev_init()
320 mn_pmu->topo.scl_id, mn_pmu->topo.index_id); in hisi_mn_pmu_probe()
H A Dhisi_uncore_pa_pmu.c278 if (pa_pmu->topo.sicl_id < 0) { in hisi_pa_pmu_init_data()
283 if (pa_pmu->topo.index_id < 0) { in hisi_pa_pmu_init_data()
466 pa_pmu->topo.sicl_id, pa_pmu->dev_info->name, in hisi_pa_pmu_probe()
467 pa_pmu->topo.index_id); in hisi_pa_pmu_probe()
/linux/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)
198 #define topology_cluster_id(cpu) (cpu_data(cpu).topo.l2c_id)
/linux/arch/s390/pci/
H A Dpci_bus.c257 static struct zpci_bus *zpci_bus_get(int topo, bool topo_is_tid) in zpci_bus_get() argument
265 if (topo_is_tid == zbus->topo_is_tid && topo == zbus->topo) { in zpci_bus_get()
314 static struct zpci_bus *zpci_bus_alloc(int topo, bool topo_is_tid) in zpci_bus_alloc() argument
322 zbus->topo = topo; in zpci_bus_alloc()
429 int topo, rc = -EBADF; in zpci_bus_device_register() local
437 topo = topo_is_tid ? zdev->tid : zdev->pchid; in zpci_bus_device_register()
438 zbus = zpci_bus_get(topo, topo_is_tid); in zpci_bus_device_register()
449 zbus = zpci_bus_alloc(topo, topo_is_tid); in zpci_bus_device_register()
/linux/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/drivers/media/mc/
H A Dmc-device.c232 struct media_v2_topology *topo = arg; in media_device_get_topology() local
244 topo->topology_version = mdev->topology_version; in media_device_get_topology()
248 uentity = media_get_uptr(topo->ptr_entities); in media_device_get_topology()
254 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()
276 uintf = media_get_uptr(topo->ptr_interfaces); in media_device_get_topology()
282 if (i > topo->num_interfaces) { in media_device_get_topology()
307 topo->num_interfaces = i; in media_device_get_topology()
308 topo->reserved2 = 0; in media_device_get_topology()
[all …]
/linux/drivers/gpu/drm/xe/
H A Dxe_query.c486 struct drm_xe_query_topology_mask *topo, in copy_mask() argument
489 topo->num_bytes = mask_size; in copy_mask()
491 if (copy_to_user(*ptr, topo, sizeof(*topo))) in copy_mask()
493 *ptr += sizeof(*topo); in copy_mask()
507 struct drm_xe_query_topology_mask topo; in query_gt_topology() local
521 topo.gt_id = id; in query_gt_topology()
523 topo.type = DRM_XE_TOPO_DSS_GEOMETRY; in query_gt_topology()
524 err = copy_mask(&query_ptr, &topo, gt->fuse_topo.g_dss_mask, in query_gt_topology()
529 topo.type = DRM_XE_TOPO_DSS_COMPUTE; in query_gt_topology()
530 err = copy_mask(&query_ptr, &topo, gt->fuse_topo.c_dss_mask, in query_gt_topology()
[all …]
/linux/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/tools/power/x86/turbostat/
H A Dturbostat.c2414 } topo; variable
2438 #define GLOBAL_CORE_ID(core_id, pkg_id) (core_id + pkg_id * (topo.max_core_id + 1))
2453 for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu) { in for_all_cpus()
4290 if ((mp->format == FORMAT_RAW) && (topo.num_packages == 0)) in sum_counters()
4297 if ((pp->format == FORMAT_RAW) && (topo.num_packages == 0)) in sum_counters()
4328 average.threads->tsc /= topo.allowed_cpus; in compute_average()
4329 average.threads->aperf /= topo.allowed_cpus; in compute_average()
4330 average.threads->mperf /= topo.allowed_cpus; in compute_average()
4331 average.threads->instr_count /= topo.allowed_cpus; in compute_average()
4332 average.threads->c1 /= topo.allowed_cpus; in compute_average()
[all …]
/linux/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/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()
H A Dntb_hw_gen4.c151 if (ndev->ntb.topo == NTB_TOPO_B2B_USD) in gen4_init_ntb()
209 ndev->ntb.topo = gen4_ppd_topo(ndev, ppd1); in gen4_init_dev()
211 ndev->ntb.topo = spr_ppd_topo(ndev, ppd1); in gen4_init_dev()
213 ntb_topo_string(ndev->ntb.topo)); in gen4_init_dev()
214 if (ndev->ntb.topo == NTB_TOPO_NONE) in gen4_init_dev()
255 ntb_topo_string(ndev->ntb.topo)); in ndev_ntb4_debugfs_read()
H A Dntb_hw_gen1.c152 if (!ntb_topo_is_b2b(ndev->ntb.topo)) in ndev_reset_unsafe_flags()
519 ntb_topo_string(ndev->ntb.topo)); in ndev_ntb_debugfs_read()
651 if (ntb_topo_is_b2b(ndev->ntb.topo)) { in ndev_ntb_debugfs_read()
975 if (ndev->ntb.topo == NTB_TOPO_SEC) in intel_ntb_link_enable()
1004 if (ndev->ntb.topo == NTB_TOPO_SEC) in intel_ntb_link_disable()
1243 if (ndev->ntb.topo == NTB_TOPO_SEC) in xeon_link_is_up()
1553 switch (ndev->ntb.topo) { in xeon_init_ntb()
1613 if (ndev->ntb.topo == NTB_TOPO_B2B_USD) { in xeon_init_ntb()
1725 ndev->ntb.topo = xeon_ppd_topo(ndev, ppd); in xeon_init_dev()
1727 ntb_topo_string(ndev->ntb.topo)); in xeon_init_dev()
[all …]
/linux/drivers/ntb/hw/amd/
H A Dntb_hw_amd.c206 if (ndev->ntb.topo == NTB_TOPO_SEC) { in amd_ntb_get_link_status()
236 } else if (ndev->ntb.topo == NTB_TOPO_PRI) { in amd_ntb_get_link_status()
304 if (ndev->ntb.topo == NTB_TOPO_PRI) { in amd_link_is_up()
361 if (ndev->ntb.topo == NTB_TOPO_SEC) in amd_ntb_link_enable()
377 if (ndev->ntb.topo == NTB_TOPO_SEC) in amd_ntb_link_disable()
873 ntb_topo_string(ndev->ntb.topo)); in ndev_debugfs_read()
969 ndev->ntb.topo = NTB_TOPO_NONE; in ndev_init_struct()
1075 switch (ndev->ntb.topo) { in amd_init_ntb()
1079 if (ndev->ntb.topo == NTB_TOPO_PRI) { in amd_init_ntb()
1123 ndev->ntb.topo = amd_get_topo(ndev); in amd_init_dev()
[all …]
/linux/net/ethtool/
H A Dphy.c74 struct phy_link_topology *topo = reply_data->dev->link_topo; in ethnl_phy_fill_reply()
86 pdn = xa_load(&topo->phys, phydev->phyindex); in ethnl_phy_fill_reply()
125 struct phy_link_topology *topo = req_base->dev->link_topo; ethnl_phy_parse_request() local

123