linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, tsbogend@alpha.franken.de,
	mpe@ellerman.id.au, paul.walmsley@sifive.com, palmer@dabbelt.com,
	robh+dt@kernel.org, hch@lst.de, m.szyprowski@samsung.com,
	robin.murphy@arm.com, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v2 4/5] riscv: Select ARCH_DMA_DEFAULT_COHERENT
Date: Thu, 23 Feb 2023 22:20:27 +0000	[thread overview]
Message-ID: <Y/fmqwboOv/JhWf/@spud> (raw)
In-Reply-To: <20230223113644.23356-5-jiaxun.yang@flygoat.com>

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

On Thu, Feb 23, 2023 at 11:36:43AM +0000, Jiaxun Yang wrote:
> For riscv our assumption is unless a device states it is non-coherent,
> we take it to be DMA coherent.
> 
> Select ARCH_DMA_DEFAULT_COHERENT to ensure dma_default_coherent
> is always initialized to true.
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>  arch/riscv/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 1d46a268ce16..b71ce992c0c0 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -233,6 +233,7 @@ config LOCKDEP_SUPPORT
>  
>  config RISCV_DMA_NONCOHERENT
>  	bool
> +	select ARCH_DMA_DEFAULT_COHERENT

Since we are always coherent by default, I feel like you should put this
in the main "config RISCV" section, where OF_DMA_DEFAULT_COHERENT
currently is, no?

Wouldn't bother respinning for that unless the dma folk have comments
for you.

>  	select ARCH_HAS_DMA_PREP_COHERENT
>  	select ARCH_HAS_SETUP_DMA_OPS
>  	select ARCH_HAS_SYNC_DMA_FOR_CPU
> -- 
> 2.37.1 (Apple Git-137.1)
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-02-23 22:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 11:36 [PATCH v2 0/5] Use dma_default_coherent for devicetree default coherency Jiaxun Yang
2023-02-23 11:36 ` [PATCH v2 1/5] of: address: Fix default coherency for MIPS Jiaxun Yang
2023-02-23 11:36 ` [PATCH v2 2/5] dma-mapping: Provide a fallback dma_default_coherent Jiaxun Yang
2023-03-01 13:03   ` Christoph Hellwig
2023-02-23 11:36 ` [PATCH v2 3/5] dma-mapping: Provide CONFIG_ARCH_DMA_DEFAULT_COHERENT Jiaxun Yang
2023-03-01 13:03   ` Christoph Hellwig
2023-02-23 11:36 ` [PATCH v2 4/5] riscv: Select ARCH_DMA_DEFAULT_COHERENT Jiaxun Yang
2023-02-23 22:20   ` Conor Dooley [this message]
2023-03-15  2:07     ` Palmer Dabbelt
2023-02-23 11:36 ` [PATCH v2 5/5] of: address: Always use dma_default_coherent for default coherency Jiaxun Yang
2023-03-01 13:06   ` Christoph Hellwig
2023-03-01 14:18     ` Jiaxun Yang
2023-03-03  0:11       ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y/fmqwboOv/JhWf/@spud \
    --to=conor@kernel.org \
    --cc=hch@lst.de \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mpe@ellerman.id.au \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).