Commit 075efe7c authored by Catalin Marinas's avatar Catalin Marinas Committed by Andrew Morton

drivers/usb: use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN

ARCH_DMA_MINALIGN represents the minimum (static) alignment for safe DMA
operations while ARCH_KMALLOC_MINALIGN is the minimum kmalloc() objects
alignment.

Link: https://lkml.kernel.org/r/20230612153201.554742-8-catalin.marinas@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: default avatarIsaac J. Manjarres <isaacmanjarres@google.com>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Daniel Vetter <daniel@ffwll.ch>
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: Robin Murphy <robin.murphy@arm.com>
Cc: Saravana Kannan <saravanak@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 6716ccaf
...@@ -34,13 +34,13 @@ void __init usb_init_pool_max(void) ...@@ -34,13 +34,13 @@ void __init usb_init_pool_max(void)
{ {
/* /*
* The pool_max values must never be smaller than * The pool_max values must never be smaller than
* ARCH_KMALLOC_MINALIGN. * ARCH_DMA_MINALIGN.
*/ */
if (ARCH_KMALLOC_MINALIGN <= 32) if (ARCH_DMA_MINALIGN <= 32)
; /* Original value is okay */ ; /* Original value is okay */
else if (ARCH_KMALLOC_MINALIGN <= 64) else if (ARCH_DMA_MINALIGN <= 64)
pool_max[0] = 64; pool_max[0] = 64;
else if (ARCH_KMALLOC_MINALIGN <= 128) else if (ARCH_DMA_MINALIGN <= 128)
pool_max[0] = 0; /* Don't use this pool */ pool_max[0] = 0; /* Don't use this pool */
else else
BUILD_BUG(); /* We don't allow this */ BUILD_BUG(); /* We don't allow this */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment