topo              119 arch/s390/kernel/topology.c 	struct cpu_topology_s390 *topo;
topo              131 arch/s390/kernel/topology.c 			topo = &cpu_topology[lcpu + i];
topo              132 arch/s390/kernel/topology.c 			topo->drawer_id = drawer->id;
topo              133 arch/s390/kernel/topology.c 			topo->book_id = book->id;
topo              134 arch/s390/kernel/topology.c 			topo->socket_id = socket->id;
topo              135 arch/s390/kernel/topology.c 			topo->core_id = rcore;
topo              136 arch/s390/kernel/topology.c 			topo->thread_id = lcpu + i;
topo              137 arch/s390/kernel/topology.c 			topo->dedicated = tl_core->d;
topo              250 arch/s390/kernel/topology.c 	struct cpu_topology_s390 *topo;
topo              254 arch/s390/kernel/topology.c 		topo = &cpu_topology[cpu];
topo              255 arch/s390/kernel/topology.c 		topo->thread_mask = cpu_thread_map(cpu);
topo              256 arch/s390/kernel/topology.c 		topo->core_mask = cpu_group_map(&socket_info, cpu);
topo              257 arch/s390/kernel/topology.c 		topo->book_mask = cpu_group_map(&book_info, cpu);
topo              258 arch/s390/kernel/topology.c 		topo->drawer_mask = cpu_group_map(&drawer_info, cpu);
topo              261 arch/s390/kernel/topology.c 			topo->thread_id = cpu;
topo              262 arch/s390/kernel/topology.c 			topo->core_id = cpu;
topo              263 arch/s390/kernel/topology.c 			topo->socket_id = id;
topo              264 arch/s390/kernel/topology.c 			topo->book_id = id;
topo              265 arch/s390/kernel/topology.c 			topo->drawer_id = id;
topo             5389 drivers/gpu/drm/drm_edid.c 	num_v_tile = (tile->topo[0] & 0xf) | (tile->topo[2] & 0x30);
topo             5390 drivers/gpu/drm/drm_edid.c 	num_h_tile = (tile->topo[0] >> 4) | ((tile->topo[2] >> 2) & 0x30);
topo             5391 drivers/gpu/drm/drm_edid.c 	tile_v_loc = (tile->topo[1] & 0xf) | ((tile->topo[2] & 0x3) << 4);
topo             5392 drivers/gpu/drm/drm_edid.c 	tile_h_loc = (tile->topo[1] >> 4) | (((tile->topo[2] >> 2) & 0x3) << 4);
topo               38 drivers/gpu/drm/i915/i915_query.c 	struct drm_i915_query_topology_info topo;
topo               55 drivers/gpu/drm/i915/i915_query.c 	total_length = sizeof(topo) + slice_length + subslice_length +
topo               58 drivers/gpu/drm/i915/i915_query.c 	ret = copy_query_item(&topo, sizeof(topo), total_length,
topo               63 drivers/gpu/drm/i915/i915_query.c 	if (topo.flags != 0)
topo               66 drivers/gpu/drm/i915/i915_query.c 	memset(&topo, 0, sizeof(topo));
topo               67 drivers/gpu/drm/i915/i915_query.c 	topo.max_slices = sseu->max_slices;
topo               68 drivers/gpu/drm/i915/i915_query.c 	topo.max_subslices = sseu->max_subslices;
topo               69 drivers/gpu/drm/i915/i915_query.c 	topo.max_eus_per_subslice = sseu->max_eus_per_subslice;
topo               71 drivers/gpu/drm/i915/i915_query.c 	topo.subslice_offset = slice_length;
topo               72 drivers/gpu/drm/i915/i915_query.c 	topo.subslice_stride = subslice_stride;
topo               73 drivers/gpu/drm/i915/i915_query.c 	topo.eu_offset = slice_length + subslice_length;
topo               74 drivers/gpu/drm/i915/i915_query.c 	topo.eu_stride = eu_stride;
topo               77 drivers/gpu/drm/i915/i915_query.c 			   &topo, sizeof(topo)))
topo               80 drivers/gpu/drm/i915/i915_query.c 	if (__copy_to_user(u64_to_user_ptr(query_item->data_ptr + sizeof(topo)),
topo               85 drivers/gpu/drm/i915/i915_query.c 					   sizeof(topo) + slice_length),
topo               90 drivers/gpu/drm/i915/i915_query.c 					   sizeof(topo) +
topo              232 drivers/media/mc/mc-device.c 	struct media_v2_topology *topo = arg;
topo              244 drivers/media/mc/mc-device.c 	topo->topology_version = mdev->topology_version;
topo              248 drivers/media/mc/mc-device.c 	uentity = media_get_uptr(topo->ptr_entities);
topo              254 drivers/media/mc/mc-device.c 		if (i > topo->num_entities) {
topo              271 drivers/media/mc/mc-device.c 	topo->num_entities = i;
topo              272 drivers/media/mc/mc-device.c 	topo->reserved1 = 0;
topo              276 drivers/media/mc/mc-device.c 	uintf = media_get_uptr(topo->ptr_interfaces);
topo              282 drivers/media/mc/mc-device.c 		if (i > topo->num_interfaces) {
topo              307 drivers/media/mc/mc-device.c 	topo->num_interfaces = i;
topo              308 drivers/media/mc/mc-device.c 	topo->reserved2 = 0;
topo              312 drivers/media/mc/mc-device.c 	upad = media_get_uptr(topo->ptr_pads);
topo              318 drivers/media/mc/mc-device.c 		if (i > topo->num_pads) {
topo              335 drivers/media/mc/mc-device.c 	topo->num_pads = i;
topo              336 drivers/media/mc/mc-device.c 	topo->reserved3 = 0;
topo              340 drivers/media/mc/mc-device.c 	ulink = media_get_uptr(topo->ptr_links);
topo              350 drivers/media/mc/mc-device.c 		if (i > topo->num_links) {
topo              367 drivers/media/mc/mc-device.c 	topo->num_links = i;
topo              368 drivers/media/mc/mc-device.c 	topo->reserved4 = 0;
topo              209 drivers/ntb/core.c 	switch (ntb->topo) {
topo              235 drivers/ntb/core.c 	switch (ntb->topo) {
topo              262 drivers/ntb/hw/amd/ntb_hw_amd.c 	if (ndev->ntb.topo == NTB_TOPO_SEC)
topo              283 drivers/ntb/hw/amd/ntb_hw_amd.c 	if (ndev->ntb.topo == NTB_TOPO_SEC)
topo              737 drivers/ntb/hw/amd/ntb_hw_amd.c 			 ntb_topo_string(ndev->ntb.topo));
topo              836 drivers/ntb/hw/amd/ntb_hw_amd.c 	ndev->ntb.topo = NTB_TOPO_NONE;
topo              916 drivers/ntb/hw/amd/ntb_hw_amd.c 	switch (ndev->ntb.topo) {
topo              920 drivers/ntb/hw/amd/ntb_hw_amd.c 		if (ndev->ntb.topo == NTB_TOPO_PRI) {
topo              965 drivers/ntb/hw/amd/ntb_hw_amd.c 	ndev->ntb.topo = amd_get_topo(ndev);
topo              967 drivers/ntb/hw/amd/ntb_hw_amd.c 		ntb_topo_string(ndev->ntb.topo));
topo             2285 drivers/ntb/hw/idt/ntb_hw_idt.c 	ndev->ntb.topo = NTB_TOPO_SWITCH;
topo              151 drivers/ntb/hw/intel/ntb_hw_gen1.c 		if (!ntb_topo_is_b2b(ndev->ntb.topo))
topo              518 drivers/ntb/hw/intel/ntb_hw_gen1.c 			 ntb_topo_string(ndev->ntb.topo));
topo              650 drivers/ntb/hw/intel/ntb_hw_gen1.c 		if (ntb_topo_is_b2b(ndev->ntb.topo)) {
topo              971 drivers/ntb/hw/intel/ntb_hw_gen1.c 	if (ndev->ntb.topo == NTB_TOPO_SEC)
topo             1000 drivers/ntb/hw/intel/ntb_hw_gen1.c 	if (ndev->ntb.topo == NTB_TOPO_SEC)
topo             1239 drivers/ntb/hw/intel/ntb_hw_gen1.c 	if (ndev->ntb.topo == NTB_TOPO_SEC)
topo             1549 drivers/ntb/hw/intel/ntb_hw_gen1.c 	switch (ndev->ntb.topo) {
topo             1609 drivers/ntb/hw/intel/ntb_hw_gen1.c 		if (ndev->ntb.topo == NTB_TOPO_B2B_USD) {
topo             1721 drivers/ntb/hw/intel/ntb_hw_gen1.c 	ndev->ntb.topo = xeon_ppd_topo(ndev, ppd);
topo             1723 drivers/ntb/hw/intel/ntb_hw_gen1.c 		ntb_topo_string(ndev->ntb.topo));
topo             1724 drivers/ntb/hw/intel/ntb_hw_gen1.c 	if (ndev->ntb.topo == NTB_TOPO_NONE)
topo             1727 drivers/ntb/hw/intel/ntb_hw_gen1.c 	if (ndev->ntb.topo != NTB_TOPO_SEC) {
topo             1830 drivers/ntb/hw/intel/ntb_hw_gen1.c 	ndev->ntb.topo = NTB_TOPO_NONE;
topo              187 drivers/ntb/hw/intel/ntb_hw_gen3.c 	switch (ndev->ntb.topo) {
topo              194 drivers/ntb/hw/intel/ntb_hw_gen3.c 		if (ndev->ntb.topo == NTB_TOPO_B2B_USD) {
topo              240 drivers/ntb/hw/intel/ntb_hw_gen3.c 	ndev->ntb.topo = xeon_ppd_topo(ndev, ppd);
topo              242 drivers/ntb/hw/intel/ntb_hw_gen3.c 		ntb_topo_string(ndev->ntb.topo));
topo              243 drivers/ntb/hw/intel/ntb_hw_gen3.c 	if (ndev->ntb.topo == NTB_TOPO_NONE)
topo              281 drivers/ntb/hw/intel/ntb_hw_gen3.c 			 ntb_topo_string(ndev->ntb.topo));
topo              347 drivers/ntb/hw/intel/ntb_hw_gen3.c 	if (ntb_topo_is_b2b(ndev->ntb.topo)) {
topo              846 drivers/ntb/hw/mscc/ntb_hw_switchtec.c 	sndev->ntb.topo = NTB_TOPO_SWITCH;
topo             1135 drivers/ntb/hw/mscc/ntb_hw_switchtec.c 	sndev->ntb.topo = NTB_TOPO_CROSSLINK;
topo              530 drivers/scsi/bfa/bfa_svc.h 				     enum bfa_port_topology topo);
topo             2239 drivers/scsi/qla2xxx/qla_bsg.c 	uint16_t loop_id, topo, sw_cap;
topo             2255 drivers/scsi/qla2xxx/qla_bsg.c 			&area, &domain, &topo, &sw_cap);
topo             2511 drivers/scsi/qla2xxx/qla_init.c 	uint16_t loop_id, topo, sw_cap;
topo             2526 drivers/scsi/qla2xxx/qla_init.c 			    &area, &domain, &topo, &sw_cap);
topo             4294 drivers/scsi/qla2xxx/qla_init.c 	uint16_t      topo;
topo             4307 drivers/scsi/qla2xxx/qla_init.c 	    &loop_id, &al_pa, &area, &domain, &topo, &sw_cap);
topo             4329 drivers/scsi/qla2xxx/qla_init.c 	if (topo == 4) {
topo             4342 drivers/scsi/qla2xxx/qla_init.c 	switch (topo) {
topo             4373 drivers/scsi/qla2xxx/qla_init.c 		    "HBA in unknown topology %x, using NL.\n", topo);
topo             4386 drivers/scsi/qla2xxx/qla_init.c 	if (!(topo == 2 && ha->flags.n2n_bigger))
topo               16 drivers/staging/greybus/audio_gb.c 	struct gb_audio_topology *topo;
topo               26 drivers/staging/greybus/audio_gb.c 	if (size < sizeof(*topo))
topo               29 drivers/staging/greybus/audio_gb.c 	topo = kzalloc(size, GFP_KERNEL);
topo               30 drivers/staging/greybus/audio_gb.c 	if (!topo)
topo               34 drivers/staging/greybus/audio_gb.c 				topo, size);
topo               36 drivers/staging/greybus/audio_gb.c 		kfree(topo);
topo               40 drivers/staging/greybus/audio_gb.c 	*topology = topo;
topo               71 include/drm/drm_displayid.h 	u8 topo[3];
topo               88 include/linux/ntb.h static inline int ntb_topo_is_b2b(enum ntb_topo topo)
topo               90 include/linux/ntb.h 	switch ((int)topo) {
topo               98 include/linux/ntb.h static inline char *ntb_topo_string(enum ntb_topo topo)
topo              100 include/linux/ntb.h 	switch (topo) {
topo              420 include/linux/ntb.h 	enum ntb_topo			topo;
topo              230 tools/power/x86/turbostat/turbostat.c 	  topo.nodes_per_pkg * topo.cores_per_node * topo.threads_per_core) + \
topo              231 tools/power/x86/turbostat/turbostat.c 	 ((node_no) * topo.cores_per_node * topo.threads_per_core) +	      \
topo              232 tools/power/x86/turbostat/turbostat.c 	 ((core_no) * topo.threads_per_core) +				      \
topo              237 tools/power/x86/turbostat/turbostat.c 	 ((pkg_no) *  topo.nodes_per_pkg * topo.cores_per_node) +	\
topo              238 tools/power/x86/turbostat/turbostat.c 	 ((node_no) * topo.cores_per_node) +				\
topo              298 tools/power/x86/turbostat/turbostat.c } topo;
topo              325 tools/power/x86/turbostat/turbostat.c 	for (pkg_no = 0; pkg_no < topo.num_packages; ++pkg_no) {
topo              326 tools/power/x86/turbostat/turbostat.c 		for (node_no = 0; node_no < topo.nodes_per_pkg; node_no++) {
topo              327 tools/power/x86/turbostat/turbostat.c 			for (core_no = 0; core_no < topo.cores_per_node; ++core_no) {
topo              329 tools/power/x86/turbostat/turbostat.c 					topo.threads_per_core; ++thread_no) {
topo             1597 tools/power/x86/turbostat/turbostat.c 	average.threads.tsc /= topo.num_cpus;
topo             1598 tools/power/x86/turbostat/turbostat.c 	average.threads.aperf /= topo.num_cpus;
topo             1599 tools/power/x86/turbostat/turbostat.c 	average.threads.mperf /= topo.num_cpus;
topo             1600 tools/power/x86/turbostat/turbostat.c 	average.threads.c1 /= topo.num_cpus;
topo             1605 tools/power/x86/turbostat/turbostat.c 	average.cores.c3 /= topo.num_cores;
topo             1606 tools/power/x86/turbostat/turbostat.c 	average.cores.c6 /= topo.num_cores;
topo             1607 tools/power/x86/turbostat/turbostat.c 	average.cores.c7 /= topo.num_cores;
topo             1608 tools/power/x86/turbostat/turbostat.c 	average.cores.mc6_us /= topo.num_cores;
topo             1611 tools/power/x86/turbostat/turbostat.c 		average.packages.pkg_wtd_core_c0 /= topo.num_packages;
topo             1613 tools/power/x86/turbostat/turbostat.c 		average.packages.pkg_any_core_c0 /= topo.num_packages;
topo             1615 tools/power/x86/turbostat/turbostat.c 		average.packages.pkg_any_gfxe_c0 /= topo.num_packages;
topo             1617 tools/power/x86/turbostat/turbostat.c 		average.packages.pkg_both_core_gfxe_c0 /= topo.num_packages;
topo             1619 tools/power/x86/turbostat/turbostat.c 	average.packages.pc2 /= topo.num_packages;
topo             1621 tools/power/x86/turbostat/turbostat.c 		average.packages.pc3 /= topo.num_packages;
topo             1623 tools/power/x86/turbostat/turbostat.c 		average.packages.pc6 /= topo.num_packages;
topo             1625 tools/power/x86/turbostat/turbostat.c 		average.packages.pc7 /= topo.num_packages;
topo             1627 tools/power/x86/turbostat/turbostat.c 	average.packages.pc8 /= topo.num_packages;
topo             1628 tools/power/x86/turbostat/turbostat.c 	average.packages.pc9 /= topo.num_packages;
topo             1629 tools/power/x86/turbostat/turbostat.c 	average.packages.pc10 /= topo.num_packages;
topo             1639 tools/power/x86/turbostat/turbostat.c 		average.threads.counter[i] /= topo.num_cpus;
topo             1648 tools/power/x86/turbostat/turbostat.c 		average.cores.counter[i] /= topo.num_cores;
topo             1657 tools/power/x86/turbostat/turbostat.c 		average.packages.counter[i] /= topo.num_packages;
topo             2470 tools/power/x86/turbostat/turbostat.c 	for (i = 0; i < topo.max_cpu_num + 1; ++i) {
topo             2515 tools/power/x86/turbostat/turbostat.c 	for (i = 0; i <= topo.max_cpu_num; ++i) {
topo             2577 tools/power/x86/turbostat/turbostat.c 	for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu)
topo             2581 tools/power/x86/turbostat/turbostat.c 	for (pkg = 0; pkg < topo.num_packages; pkg++) {
topo             2583 tools/power/x86/turbostat/turbostat.c 		for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu) {
topo             2596 tools/power/x86/turbostat/turbostat.c 			for (cpux = cpu; cpux <= topo.max_cpu_num; cpux++) {
topo             2604 tools/power/x86/turbostat/turbostat.c 			if (lnode > topo.nodes_per_pkg)
topo             2605 tools/power/x86/turbostat/turbostat.c 				topo.nodes_per_pkg = lnode;
topo             2607 tools/power/x86/turbostat/turbostat.c 		if (cpu_count >= topo.max_cpu_num)
topo             2619 tools/power/x86/turbostat/turbostat.c 	for (i = 0; i <= topo.max_cpu_num; i++) {
topo             2638 tools/power/x86/turbostat/turbostat.c 	int offset = topo.max_cpu_num + 1;
topo             2642 tools/power/x86/turbostat/turbostat.c 	thiscpu->put_ids = CPU_ALLOC((topo.max_cpu_num + 1));
topo             2648 tools/power/x86/turbostat/turbostat.c 	size = CPU_ALLOC_SIZE((topo.max_cpu_num + 1));
topo             2691 tools/power/x86/turbostat/turbostat.c 	for (pkg_no = 0; pkg_no < topo.num_packages; ++pkg_no) {
topo             2692 tools/power/x86/turbostat/turbostat.c 		for (node_no = 0; node_no < topo.nodes_per_pkg; ++node_no) {
topo             2693 tools/power/x86/turbostat/turbostat.c 			for (core_no = 0; core_no < topo.cores_per_node;
topo             2696 tools/power/x86/turbostat/turbostat.c 					topo.threads_per_core; ++thread_no) {
topo             2766 tools/power/x86/turbostat/turbostat.c 	printf("turbostat: re-initialized with num_cpus %d\n", topo.num_cpus);
topo             2774 tools/power/x86/turbostat/turbostat.c 	topo.max_cpu_num = 0;
topo             2779 tools/power/x86/turbostat/turbostat.c 		topo.max_cpu_num += BITMASK_SIZE;
topo             2781 tools/power/x86/turbostat/turbostat.c 	topo.max_cpu_num--; /* 0 based */
topo             2790 tools/power/x86/turbostat/turbostat.c 	topo.num_cpus++;
topo             2823 tools/power/x86/turbostat/turbostat.c 	for (column = 0; column < topo.num_cpus; ++column) {
topo             2830 tools/power/x86/turbostat/turbostat.c 		if (cpu_number > topo.max_cpu_num) {
topo             2831 tools/power/x86/turbostat/turbostat.c 			warn("/proc/interrupts: cpu%d: > %d", cpu_number, topo.max_cpu_num);
topo             2849 tools/power/x86/turbostat/turbostat.c 		for (column = 0; column < topo.num_cpus; ++column) {
topo             4967 tools/power/x86/turbostat/turbostat.c 	topo.num_cpus = 0;
topo             4969 tools/power/x86/turbostat/turbostat.c 	if (!summary_only && topo.num_cpus > 1)
topo             4973 tools/power/x86/turbostat/turbostat.c 		fprintf(outf, "num_cpus %d max_cpu_num %d\n", topo.num_cpus, topo.max_cpu_num);
topo             4975 tools/power/x86/turbostat/turbostat.c 	cpus = calloc(1, (topo.max_cpu_num  + 1) * sizeof(struct cpu_topology));
topo             4982 tools/power/x86/turbostat/turbostat.c 	cpu_present_set = CPU_ALLOC((topo.max_cpu_num + 1));
topo             4985 tools/power/x86/turbostat/turbostat.c 	cpu_present_setsize = CPU_ALLOC_SIZE((topo.max_cpu_num + 1));
topo             5001 tools/power/x86/turbostat/turbostat.c 	cpu_affinity_set = CPU_ALLOC((topo.max_cpu_num + 1));
topo             5004 tools/power/x86/turbostat/turbostat.c 	cpu_affinity_setsize = CPU_ALLOC_SIZE((topo.max_cpu_num + 1));
topo             5013 tools/power/x86/turbostat/turbostat.c 	for (i = 0; i <= topo.max_cpu_num; ++i) {
topo             5036 tools/power/x86/turbostat/turbostat.c 		if (cpus[i].physical_node_id > topo.max_node_num)
topo             5037 tools/power/x86/turbostat/turbostat.c 			topo.max_node_num = cpus[i].physical_node_id;
topo             5049 tools/power/x86/turbostat/turbostat.c 			topo.num_cores++;
topo             5052 tools/power/x86/turbostat/turbostat.c 	topo.cores_per_node = max_core_id + 1;
topo             5055 tools/power/x86/turbostat/turbostat.c 			max_core_id, topo.cores_per_node);
topo             5056 tools/power/x86/turbostat/turbostat.c 	if (!summary_only && topo.cores_per_node > 1)
topo             5059 tools/power/x86/turbostat/turbostat.c 	topo.num_die = max_die_id + 1;
topo             5062 tools/power/x86/turbostat/turbostat.c 				max_die_id, topo.num_die);
topo             5063 tools/power/x86/turbostat/turbostat.c 	if (!summary_only && topo.num_die > 1)
topo             5066 tools/power/x86/turbostat/turbostat.c 	topo.num_packages = max_package_id + 1;
topo             5069 tools/power/x86/turbostat/turbostat.c 			max_package_id, topo.num_packages);
topo             5070 tools/power/x86/turbostat/turbostat.c 	if (!summary_only && topo.num_packages > 1)
topo             5075 tools/power/x86/turbostat/turbostat.c 		fprintf(outf, "nodes_per_pkg %d\n", topo.nodes_per_pkg);
topo             5076 tools/power/x86/turbostat/turbostat.c 	if (!summary_only && topo.nodes_per_pkg > 1)
topo             5079 tools/power/x86/turbostat/turbostat.c 	topo.threads_per_core = max_siblings;
topo             5086 tools/power/x86/turbostat/turbostat.c 	for (i = 0; i <= topo.max_cpu_num; ++i) {
topo             5105 tools/power/x86/turbostat/turbostat.c 	int num_cores = topo.cores_per_node * topo.nodes_per_pkg *
topo             5106 tools/power/x86/turbostat/turbostat.c 			topo.num_packages;
topo             5107 tools/power/x86/turbostat/turbostat.c 	int num_threads = topo.threads_per_core * num_cores;
topo             5123 tools/power/x86/turbostat/turbostat.c 	*p = calloc(topo.num_packages, sizeof(struct pkg_data));
topo             5127 tools/power/x86/turbostat/turbostat.c 	for (i = 0; i < topo.num_packages; i++)
topo             5182 tools/power/x86/turbostat/turbostat.c 	output_buffer = calloc(1, (1 + topo.num_cpus) * 2048);
topo             5189 tools/power/x86/turbostat/turbostat.c 	fd_percpu = calloc(topo.max_cpu_num + 1, sizeof(int));
topo             5195 tools/power/x86/turbostat/turbostat.c 	irq_column_2_cpu = calloc(topo.num_cpus, sizeof(int));
topo             5197 tools/power/x86/turbostat/turbostat.c 		err(-1, "calloc %d", topo.num_cpus);
topo             5199 tools/power/x86/turbostat/turbostat.c 	irqs_per_cpu = calloc(topo.max_cpu_num + 1, sizeof(int));
topo             5201 tools/power/x86/turbostat/turbostat.c 		err(-1, "calloc %d", topo.max_cpu_num + 1);