mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 02:01:29 +00:00
67796bf7dc
Impact: unification of pci-dma macros and pci_32.h removal This patch unifies the definition of the pci_unmap_addr*, pci_unmap_len* and DECLARE_PCI_UNMAP* macros. This makes sense because the pci_unmap functions are no longer no-ops anymore when the kernel runs with CONFIG_DMA_API_DEBUG. Without an iommu or DMA_API_DEBUG it is a no-op on 32 bit because the dma mapping path returns a physical address and therefore the dma-api implementation has no internal state which needs to be destroyed with an unmap call. This unification also simplifies the port of x86_64 iommu drivers to 32 bit x86 and let us get rid of pci_32.h. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com>
30 lines
687 B
C
30 lines
687 B
C
#ifndef _ASM_X86_PCI_64_H
|
|
#define _ASM_X86_PCI_64_H
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#ifdef CONFIG_CALGARY_IOMMU
|
|
static inline void *pci_iommu(struct pci_bus *bus)
|
|
{
|
|
struct pci_sysdata *sd = bus->sysdata;
|
|
return sd->iommu;
|
|
}
|
|
|
|
static inline void set_pci_iommu(struct pci_bus *bus, void *val)
|
|
{
|
|
struct pci_sysdata *sd = bus->sysdata;
|
|
sd->iommu = val;
|
|
}
|
|
#endif /* CONFIG_CALGARY_IOMMU */
|
|
|
|
extern int (*pci_config_read)(int seg, int bus, int dev, int fn,
|
|
int reg, int len, u32 *value);
|
|
extern int (*pci_config_write)(int seg, int bus, int dev, int fn,
|
|
int reg, int len, u32 value);
|
|
|
|
extern void dma32_reserve_bootmem(void);
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
#endif /* _ASM_X86_PCI_64_H */
|