linux/arch/x86/pci/common.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *	Low-Level PCI Support for PC
 *
 *	(c) 1999--2000 Martin Mares <[email protected]>
 */

#include <linux/sched.h>
#include <linux/pci.h>
#include <linux/pci-acpi.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/dmi.h>
#include <linux/slab.h>

#include <asm/acpi.h>
#include <asm/segment.h>
#include <asm/io.h>
#include <asm/smp.h>
#include <asm/pci_x86.h>
#include <asm/setup.h>
#include <asm/irqdomain.h>

unsigned int pci_probe =;

static int pci_bf_sort;
int pci_routeirq;
int noioapicquirk;
#ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS
int noioapicreroute =;
#else
int noioapicreroute = 1;
#endif
int pcibios_last_bus =;
unsigned long pirq_table_addr;
const struct pci_raw_ops *__read_mostly raw_pci_ops;
const struct pci_raw_ops *__read_mostly raw_pci_ext_ops;

int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
						int reg, int len, u32 *val)
{}

int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn,
						int reg, int len, u32 val)
{}

static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value)
{}

static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value)
{}

struct pci_ops pci_root_ops =;

/*
 * This interrupt-safe spinlock protects all accesses to PCI configuration
 * space, except for the mmconfig (ECAM) based operations.
 */
DEFINE_RAW_SPINLOCK();

static int __init can_skip_ioresource_align(const struct dmi_system_id *d)
{}

static const struct dmi_system_id can_skip_pciprobe_dmi_table[] __initconst =;

void __init dmi_check_skip_isa_align(void)
{}

static void pcibios_fixup_device_resources(struct pci_dev *dev)
{}

/*
 *  Called after each bus is probed, but before its children
 *  are examined.
 */

void pcibios_fixup_bus(struct pci_bus *b)
{}

void pcibios_add_bus(struct pci_bus *bus)
{}

void pcibios_remove_bus(struct pci_bus *bus)
{}

/*
 * Only use DMI information to set this if nothing was passed
 * on the kernel command line (which was parsed earlier).
 */

static int __init set_bf_sort(const struct dmi_system_id *d)
{}

static void __init read_dmi_type_b1(const struct dmi_header *dm,
				    void *private_data)
{}

static int __init find_sort_method(const struct dmi_system_id *d)
{}

/*
 * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus)
 */
#ifdef __i386__
static int __init assign_all_busses(const struct dmi_system_id *d)
{
	pci_probe |= PCI_ASSIGN_ALL_BUSSES;
	printk(KERN_INFO "%s detected: enabling PCI bus# renumbering"
			" (pci=assign-busses)\n", d->ident);
	return 0;
}
#endif

static int __init set_scan_all(const struct dmi_system_id *d)
{}

static const struct dmi_system_id pciprobe_dmi_table[] __initconst =;

void __init dmi_check_pciprobe(void)
{}

void pcibios_scan_root(int busnum)
{}

void __init pcibios_set_cache_line_size(void)
{}

int __init pcibios_init(void)
{}

char *__init pcibios_setup(char *str)
{}

unsigned int pcibios_assign_all_busses(void)
{}

static void set_dev_domain_options(struct pci_dev *pdev)
{}

int pcibios_device_add(struct pci_dev *dev)
{}

int pcibios_enable_device(struct pci_dev *dev, int mask)
{}

void pcibios_disable_device (struct pci_dev *dev)
{}

#ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
void pcibios_release_device(struct pci_dev *dev)
{}
#endif

int pci_ext_cfg_avail(void)
{}

#if IS_ENABLED(CONFIG_VMD)
struct pci_dev *pci_real_dma_dev(struct pci_dev *dev)
{}
#endif