mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-15 01:56:12 +07:00
e1c7e32453
Move the generic implementation to <linux/dma-mapping.h> now that all architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now that everyone supports them. [valentinrothberg@gmail.com: remove leftovers in Kconfig] Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Chris Metcalf <cmetcalf@ezchip.com> Cc: David Howells <dhowells@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Helge Deller <deller@gmx.de> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Mark Salter <msalter@redhat.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Steven Miao <realmz6@gmail.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: Joerg Roedel <jroedel@suse.de> Cc: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
41 lines
963 B
C
41 lines
963 B
C
#ifndef ___ASM_SPARC_DMA_MAPPING_H
|
|
#define ___ASM_SPARC_DMA_MAPPING_H
|
|
|
|
#include <linux/scatterlist.h>
|
|
#include <linux/mm.h>
|
|
#include <linux/dma-debug.h>
|
|
|
|
#define DMA_ERROR_CODE (~(dma_addr_t)0x0)
|
|
|
|
#define HAVE_ARCH_DMA_SUPPORTED 1
|
|
int dma_supported(struct device *dev, u64 mask);
|
|
|
|
static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
|
|
enum dma_data_direction dir)
|
|
{
|
|
/* Since dma_{alloc,free}_noncoherent() allocated coherent memory, this
|
|
* routine can be a nop.
|
|
*/
|
|
}
|
|
|
|
extern struct dma_map_ops *dma_ops;
|
|
extern struct dma_map_ops *leon_dma_ops;
|
|
extern struct dma_map_ops pci32_dma_ops;
|
|
|
|
extern struct bus_type pci_bus_type;
|
|
|
|
static inline struct dma_map_ops *get_dma_ops(struct device *dev)
|
|
{
|
|
#ifdef CONFIG_SPARC_LEON
|
|
if (sparc_cpu_model == sparc_leon)
|
|
return leon_dma_ops;
|
|
#endif
|
|
#if defined(CONFIG_SPARC32) && defined(CONFIG_PCI)
|
|
if (dev->bus == &pci_bus_type)
|
|
return &pci32_dma_ops;
|
|
#endif
|
|
return dma_ops;
|
|
}
|
|
|
|
#endif
|