[RESEND PATCH v2 50/53] mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset

Russell King - ARM Linux linux at armlinux.org.uk
Tue Mar 28 03:22:28 PDT 2017


On Tue, Mar 28, 2017 at 10:07:21AM +0200, Boris Brezillon wrote:
> Hm, it seems that alignment for kmalloc SLAB caches is set to
> ARCH_KMALLOC_MINALIGN which is set to ARCH_DMA_MINALIGN by default and
> ARCH_DMA_MINALIGN is usually equal to the L1 cache line size, so I was
> wrong here.

Yes, we set kmalloc() up to always return L1 cache line aligned data,
where "L1 cache line aligned" is the _maximum_ cache line alignment
that the kernel has been built for, not the cache line alignment of
the CPU we're running on.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.



More information about the linux-mtd mailing list