blob: bb1654fe0ce74cd75a28d9c671e00fe98e83c230 [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/*
Mauro Carvalho Chehab985098a2020-06-23 09:09:10 +02006 * IOMMU interface. See Documentation/core-api/dma-api-howto.rst and
7 * Documentation/core-api/dma-api.rst for documentation.
Glauber Costa6f536632008-03-25 18:36:20 -03008 */
9
10#include <linux/scatterlist.h>
11#include <asm/io.h>
12#include <asm/swiotlb.h>
13
Glauber Costab7107a32008-03-25 18:36:39 -030014extern int iommu_merge;
Glauber Costab7107a32008-03-25 18:36:39 -030015extern int panic_on_overflow;
Glauber Costa7c183412008-03-25 18:36:36 -030016
Bart Van Assche52997092017-01-20 13:04:01 -080017extern const struct dma_map_ops *dma_ops;
Glauber Costa6f536632008-03-25 18:36:20 -030018
Bart Van Assche815dd182017-01-20 13:04:04 -080019static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
Glauber Costac786df02008-03-25 18:36:37 -030020{
FUJITA Tomonori8d8bb392008-07-25 19:44:49 -070021 return dma_ops;
FUJITA Tomonori8d8bb392008-07-25 19:44:49 -070022}
23
Glauber Costa6f536632008-03-25 18:36:20 -030024#endif