History

driver core: lift dma_default_coherent into common code

Lift the dma_default_coherent variable from the mips architecture code to the driver core. This allows an architecture to sdefault all device to be DMA coherent at run time, even if the kernel is build with support for DMA noncoherent device. By allowing device_initialize to set the ->dma_coherent field to this default the amount of arch hooks required for this behavior can be greatly reduced.

Christoph Hellwig committed 5 years ago

Commit 6d4e9a81 parent 14ac09a13 files · +14 −39Browse files

Showing the changes to kernel (2 of 13 files). Show all

Unified · Split

2 files
  1. kernel/dma/Kconfig +0 −3
  2. kernel/dma/mapping.c +2 −0
kernel/dma/Kconfig+0−3
@@ -33,9 +33,6 @@ config NEED_DMA_MAP_STATE · 32 unmodified lines
3333 config ARCH_DMA_ADDR_T_64BIT
3434 def_bool 64BIT || PHYS_ADDR_T_64BIT
3535
36−config ARCH_HAS_DMA_COHERENCE_H
37− bool
38−
3936 config ARCH_HAS_DMA_SET_MASK
4037 bool
4138
kernel/dma/mapping.c+2−0
@@ -16,6 +16,8 @@ · 15 unmodified lines
1616 #include "debug.h"
1717 #include "direct.h"
1818
19+bool dma_default_coherent;
20+
1921 /*
2022 * Managed DMA API
2123 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t