Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Kochetkov <fido_max@inbox.ru>
To: Christoph Hellwig <hch@lst.de>, Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Conor Dooley <conor@kernel.org>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	robh@kernel.org, mpe@ellerman.id.au, aou@eecs.berkeley.edu,
	palmer@dabbelt.com, paul.walmsley@sifive.com
Subject: Re: [PATCH 1/1] riscv: set ARCH_DMA_DEFAULT_COHERENT if RISCV_DMA_NONCOHERENT is not set
Date: Mon, 25 Dec 2023 09:47:21 +0300	[thread overview]
Message-ID: <15b89089-3dcd-4668-8d8b-d12ff0684c29@inbox.ru> (raw)
In-Reply-To: <20231223045912.GA21836@lst.de>



On 23.12.2023 07:59, Christoph Hellwig wrote:
> On Fri, Dec 22, 2023 at 04:01:43PM +0000, Jiaxun Yang wrote:
>>>
>>> But arch_setup_dma_ops() is called only from of_dma_configure_id() and
>>> acpi_dma_configure_id(). So it works only for DT and ACPI devices. What
>>> about platform_device?
>>
>> Ah I see, that's the problem, in MIPS's use case all DMA capable devices
>> are following platform's default coherency. For RISC-V we assume all device
>> are enabled by ACPI or DT.
>>
>> Perhaps you can override it in driver, but that will make drivers platform
>> dependent.
>>
>> I'll leave this question to Christoph.
> 
> I've already said it.  You must not have DMA capable devices that aren't
> declared in ACPI or OF, just like on any modern Linux platform.

Ok. I've got the point. Thank you for clarification.

> 
> What devices are you concerned about anyway Maxim?

I have 3rd party external out of tree camera driver. csi, isp, dewarp 
components are OF, but common media device is created as 
platform_device. I will convert is to OF.



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

      reply	other threads:[~2023-12-25  6:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 22:27   ` Jiaxun Yang
2023-12-22  4:14     ` Christoph Hellwig
2023-12-22 14:39       ` Maxim Kochetkov
2023-12-22 14:54         ` Conor Dooley
2023-12-22 15:04           ` Christoph Hellwig
2023-12-22 15:38           ` Maxim Kochetkov
2023-12-22 15:45             ` Jiaxun Yang
2023-12-22 15:53               ` Maxim Kochetkov
2023-12-22 16:01                 ` Jiaxun Yang
2023-12-23  4:59                   ` Christoph Hellwig
2023-12-25  6:47                     ` Maxim Kochetkov [this message]

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=15b89089-3dcd-4668-8d8b-d12ff0684c29@inbox.ru \
    --to=fido_max@inbox.ru \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor@kernel.org \
    --cc=hch@lst.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox