Lines Matching refs: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()
1063 int rc, i; in cxl_rch_topo_init() local
1065 for (i = 0; i < ARRAY_SIZE(cxl_rch); i++) { in cxl_rch_topo_init()
1066 int idx = NR_CXL_HOST_BRIDGES + NR_CXL_SINGLE_HOST + i; in cxl_rch_topo_init()
1081 cxl_rch[i] = pdev; in cxl_rch_topo_init()
1092 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_topo_init()
1093 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_topo_init()
1098 platform_device_unregister(cxl_rch[i]); in cxl_rch_topo_init()
1106 int i; in cxl_rch_topo_exit() local
1108 for (i = ARRAY_SIZE(cxl_rch) - 1; i >= 0; i--) { in cxl_rch_topo_exit()
1109 struct platform_device *pdev = cxl_rch[i]; in cxl_rch_topo_exit()
1114 platform_device_unregister(cxl_rch[i]); in cxl_rch_topo_exit()
1120 int i, rc; in cxl_single_topo_init() local
1122 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) { in cxl_single_topo_init()
1124 &host_bridge[NR_CXL_HOST_BRIDGES + i]; in cxl_single_topo_init()
1128 NR_CXL_HOST_BRIDGES + i); in cxl_single_topo_init()
1139 cxl_hb_single[i] = pdev; in cxl_single_topo_init()
1140 mock_pci_bus[i + NR_CXL_HOST_BRIDGES].bridge = &pdev->dev; in cxl_single_topo_init()
1147 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) { in cxl_single_topo_init()
1149 cxl_hb_single[i % ARRAY_SIZE(cxl_hb_single)]; in cxl_single_topo_init()
1153 NR_MULTI_ROOT + i); in cxl_single_topo_init()
1163 cxl_root_single[i] = pdev; in cxl_single_topo_init()
1166 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) { in cxl_single_topo_init()
1167 struct platform_device *root_port = cxl_root_single[i]; in cxl_single_topo_init()
1171 NR_MULTI_ROOT + i); in cxl_single_topo_init()
1181 cxl_swu_single[i] = pdev; in cxl_single_topo_init()
1184 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) { in cxl_single_topo_init()
1186 cxl_swu_single[i % ARRAY_SIZE(cxl_swu_single)]; in cxl_single_topo_init()
1190 i + NR_MEM_MULTI); in cxl_single_topo_init()
1200 cxl_swd_single[i] = pdev; in cxl_single_topo_init()
1206 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_topo_init()
1207 platform_device_unregister(cxl_swd_single[i]); in cxl_single_topo_init()
1209 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_topo_init()
1210 platform_device_unregister(cxl_swu_single[i]); in cxl_single_topo_init()
1212 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_topo_init()
1213 platform_device_unregister(cxl_root_single[i]); in cxl_single_topo_init()
1215 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_topo_init()
1216 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_topo_init()
1221 platform_device_unregister(cxl_hb_single[i]); in cxl_single_topo_init()
1229 int i; in cxl_single_topo_exit() local
1231 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_topo_exit()
1232 platform_device_unregister(cxl_swd_single[i]); in cxl_single_topo_exit()
1233 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_topo_exit()
1234 platform_device_unregister(cxl_swu_single[i]); in cxl_single_topo_exit()
1235 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_topo_exit()
1236 platform_device_unregister(cxl_root_single[i]); in cxl_single_topo_exit()
1237 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_topo_exit()
1238 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_topo_exit()
1243 platform_device_unregister(cxl_hb_single[i]); in cxl_single_topo_exit()
1249 int i; in cxl_mem_exit() local
1251 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_mem_exit()
1252 platform_device_unregister(cxl_rcd[i]); in cxl_mem_exit()
1253 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_mem_exit()
1254 platform_device_unregister(cxl_mem_single[i]); in cxl_mem_exit()
1255 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_mem_exit()
1256 platform_device_unregister(cxl_mem[i]); in cxl_mem_exit()
1261 int i, rc; in cxl_mem_init() local
1263 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) { in cxl_mem_init()
1264 struct platform_device *dport = cxl_switch_dport[i]; in cxl_mem_init()
1267 pdev = platform_device_alloc("cxl_mem", i); in cxl_mem_init()
1271 set_dev_node(&pdev->dev, i % 2); in cxl_mem_init()
1278 cxl_mem[i] = pdev; in cxl_mem_init()
1281 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) { in cxl_mem_init()
1282 struct platform_device *dport = cxl_swd_single[i]; in cxl_mem_init()
1285 pdev = platform_device_alloc("cxl_mem", NR_MEM_MULTI + i); in cxl_mem_init()
1289 set_dev_node(&pdev->dev, i % 2); in cxl_mem_init()
1296 cxl_mem_single[i] = pdev; in cxl_mem_init()
1299 for (i = 0; i < ARRAY_SIZE(cxl_rcd); i++) { in cxl_mem_init()
1300 int idx = NR_MEM_MULTI + NR_MEM_SINGLE + i; in cxl_mem_init()
1301 struct platform_device *rch = cxl_rch[i]; in cxl_mem_init()
1308 set_dev_node(&pdev->dev, i % 2); in cxl_mem_init()
1315 cxl_rcd[i] = pdev; in cxl_mem_init()
1321 for (i = ARRAY_SIZE(cxl_rcd) - 1; i >= 0; i--) in cxl_mem_init()
1322 platform_device_unregister(cxl_rcd[i]); in cxl_mem_init()
1324 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_mem_init()
1325 platform_device_unregister(cxl_mem_single[i]); in cxl_mem_init()
1327 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_mem_init()
1328 platform_device_unregister(cxl_mem[i]); in cxl_mem_init()
1334 int rc, i; in cxl_test_init() local
1367 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) { in cxl_test_init()
1368 struct acpi_device *adev = &host_bridge[i]; in cxl_test_init()
1371 pdev = platform_device_alloc("cxl_host_bridge", i); in cxl_test_init()
1382 cxl_host_bridge[i] = pdev; in cxl_test_init()
1383 mock_pci_bus[i].bridge = &pdev->dev; in cxl_test_init()
1390 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) { in cxl_test_init()
1392 cxl_host_bridge[i % ARRAY_SIZE(cxl_host_bridge)]; in cxl_test_init()
1395 pdev = platform_device_alloc("cxl_root_port", i); in cxl_test_init()
1405 cxl_root_port[i] = pdev; in cxl_test_init()
1409 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) { in cxl_test_init()
1410 struct platform_device *root_port = cxl_root_port[i]; in cxl_test_init()
1413 pdev = platform_device_alloc("cxl_switch_uport", i); in cxl_test_init()
1423 cxl_switch_uport[i] = pdev; in cxl_test_init()
1426 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) { in cxl_test_init()
1428 cxl_switch_uport[i % ARRAY_SIZE(cxl_switch_uport)]; in cxl_test_init()
1431 pdev = platform_device_alloc("cxl_switch_dport", i); in cxl_test_init()
1441 cxl_switch_dport[i] = pdev; in cxl_test_init()
1476 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_init()
1477 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_init()
1479 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_init()
1480 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_init()
1482 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_init()
1483 platform_device_unregister(cxl_root_port[i]); in cxl_test_init()
1485 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_init()
1486 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_init()
1491 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_init()
1504 int i; in cxl_test_exit() local
1510 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_exit()
1511 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_exit()
1512 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_exit()
1513 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_exit()
1514 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_exit()
1515 platform_device_unregister(cxl_root_port[i]); in cxl_test_exit()
1516 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_exit()
1517 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_exit()
1522 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_exit()