x86/pci-dma: switch the VIA 32-bit DMA quirk to use the struct device flag

Instead of globally disabling > 32bit DMA using the arch_dma_supported
hook walk the PCI bus under the actually affected bridge and mark every
device with the dma_32bit_limit flag.  This also gets rid of the
arch_dma_supported hook entirely.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Christoph Hellwig
2018-05-28 12:47:57 +02:00
parent 098afd9817
commit 0ead51c3fb
3 changed files with 10 additions and 31 deletions

View File

@@ -30,9 +30,6 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
return dma_ops;
}
int arch_dma_supported(struct device *dev, u64 mask);
#define arch_dma_supported arch_dma_supported
bool arch_dma_alloc_attrs(struct device **dev);
#define arch_dma_alloc_attrs arch_dma_alloc_attrs