public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst•de>
To: Gavin Li <gavinli@thegavinli•com>
Cc: Gavin Li <git@thegavinli•com>, Shawn Anastasio <shawn@anastas•io>,
	Michael Ellerman <mpe@ellerman•id.au>,
	linuxppc-dev@lists•ozlabs.org, linux-kernel@vger•kernel.org,
	Russell King <linux@armlinux•org.uk>,
	linux-mips@vger•kernel.org, Paul Burton <paul.burton@mips•com>,
	Catalin Marinas <catalin.marinas@arm•com>,
	James Hogan <jhogan@kernel•org>, Will Deacon <will@kernel•org>,
	Christoph Hellwig <hch@lst•de>,
	linux-arm-kernel@lists•infradead.org,
	Robin Murphy <robin.murphy@arm•com>
Subject: Re: [PATCH 1/2] dma-mapping: fix page attributes for dma_mmap_*
Date: Tue, 6 Aug 2019 07:12:42 +0200	[thread overview]
Message-ID: <20190806051242.GA13269@lst.de> (raw)
In-Reply-To: <CA+GxvY5C_rrukCzC5K-h72bePyW8PS_Rfj3uxh-K6UrcAextUQ@mail.gmail.com>

On Mon, Aug 05, 2019 at 07:55:44PM -0700, Gavin Li wrote:
> >         /* create a coherent mapping */
> >         ret = dma_common_contiguous_remap(page, size, VM_USERMAP,
> > -                       arch_dma_mmap_pgprot(dev, PAGE_KERNEL, attrs),
> > +                       dma_pgprot(dev, PAGE_KERNEL, attrs),
> >                         __builtin_return_address(0));
> >         if (!ret) {
> >                 __dma_direct_free_pages(dev, size, page);
> 
> Is dma_common_contiguous_remap() still necessary in the
> DMA_ATTR_NON_CONSISTENT case? I would presume it would be fine to just
> return a linearly mapped address in that case.

It would not be required for a real DMA_ATTR_NON_CONSISTENT
implementation.  But only parisc and mips actually properly implement
DMA_ATTR_NON_CONSISTENT, everyone ignores it.  Given that the API is
a little ill defined and I have a better replacement in the pipeline
I don't want to start implementing it for other architectures now.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-08-06  5:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-05  8:01 fix default dma_mmap_* pgprot v2 Christoph Hellwig
2019-08-05  8:01 ` [PATCH 1/2] dma-mapping: fix page attributes for dma_mmap_* Christoph Hellwig
2019-08-05  9:10   ` Catalin Marinas
     [not found]   ` <CAP_+7SzPdNCMKuuXMjHjpCzxsey2YWR_e6mTAWtNSZ6kKBvKFw@mail.gmail.com>
2019-08-06  2:55     ` Gavin Li
2019-08-06  5:12       ` Christoph Hellwig [this message]
2019-08-06 19:39   ` Shawn Anastasio
2019-08-07  6:04     ` Christoph Hellwig
2019-08-07 11:45       ` Shawn Anastasio
2019-08-05  8:01 ` [PATCH 2/2] MIPS: remove support for DMA_ATTR_WRITE_COMBINE Christoph Hellwig
2019-08-05  8:06   ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2019-08-07  6:16 fix default dma_mmap_* pgprot v3 Christoph Hellwig
2019-08-07  6:16 ` [PATCH 1/2] dma-mapping: fix page attributes for dma_mmap_* Christoph Hellwig

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=20190806051242.GA13269@lst.de \
    --to=hch@lst$(echo .)de \
    --cc=catalin.marinas@arm$(echo .)com \
    --cc=gavinli@thegavinli$(echo .)com \
    --cc=git@thegavinli$(echo .)com \
    --cc=jhogan@kernel$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mips@vger$(echo .)kernel.org \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=paul.burton@mips$(echo .)com \
    --cc=robin.murphy@arm$(echo .)com \
    --cc=shawn@anastas$(echo .)io \
    --cc=will@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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