mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Han Xu <han.xu@nxp.com>
To: Mark Brown <broonie@kernel.org>
Cc: Ashish Kumar <ashish.kumar@nxp.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [EXT] Re: [PATCH 1/3] spi: spi-nxp-fspi: dynamically alloc AHB memory for FSPI
Date: Thu, 11 Jul 2019 19:45:19 +0000	[thread overview]
Message-ID: <AM6PR04MB49670C9EA59A507F9C78B42097F30@AM6PR04MB4967.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20190711124117.GG14859@sirena.co.uk>



> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Thursday, July 11, 2019 7:41 AM
> To: Han Xu <han.xu@nxp.com>
> Cc: Ashish Kumar <ashish.kumar@nxp.com>; linux-spi@vger.kernel.org; linux-
> kernel@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>
> Subject: Re: [EXT] Re: [PATCH 1/3] spi: spi-nxp-fspi: dynamically alloc AHB memory
> for FSPI
> 
> On Wed, Jul 10, 2019 at 03:35:46PM +0000, Han Xu wrote:
> 
> > > > dynamically alloc AHB memory for FSPI controller
> 
> > > Why?  This is currently done at probe which is what you'd expect to
> > > happen here, there's no explanation as to why this change is being made.
> 
> > Explained in cover letter, It failed to alloc the whole memory mapping
> > area during probe on some platforms, since the AHB memory area could
> > be pretty large. The error may look like:
> 
> > [    1.129404] fsl-quadspi 1550000.spi: ioremap failed for resource [mem
> 0x40000000-0x7fffffff]
> 
> The commit itself needs to have some explanation of what it's doing so it's in the
> git log, particularly for something odd like this.  More generally this just doesn't feel
> like it's solving the problem - essentially we're just deferring the mapping and then
> keep on failing operations until the allocation succeeds for some reason.  That's
> going to be disruptive for users of the device and it doesn't seem like it's going to
> be a robust solution.  Why does the allocation not work initially and why is it more
> likely to work later on?

Yes, I will explain the reason in next version. To allocate the whole 256MB memory at one time exceed the vmalloc limit, so we dynamically allocate small amount of memory just as needed. There is no failing operation, just deferring and re-allocate if new access area beyond the previous allocate area.

  reply	other threads:[~2019-07-11 19:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10  2:31 [PATCH 0/3] dynamically alloc AHB memory han.xu
2019-07-10  2:31 ` [PATCH 1/3] spi: spi-nxp-fspi: dynamically alloc AHB memory for FSPI han.xu
2019-07-10 15:16   ` Mark Brown
2019-07-10 15:35     ` [EXT] " Han Xu
2019-07-11 12:41       ` Mark Brown
2019-07-11 19:45         ` Han Xu [this message]
2019-07-10  2:31 ` [PATCH 2/3] spi: spi-fsl-qspi: change i.MX7D RX FIFO size han.xu
2019-07-10 15:34   ` Applied "spi: spi-fsl-qspi: change i.MX7D RX FIFO size" to the spi tree Mark Brown
2019-07-10  2:31 ` [PATCH 3/3] spi: spi-fsl-qspi: dynamically alloc AHB memory for QSPI han.xu

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=AM6PR04MB49670C9EA59A507F9C78B42097F30@AM6PR04MB4967.eurprd04.prod.outlook.com \
    --to=han.xu@nxp.com \
    --cc=ashish.kumar@nxp.com \
    --cc=broonie@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@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

all inboxes | Powered by JetHome®