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()
1054 int rc, i; in cxl_rch_init() local
1056 for (i = 0; i < ARRAY_SIZE(cxl_rch); i++) { in cxl_rch_init()
1057 int idx = NR_CXL_HOST_BRIDGES + NR_CXL_SINGLE_HOST + i; in cxl_rch_init()
1072 cxl_rch[i] = pdev; in cxl_rch_init()
1080 for (i = 0; i < ARRAY_SIZE(cxl_rcd); i++) { in cxl_rch_init()
1081 int idx = NR_MEM_MULTI + NR_MEM_SINGLE + i; in cxl_rch_init()
1082 struct platform_device *rch = cxl_rch[i]; in cxl_rch_init()
1089 set_dev_node(&pdev->dev, i % 2); in cxl_rch_init()
1096 cxl_rcd[i] = pdev; in cxl_rch_init()
1102 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_rch_init()
1103 platform_device_unregister(cxl_rcd[i]); in cxl_rch_init()
1105 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_init()
1106 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_init()
1111 platform_device_unregister(cxl_rch[i]); in cxl_rch_init()
1119 int i; in cxl_rch_exit() local
1121 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_rch_exit()
1122 platform_device_unregister(cxl_rcd[i]); in cxl_rch_exit()
1123 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_exit()
1124 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_exit()
1129 platform_device_unregister(cxl_rch[i]); in cxl_rch_exit()
1135 int i, rc; in cxl_single_init() local
1137 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) { in cxl_single_init()
1139 &host_bridge[NR_CXL_HOST_BRIDGES + i]; in cxl_single_init()
1143 NR_CXL_HOST_BRIDGES + i); in cxl_single_init()
1154 cxl_hb_single[i] = pdev; in cxl_single_init()
1155 mock_pci_bus[i + NR_CXL_HOST_BRIDGES].bridge = &pdev->dev; in cxl_single_init()
1162 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) { in cxl_single_init()
1164 cxl_hb_single[i % ARRAY_SIZE(cxl_hb_single)]; in cxl_single_init()
1168 NR_MULTI_ROOT + i); in cxl_single_init()
1178 cxl_root_single[i] = pdev; in cxl_single_init()
1181 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) { in cxl_single_init()
1182 struct platform_device *root_port = cxl_root_single[i]; in cxl_single_init()
1186 NR_MULTI_ROOT + i); in cxl_single_init()
1196 cxl_swu_single[i] = pdev; in cxl_single_init()
1199 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) { in cxl_single_init()
1201 cxl_swu_single[i % ARRAY_SIZE(cxl_swu_single)]; in cxl_single_init()
1205 i + NR_MEM_MULTI); in cxl_single_init()
1215 cxl_swd_single[i] = pdev; in cxl_single_init()
1218 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) { in cxl_single_init()
1219 struct platform_device *dport = cxl_swd_single[i]; in cxl_single_init()
1222 pdev = platform_device_alloc("cxl_mem", NR_MEM_MULTI + i); in cxl_single_init()
1226 set_dev_node(&pdev->dev, i % 2); in cxl_single_init()
1233 cxl_mem_single[i] = pdev; in cxl_single_init()
1239 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_single_init()
1240 platform_device_unregister(cxl_mem_single[i]); in cxl_single_init()
1242 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_init()
1243 platform_device_unregister(cxl_swd_single[i]); in cxl_single_init()
1245 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_init()
1246 platform_device_unregister(cxl_swu_single[i]); in cxl_single_init()
1248 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_init()
1249 platform_device_unregister(cxl_root_single[i]); in cxl_single_init()
1251 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_init()
1252 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_init()
1257 platform_device_unregister(cxl_hb_single[i]); in cxl_single_init()
1265 int i; in cxl_single_exit() local
1267 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_single_exit()
1268 platform_device_unregister(cxl_mem_single[i]); in cxl_single_exit()
1269 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_exit()
1270 platform_device_unregister(cxl_swd_single[i]); in cxl_single_exit()
1271 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_exit()
1272 platform_device_unregister(cxl_swu_single[i]); in cxl_single_exit()
1273 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_exit()
1274 platform_device_unregister(cxl_root_single[i]); in cxl_single_exit()
1275 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_exit()
1276 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_exit()
1281 platform_device_unregister(cxl_hb_single[i]); in cxl_single_exit()
1287 int rc, i; in cxl_test_init() local
1320 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) { in cxl_test_init()
1321 struct acpi_device *adev = &host_bridge[i]; in cxl_test_init()
1324 pdev = platform_device_alloc("cxl_host_bridge", i); in cxl_test_init()
1335 cxl_host_bridge[i] = pdev; in cxl_test_init()
1336 mock_pci_bus[i].bridge = &pdev->dev; in cxl_test_init()
1343 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) { in cxl_test_init()
1345 cxl_host_bridge[i % ARRAY_SIZE(cxl_host_bridge)]; in cxl_test_init()
1348 pdev = platform_device_alloc("cxl_root_port", i); in cxl_test_init()
1358 cxl_root_port[i] = pdev; in cxl_test_init()
1362 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) { in cxl_test_init()
1363 struct platform_device *root_port = cxl_root_port[i]; in cxl_test_init()
1366 pdev = platform_device_alloc("cxl_switch_uport", i); in cxl_test_init()
1376 cxl_switch_uport[i] = pdev; in cxl_test_init()
1379 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) { in cxl_test_init()
1381 cxl_switch_uport[i % ARRAY_SIZE(cxl_switch_uport)]; in cxl_test_init()
1384 pdev = platform_device_alloc("cxl_switch_dport", i); in cxl_test_init()
1394 cxl_switch_dport[i] = pdev; in cxl_test_init()
1397 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) { in cxl_test_init()
1398 struct platform_device *dport = cxl_switch_dport[i]; in cxl_test_init()
1401 pdev = platform_device_alloc("cxl_mem", i); in cxl_test_init()
1405 set_dev_node(&pdev->dev, i % 2); in cxl_test_init()
1412 cxl_mem[i] = pdev; in cxl_test_init()
1443 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_test_init()
1444 platform_device_unregister(cxl_mem[i]); in cxl_test_init()
1446 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_init()
1447 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_init()
1449 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_init()
1450 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_init()
1452 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_init()
1453 platform_device_unregister(cxl_root_port[i]); in cxl_test_init()
1455 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_init()
1456 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_init()
1461 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_init()
1474 int i; in cxl_test_exit() local
1479 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_test_exit()
1480 platform_device_unregister(cxl_mem[i]); in cxl_test_exit()
1481 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_exit()
1482 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_exit()
1483 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_exit()
1484 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_exit()
1485 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_exit()
1486 platform_device_unregister(cxl_root_port[i]); in cxl_test_exit()
1487 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_exit()
1488 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_exit()
1493 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_exit()