1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 #include <linux/list.h> 4 #include <linux/acpi.h> 5 6 struct cxl_mock_ops { 7 struct list_head list; 8 bool (*is_mock_adev)(struct acpi_device *dev); 9 acpi_status (*acpi_get_table)(char *signature, u32 instance, 10 struct acpi_table_header **out_table); 11 void (*acpi_put_table)(struct acpi_table_header *table); 12 bool (*is_mock_bridge)(struct device *dev); 13 acpi_status (*acpi_evaluate_integer)(acpi_handle handle, 14 acpi_string pathname, 15 struct acpi_object_list *arguments, 16 unsigned long long *data); 17 struct acpi_pci_root *(*acpi_pci_find_root)(acpi_handle handle); 18 struct platform_device *(*mock_port)(struct pci_bus *bus, int index); 19 bool (*is_mock_bus)(struct pci_bus *bus); 20 bool (*is_mock_port)(struct platform_device *pdev); 21 bool (*is_mock_dev)(struct device *dev); 22 }; 23 24 void register_cxl_mock_ops(struct cxl_mock_ops *ops); 25 void unregister_cxl_mock_ops(struct cxl_mock_ops *ops); 26 struct cxl_mock_ops *get_cxl_mock_ops(int *index); 27 void put_cxl_mock_ops(int index); 28