mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 06:26:43 +07:00
0195c00244
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIVAwUAT3NKzROxKuMESys7AQKElw/+JyDxJSlj+g+nymkx8IVVuU8CsEwNLgRk 8KEnRfLhGtkXFLSJYWO6jzGo16F8Uqli1PdMFte/wagSv0285/HZaKlkkBVHdJ/m u40oSjgT013bBh6MQ0Oaf8pFezFUiQB5zPOA9QGaLVGDLXCmgqUgd7exaD5wRIwB ZmyItjZeAVnDfk1R+ZiNYytHAi8A5wSB+eFDCIQYgyulA1Igd1UnRtx+dRKbvc/m rWQ6KWbZHIdvP1ksd8wHHkrlUD2pEeJ8glJLsZUhMm/5oMf/8RmOCvmo8rvE/qwl eDQ1h4cGYlfjobxXZMHqAN9m7Jg2bI946HZjdb7/7oCeO6VW3FwPZ/Ic75p+wp45 HXJTItufERYk6QxShiOKvA+QexnYwY0IT5oRP4DrhdVB/X9cl2MoaZHC+RbYLQy+ /5VNZKi38iK4F9AbFamS7kd0i5QszA/ZzEzKZ6VMuOp3W/fagpn4ZJT1LIA3m4A9 Q0cj24mqeyCfjysu0TMbPtaN+Yjeu1o1OFRvM8XffbZsp5bNzuTDEvviJ2NXw4vK 4qUHulhYSEWcu9YgAZXvEWDEM78FXCkg2v/CrZXH5tyc95kUkMPcgG+QZBB5wElR FaOKpiC/BuNIGEf02IZQ4nfDxE90QwnDeoYeV+FvNj9UEOopJ5z5bMPoTHxm4cCD NypQthI85pc= =G9mT -----END PGP SIGNATURE----- Merge tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system Pull "Disintegrate and delete asm/system.h" from David Howells: "Here are a bunch of patches to disintegrate asm/system.h into a set of separate bits to relieve the problem of circular inclusion dependencies. I've built all the working defconfigs from all the arches that I can and made sure that they don't break. The reason for these patches is that I recently encountered a circular dependency problem that came about when I produced some patches to optimise get_order() by rewriting it to use ilog2(). This uses bitops - and on the SH arch asm/bitops.h drags in asm-generic/get_order.h by a circuituous route involving asm/system.h. The main difficulty seems to be asm/system.h. It holds a number of low level bits with no/few dependencies that are commonly used (eg. memory barriers) and a number of bits with more dependencies that aren't used in many places (eg. switch_to()). These patches break asm/system.h up into the following core pieces: (1) asm/barrier.h Move memory barriers here. This already done for MIPS and Alpha. (2) asm/switch_to.h Move switch_to() and related stuff here. (3) asm/exec.h Move arch_align_stack() here. Other process execution related bits could perhaps go here from asm/processor.h. (4) asm/cmpxchg.h Move xchg() and cmpxchg() here as they're full word atomic ops and frequently used by atomic_xchg() and atomic_cmpxchg(). (5) asm/bug.h Move die() and related bits. (6) asm/auxvec.h Move AT_VECTOR_SIZE_ARCH here. Other arch headers are created as needed on a per-arch basis." Fixed up some conflicts from other header file cleanups and moving code around that has happened in the meantime, so David's testing is somewhat weakened by that. We'll find out anything that got broken and fix it.. * tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits) Delete all instances of asm/system.h Remove all #inclusions of asm/system.h Add #includes needed to permit the removal of asm/system.h Move all declarations of free_initmem() to linux/mm.h Disintegrate asm/system.h for OpenRISC Split arch_align_stack() out from asm-generic/system.h Split the switch_to() wrapper out of asm-generic/system.h Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h Create asm-generic/barrier.h Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h Disintegrate asm/system.h for Xtensa Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] Disintegrate asm/system.h for Tile Disintegrate asm/system.h for Sparc Disintegrate asm/system.h for SH Disintegrate asm/system.h for Score Disintegrate asm/system.h for S390 Disintegrate asm/system.h for PowerPC Disintegrate asm/system.h for PA-RISC Disintegrate asm/system.h for MN10300 ...
142 lines
3.8 KiB
C
142 lines
3.8 KiB
C
#ifndef _ASM_IA64_PCI_H
|
|
#define _ASM_IA64_PCI_H
|
|
|
|
#include <linux/mm.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/spinlock.h>
|
|
#include <linux/string.h>
|
|
#include <linux/types.h>
|
|
|
|
#include <asm/io.h>
|
|
#include <asm/scatterlist.h>
|
|
#include <asm/hw_irq.h>
|
|
|
|
struct pci_vector_struct {
|
|
__u16 segment; /* PCI Segment number */
|
|
__u16 bus; /* PCI Bus number */
|
|
__u32 pci_id; /* ACPI split 16 bits device, 16 bits function (see section 6.1.1) */
|
|
__u8 pin; /* PCI PIN (0 = A, 1 = B, 2 = C, 3 = D) */
|
|
__u32 irq; /* IRQ assigned */
|
|
};
|
|
|
|
/*
|
|
* Can be used to override the logic in pci_scan_bus for skipping already-configured bus
|
|
* numbers - to be used for buggy BIOSes or architectures with incomplete PCI setup by the
|
|
* loader.
|
|
*/
|
|
#define pcibios_assign_all_busses() 0
|
|
|
|
#define PCIBIOS_MIN_IO 0x1000
|
|
#define PCIBIOS_MIN_MEM 0x10000000
|
|
|
|
void pcibios_config_init(void);
|
|
|
|
struct pci_dev;
|
|
|
|
/*
|
|
* PCI_DMA_BUS_IS_PHYS should be set to 1 if there is _necessarily_ a direct
|
|
* correspondence between device bus addresses and CPU physical addresses.
|
|
* Platforms with a hardware I/O MMU _must_ turn this off to suppress the
|
|
* bounce buffer handling code in the block and network device layers.
|
|
* Platforms with separate bus address spaces _must_ turn this off and provide
|
|
* a device DMA mapping implementation that takes care of the necessary
|
|
* address translation.
|
|
*
|
|
* For now, the ia64 platforms which may have separate/multiple bus address
|
|
* spaces all have I/O MMUs which support the merging of physically
|
|
* discontiguous buffers, so we can use that as the sole factor to determine
|
|
* the setting of PCI_DMA_BUS_IS_PHYS.
|
|
*/
|
|
extern unsigned long ia64_max_iommu_merge_mask;
|
|
#define PCI_DMA_BUS_IS_PHYS (ia64_max_iommu_merge_mask == ~0UL)
|
|
|
|
static inline void
|
|
pcibios_penalize_isa_irq (int irq, int active)
|
|
{
|
|
/* We don't do dynamic PCI IRQ allocation */
|
|
}
|
|
|
|
#include <asm-generic/pci-dma-compat.h>
|
|
|
|
#ifdef CONFIG_PCI
|
|
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
|
|
enum pci_dma_burst_strategy *strat,
|
|
unsigned long *strategy_parameter)
|
|
{
|
|
unsigned long cacheline_size;
|
|
u8 byte;
|
|
|
|
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
|
|
if (byte == 0)
|
|
cacheline_size = 1024;
|
|
else
|
|
cacheline_size = (int) byte * 4;
|
|
|
|
*strat = PCI_DMA_BURST_MULTIPLE;
|
|
*strategy_parameter = cacheline_size;
|
|
}
|
|
#endif
|
|
|
|
#define HAVE_PCI_MMAP
|
|
extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
|
|
enum pci_mmap_state mmap_state, int write_combine);
|
|
#define HAVE_PCI_LEGACY
|
|
extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
|
|
struct vm_area_struct *vma,
|
|
enum pci_mmap_state mmap_state);
|
|
|
|
#define pci_get_legacy_mem platform_pci_get_legacy_mem
|
|
#define pci_legacy_read platform_pci_legacy_read
|
|
#define pci_legacy_write platform_pci_legacy_write
|
|
|
|
struct pci_window {
|
|
struct resource resource;
|
|
u64 offset;
|
|
};
|
|
|
|
struct pci_controller {
|
|
void *acpi_handle;
|
|
void *iommu;
|
|
int segment;
|
|
int node; /* nearest node with memory or -1 for global allocation */
|
|
|
|
unsigned int windows;
|
|
struct pci_window *window;
|
|
|
|
void *platform_data;
|
|
};
|
|
|
|
#define PCI_CONTROLLER(busdev) ((struct pci_controller *) busdev->sysdata)
|
|
#define pci_domain_nr(busdev) (PCI_CONTROLLER(busdev)->segment)
|
|
|
|
extern struct pci_ops pci_root_ops;
|
|
|
|
static inline int pci_proc_domain(struct pci_bus *bus)
|
|
{
|
|
return (pci_domain_nr(bus) != 0);
|
|
}
|
|
|
|
static inline struct resource *
|
|
pcibios_select_root(struct pci_dev *pdev, struct resource *res)
|
|
{
|
|
struct resource *root = NULL;
|
|
|
|
if (res->flags & IORESOURCE_IO)
|
|
root = &ioport_resource;
|
|
if (res->flags & IORESOURCE_MEM)
|
|
root = &iomem_resource;
|
|
|
|
return root;
|
|
}
|
|
|
|
#define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
|
|
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
|
|
{
|
|
return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14);
|
|
}
|
|
|
|
#ifdef CONFIG_INTEL_IOMMU
|
|
extern void pci_iommu_alloc(void);
|
|
#endif
|
|
#endif /* _ASM_IA64_PCI_H */
|