All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@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,
	hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH v3 1/4] of: address: Fix default coherency for MIPS
Date: Tue, 28 Mar 2023 09:15:20 -0500	[thread overview]
Message-ID: <CAL_JsqKxJ-u4owKhY1tSiDyBo0=92iQoJM0G6TAZ7BSNpJAZAw@mail.gmail.com> (raw)
In-Reply-To: <20230321110813.26808-2-jiaxun.yang@flygoat.com>

On Tue, Mar 21, 2023 at 6:08 AM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
>
> DT-based MIPS doesn't use OF_DMA_DEFAULT_COHERENT, but
> might override the system-wide default at runtime.
>
> Use dma_default_coherent to override default coherence for
> MIPS.
>

I assume you want this tagged for stable? Otherwise, I don't
understand why you add this here and then remove in patch 4.

> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>  drivers/of/address.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/of/address.c b/drivers/of/address.c
> index 4c0b169ef9bf..c105d66a1fa4 100644
> --- a/drivers/of/address.c
> +++ b/drivers/of/address.c
> @@ -1105,6 +1105,14 @@ bool of_dma_is_coherent(struct device_node *np)
>         struct device_node *node;
>         bool is_coherent = IS_ENABLED(CONFIG_OF_DMA_DEFAULT_COHERENT);
>
> +       /*
> +        * DT-based MIPS doesn't use OF_DMA_DEFAULT_COHERENT, but
> +        * might override the system-wide default at runtime.
> +        */
> +#if defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT)
> +       is_coherent = dma_default_coherent;
> +#endif
> +
>         node = of_node_get(np);
>
>         while (node) {
> --
> 2.37.1 (Apple Git-137.1)
>

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh+dt@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, hch@lst.de,  m.szyprowski@samsung.com,
	robin.murphy@arm.com,  linux-riscv@lists.infradead.org
Subject: Re: [PATCH v3 1/4] of: address: Fix default coherency for MIPS
Date: Tue, 28 Mar 2023 09:15:20 -0500	[thread overview]
Message-ID: <CAL_JsqKxJ-u4owKhY1tSiDyBo0=92iQoJM0G6TAZ7BSNpJAZAw@mail.gmail.com> (raw)
In-Reply-To: <20230321110813.26808-2-jiaxun.yang@flygoat.com>

On Tue, Mar 21, 2023 at 6:08 AM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
>
> DT-based MIPS doesn't use OF_DMA_DEFAULT_COHERENT, but
> might override the system-wide default at runtime.
>
> Use dma_default_coherent to override default coherence for
> MIPS.
>

I assume you want this tagged for stable? Otherwise, I don't
understand why you add this here and then remove in patch 4.

> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>  drivers/of/address.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/of/address.c b/drivers/of/address.c
> index 4c0b169ef9bf..c105d66a1fa4 100644
> --- a/drivers/of/address.c
> +++ b/drivers/of/address.c
> @@ -1105,6 +1105,14 @@ bool of_dma_is_coherent(struct device_node *np)
>         struct device_node *node;
>         bool is_coherent = IS_ENABLED(CONFIG_OF_DMA_DEFAULT_COHERENT);
>
> +       /*
> +        * DT-based MIPS doesn't use OF_DMA_DEFAULT_COHERENT, but
> +        * might override the system-wide default at runtime.
> +        */
> +#if defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT)
> +       is_coherent = dma_default_coherent;
> +#endif
> +
>         node = of_node_get(np);
>
>         while (node) {
> --
> 2.37.1 (Apple Git-137.1)
>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh+dt@kernel.org>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: tsbogend@alpha.franken.de, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org, palmer@dabbelt.com,
	paul.walmsley@sifive.com, robin.murphy@arm.com,
	linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org,
	hch@lst.de, m.szyprowski@samsung.com
Subject: Re: [PATCH v3 1/4] of: address: Fix default coherency for MIPS
Date: Tue, 28 Mar 2023 09:15:20 -0500	[thread overview]
Message-ID: <CAL_JsqKxJ-u4owKhY1tSiDyBo0=92iQoJM0G6TAZ7BSNpJAZAw@mail.gmail.com> (raw)
In-Reply-To: <20230321110813.26808-2-jiaxun.yang@flygoat.com>

On Tue, Mar 21, 2023 at 6:08 AM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
>
> DT-based MIPS doesn't use OF_DMA_DEFAULT_COHERENT, but
> might override the system-wide default at runtime.
>
> Use dma_default_coherent to override default coherence for
> MIPS.
>

I assume you want this tagged for stable? Otherwise, I don't
understand why you add this here and then remove in patch 4.

> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>  drivers/of/address.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/of/address.c b/drivers/of/address.c
> index 4c0b169ef9bf..c105d66a1fa4 100644
> --- a/drivers/of/address.c
> +++ b/drivers/of/address.c
> @@ -1105,6 +1105,14 @@ bool of_dma_is_coherent(struct device_node *np)
>         struct device_node *node;
>         bool is_coherent = IS_ENABLED(CONFIG_OF_DMA_DEFAULT_COHERENT);
>
> +       /*
> +        * DT-based MIPS doesn't use OF_DMA_DEFAULT_COHERENT, but
> +        * might override the system-wide default at runtime.
> +        */
> +#if defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT)
> +       is_coherent = dma_default_coherent;
> +#endif
> +
>         node = of_node_get(np);
>
>         while (node) {
> --
> 2.37.1 (Apple Git-137.1)
>

  reply	other threads:[~2023-03-28 14:16 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 11:08 [PATCH v3 0/4] Use dma_default_coherent for devicetree default coherency Jiaxun Yang
2023-03-21 11:08 ` Jiaxun Yang
2023-03-21 11:08 ` Jiaxun Yang
2023-03-21 11:08 ` [PATCH v3 1/4] of: address: Fix default coherency for MIPS Jiaxun Yang
2023-03-21 11:08   ` Jiaxun Yang
2023-03-21 11:08   ` Jiaxun Yang
2023-03-28 14:15   ` Rob Herring [this message]
2023-03-28 14:15     ` Rob Herring
2023-03-28 14:15     ` Rob Herring
2023-03-21 11:08 ` [PATCH v3 2/4] dma-mapping: Provide a fallback dma_default_coherent Jiaxun Yang
2023-03-21 11:08   ` Jiaxun Yang
2023-03-21 11:08   ` Jiaxun Yang
2023-03-21 11:08 ` [PATCH v3 3/4] dma-mapping: Provide CONFIG_ARCH_DMA_DEFAULT_COHERENT Jiaxun Yang
2023-03-21 11:08   ` Jiaxun Yang
2023-03-21 11:08   ` Jiaxun Yang
2023-03-21 11:08 ` [PATCH v3 4/4] of: address: Always use dma_default_coherent for default coherency Jiaxun Yang
2023-03-21 11:08   ` Jiaxun Yang
2023-03-21 11:08   ` Jiaxun Yang
2023-03-28 14:17   ` Rob Herring
2023-03-28 14:17     ` Rob Herring
2023-03-28 14:17     ` Rob Herring
2023-03-29  3:27   ` Michael Ellerman
2023-03-29  3:27     ` Michael Ellerman
2023-03-29  3:27     ` Michael Ellerman
2023-03-23  7:29 ` [PATCH v3 0/4] Use dma_default_coherent for devicetree " Christoph Hellwig
2023-03-23  7:29   ` Christoph Hellwig
2023-03-23  7:29   ` Christoph Hellwig
2023-03-23 21:07   ` Jiaxun Yang
2023-03-23 21:07     ` Jiaxun Yang
2023-03-23 21:07     ` Jiaxun Yang
2023-03-23 21:39     ` Christoph Hellwig
2023-03-23 21:39       ` Christoph Hellwig
2023-03-23 21:39       ` Christoph Hellwig
2023-03-24  9:17       ` Jiaxun Yang
2023-03-24  9:17         ` Jiaxun Yang
2023-03-24  9:17         ` Jiaxun Yang
2023-03-28  1:18         ` Christoph Hellwig
2023-03-28  1:18           ` Christoph Hellwig
2023-03-28  1:18           ` Christoph Hellwig
2023-03-28  7:45           ` Thomas Bogendoerfer
2023-03-28  7:45             ` Thomas Bogendoerfer
2023-03-28  7:45             ` Thomas Bogendoerfer
2023-03-28 13:02             ` Jiaxun Yang
2023-03-28 13:02               ` Jiaxun Yang
2023-03-28 13:02               ` Jiaxun Yang

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='CAL_JsqKxJ-u4owKhY1tSiDyBo0=92iQoJM0G6TAZ7BSNpJAZAw@mail.gmail.com' \
    --to=robh+dt@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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.