mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 06:15:12 +00:00
drivers/gpu: 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-7-catalin.marinas@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Isaac J. Manjarres <isaacmanjarres@google.com> Cc: Daniel Vetter <daniel@ffwll.ch> 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: 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: 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: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
be6a5b5e9e
commit
6716ccaf43
@ -49,10 +49,10 @@ struct drmres {
|
||||
* Some archs want to perform DMA into kmalloc caches
|
||||
* and need a guaranteed alignment larger than
|
||||
* the alignment of a 64-bit integer.
|
||||
* Thus we use ARCH_KMALLOC_MINALIGN here and get exactly the same
|
||||
* buffer alignment as if it was allocated by plain kmalloc().
|
||||
* Thus we use ARCH_DMA_MINALIGN for data[] which will force the same
|
||||
* alignment for struct drmres when allocated by kmalloc().
|
||||
*/
|
||||
u8 __aligned(ARCH_KMALLOC_MINALIGN) data[];
|
||||
u8 __aligned(ARCH_DMA_MINALIGN) data[];
|
||||
};
|
||||
|
||||
static void free_dr(struct drmres *dr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user