All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Kochetkov <fido_max@inbox.ru>
To: linux-riscv@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, robh@kernel.org,
	jiaxun.yang@flygoat.com, mpe@ellerman.id.au,
	aou@eecs.berkeley.edu, palmer@dabbelt.com,
	paul.walmsley@sifive.com, Maxim Kochetkov <fido_max@inbox.ru>
Subject: [PATCH 1/1] riscv: set ARCH_DMA_DEFAULT_COHERENT if RISCV_DMA_NONCOHERENT is not set
Date: Thu, 21 Dec 2023 21:51:52 +0300	[thread overview]
Message-ID: <20231221185152.327231-1-fido_max@inbox.ru> (raw)

Not all the RISCV are DMA coherent by default. Moreover we have
RISCV_DMA_NONCOHERENT option.
So set ARCH_DMA_DEFAULT_COHERENT only when RISCV_DMA_NONCOHERENT is not set

Fixes: c00a60d6f4a1 ("of: address: always use dma_default_coherent for default coherency")
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
---
 arch/riscv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index d6824bec2c00..111c5d92d503 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -14,7 +14,7 @@ config RISCV
 	def_bool y
 	select ACPI_GENERIC_GSI if ACPI
 	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
-	select ARCH_DMA_DEFAULT_COHERENT
+	select ARCH_DMA_DEFAULT_COHERENT if !RISCV_DMA_NONCOHERENT
 	select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
 	select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
 	select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
-- 
2.40.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: Maxim Kochetkov <fido_max@inbox.ru>
To: linux-riscv@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, robh@kernel.org,
	jiaxun.yang@flygoat.com, mpe@ellerman.id.au,
	aou@eecs.berkeley.edu, palmer@dabbelt.com,
	paul.walmsley@sifive.com, Maxim Kochetkov <fido_max@inbox.ru>
Subject: [PATCH 1/1] riscv: set ARCH_DMA_DEFAULT_COHERENT if RISCV_DMA_NONCOHERENT is not set
Date: Thu, 21 Dec 2023 21:51:52 +0300	[thread overview]
Message-ID: <20231221185152.327231-1-fido_max@inbox.ru> (raw)

Not all the RISCV are DMA coherent by default. Moreover we have
RISCV_DMA_NONCOHERENT option.
So set ARCH_DMA_DEFAULT_COHERENT only when RISCV_DMA_NONCOHERENT is not set

Fixes: c00a60d6f4a1 ("of: address: always use dma_default_coherent for default coherency")
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
---
 arch/riscv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index d6824bec2c00..111c5d92d503 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -14,7 +14,7 @@ config RISCV
 	def_bool y
 	select ACPI_GENERIC_GSI if ACPI
 	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
-	select ARCH_DMA_DEFAULT_COHERENT
+	select ARCH_DMA_DEFAULT_COHERENT if !RISCV_DMA_NONCOHERENT
 	select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
 	select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
 	select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
-- 
2.40.1


             reply	other threads:[~2023-12-21 18:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 18:51 Maxim Kochetkov [this message]
2023-12-21 18:51 ` [PATCH 1/1] riscv: set ARCH_DMA_DEFAULT_COHERENT if RISCV_DMA_NONCOHERENT is not set Maxim Kochetkov
2023-12-21 20:29 ` Conor Dooley
2023-12-21 20:29   ` Conor Dooley
2023-12-21 22:27   ` Jiaxun Yang
2023-12-21 22:27     ` Jiaxun Yang
2023-12-22  4:14     ` Christoph Hellwig
2023-12-22  4:14       ` Christoph Hellwig
2023-12-22 14:39       ` Maxim Kochetkov
2023-12-22 14:39         ` Maxim Kochetkov
2023-12-22 14:54         ` Conor Dooley
2023-12-22 14:54           ` Conor Dooley
2023-12-22 15:04           ` Christoph Hellwig
2023-12-22 15:04             ` Christoph Hellwig
2023-12-22 15:38           ` Maxim Kochetkov
2023-12-22 15:38             ` Maxim Kochetkov
2023-12-22 15:45             ` Jiaxun Yang
2023-12-22 15:45               ` Jiaxun Yang
2023-12-22 15:53               ` Maxim Kochetkov
2023-12-22 15:53                 ` Maxim Kochetkov
2023-12-22 16:01                 ` Jiaxun Yang
2023-12-22 16:01                   ` Jiaxun Yang
2023-12-23  4:59                   ` Christoph Hellwig
2023-12-23  4:59                     ` Christoph Hellwig
2023-12-25  6:47                     ` Maxim Kochetkov
2023-12-25  6:47                       ` Maxim Kochetkov

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=20231221185152.327231-1-fido_max@inbox.ru \
    --to=fido_max@inbox.ru \
    --cc=aou@eecs.berkeley.edu \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mpe@ellerman.id.au \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    /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.