Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit ae626eb

Browse files
author
Christoph Hellwig
committed
ARM/dma-mapping: use dma-direct unconditionally
Use dma-direct unconditionally on arm. It has already been used for some time for LPAE and nommu configurations. This mostly changes the streaming mapping implementation and the (simple) coherent allocator for device that are DMA coherent. The existing complex allocator for uncached mappings for non-coherent devices is still used as is using the arch_dma_alloc/arch_dma_free hooks. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Acked-by: Andre Przywara <[email protected]> [highbank] Tested-by: Marc Zyngier <[email protected]>
1 parent af6f23b commit ae626eb

File tree

5 files changed

+19
-378
lines changed

5 files changed

+19
-378
lines changed

arch/arm/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ config ARM
1919
select ARCH_HAS_SET_MEMORY
2020
select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
2121
select ARCH_HAS_STRICT_MODULE_RWX if MMU
22-
select ARCH_HAS_SYNC_DMA_FOR_DEVICE if SWIOTLB || !MMU
23-
select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB || !MMU
22+
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
23+
select ARCH_HAS_SYNC_DMA_FOR_CPU
2424
select ARCH_HAS_TEARDOWN_DMA_OPS if MMU
2525
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
2626
select ARCH_HAVE_CUSTOM_GPIO_H

arch/arm/include/asm/dma-mapping.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

arch/arm/mach-highbank/highbank.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int highbank_platform_notifier(struct notifier_block *nb,
9898
if (of_property_read_bool(dev->of_node, "dma-coherent")) {
9999
val = readl(sregs_base + reg);
100100
writel(val | 0xff01, sregs_base + reg);
101-
set_dma_ops(dev, &arm_coherent_dma_ops);
101+
dev->dma_coherent = true;
102102
}
103103

104104
return NOTIFY_OK;

arch/arm/mach-mvebu/coherency.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int mvebu_hwcc_notifier(struct notifier_block *nb,
9898

9999
if (event != BUS_NOTIFY_ADD_DEVICE)
100100
return NOTIFY_DONE;
101-
set_dma_ops(dev, &arm_coherent_dma_ops);
101+
dev->dma_coherent = true;
102102

103103
return NOTIFY_OK;
104104
}

0 commit comments

Comments
 (0)