linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] spi: Fix mapping from vmalloc-ed buffer to scatter list
Date: Fri, 14 Nov 2014 17:11:33 +0000	[thread overview]
Message-ID: <20141114171133.GC12443@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20141114160607.GB12443-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>

On Fri, Nov 14, 2014 at 04:06:07PM +0000, Charles Keepax wrote:
> On Fri, Nov 14, 2014 at 03:52:22PM +0000, Mark Brown wrote:
> > On Fri, Nov 14, 2014 at 03:40:44PM +0000, Charles Keepax wrote:
> > > We can only use page_address on memory that has been mapped using kmap,
> > > when the buffer passed to the SPI has been allocated by vmalloc the page
> > > has not necessarily been mapped through kmap. This means sometimes
> > > page_address will return NULL causing the pointer we pass to sg_set_buf
> > > to be invalid.
> > 
> > Hrm, this is a bug in the mxs driver (which is where we copied the core
> > code from) - care to fix that too?
> 
> Yeah no problem, won't be able to test it, but should be a fairly
> trivial change and hopefully someone else can test.

Ah... ok I think I see the difference here. The MXS architecture
has CONFIG_HIGHMEM=n whereas Arndale has CONFIG_HIGHMEM=y. So
that means on MXS all the pages will always be in low mem so I
think will always be mapped into the kernel logical address space
hence no problems. Not sure if it would be worth updating the
driver or not, what do you think?

Thanks,
Charles
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-11-14 17:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-14 15:40 [PATCH 1/2] spi: Fix mapping from vmalloc-ed buffer to scatter list Charles Keepax
     [not found] ` <1415979645-26264-1-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2014-11-14 15:40   ` [PATCH 2/2] ASoC: wm_adsp: Use vmalloc to allocate firmware download buffer Charles Keepax
     [not found]     ` <1415979645-26264-2-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2014-11-14 17:32       ` Mark Brown
2014-11-14 15:52   ` [PATCH 1/2] spi: Fix mapping from vmalloc-ed buffer to scatter list Mark Brown
     [not found]     ` <20141114155222.GF3815-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-11-14 16:06       ` Charles Keepax
     [not found]         ` <20141114160607.GB12443-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2014-11-14 17:11           ` Charles Keepax [this message]
     [not found]             ` <20141114171133.GC12443-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2014-11-14 17:26               ` Mark Brown
     [not found]                 ` <20141114172626.GI3815-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-11-14 17:41                   ` Charles Keepax
  -- strict thread matches above, loose matches on Subject: below --
2014-11-17  9:14 Charles Keepax
     [not found] ` <1416215672-31554-1-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2014-11-17 10:40   ` Mark Brown

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=20141114171133.GC12443@opensource.wolfsonmicro.com \
    --to=ckeepax-yzvpicuk2aatku/dhu1wvuem+bqzidxxqq4iyu8u01e@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@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 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).