Pull PCI updates from Bjorn Helgaas:
- detach driver before tearing down procfs/sysfs (Alex Williamson)
- disable PCIe services during shutdown (Sinan Kaya)
- fix ASPM oops on systems with no Root Ports (Ard Biesheuvel)
- fix ASPM LTR_L1.2_THRESHOLD programming (Bjorn Helgaas)
- fix ASPM Common_Mode_Restore_Time computation (Bjorn Helgaas)
- fix portdrv MSI/MSI-X vector allocation (Dongdong Liu, Bjorn
Helgaas)
- report non-fatal AER errors only to the affected endpoint (Gabriele
Paoloni)
- distribute bus numbers, MMIO, and I/O space among hotplug bridges to
allow more devices to be hot-added (Mika Westerberg)
- fix pciehp races during initialization and surprise link down (Mika
Westerberg)
- handle surprise-removed devices in PME handling (Qiang)
- support resizable BARs for large graphics devices (Christian König)
- expose SR-IOV offset, stride, and VF device ID via sysfs (Filippo
Sironi)
- create SR-IOV virtfn/physfn sysfs links before attaching driver
(Stuart Hayes)
- fix SR-IOV "ARI Capable Hierarchy" restore issue (Tony Nguyen)
- enforce Kconfig IOV/REALLOC dependency (Sascha El-Sharkawy)
- avoid slot reset if bridge itself is broken (Jan Glauber)
- clean up pci_reset_function() path (Jan H. Schönherr)
- make pci_map_rom() fail if the option ROM is invalid (Changbin Du)
- convert timers to timer_setup() (Kees Cook)
- move PCI_QUIRKS to PCI bus Kconfig menu (Randy Dunlap)
- constify pci_dev_type and intel_mid_pci_ops (Bhumika Goyal)
- remove unnecessary pci_dev, pci_bus, resource, pcibios_set_master()
declarations (Bjorn Helgaas)
- fix endpoint framework overflows and BUG()s (Dan Carpenter)
- fix endpoint framework issues (Kishon Vijay Abraham I)
- avoid broken Cavium CN8xxx bus reset behavior (David Daney)
- extend Cavium ACS capability quirks (Vadim Lomovtsev)
- support Synopsys DesignWare RC in ECAM mode (Ard Biesheuvel)
- turn off dra7xx clocks cleanly on shutdown (Keerthy)
- fix Faraday probe error path (Wei Yongjun)
- support HiSilicon STB SoC PCIe host controller (Jianguo Sun)
- fix Hyper-V interrupt affinity issue (Dexuan Cui)
- remove useless ACPI warning for Hyper-V pass-through devices (Vitaly
Kuznetsov)
- support multiple MSI on iProc (Sandor Bodo-Merle)
- support Layerscape LS1012a and LS1046a PCIe host controllers (Hou
Zhiqiang)
- fix Layerscape default error response (Minghuan Lian)
- support MSI on Tango host controller (Marc Gonzalez)
- support Tegra186 PCIe host controller (Manikanta Maddireddy)
- use generic accessors on Tegra when possible (Thierry Reding)
- support V3 Semiconductor PCI host controller (Linus Walleij)
* tag 'pci-v4.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (85 commits)
PCI/ASPM: Add L1 Substates definitions
PCI/ASPM: Reformat ASPM register definitions
PCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD
PCI/ASPM: Account for downstream device's Port Common_Mode_Restore_Time
PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe()
PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up()
PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up()
PCI: Fix kernel-doc build warning
PCI: Fail pci_map_rom() if the option ROM is invalid
PCI: Move pci_map_rom() error path
PCI: Move PCI_QUIRKS to the PCI bus menu
alpha/PCI: Make pdev_save_srm_config() static
PCI: Remove unused declarations
PCI: Remove redundant pci_dev, pci_bus, resource declarations
PCI: Remove redundant pcibios_set_master() declarations
PCI/PME: Handle invalid data when reading Root Status
PCI: hv: Use effective affinity mask
PCI: pciehp: Do not clear Presence Detect Changed during initialization
PCI: pciehp: Fix race condition handling surprise link down
PCI: Distribute available resources to hotplug-capable bridges
...
106 lines
2.9 KiB
C
106 lines
2.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ALPHA_PCI_H
|
|
#define __ALPHA_PCI_H
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#include <linux/spinlock.h>
|
|
#include <linux/dma-mapping.h>
|
|
#include <linux/scatterlist.h>
|
|
#include <asm/machvec.h>
|
|
|
|
/*
|
|
* The following structure is used to manage multiple PCI busses.
|
|
*/
|
|
|
|
struct pci_iommu_arena;
|
|
struct page;
|
|
|
|
/* A controller. Used to manage multiple PCI busses. */
|
|
|
|
struct pci_controller {
|
|
struct pci_controller *next;
|
|
struct pci_bus *bus;
|
|
struct resource *io_space;
|
|
struct resource *mem_space;
|
|
|
|
/* The following are for reporting to userland. The invariant is
|
|
that if we report a BWX-capable dense memory, we do not report
|
|
a sparse memory at all, even if it exists. */
|
|
unsigned long sparse_mem_base;
|
|
unsigned long dense_mem_base;
|
|
unsigned long sparse_io_base;
|
|
unsigned long dense_io_base;
|
|
|
|
/* This one's for the kernel only. It's in KSEG somewhere. */
|
|
unsigned long config_space_base;
|
|
|
|
unsigned int index;
|
|
/* For compatibility with current (as of July 2003) pciutils
|
|
and XFree86. Eventually will be removed. */
|
|
unsigned int need_domain_info;
|
|
|
|
struct pci_iommu_arena *sg_pci;
|
|
struct pci_iommu_arena *sg_isa;
|
|
|
|
void *sysdata;
|
|
};
|
|
|
|
/* Override the logic in pci_scan_bus for skipping already-configured
|
|
bus numbers. */
|
|
|
|
#define pcibios_assign_all_busses() 1
|
|
|
|
#define PCIBIOS_MIN_IO alpha_mv.min_io_address
|
|
#define PCIBIOS_MIN_MEM alpha_mv.min_mem_address
|
|
|
|
/* IOMMU controls. */
|
|
|
|
/* The PCI address space does not equal the physical memory address space.
|
|
The networking and block device layers use this boolean for bounce buffer
|
|
decisions. */
|
|
#define PCI_DMA_BUS_IS_PHYS 0
|
|
|
|
/* TODO: integrate with include/asm-generic/pci.h ? */
|
|
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
|
|
{
|
|
return channel ? 15 : 14;
|
|
}
|
|
|
|
#define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
|
|
|
|
static inline int pci_proc_domain(struct pci_bus *bus)
|
|
{
|
|
struct pci_controller *hose = bus->sysdata;
|
|
return hose->need_domain_info;
|
|
}
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
/* Values for the `which' argument to sys_pciconfig_iobase. */
|
|
#define IOBASE_HOSE 0
|
|
#define IOBASE_SPARSE_MEM 1
|
|
#define IOBASE_DENSE_MEM 2
|
|
#define IOBASE_SPARSE_IO 3
|
|
#define IOBASE_DENSE_IO 4
|
|
#define IOBASE_ROOT_BUS 5
|
|
#define IOBASE_FROM_HOSE 0x10000
|
|
|
|
extern struct pci_dev *isa_bridge;
|
|
|
|
extern int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val,
|
|
size_t count);
|
|
extern int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val,
|
|
size_t count);
|
|
extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
|
|
struct vm_area_struct *vma,
|
|
enum pci_mmap_state mmap_state);
|
|
extern void pci_adjust_legacy_attr(struct pci_bus *bus,
|
|
enum pci_mmap_state mmap_type);
|
|
#define HAVE_PCI_LEGACY 1
|
|
|
|
extern int pci_create_resource_files(struct pci_dev *dev);
|
|
extern void pci_remove_resource_files(struct pci_dev *dev);
|
|
|
|
#endif /* __ALPHA_PCI_H */
|