Lines Matching refs:i

49 	int i;  in is_multi_bridge()  local
51 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) in is_multi_bridge()
52 if (&cxl_host_bridge[i]->dev == dev) in is_multi_bridge()
59 int i; in is_single_bridge() local
61 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) in is_single_bridge()
62 if (&cxl_hb_single[i]->dev == dev) in is_single_bridge()
85 int i; in is_mock_dev() local
87 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) in is_mock_dev()
88 if (dev == &cxl_mem[i]->dev) in is_mock_dev()
90 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) in is_mock_dev()
91 if (dev == &cxl_mem_single[i]->dev) in is_mock_dev()
93 for (i = 0; i < ARRAY_SIZE(cxl_rcd); i++) in is_mock_dev()
94 if (dev == &cxl_rcd[i]->dev) in is_mock_dev()
103 int i; in is_mock_adev() local
108 for (i = 0; i < ARRAY_SIZE(host_bridge); i++) in is_mock_adev()
109 if (adev == &host_bridge[i]) in is_mock_adev()
425 int i; in populate_cedt() local
427 for (i = 0; i < ARRAY_SIZE(mock_cedt.chbs); i++) { in populate_cedt()
428 struct acpi_cedt_chbs *chbs = &mock_cedt.chbs[i]; in populate_cedt()
443 for (i = cfmws_start; i <= cfmws_end; i++) { in populate_cedt()
444 struct acpi_cedt_cfmws *window = mock_cfmws[i]; in populate_cedt()
475 int i; in mock_acpi_table_parse_cedt() local
481 for (i = 0; i < ARRAY_SIZE(mock_cedt.chbs); i++) { in mock_acpi_table_parse_cedt()
482 h = (union acpi_subtable_headers *)&mock_cedt.chbs[i]; in mock_acpi_table_parse_cedt()
483 end = (unsigned long)&mock_cedt.chbs[i + 1]; in mock_acpi_table_parse_cedt()
488 for (i = cfmws_start; i <= cfmws_end; i++) { in mock_acpi_table_parse_cedt()
489 h = (union acpi_subtable_headers *) mock_cfmws[i]; in mock_acpi_table_parse_cedt()
490 end = (unsigned long) h + mock_cfmws[i]->header.length; in mock_acpi_table_parse_cedt()
495 for (i = 0; i < ARRAY_SIZE(mock_cxims); i++) { in mock_acpi_table_parse_cedt()
496 h = (union acpi_subtable_headers *)mock_cxims[i]; in mock_acpi_table_parse_cedt()
497 end = (unsigned long)h + mock_cxims[i]->header.length; in mock_acpi_table_parse_cedt()
506 int i; in is_mock_bridge() local
508 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) in is_mock_bridge()
509 if (dev == &cxl_host_bridge[i]->dev) in is_mock_bridge()
511 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) in is_mock_bridge()
512 if (dev == &cxl_hb_single[i]->dev) in is_mock_bridge()
514 for (i = 0; i < ARRAY_SIZE(cxl_rch); i++) in is_mock_bridge()
515 if (dev == &cxl_rch[i]->dev) in is_mock_bridge()
523 int i; in is_mock_port() local
528 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) in is_mock_port()
529 if (dev == &cxl_root_port[i]->dev) in is_mock_port()
532 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) in is_mock_port()
533 if (dev == &cxl_switch_uport[i]->dev) in is_mock_port()
536 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) in is_mock_port()
537 if (dev == &cxl_switch_dport[i]->dev) in is_mock_port()
540 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) in is_mock_port()
541 if (dev == &cxl_root_single[i]->dev) in is_mock_port()
544 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) in is_mock_port()
545 if (dev == &cxl_swu_single[i]->dev) in is_mock_port()
548 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) in is_mock_port()
549 if (dev == &cxl_swd_single[i]->dev) in is_mock_port()
565 int i; in find_host_bridge() local
567 for (i = 0; i < ARRAY_SIZE(host_bridge); i++) in find_host_bridge()
568 if (handle == host_bridge[i].handle) in find_host_bridge()
569 return &host_bridge[i]; in find_host_bridge()
606 int i; in is_mock_bus() local
608 for (i = 0; i < ARRAY_SIZE(mock_pci_bus); i++) in is_mock_bus()
609 if (bus == &mock_pci_bus[i]) in is_mock_bus()
747 int i; in mock_init_hdm_decoder() local
804 for (i = 0; i < 2; i++) { in mock_init_hdm_decoder()
815 if (i == 0) { in mock_init_hdm_decoder()
831 if (i == 0) in mock_init_hdm_decoder()
849 int target_count, i; in mock_cxl_enumerate_decoders() local
858 for (i = 0; i < NR_CXL_PORT_DECODERS; i++) { in mock_cxl_enumerate_decoders()
920 int i, array_size; in mock_cxl_port_enumerate_dports() local
954 for (i = 0; i < array_size; i++) { in mock_cxl_port_enumerate_dports()
955 struct platform_device *pdev = array[i]; in mock_cxl_port_enumerate_dports()
1005 int rc, i; in cxl_rch_init() local
1007 for (i = 0; i < ARRAY_SIZE(cxl_rch); i++) { in cxl_rch_init()
1008 int idx = NR_CXL_HOST_BRIDGES + NR_CXL_SINGLE_HOST + i; in cxl_rch_init()
1023 cxl_rch[i] = pdev; in cxl_rch_init()
1031 for (i = 0; i < ARRAY_SIZE(cxl_rcd); i++) { in cxl_rch_init()
1032 int idx = NR_MEM_MULTI + NR_MEM_SINGLE + i; in cxl_rch_init()
1033 struct platform_device *rch = cxl_rch[i]; in cxl_rch_init()
1040 set_dev_node(&pdev->dev, i % 2); in cxl_rch_init()
1047 cxl_rcd[i] = pdev; in cxl_rch_init()
1053 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_rch_init()
1054 platform_device_unregister(cxl_rcd[i]); in cxl_rch_init()
1056 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_init()
1057 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_init()
1062 platform_device_unregister(cxl_rch[i]); in cxl_rch_init()
1070 int i; in cxl_rch_exit() local
1072 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_rch_exit()
1073 platform_device_unregister(cxl_rcd[i]); in cxl_rch_exit()
1074 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_exit()
1075 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_exit()
1080 platform_device_unregister(cxl_rch[i]); in cxl_rch_exit()
1086 int i, rc; in cxl_single_init() local
1088 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) { in cxl_single_init()
1090 &host_bridge[NR_CXL_HOST_BRIDGES + i]; in cxl_single_init()
1094 NR_CXL_HOST_BRIDGES + i); in cxl_single_init()
1105 cxl_hb_single[i] = pdev; in cxl_single_init()
1106 mock_pci_bus[i + NR_CXL_HOST_BRIDGES].bridge = &pdev->dev; in cxl_single_init()
1113 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) { in cxl_single_init()
1115 cxl_hb_single[i % ARRAY_SIZE(cxl_hb_single)]; in cxl_single_init()
1119 NR_MULTI_ROOT + i); in cxl_single_init()
1129 cxl_root_single[i] = pdev; in cxl_single_init()
1132 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) { in cxl_single_init()
1133 struct platform_device *root_port = cxl_root_single[i]; in cxl_single_init()
1137 NR_MULTI_ROOT + i); in cxl_single_init()
1147 cxl_swu_single[i] = pdev; in cxl_single_init()
1150 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) { in cxl_single_init()
1152 cxl_swu_single[i % ARRAY_SIZE(cxl_swu_single)]; in cxl_single_init()
1156 i + NR_MEM_MULTI); in cxl_single_init()
1166 cxl_swd_single[i] = pdev; in cxl_single_init()
1169 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) { in cxl_single_init()
1170 struct platform_device *dport = cxl_swd_single[i]; in cxl_single_init()
1173 pdev = platform_device_alloc("cxl_mem", NR_MEM_MULTI + i); in cxl_single_init()
1177 set_dev_node(&pdev->dev, i % 2); in cxl_single_init()
1184 cxl_mem_single[i] = pdev; in cxl_single_init()
1190 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_single_init()
1191 platform_device_unregister(cxl_mem_single[i]); in cxl_single_init()
1193 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_init()
1194 platform_device_unregister(cxl_swd_single[i]); in cxl_single_init()
1196 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_init()
1197 platform_device_unregister(cxl_swu_single[i]); in cxl_single_init()
1199 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_init()
1200 platform_device_unregister(cxl_root_single[i]); in cxl_single_init()
1202 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_init()
1203 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_init()
1208 platform_device_unregister(cxl_hb_single[i]); in cxl_single_init()
1216 int i; in cxl_single_exit() local
1218 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_single_exit()
1219 platform_device_unregister(cxl_mem_single[i]); in cxl_single_exit()
1220 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_exit()
1221 platform_device_unregister(cxl_swd_single[i]); in cxl_single_exit()
1222 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_exit()
1223 platform_device_unregister(cxl_swu_single[i]); in cxl_single_exit()
1224 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_exit()
1225 platform_device_unregister(cxl_root_single[i]); in cxl_single_exit()
1226 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_exit()
1227 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_exit()
1232 platform_device_unregister(cxl_hb_single[i]); in cxl_single_exit()
1238 int rc, i; in cxl_test_init() local
1271 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) { in cxl_test_init()
1272 struct acpi_device *adev = &host_bridge[i]; in cxl_test_init()
1275 pdev = platform_device_alloc("cxl_host_bridge", i); in cxl_test_init()
1286 cxl_host_bridge[i] = pdev; in cxl_test_init()
1287 mock_pci_bus[i].bridge = &pdev->dev; in cxl_test_init()
1294 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) { in cxl_test_init()
1296 cxl_host_bridge[i % ARRAY_SIZE(cxl_host_bridge)]; in cxl_test_init()
1299 pdev = platform_device_alloc("cxl_root_port", i); in cxl_test_init()
1309 cxl_root_port[i] = pdev; in cxl_test_init()
1313 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) { in cxl_test_init()
1314 struct platform_device *root_port = cxl_root_port[i]; in cxl_test_init()
1317 pdev = platform_device_alloc("cxl_switch_uport", i); in cxl_test_init()
1327 cxl_switch_uport[i] = pdev; in cxl_test_init()
1330 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) { in cxl_test_init()
1332 cxl_switch_uport[i % ARRAY_SIZE(cxl_switch_uport)]; in cxl_test_init()
1335 pdev = platform_device_alloc("cxl_switch_dport", i); in cxl_test_init()
1345 cxl_switch_dport[i] = pdev; in cxl_test_init()
1348 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) { in cxl_test_init()
1349 struct platform_device *dport = cxl_switch_dport[i]; in cxl_test_init()
1352 pdev = platform_device_alloc("cxl_mem", i); in cxl_test_init()
1356 set_dev_node(&pdev->dev, i % 2); in cxl_test_init()
1363 cxl_mem[i] = pdev; in cxl_test_init()
1394 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_test_init()
1395 platform_device_unregister(cxl_mem[i]); in cxl_test_init()
1397 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_init()
1398 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_init()
1400 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_init()
1401 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_init()
1403 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_init()
1404 platform_device_unregister(cxl_root_port[i]); in cxl_test_init()
1406 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_init()
1407 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_init()
1412 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_init()
1425 int i; in cxl_test_exit() local
1430 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_test_exit()
1431 platform_device_unregister(cxl_mem[i]); in cxl_test_exit()
1432 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_exit()
1433 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_exit()
1434 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_exit()
1435 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_exit()
1436 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_exit()
1437 platform_device_unregister(cxl_root_port[i]); in cxl_test_exit()
1438 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_exit()
1439 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_exit()
1444 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_exit()