mbox series

[v4,0/3] Use dma_default_coherent for devicetree default coherency

Message ID 20230401091531.47412-1-jiaxun.yang@flygoat.com (mailing list archive)
Headers show
Series Use dma_default_coherent for devicetree default coherency | expand

Message

Jiaxun Yang April 1, 2023, 9:15 a.m. UTC
Hi all,

This series split out second half of my previous series
"[PATCH 0/4] MIPS DMA coherence fixes".

It intends to use dma_default_coherent to determine the default coherency of
devicetree probed devices instead of hardcoding it with Kconfig options.

For some MIPS systems, dma_default_coherent is determined with either
bootloader or hardware registers in platform initilization code, and devicetree
does not explicility specify the coherency of the device, so we need the ability
to change the default coherency of devicetree probed devices.

For other platforms that supports noncoherent, dma_default_coherent is a fixed
value set by arch code. It's defaulted to false for most archs except RISC-V
and powerpc in some cases.

Thanks
- Jiaxun
---
v2:
  - Add PATCH 1 to help with backporting
  - Use Kconfig option to set dma_default_coherent 

v3:
  - Style fixes
  - Squash setting ARCH_DMA_DEFAULT_COHERENT into PATCH 4
  - Setting ARCH_DMA_DEFAULT_COHERENT for PowerPC

v4:
  - Drop first patch

Jiaxun Yang (3):
  dma-mapping: Provide a fallback dma_default_coherent
  dma-mapping: Provide CONFIG_ARCH_DMA_DEFAULT_COHERENT
  of: address: Always use dma_default_coherent for default coherency

 arch/powerpc/Kconfig        | 2 +-
 arch/riscv/Kconfig          | 2 +-
 drivers/of/Kconfig          | 4 ----
 drivers/of/address.c        | 2 +-
 include/linux/dma-map-ops.h | 2 ++
 kernel/dma/Kconfig          | 7 +++++++
 kernel/dma/mapping.c        | 6 +++++-
 7 files changed, 17 insertions(+), 8 deletions(-)

Comments

Jiaxun Yang April 6, 2023, 7:12 a.m. UTC | #1
> 2023年4月1日 10:15,Jiaxun Yang <jiaxun.yang@flygoat.com> 写道:
> 
> Hi all,
> 
> This series split out second half of my previous series
> "[PATCH 0/4] MIPS DMA coherence fixes".
> 
> It intends to use dma_default_coherent to determine the default coherency of
> devicetree probed devices instead of hardcoding it with Kconfig options.
> 
> For some MIPS systems, dma_default_coherent is determined with either
> bootloader or hardware registers in platform initilization code, and devicetree
> does not explicility specify the coherency of the device, so we need the ability
> to change the default coherency of devicetree probed devices.
> 
> For other platforms that supports noncoherent, dma_default_coherent is a fixed
> value set by arch code. It's defaulted to false for most archs except RISC-V
> and powerpc in some cases.

Ping.

Is there any issue remain in this series?

Thanks
Jiaxun

> 
> Thanks
> - Jiaxun
> ---
> v2:
>  - Add PATCH 1 to help with backporting
>  - Use Kconfig option to set dma_default_coherent 
> 
> v3:
>  - Style fixes
>  - Squash setting ARCH_DMA_DEFAULT_COHERENT into PATCH 4
>  - Setting ARCH_DMA_DEFAULT_COHERENT for PowerPC
> 
> v4:
>  - Drop first patch
> 
> Jiaxun Yang (3):
>  dma-mapping: Provide a fallback dma_default_coherent
>  dma-mapping: Provide CONFIG_ARCH_DMA_DEFAULT_COHERENT
>  of: address: Always use dma_default_coherent for default coherency
> 
> arch/powerpc/Kconfig        | 2 +-
> arch/riscv/Kconfig          | 2 +-
> drivers/of/Kconfig          | 4 ----
> drivers/of/address.c        | 2 +-
> include/linux/dma-map-ops.h | 2 ++
> kernel/dma/Kconfig          | 7 +++++++
> kernel/dma/mapping.c        | 6 +++++-
> 7 files changed, 17 insertions(+), 8 deletions(-)
> 
> -- 
> 2.39.2 (Apple Git-143)
>
Christoph Hellwig April 7, 2023, 5:39 a.m. UTC | #2
Thanks,

applied to the dma-mapping tree for 6.4.