Commit f728ed91 authored by Juxin Gao's avatar Juxin Gao Committed by Hongchen Zhang
Browse files

LoongArch: Add swiotlb backups buffer

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I7AHL9



--------------------------------

Change-Id: I1b627be7ca7bd3690a175b3334c088e445278504
Signed-off-by: default avatarJuxin Gao <gaojuxin@loongson.cn>
Signed-off-by: default avatarHongchen Zhang <zhanghongchen@loongson.cn>
parent c9c2b924
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2020 Loongson Technology Corporation Limited
 */
#ifndef _ASM_DMA_MAPPING_H
#define _ASM_DMA_MAPPING_H

extern const struct dma_map_ops loongson_dma_ops;
extern bool swiotlb_need_fix;
extern phys_addr_t io_tlb_start;

static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
{
	if (swiotlb_need_fix)
		return &loongson_dma_ops;
	else
		return NULL;
}

#endif /* _ASM_DMA_MAPPING_H */
+864 −0

File changed.

Preview size limit exceeded, changes collapsed.