Lines Matching full:i
51 int i; in is_multi_bridge() local
53 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) in is_multi_bridge()
54 if (&cxl_host_bridge[i]->dev == dev) in is_multi_bridge()
61 int i; in is_single_bridge() local
63 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) in is_single_bridge()
64 if (&cxl_hb_single[i]->dev == dev) in is_single_bridge()
91 int i; in is_mock_dev() local
93 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) in is_mock_dev()
94 if (dev == &cxl_mem[i]->dev) in is_mock_dev()
96 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) in is_mock_dev()
97 if (dev == &cxl_mem_single[i]->dev) in is_mock_dev()
99 for (i = 0; i < ARRAY_SIZE(cxl_rcd); i++) in is_mock_dev()
100 if (dev == &cxl_rcd[i]->dev) in is_mock_dev()
109 int i; in is_mock_adev() local
114 for (i = 0; i < ARRAY_SIZE(host_bridge); i++) in is_mock_adev()
115 if (adev == &host_bridge[i]) in is_mock_adev()
431 int i; in populate_cedt() local
433 for (i = 0; i < ARRAY_SIZE(mock_cedt.chbs); i++) { in populate_cedt()
434 struct acpi_cedt_chbs *chbs = &mock_cedt.chbs[i]; in populate_cedt()
449 for (i = cfmws_start; i <= cfmws_end; i++) { in populate_cedt()
450 struct acpi_cedt_cfmws *window = mock_cfmws[i]; in populate_cedt()
481 int i; in mock_acpi_table_parse_cedt() local
487 for (i = 0; i < ARRAY_SIZE(mock_cedt.chbs); i++) { in mock_acpi_table_parse_cedt()
488 h = (union acpi_subtable_headers *)&mock_cedt.chbs[i]; in mock_acpi_table_parse_cedt()
489 end = (unsigned long)&mock_cedt.chbs[i + 1]; in mock_acpi_table_parse_cedt()
494 for (i = cfmws_start; i <= cfmws_end; i++) { in mock_acpi_table_parse_cedt()
495 h = (union acpi_subtable_headers *) mock_cfmws[i]; in mock_acpi_table_parse_cedt()
496 end = (unsigned long) h + mock_cfmws[i]->header.length; in mock_acpi_table_parse_cedt()
501 for (i = 0; i < ARRAY_SIZE(mock_cxims); i++) { in mock_acpi_table_parse_cedt()
502 h = (union acpi_subtable_headers *)mock_cxims[i]; in mock_acpi_table_parse_cedt()
503 end = (unsigned long)h + mock_cxims[i]->header.length; in mock_acpi_table_parse_cedt()
512 int i; in is_mock_bridge() local
514 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) in is_mock_bridge()
515 if (dev == &cxl_host_bridge[i]->dev) in is_mock_bridge()
517 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) in is_mock_bridge()
518 if (dev == &cxl_hb_single[i]->dev) in is_mock_bridge()
520 for (i = 0; i < ARRAY_SIZE(cxl_rch); i++) in is_mock_bridge()
521 if (dev == &cxl_rch[i]->dev) in is_mock_bridge()
529 int i; in is_mock_port() local
534 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) in is_mock_port()
535 if (dev == &cxl_root_port[i]->dev) in is_mock_port()
538 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) in is_mock_port()
539 if (dev == &cxl_switch_uport[i]->dev) in is_mock_port()
542 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) in is_mock_port()
543 if (dev == &cxl_switch_dport[i]->dev) in is_mock_port()
546 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) in is_mock_port()
547 if (dev == &cxl_root_single[i]->dev) in is_mock_port()
550 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) in is_mock_port()
551 if (dev == &cxl_swu_single[i]->dev) in is_mock_port()
554 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) in is_mock_port()
555 if (dev == &cxl_swd_single[i]->dev) in is_mock_port()
571 int i; in find_host_bridge() local
573 for (i = 0; i < ARRAY_SIZE(host_bridge); i++) in find_host_bridge()
574 if (handle == host_bridge[i].handle) in find_host_bridge()
575 return &host_bridge[i]; in find_host_bridge()
612 int i; in is_mock_bus() local
614 for (i = 0; i < ARRAY_SIZE(mock_pci_bus); i++) in is_mock_bus()
615 if (bus == &mock_pci_bus[i]) in is_mock_bus()
753 int i; in mock_init_hdm_decoder() local
810 for (i = 0; i < 2; i++) { in mock_init_hdm_decoder()
821 if (i == 0) { in mock_init_hdm_decoder()
837 if (i == 0) in mock_init_hdm_decoder()
855 int target_count, i; in mock_cxl_enumerate_decoders() local
864 for (i = 0; i < NR_CXL_PORT_DECODERS; i++) { in mock_cxl_enumerate_decoders()
926 int i, array_size; in mock_cxl_port_enumerate_dports() local
960 for (i = 0; i < array_size; i++) { in mock_cxl_port_enumerate_dports()
961 struct platform_device *pdev = array[i]; in mock_cxl_port_enumerate_dports()
989 for (int i = 0; i < ACCESS_COORDINATE_MAX; i++) { in dpa_perf_setup() local
990 dpa_perf->coord[i].read_latency = 500; in dpa_perf_setup()
991 dpa_perf->coord[i].write_latency = 500; in dpa_perf_setup()
992 dpa_perf->coord[i].read_bandwidth = 1000; in dpa_perf_setup()
993 dpa_perf->coord[i].write_bandwidth = 1000; in dpa_perf_setup()
1008 for (int i = 0; i < cxlds->nr_partitions; i++) { in mock_cxl_endpoint_parse_cdat() local
1009 struct resource *res = &cxlds->part[i].res; in mock_cxl_endpoint_parse_cdat()
1010 struct cxl_dpa_perf *perf = &cxlds->part[i].perf; in mock_cxl_endpoint_parse_cdat()
1059 int rc, i; in cxl_rch_topo_init() local
1061 for (i = 0; i < ARRAY_SIZE(cxl_rch); i++) { in cxl_rch_topo_init()
1062 int idx = NR_CXL_HOST_BRIDGES + NR_CXL_SINGLE_HOST + i; in cxl_rch_topo_init()
1077 cxl_rch[i] = pdev; in cxl_rch_topo_init()
1088 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_topo_init()
1089 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_topo_init()
1094 platform_device_unregister(cxl_rch[i]); in cxl_rch_topo_init()
1102 int i; in cxl_rch_topo_exit() local
1104 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_topo_exit()
1105 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_topo_exit()
1110 platform_device_unregister(cxl_rch[i]); in cxl_rch_topo_exit()
1116 int i, rc; in cxl_single_topo_init() local
1118 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) { in cxl_single_topo_init()
1120 &host_bridge[NR_CXL_HOST_BRIDGES + i]; in cxl_single_topo_init()
1124 NR_CXL_HOST_BRIDGES + i); in cxl_single_topo_init()
1135 cxl_hb_single[i] = pdev; in cxl_single_topo_init()
1136 mock_pci_bus[i + NR_CXL_HOST_BRIDGES].bridge = &pdev->dev; in cxl_single_topo_init()
1143 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) { in cxl_single_topo_init()
1145 cxl_hb_single[i % ARRAY_SIZE(cxl_hb_single)]; in cxl_single_topo_init()
1149 NR_MULTI_ROOT + i); in cxl_single_topo_init()
1159 cxl_root_single[i] = pdev; in cxl_single_topo_init()
1162 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) { in cxl_single_topo_init()
1163 struct platform_device *root_port = cxl_root_single[i]; in cxl_single_topo_init()
1167 NR_MULTI_ROOT + i); in cxl_single_topo_init()
1177 cxl_swu_single[i] = pdev; in cxl_single_topo_init()
1180 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) { in cxl_single_topo_init()
1182 cxl_swu_single[i % ARRAY_SIZE(cxl_swu_single)]; in cxl_single_topo_init()
1186 i + NR_MEM_MULTI); in cxl_single_topo_init()
1196 cxl_swd_single[i] = pdev; in cxl_single_topo_init()
1202 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_topo_init()
1203 platform_device_unregister(cxl_swd_single[i]); in cxl_single_topo_init()
1205 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_topo_init()
1206 platform_device_unregister(cxl_swu_single[i]); in cxl_single_topo_init()
1208 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_topo_init()
1209 platform_device_unregister(cxl_root_single[i]); in cxl_single_topo_init()
1211 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_topo_init()
1212 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_topo_init()
1217 platform_device_unregister(cxl_hb_single[i]); in cxl_single_topo_init()
1225 int i; in cxl_single_topo_exit() local
1227 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_topo_exit()
1228 platform_device_unregister(cxl_swd_single[i]); in cxl_single_topo_exit()
1229 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_topo_exit()
1230 platform_device_unregister(cxl_swu_single[i]); in cxl_single_topo_exit()
1231 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_topo_exit()
1232 platform_device_unregister(cxl_root_single[i]); in cxl_single_topo_exit()
1233 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_topo_exit()
1234 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_topo_exit()
1239 platform_device_unregister(cxl_hb_single[i]); in cxl_single_topo_exit()
1245 int i; in cxl_mem_exit() local
1247 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_mem_exit()
1248 platform_device_unregister(cxl_rcd[i]); in cxl_mem_exit()
1249 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_mem_exit()
1250 platform_device_unregister(cxl_mem_single[i]); in cxl_mem_exit()
1251 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_mem_exit()
1252 platform_device_unregister(cxl_mem[i]); in cxl_mem_exit()
1257 int i, rc; in cxl_mem_init() local
1259 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) { in cxl_mem_init()
1260 struct platform_device *dport = cxl_switch_dport[i]; in cxl_mem_init()
1263 pdev = platform_device_alloc("cxl_mem", i); in cxl_mem_init()
1267 set_dev_node(&pdev->dev, i % 2); in cxl_mem_init()
1274 cxl_mem[i] = pdev; in cxl_mem_init()
1277 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) { in cxl_mem_init()
1278 struct platform_device *dport = cxl_swd_single[i]; in cxl_mem_init()
1281 pdev = platform_device_alloc("cxl_mem", NR_MEM_MULTI + i); in cxl_mem_init()
1285 set_dev_node(&pdev->dev, i % 2); in cxl_mem_init()
1292 cxl_mem_single[i] = pdev; in cxl_mem_init()
1295 for (i = 0; i < ARRAY_SIZE(cxl_rcd); i++) { in cxl_mem_init()
1296 int idx = NR_MEM_MULTI + NR_MEM_SINGLE + i; in cxl_mem_init()
1297 struct platform_device *rch = cxl_rch[i]; in cxl_mem_init()
1304 set_dev_node(&pdev->dev, i % 2); in cxl_mem_init()
1311 cxl_rcd[i] = pdev; in cxl_mem_init()
1317 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_mem_init()
1318 platform_device_unregister(cxl_rcd[i]); in cxl_mem_init()
1320 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_mem_init()
1321 platform_device_unregister(cxl_mem_single[i]); in cxl_mem_init()
1323 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_mem_init()
1324 platform_device_unregister(cxl_mem[i]); in cxl_mem_init()
1330 int rc, i; in cxl_test_init() local
1363 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) { in cxl_test_init()
1364 struct acpi_device *adev = &host_bridge[i]; in cxl_test_init()
1367 pdev = platform_device_alloc("cxl_host_bridge", i); in cxl_test_init()
1378 cxl_host_bridge[i] = pdev; in cxl_test_init()
1379 mock_pci_bus[i].bridge = &pdev->dev; in cxl_test_init()
1386 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) { in cxl_test_init()
1388 cxl_host_bridge[i % ARRAY_SIZE(cxl_host_bridge)]; in cxl_test_init()
1391 pdev = platform_device_alloc("cxl_root_port", i); in cxl_test_init()
1401 cxl_root_port[i] = pdev; in cxl_test_init()
1405 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) { in cxl_test_init()
1406 struct platform_device *root_port = cxl_root_port[i]; in cxl_test_init()
1409 pdev = platform_device_alloc("cxl_switch_uport", i); in cxl_test_init()
1419 cxl_switch_uport[i] = pdev; in cxl_test_init()
1422 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) { in cxl_test_init()
1424 cxl_switch_uport[i % ARRAY_SIZE(cxl_switch_uport)]; in cxl_test_init()
1427 pdev = platform_device_alloc("cxl_switch_dport", i); in cxl_test_init()
1437 cxl_switch_dport[i] = pdev; in cxl_test_init()
1472 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_init()
1473 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_init()
1475 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_init()
1476 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_init()
1478 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_init()
1479 platform_device_unregister(cxl_root_port[i]); in cxl_test_init()
1481 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_init()
1482 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_init()
1487 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_init()
1500 int i; in cxl_test_exit() local
1506 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_exit()
1507 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_exit()
1508 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_exit()
1509 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_exit()
1510 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_exit()
1511 platform_device_unregister(cxl_root_port[i]); in cxl_test_exit()
1512 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_exit()
1513 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_exit()
1518 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_exit()