Lines Matching full:i
52 int i; in is_multi_bridge() local
54 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) in is_multi_bridge()
55 if (&cxl_host_bridge[i]->dev == dev) in is_multi_bridge()
62 int i; in is_single_bridge() local
64 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) in is_single_bridge()
65 if (&cxl_hb_single[i]->dev == dev) in is_single_bridge()
92 int i; in is_mock_dev() local
94 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) in is_mock_dev()
95 if (dev == &cxl_mem[i]->dev) in is_mock_dev()
97 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) in is_mock_dev()
98 if (dev == &cxl_mem_single[i]->dev) in is_mock_dev()
100 for (i = 0; i < ARRAY_SIZE(cxl_rcd); i++) in is_mock_dev()
101 if (dev == &cxl_rcd[i]->dev) in is_mock_dev()
110 int i; in is_mock_adev() local
115 for (i = 0; i < ARRAY_SIZE(host_bridge); i++) in is_mock_adev()
116 if (adev == &host_bridge[i]) in is_mock_adev()
432 int i; in populate_cedt() local
434 for (i = 0; i < ARRAY_SIZE(mock_cedt.chbs); i++) { in populate_cedt()
435 struct acpi_cedt_chbs *chbs = &mock_cedt.chbs[i]; in populate_cedt()
450 for (i = cfmws_start; i <= cfmws_end; i++) { in populate_cedt()
451 struct acpi_cedt_cfmws *window = mock_cfmws[i]; in populate_cedt()
482 int i; in mock_acpi_table_parse_cedt() local
488 for (i = 0; i < ARRAY_SIZE(mock_cedt.chbs); i++) { in mock_acpi_table_parse_cedt()
489 h = (union acpi_subtable_headers *)&mock_cedt.chbs[i]; in mock_acpi_table_parse_cedt()
490 end = (unsigned long)&mock_cedt.chbs[i + 1]; in mock_acpi_table_parse_cedt()
495 for (i = cfmws_start; i <= cfmws_end; i++) { in mock_acpi_table_parse_cedt()
496 h = (union acpi_subtable_headers *) mock_cfmws[i]; in mock_acpi_table_parse_cedt()
497 end = (unsigned long) h + mock_cfmws[i]->header.length; in mock_acpi_table_parse_cedt()
502 for (i = 0; i < ARRAY_SIZE(mock_cxims); i++) { in mock_acpi_table_parse_cedt()
503 h = (union acpi_subtable_headers *)mock_cxims[i]; in mock_acpi_table_parse_cedt()
504 end = (unsigned long)h + mock_cxims[i]->header.length; in mock_acpi_table_parse_cedt()
513 int i; in is_mock_bridge() local
515 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) in is_mock_bridge()
516 if (dev == &cxl_host_bridge[i]->dev) in is_mock_bridge()
518 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) in is_mock_bridge()
519 if (dev == &cxl_hb_single[i]->dev) in is_mock_bridge()
521 for (i = 0; i < ARRAY_SIZE(cxl_rch); i++) in is_mock_bridge()
522 if (dev == &cxl_rch[i]->dev) in is_mock_bridge()
530 int i; in is_mock_port() local
535 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) in is_mock_port()
536 if (dev == &cxl_root_port[i]->dev) in is_mock_port()
539 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) in is_mock_port()
540 if (dev == &cxl_switch_uport[i]->dev) in is_mock_port()
543 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) in is_mock_port()
544 if (dev == &cxl_switch_dport[i]->dev) in is_mock_port()
547 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) in is_mock_port()
548 if (dev == &cxl_root_single[i]->dev) in is_mock_port()
551 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) in is_mock_port()
552 if (dev == &cxl_swu_single[i]->dev) in is_mock_port()
555 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) in is_mock_port()
556 if (dev == &cxl_swd_single[i]->dev) in is_mock_port()
572 int i; in find_host_bridge() local
574 for (i = 0; i < ARRAY_SIZE(host_bridge); i++) in find_host_bridge()
575 if (handle == host_bridge[i].handle) in find_host_bridge()
576 return &host_bridge[i]; in find_host_bridge()
613 int i; in is_mock_bus() local
615 for (i = 0; i < ARRAY_SIZE(mock_pci_bus); i++) in is_mock_bus()
616 if (bus == &mock_pci_bus[i]) in is_mock_bus()
754 int i; in mock_init_hdm_decoder() local
811 for (i = 0; i < 2; i++) { in mock_init_hdm_decoder()
822 if (i == 0) { in mock_init_hdm_decoder()
838 if (i == 0) in mock_init_hdm_decoder()
856 int target_count, i; in mock_cxl_enumerate_decoders() local
865 for (i = 0; i < NR_CXL_PORT_DECODERS; i++) { in mock_cxl_enumerate_decoders()
927 int i, array_size; in mock_cxl_port_enumerate_dports() local
961 for (i = 0; i < array_size; i++) { in mock_cxl_port_enumerate_dports()
962 struct platform_device *pdev = array[i]; in mock_cxl_port_enumerate_dports()
990 for (int i = 0; i < ACCESS_COORDINATE_MAX; i++) { in dpa_perf_setup() local
991 dpa_perf->coord[i].read_latency = 500; in dpa_perf_setup()
992 dpa_perf->coord[i].write_latency = 500; in dpa_perf_setup()
993 dpa_perf->coord[i].read_bandwidth = 1000; in dpa_perf_setup()
994 dpa_perf->coord[i].write_bandwidth = 1000; in dpa_perf_setup()
1009 for (int i = 0; i < cxlds->nr_partitions; i++) { in mock_cxl_endpoint_parse_cdat() local
1010 struct resource *res = &cxlds->part[i].res; in mock_cxl_endpoint_parse_cdat()
1011 struct cxl_dpa_perf *perf = &cxlds->part[i].perf; in mock_cxl_endpoint_parse_cdat()
1060 int rc, i; in cxl_rch_topo_init() local
1062 for (i = 0; i < ARRAY_SIZE(cxl_rch); i++) { in cxl_rch_topo_init()
1063 int idx = NR_CXL_HOST_BRIDGES + NR_CXL_SINGLE_HOST + i; in cxl_rch_topo_init()
1078 cxl_rch[i] = pdev; in cxl_rch_topo_init()
1089 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_topo_init()
1090 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_topo_init()
1095 platform_device_unregister(cxl_rch[i]); in cxl_rch_topo_init()
1103 int i; in cxl_rch_topo_exit() local
1105 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_topo_exit()
1106 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_topo_exit()
1111 platform_device_unregister(cxl_rch[i]); in cxl_rch_topo_exit()
1117 int i, rc; in cxl_single_topo_init() local
1119 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) { in cxl_single_topo_init()
1121 &host_bridge[NR_CXL_HOST_BRIDGES + i]; in cxl_single_topo_init()
1125 NR_CXL_HOST_BRIDGES + i); in cxl_single_topo_init()
1136 cxl_hb_single[i] = pdev; in cxl_single_topo_init()
1137 mock_pci_bus[i + NR_CXL_HOST_BRIDGES].bridge = &pdev->dev; in cxl_single_topo_init()
1144 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) { in cxl_single_topo_init()
1146 cxl_hb_single[i % ARRAY_SIZE(cxl_hb_single)]; in cxl_single_topo_init()
1150 NR_MULTI_ROOT + i); in cxl_single_topo_init()
1160 cxl_root_single[i] = pdev; in cxl_single_topo_init()
1163 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) { in cxl_single_topo_init()
1164 struct platform_device *root_port = cxl_root_single[i]; in cxl_single_topo_init()
1168 NR_MULTI_ROOT + i); in cxl_single_topo_init()
1178 cxl_swu_single[i] = pdev; in cxl_single_topo_init()
1181 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) { in cxl_single_topo_init()
1183 cxl_swu_single[i % ARRAY_SIZE(cxl_swu_single)]; in cxl_single_topo_init()
1187 i + NR_MEM_MULTI); in cxl_single_topo_init()
1197 cxl_swd_single[i] = pdev; in cxl_single_topo_init()
1203 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_topo_init()
1204 platform_device_unregister(cxl_swd_single[i]); in cxl_single_topo_init()
1206 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_topo_init()
1207 platform_device_unregister(cxl_swu_single[i]); in cxl_single_topo_init()
1209 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_topo_init()
1210 platform_device_unregister(cxl_root_single[i]); in cxl_single_topo_init()
1212 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_topo_init()
1213 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_topo_init()
1218 platform_device_unregister(cxl_hb_single[i]); in cxl_single_topo_init()
1226 int i; in cxl_single_topo_exit() local
1228 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_topo_exit()
1229 platform_device_unregister(cxl_swd_single[i]); in cxl_single_topo_exit()
1230 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_topo_exit()
1231 platform_device_unregister(cxl_swu_single[i]); in cxl_single_topo_exit()
1232 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_topo_exit()
1233 platform_device_unregister(cxl_root_single[i]); in cxl_single_topo_exit()
1234 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_topo_exit()
1235 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_topo_exit()
1240 platform_device_unregister(cxl_hb_single[i]); in cxl_single_topo_exit()
1246 int i; in cxl_mem_exit() local
1248 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_mem_exit()
1249 platform_device_unregister(cxl_rcd[i]); in cxl_mem_exit()
1250 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_mem_exit()
1251 platform_device_unregister(cxl_mem_single[i]); in cxl_mem_exit()
1252 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_mem_exit()
1253 platform_device_unregister(cxl_mem[i]); in cxl_mem_exit()
1258 int i, rc; in cxl_mem_init() local
1260 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) { in cxl_mem_init()
1261 struct platform_device *dport = cxl_switch_dport[i]; in cxl_mem_init()
1264 pdev = platform_device_alloc("cxl_mem", i); in cxl_mem_init()
1268 set_dev_node(&pdev->dev, i % 2); in cxl_mem_init()
1275 cxl_mem[i] = pdev; in cxl_mem_init()
1278 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) { in cxl_mem_init()
1279 struct platform_device *dport = cxl_swd_single[i]; in cxl_mem_init()
1282 pdev = platform_device_alloc("cxl_mem", NR_MEM_MULTI + i); in cxl_mem_init()
1286 set_dev_node(&pdev->dev, i % 2); in cxl_mem_init()
1293 cxl_mem_single[i] = pdev; in cxl_mem_init()
1296 for (i = 0; i < ARRAY_SIZE(cxl_rcd); i++) { in cxl_mem_init()
1297 int idx = NR_MEM_MULTI + NR_MEM_SINGLE + i; in cxl_mem_init()
1298 struct platform_device *rch = cxl_rch[i]; in cxl_mem_init()
1305 set_dev_node(&pdev->dev, i % 2); in cxl_mem_init()
1312 cxl_rcd[i] = pdev; in cxl_mem_init()
1318 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_mem_init()
1319 platform_device_unregister(cxl_rcd[i]); in cxl_mem_init()
1321 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_mem_init()
1322 platform_device_unregister(cxl_mem_single[i]); in cxl_mem_init()
1324 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_mem_init()
1325 platform_device_unregister(cxl_mem[i]); in cxl_mem_init()
1331 int rc, i; in cxl_test_init() local
1368 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) { in cxl_test_init()
1369 struct acpi_device *adev = &host_bridge[i]; in cxl_test_init()
1372 pdev = platform_device_alloc("cxl_host_bridge", i); in cxl_test_init()
1383 cxl_host_bridge[i] = pdev; in cxl_test_init()
1384 mock_pci_bus[i].bridge = &pdev->dev; in cxl_test_init()
1391 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) { in cxl_test_init()
1393 cxl_host_bridge[i % ARRAY_SIZE(cxl_host_bridge)]; in cxl_test_init()
1396 pdev = platform_device_alloc("cxl_root_port", i); in cxl_test_init()
1406 cxl_root_port[i] = pdev; in cxl_test_init()
1410 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) { in cxl_test_init()
1411 struct platform_device *root_port = cxl_root_port[i]; in cxl_test_init()
1414 pdev = platform_device_alloc("cxl_switch_uport", i); in cxl_test_init()
1424 cxl_switch_uport[i] = pdev; in cxl_test_init()
1427 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) { in cxl_test_init()
1429 cxl_switch_uport[i % ARRAY_SIZE(cxl_switch_uport)]; in cxl_test_init()
1432 pdev = platform_device_alloc("cxl_switch_dport", i); in cxl_test_init()
1442 cxl_switch_dport[i] = pdev; in cxl_test_init()
1477 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_init()
1478 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_init()
1480 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_init()
1481 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_init()
1483 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_init()
1484 platform_device_unregister(cxl_root_port[i]); in cxl_test_init()
1486 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_init()
1487 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_init()
1492 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_init()
1505 int i; in cxl_test_exit() local
1511 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_exit()
1512 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_exit()
1513 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_exit()
1514 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_exit()
1515 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_exit()
1516 platform_device_unregister(cxl_root_port[i]); in cxl_test_exit()
1517 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_exit()
1518 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_exit()
1523 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_exit()