Lines Matching full:i

41 	int i;  in is_multi_bridge()  local
43 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) in is_multi_bridge()
44 if (&cxl_host_bridge[i]->dev == dev) in is_multi_bridge()
51 int i; in is_single_bridge() local
53 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) in is_single_bridge()
54 if (&cxl_hb_single[i]->dev == dev) in is_single_bridge()
75 int i; in is_mock_dev() local
77 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) in is_mock_dev()
78 if (dev == &cxl_mem[i]->dev) in is_mock_dev()
80 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) in is_mock_dev()
81 if (dev == &cxl_mem_single[i]->dev) in is_mock_dev()
90 int i; in is_mock_adev() local
95 for (i = 0; i < ARRAY_SIZE(host_bridge); i++) in is_mock_adev()
96 if (adev == &host_bridge[i]) in is_mock_adev()
293 int i; in populate_cedt() local
295 for (i = 0; i < ARRAY_SIZE(mock_cedt.chbs); i++) { in populate_cedt()
296 struct acpi_cedt_chbs *chbs = &mock_cedt.chbs[i]; in populate_cedt()
311 for (i = 0; i < ARRAY_SIZE(mock_cfmws); i++) { in populate_cedt()
312 struct acpi_cedt_cfmws *window = mock_cfmws[i]; in populate_cedt()
341 int i; in mock_acpi_table_parse_cedt() local
347 for (i = 0; i < ARRAY_SIZE(mock_cedt.chbs); i++) { in mock_acpi_table_parse_cedt()
348 h = (union acpi_subtable_headers *)&mock_cedt.chbs[i]; in mock_acpi_table_parse_cedt()
349 end = (unsigned long)&mock_cedt.chbs[i + 1]; in mock_acpi_table_parse_cedt()
354 for (i = 0; i < ARRAY_SIZE(mock_cfmws); i++) { in mock_acpi_table_parse_cedt()
355 h = (union acpi_subtable_headers *) mock_cfmws[i]; in mock_acpi_table_parse_cedt()
356 end = (unsigned long) h + mock_cfmws[i]->header.length; in mock_acpi_table_parse_cedt()
365 int i; in is_mock_bridge() local
367 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) in is_mock_bridge()
368 if (dev == &cxl_host_bridge[i]->dev) in is_mock_bridge()
370 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) in is_mock_bridge()
371 if (dev == &cxl_hb_single[i]->dev) in is_mock_bridge()
378 int i; in is_mock_port() local
383 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) in is_mock_port()
384 if (dev == &cxl_root_port[i]->dev) in is_mock_port()
387 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) in is_mock_port()
388 if (dev == &cxl_switch_uport[i]->dev) in is_mock_port()
391 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) in is_mock_port()
392 if (dev == &cxl_switch_dport[i]->dev) in is_mock_port()
395 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) in is_mock_port()
396 if (dev == &cxl_root_single[i]->dev) in is_mock_port()
399 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) in is_mock_port()
400 if (dev == &cxl_swu_single[i]->dev) in is_mock_port()
403 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) in is_mock_port()
404 if (dev == &cxl_swd_single[i]->dev) in is_mock_port()
420 int i; in find_host_bridge() local
422 for (i = 0; i < ARRAY_SIZE(host_bridge); i++) in find_host_bridge()
423 if (handle == host_bridge[i].handle) in find_host_bridge()
424 return &host_bridge[i]; in find_host_bridge()
454 int i; in is_mock_bus() local
456 for (i = 0; i < ARRAY_SIZE(mock_pci_bus); i++) in is_mock_bus()
457 if (bus == &mock_pci_bus[i]) in is_mock_bus()
558 int target_count, i; in mock_cxl_enumerate_decoders() local
567 for (i = 0; i < NR_CXL_PORT_DECODERS; i++) { in mock_cxl_enumerate_decoders()
639 int i, array_size; in mock_cxl_port_enumerate_dports() local
673 for (i = 0; i < array_size; i++) { in mock_cxl_port_enumerate_dports()
674 struct platform_device *pdev = array[i]; in mock_cxl_port_enumerate_dports()
734 int i, rc; in cxl_single_init() local
736 for (i = 0; i < ARRAY_SIZE(cxl_hb_single); i++) { in cxl_single_init()
738 &host_bridge[NR_CXL_HOST_BRIDGES + i]; in cxl_single_init()
742 NR_CXL_HOST_BRIDGES + i); in cxl_single_init()
753 cxl_hb_single[i] = pdev; in cxl_single_init()
760 for (i = 0; i < ARRAY_SIZE(cxl_root_single); i++) { in cxl_single_init()
762 cxl_hb_single[i % ARRAY_SIZE(cxl_hb_single)]; in cxl_single_init()
766 NR_MULTI_ROOT + i); in cxl_single_init()
776 cxl_root_single[i] = pdev; in cxl_single_init()
779 for (i = 0; i < ARRAY_SIZE(cxl_swu_single); i++) { in cxl_single_init()
780 struct platform_device *root_port = cxl_root_single[i]; in cxl_single_init()
784 NR_MULTI_ROOT + i); in cxl_single_init()
794 cxl_swu_single[i] = pdev; in cxl_single_init()
797 for (i = 0; i < ARRAY_SIZE(cxl_swd_single); i++) { in cxl_single_init()
799 cxl_swu_single[i % ARRAY_SIZE(cxl_swu_single)]; in cxl_single_init()
803 i + NR_MEM_MULTI); in cxl_single_init()
813 cxl_swd_single[i] = pdev; in cxl_single_init()
816 for (i = 0; i < ARRAY_SIZE(cxl_mem_single); i++) { in cxl_single_init()
817 struct platform_device *dport = cxl_swd_single[i]; in cxl_single_init()
820 pdev = platform_device_alloc("cxl_mem", NR_MEM_MULTI + i); in cxl_single_init()
824 set_dev_node(&pdev->dev, i % 2); in cxl_single_init()
831 cxl_mem_single[i] = pdev; in cxl_single_init()
837 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_single_init()
838 platform_device_unregister(cxl_mem_single[i]); in cxl_single_init()
840 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_init()
841 platform_device_unregister(cxl_swd_single[i]); in cxl_single_init()
843 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_init()
844 platform_device_unregister(cxl_swu_single[i]); in cxl_single_init()
846 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_init()
847 platform_device_unregister(cxl_root_single[i]); in cxl_single_init()
849 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_init()
850 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_init()
855 platform_device_unregister(cxl_hb_single[i]); in cxl_single_init()
863 int i; in cxl_single_exit() local
865 for (i = ARRAY_SIZE(cxl_mem_single) - 1; i >= 0; i--) in cxl_single_exit()
866 platform_device_unregister(cxl_mem_single[i]); in cxl_single_exit()
867 for (i = ARRAY_SIZE(cxl_swd_single) - 1; i >= 0; i--) in cxl_single_exit()
868 platform_device_unregister(cxl_swd_single[i]); in cxl_single_exit()
869 for (i = ARRAY_SIZE(cxl_swu_single) - 1; i >= 0; i--) in cxl_single_exit()
870 platform_device_unregister(cxl_swu_single[i]); in cxl_single_exit()
871 for (i = ARRAY_SIZE(cxl_root_single) - 1; i >= 0; i--) in cxl_single_exit()
872 platform_device_unregister(cxl_root_single[i]); in cxl_single_exit()
873 for (i = ARRAY_SIZE(cxl_hb_single) - 1; i >= 0; i--) { in cxl_single_exit()
874 struct platform_device *pdev = cxl_hb_single[i]; in cxl_single_exit()
879 platform_device_unregister(cxl_hb_single[i]); in cxl_single_exit()
885 int rc, i; in cxl_test_init() local
904 for (i = 0; i < ARRAY_SIZE(cxl_host_bridge); i++) { in cxl_test_init()
905 struct acpi_device *adev = &host_bridge[i]; in cxl_test_init()
908 pdev = platform_device_alloc("cxl_host_bridge", i); in cxl_test_init()
919 cxl_host_bridge[i] = pdev; in cxl_test_init()
926 for (i = 0; i < ARRAY_SIZE(cxl_root_port); i++) { in cxl_test_init()
928 cxl_host_bridge[i % ARRAY_SIZE(cxl_host_bridge)]; in cxl_test_init()
931 pdev = platform_device_alloc("cxl_root_port", i); in cxl_test_init()
941 cxl_root_port[i] = pdev; in cxl_test_init()
945 for (i = 0; i < ARRAY_SIZE(cxl_switch_uport); i++) { in cxl_test_init()
946 struct platform_device *root_port = cxl_root_port[i]; in cxl_test_init()
949 pdev = platform_device_alloc("cxl_switch_uport", i); in cxl_test_init()
959 cxl_switch_uport[i] = pdev; in cxl_test_init()
962 for (i = 0; i < ARRAY_SIZE(cxl_switch_dport); i++) { in cxl_test_init()
964 cxl_switch_uport[i % ARRAY_SIZE(cxl_switch_uport)]; in cxl_test_init()
967 pdev = platform_device_alloc("cxl_switch_dport", i); in cxl_test_init()
977 cxl_switch_dport[i] = pdev; in cxl_test_init()
980 for (i = 0; i < ARRAY_SIZE(cxl_mem); i++) { in cxl_test_init()
981 struct platform_device *dport = cxl_switch_dport[i]; in cxl_test_init()
984 pdev = platform_device_alloc("cxl_mem", i); in cxl_test_init()
988 set_dev_node(&pdev->dev, i % 2); in cxl_test_init()
995 cxl_mem[i] = pdev; in cxl_test_init()
1020 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_test_init()
1021 platform_device_unregister(cxl_mem[i]); in cxl_test_init()
1023 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_init()
1024 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_init()
1026 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_init()
1027 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_init()
1029 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_init()
1030 platform_device_unregister(cxl_root_port[i]); in cxl_test_init()
1032 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_init()
1033 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_init()
1038 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_init()
1051 int i; in cxl_test_exit() local
1055 for (i = ARRAY_SIZE(cxl_mem) - 1; i >= 0; i--) in cxl_test_exit()
1056 platform_device_unregister(cxl_mem[i]); in cxl_test_exit()
1057 for (i = ARRAY_SIZE(cxl_switch_dport) - 1; i >= 0; i--) in cxl_test_exit()
1058 platform_device_unregister(cxl_switch_dport[i]); in cxl_test_exit()
1059 for (i = ARRAY_SIZE(cxl_switch_uport) - 1; i >= 0; i--) in cxl_test_exit()
1060 platform_device_unregister(cxl_switch_uport[i]); in cxl_test_exit()
1061 for (i = ARRAY_SIZE(cxl_root_port) - 1; i >= 0; i--) in cxl_test_exit()
1062 platform_device_unregister(cxl_root_port[i]); in cxl_test_exit()
1063 for (i = ARRAY_SIZE(cxl_host_bridge) - 1; i >= 0; i--) { in cxl_test_exit()
1064 struct platform_device *pdev = cxl_host_bridge[i]; in cxl_test_exit()
1069 platform_device_unregister(cxl_host_bridge[i]); in cxl_test_exit()