#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/pci.h>
#include <linux/pci-acpi.h>
#include <linux/dmar.h>
#include <linux/acpi.h>
#include <linux/slab.h>
#include <linux/dmi.h>
#include <linux/platform_data/x86/apple.h>
#include "internal.h"
#define ACPI_PCI_ROOT_CLASS …
#define ACPI_PCI_ROOT_DEVICE_NAME …
static int acpi_pci_root_add(struct acpi_device *device,
const struct acpi_device_id *not_used);
static void acpi_pci_root_remove(struct acpi_device *device);
static int acpi_pci_root_scan_dependent(struct acpi_device *adev)
{ … }
#define ACPI_PCIE_REQ_SUPPORT …
static const struct acpi_device_id root_device_ids[] = …;
static struct acpi_scan_handler pci_root_handler = …;
int acpi_is_root_bridge(acpi_handle handle)
{ … }
EXPORT_SYMBOL_GPL(…);
static acpi_status
get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
{ … }
static acpi_status try_get_root_bridge_busnr(acpi_handle handle,
struct resource *res)
{ … }
struct pci_osc_bit_struct { … };
static struct pci_osc_bit_struct pci_osc_support_bit[] = …;
static struct pci_osc_bit_struct pci_osc_control_bit[] = …;
static struct pci_osc_bit_struct cxl_osc_support_bit[] = …;
static struct pci_osc_bit_struct cxl_osc_control_bit[] = …;
static void decode_osc_bits(struct acpi_pci_root *root, char *msg, u32 word,
struct pci_osc_bit_struct *table, int size)
{ … }
static void decode_osc_support(struct acpi_pci_root *root, char *msg, u32 word)
{ … }
static void decode_osc_control(struct acpi_pci_root *root, char *msg, u32 word)
{ … }
static void decode_cxl_osc_support(struct acpi_pci_root *root, char *msg, u32 word)
{ … }
static void decode_cxl_osc_control(struct acpi_pci_root *root, char *msg, u32 word)
{ … }
static inline bool is_pcie(struct acpi_pci_root *root)
{ … }
static inline bool is_cxl(struct acpi_pci_root *root)
{ … }
static u8 pci_osc_uuid_str[] = …;
static u8 cxl_osc_uuid_str[] = …;
static char *to_uuid(struct acpi_pci_root *root)
{ … }
static int cap_length(struct acpi_pci_root *root)
{ … }
static acpi_status acpi_pci_run_osc(struct acpi_pci_root *root,
const u32 *capbuf, u32 *pci_control,
u32 *cxl_control)
{ … }
static acpi_status acpi_pci_query_osc(struct acpi_pci_root *root, u32 support,
u32 *control, u32 cxl_support,
u32 *cxl_control)
{ … }
struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle)
{ … }
EXPORT_SYMBOL_GPL(…);
struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
{ … }
EXPORT_SYMBOL_GPL(…);
static acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask,
u32 support, u32 *cxl_mask,
u32 cxl_support)
{ … }
static u32 calculate_support(void)
{ … }
static u32 calculate_cxl_support(void)
{ … }
static u32 calculate_control(void)
{ … }
static u32 calculate_cxl_control(void)
{ … }
static bool os_control_query_checks(struct acpi_pci_root *root, u32 support)
{ … }
static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
{ … }
static int acpi_pci_root_add(struct acpi_device *device,
const struct acpi_device_id *not_used)
{ … }
static void acpi_pci_root_remove(struct acpi_device *device)
{ … }
static void acpi_pci_root_validate_resources(struct device *dev,
struct list_head *resources,
unsigned long type)
{ … }
static void acpi_pci_root_remap_iospace(struct fwnode_handle *fwnode,
struct resource_entry *entry)
{ … }
int acpi_pci_probe_root_resources(struct acpi_pci_root_info *info)
{ … }
static void pci_acpi_root_add_resources(struct acpi_pci_root_info *info)
{ … }
static void __acpi_pci_root_release_info(struct acpi_pci_root_info *info)
{ … }
static void acpi_pci_root_release_info(struct pci_host_bridge *bridge)
{ … }
struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
struct acpi_pci_root_ops *ops,
struct acpi_pci_root_info *info,
void *sysdata)
{ … }
void __init acpi_pci_root_init(void)
{ … }