From: Greg KH <gregkh@linuxfoundation.org>
To: gavinli@thegavinli.com
Cc: linux-usb@vger.kernel.org, Gavin Li <git@thegavinli.com>
Subject: Re: [PATCH] usb: devio: fix mmap() on non-coherent DMA architectures
Date: Fri, 2 Aug 2019 14:14:16 +0200 [thread overview]
Message-ID: <20190802121416.GA20689@kroah.com> (raw)
In-Reply-To: <20190801220436.3871-1-gavinli@thegavinli.com>
On Thu, Aug 01, 2019 at 03:04:36PM -0700, gavinli@thegavinli.com wrote:
> From: Gavin Li <git@thegavinli.com>
>
> On architectures that are not (or are optionally) DMA coherent,
> dma_alloc_coherent() returns an address into the vmalloc space,
> and calling virt_to_phys() on this address returns an unusable
> physical address.
>
> This patch replaces the raw remap_pfn_range() call with a call to
> dmap_mmap_coherent(), which takes care of the differences between
> coherent and non-coherent code paths.
>
> Tested on an arm64 rk3399 board.
>
> Signed-off-by: Gavin Li <git@thegavinli.com>
> ---
> drivers/usb/core/devio.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
Should this be backported to the stable kernel trees to fix the issue on
those platforms? If so, how far back? What commit caused this problem
to occur?
thanks,
greg k-h
next prev parent reply other threads:[~2019-08-02 12:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 22:04 [PATCH] usb: devio: fix mmap() on non-coherent DMA architectures gavinli
2019-08-02 12:14 ` Greg KH [this message]
2019-08-02 17:57 ` Gavin Li
2019-08-05 15:17 ` Greg KH
2019-09-04 7:05 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2019-08-01 22:01 gavinli
2019-08-05 11:37 ` David Laight
2019-08-05 18:33 ` Gavin Li
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=20190802121416.GA20689@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=gavinli@thegavinli.com \
--cc=git@thegavinli.com \
--cc=linux-usb@vger.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;
as well as URLs for NNTP newsgroup(s).