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.
Showing the changes to kernel (2 of 13 files). Show all
Unified · Split
| @@ -33,9 +33,6 @@ config NEED_DMA_MAP_STATE · 32 unmodified lines | |||
| 33 | config ARCH_DMA_ADDR_T_64BIT | 33 | config ARCH_DMA_ADDR_T_64BIT |
| 34 | def_bool 64BIT || PHYS_ADDR_T_64BIT | 34 | def_bool 64BIT || PHYS_ADDR_T_64BIT |
| 35 | 35 | ||
| 36 | config ARCH_HAS_DMA_COHERENCE_H | ||
| 37 | bool | ||
| 38 | |||
| 39 | config ARCH_HAS_DMA_SET_MASK | 36 | config ARCH_HAS_DMA_SET_MASK |
| 40 | bool | 37 | bool |
| 41 | 38 | ||
| @@ -16,6 +16,8 @@ · 15 unmodified lines | |||
| 16 | #include "debug.h" | 16 | #include "debug.h" |
| 17 | #include "direct.h" | 17 | #include "direct.h" |
| 18 | 18 | ||
| 19 | bool dma_default_coherent; | ||
| 20 | |||
| 19 | /* | 21 | /* |
| 20 | * Managed DMA API | 22 | * Managed DMA API |
| 21 | */ | 23 | */ |