blob: 6b15a24930e0abf92d69519b3ac39e6593ccadb6 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
H. Peter Anvin1965aae2008-10-22 22:26:29 -07002#ifndef _ASM_X86_DMA_MAPPING_H
3#define _ASM_X86_DMA_MAPPING_H
Glauber Costa6f536632008-03-25 18:36:20 -03004
5/*
Paul Bolle395cf962011-08-15 02:02:26 +02006 * IOMMU interface. See Documentation/DMA-API-HOWTO.txt and
Randy Dunlap5872fb92009-01-29 16:28:02 -08007 * Documentation/DMA-API.txt for documentation.
Glauber Costa6f536632008-03-25 18:36:20 -03008 */
9
10#include <linux/scatterlist.h>
Joerg Roedel2118d0c2009-01-09 15:13:15 +010011#include <linux/dma-debug.h>
Glauber Costa6f536632008-03-25 18:36:20 -030012#include <asm/io.h>
13#include <asm/swiotlb.h>
Marek Szyprowski0a2b9a62011-12-29 13:09:51 +010014#include <linux/dma-contiguous.h>
Glauber Costa6f536632008-03-25 18:36:20 -030015
Glauber Costab7107a32008-03-25 18:36:39 -030016extern int iommu_merge;
Glauber Costab7107a32008-03-25 18:36:39 -030017extern int panic_on_overflow;
Glauber Costa7c183412008-03-25 18:36:36 -030018
Bart Van Assche52997092017-01-20 13:04:01 -080019extern const struct dma_map_ops *dma_ops;
Glauber Costa6f536632008-03-25 18:36:20 -030020
Bart Van Assche815dd182017-01-20 13:04:04 -080021static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
Glauber Costac786df02008-03-25 18:36:37 -030022{
FUJITA Tomonori8d8bb392008-07-25 19:44:49 -070023 return dma_ops;
FUJITA Tomonori8d8bb392008-07-25 19:44:49 -070024}
25
Glauber Costa6f536632008-03-25 18:36:20 -030026#endif