Re: [PATCH 1/2] spi: Fix mapping from vmalloc-ed buffer to scatter list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux