linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	Abhishek Sahu <absahu@codeaurora.org>,
	Archit Taneja <architt@codeaurora.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nand: ranw: qcom_nand: stop using phys_to_dma()
Date: Tue, 17 Jul 2018 22:36:36 +0200	[thread overview]
Message-ID: <20180717223636.125d5563@bbrezillon> (raw)
In-Reply-To: <CAK8P3a1Pa1U+RsmhSk=iJErAdj0tKKh967X1dAqbA+Vz-nKCeg@mail.gmail.com>

On Tue, 17 Jul 2018 22:29:58 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> On Tue, Jul 17, 2018 at 10:01 PM, Boris Brezillon
> <boris.brezillon@bootlin.com> wrote:
> > Hi Arnd,
> >
> > On Wed, 11 Jul 2018 16:26:31 +0200
> > Arnd Bergmann <arnd@arndb.de> wrote:
> >  
> >> On Wed, Jul 11, 2018 at 3:04 PM, Boris Brezillon
> >> <boris.brezillon@bootlin.com> wrote:  
> >> > On Wed, 11 Jul 2018 14:26:58 +0200
> >> > Arnd Bergmann <arnd@arndb.de> wrote:
> >> >  
> >> >> Compile-testing this driver on x86 caused a link error:
> >> >>
> >> >> ERROR: "__phys_to_dma" [drivers/mtd/nand/raw/qcom_nandc.ko] undefined!
> >> >>
> >> >> The problem here is that the driver attempts to convert the physical
> >> >> address into the DMA controller as a dma_addr_t and calls phys_to_dma()
> >> >> to do the conversion.
> >> >>
> >> >> However, there is no generic way to convert a phys_addr_t into a dma_addr_t
> >> >> for anything other than RAM (which should use the dma-mapping API instead).
> >> >> The only correct use of phys_to_dma() instead is inside of the dma-mapping
> >> >> implementation.  
> >> >
> >> > Should we use dma_map_resource() to do the phys_addr_t to dma_addr_t
> >> > conversion?  
> >>
> >> I had not seen that interface before, but yes, that does seem like the best
> >> way to do it here.  
> >
> > Do you plan to send a new version using dma_map_resource()?  
> 
> I somehow thought you were going to do that yourself, but have now
> posted a new version of the patch the way you suggested.

I tend not to do that, unless I'm explicitly asked to :-).

> 
> > BTW, there's typo in the subject prefix (s/ranw/rawnand/).  
> 
> Hmm, missed that again in v2. Can you fix it up when applying?

Sure.

      reply	other threads:[~2018-07-17 20:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 12:26 [PATCH] nand: ranw: qcom_nand: stop using phys_to_dma() Arnd Bergmann
2018-07-11 13:04 ` Boris Brezillon
2018-07-11 14:26   ` Arnd Bergmann
2018-07-17 20:01     ` Boris Brezillon
2018-07-17 20:29       ` Arnd Bergmann
2018-07-17 20:36         ` Boris Brezillon [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=20180717223636.125d5563@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=absahu@codeaurora.org \
    --cc=architt@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=yamada.masahiro@socionext.com \
    /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).