All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
To: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	Paul Burton <paul.burton-8NJIiSa5LzA@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH 2/5] dma-mapping: move the dma_coherent flag to struct device
Date: Mon, 10 Sep 2018 17:06:40 +0100	[thread overview]
Message-ID: <aa6f49f8-24ea-f166-9c58-aecb13df0418@arm.com> (raw)
In-Reply-To: <20180910154747.GA23578-jcswGhMUV9g@public.gmane.org>

On 10/09/18 16:47, Christoph Hellwig wrote:
>>> --- a/kernel/dma/Kconfig
>>> +++ b/kernel/dma/Kconfig
>>> @@ -13,6 +13,9 @@ config NEED_DMA_MAP_STATE
>>>    config ARCH_DMA_ADDR_T_64BIT
>>>    	def_bool 64BIT || PHYS_ADDR_T_64BIT
>>>    +config ARCH_HAS_DMA_COHERENCE_H
>>> +	bool
>>
>> This seems a little crude - is it unbearably churny to make an
>> asm-generic/dma-coherence.h implementation for everyone else?
> 
> The case of having something else than the per-device flag is rather
> odd, and I hope we don't grow any new user in addition to mips.
> 
> In fact I'm already thinking of ways to get rid of it for mips by
> e.g. iterating over all devices and just setting dma_coherent,
> but for now I wanted to solve the more urgen issues and tackle this
> later, as this unification blocks a few other things

Ah, somehow I started thinking that arm(64) would need to implement 
their own as well, but I see the point now. In that case, TBH I'd be 
quite happy with just a simple #ifdef CONFIG_MIPS in 
linux/dma-noncoherent.h - plus then it looks even more like something 
nobody else is expected to do.

>> Nits aside, this otherwise looks sane to me for factoring out the
>> equivalent Xen and arm64 DMA ops cases.
> 
> Like this? :)
> 
> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-maybe-coherent

Man, that's going to take me a *lot* of time to pick through. All those 
horrendous subtleties that I barely remember!

Robin.

WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: iommu@lists.linux-foundation.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Paul Burton <paul.burton@mips.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] dma-mapping: move the dma_coherent flag to struct device
Date: Mon, 10 Sep 2018 17:06:40 +0100	[thread overview]
Message-ID: <aa6f49f8-24ea-f166-9c58-aecb13df0418@arm.com> (raw)
In-Reply-To: <20180910154747.GA23578@lst.de>

On 10/09/18 16:47, Christoph Hellwig wrote:
>>> --- a/kernel/dma/Kconfig
>>> +++ b/kernel/dma/Kconfig
>>> @@ -13,6 +13,9 @@ config NEED_DMA_MAP_STATE
>>>    config ARCH_DMA_ADDR_T_64BIT
>>>    	def_bool 64BIT || PHYS_ADDR_T_64BIT
>>>    +config ARCH_HAS_DMA_COHERENCE_H
>>> +	bool
>>
>> This seems a little crude - is it unbearably churny to make an
>> asm-generic/dma-coherence.h implementation for everyone else?
> 
> The case of having something else than the per-device flag is rather
> odd, and I hope we don't grow any new user in addition to mips.
> 
> In fact I'm already thinking of ways to get rid of it for mips by
> e.g. iterating over all devices and just setting dma_coherent,
> but for now I wanted to solve the more urgen issues and tackle this
> later, as this unification blocks a few other things

Ah, somehow I started thinking that arm(64) would need to implement 
their own as well, but I see the point now. In that case, TBH I'd be 
quite happy with just a simple #ifdef CONFIG_MIPS in 
linux/dma-noncoherent.h - plus then it looks even more like something 
nobody else is expected to do.

>> Nits aside, this otherwise looks sane to me for factoring out the
>> equivalent Xen and arm64 DMA ops cases.
> 
> Like this? :)
> 
> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-maybe-coherent

Man, that's going to take me a *lot* of time to pick through. All those 
horrendous subtleties that I barely remember!

Robin.

  parent reply	other threads:[~2018-09-10 16:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10  6:05 merge dma_direct_ops and dma_noncoherent_ops v2 Christoph Hellwig
2018-09-10  6:05 ` Christoph Hellwig
     [not found] ` <20180910060533.27172-1-hch-jcswGhMUV9g@public.gmane.org>
2018-09-10  6:05   ` [PATCH 1/5] MIPS: don't select DMA_MAYBE_COHERENT from DMA_PERDEV_COHERENT Christoph Hellwig
2018-09-10  6:05     ` Christoph Hellwig
2018-09-10  6:05   ` [PATCH 2/5] dma-mapping: move the dma_coherent flag to struct device Christoph Hellwig
2018-09-10  6:05     ` Christoph Hellwig
2018-09-10 15:19     ` Robin Murphy
2018-09-10 15:47       ` Christoph Hellwig
     [not found]         ` <20180910154747.GA23578-jcswGhMUV9g@public.gmane.org>
2018-09-10 16:06           ` Robin Murphy [this message]
2018-09-10 16:06             ` Robin Murphy
2018-09-11  6:48             ` Christoph Hellwig
2018-09-11  6:58       ` Christoph Hellwig
2018-09-10 16:13     ` Greg Kroah-Hartman
     [not found]       ` <20180910161350.GA10380-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2018-09-11  6:46         ` Christoph Hellwig
2018-09-11  6:46           ` Christoph Hellwig
     [not found]           ` <20180911064636.GA6214-jcswGhMUV9g@public.gmane.org>
2018-09-11  8:19             ` Greg Kroah-Hartman
2018-09-11  8:19               ` Greg Kroah-Hartman
2018-09-10  6:05   ` [PATCH 4/5] dma-mapping: consolidate the dma mmap implementations Christoph Hellwig
2018-09-10  6:05     ` Christoph Hellwig
2018-09-10  6:05   ` [PATCH 5/5] dma-mapping: support non-coherent devices in dma_common_get_sgtable Christoph Hellwig
2018-09-10  6:05     ` Christoph Hellwig
2018-09-10  6:05 ` [PATCH 3/5] dma-mapping: merge direct and noncoherent ops Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2018-08-27 14:50 (unknown), Christoph Hellwig
2018-08-27 14:50 ` [PATCH 2/5] dma-mapping: move the dma_coherent flag to struct device Christoph Hellwig
2018-08-31 20:11   ` Paul Burton

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=aa6f49f8-24ea-f166-9c58-aecb13df0418@arm.com \
    --to=robin.murphy-5wv7dgnigg8@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=paul.burton-8NJIiSa5LzA@public.gmane.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.