• Catalin Marinas's avatar
    mm/slab: limit kmalloc() minimum alignment to dma_get_cache_alignment() · 963e84b0
    Catalin Marinas authored
    Do not create kmalloc() caches which are not aligned to
    dma_get_cache_alignment().  There is no functional change since for
    current architectures defining ARCH_DMA_MINALIGN, ARCH_KMALLOC_MINALIGN
    equals ARCH_DMA_MINALIGN (and dma_get_cache_alignment()).  On
    architectures without a specific ARCH_DMA_MINALIGN,
    dma_get_cache_alignment() is 1, so no change to the kmalloc() caches.
    
    Link: https://lkml.kernel.org/r/20230612153201.554742-5-catalin.marinas@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Tested-by: default avatarIsaac J. Manjarres <isaacmanjarres@google.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Robin Murphy <robin.murphy@arm.com>
    Cc: Alasdair Kergon <agk@redhat.com>
    Cc: Ard Biesheuvel <ardb@kernel.org>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: Jerry Snitselaar <jsnitsel@redhat.com>
    Cc: Joerg Roedel <joro@8bytes.org>
    Cc: Jonathan Cameron <jic23@kernel.org>
    Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Cc: Lars-Peter Clausen <lars@metafoo.de>
    Cc: Logan Gunthorpe <logang@deltatee.com>
    Cc: Marc Zyngier <maz@kernel.org>
    Cc: Mark Brown <broonie@kernel.org>
    Cc: Mike Snitzer <snitzer@kernel.org>
    Cc: "Rafael J. Wysocki" <rafael@kernel.org>
    Cc: Saravana Kannan <saravanak@google.com>
    Cc: Will Deacon <will@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    963e84b0
slab_common.c 37.4 KB