Message ID | 20230524171904.3967031-7-catalin.marinas@arm.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E968C77B73 for <linux-mm@archiver.kernel.org>; Wed, 24 May 2023 17:19:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2B62F900009; Wed, 24 May 2023 13:19:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 265BA900002; Wed, 24 May 2023 13:19:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15539900009; Wed, 24 May 2023 13:19:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 08846900002 for <linux-mm@kvack.org>; Wed, 24 May 2023 13:19:39 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D33DEC0978 for <linux-mm@kvack.org>; Wed, 24 May 2023 17:19:38 +0000 (UTC) X-FDA: 80825810436.08.843242C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id 39067A0008 for <linux-mm@kvack.org>; Wed, 24 May 2023 17:19:36 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf15.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684948777; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S59+slMdeGHVr9gGv1wpxhrhYrhnmUIhONDI6UrLqhg=; b=JvvhcG3BY8i/ieWa8ebsv0+pcI3fh9vj+PwtruLe9kDyQvB/XOhXGI1kQ7Ch/6LDYyn+6E AJzGgmnSS2sVAKwaPesSxzIkOomfj8ADh9WDdWFME7uvcCuBnsfVJnT4MLsS/d8YeaRU9o 17WV0EeVvTsiqPez+LMviZpi1Pu4vII= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf15.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684948777; a=rsa-sha256; cv=none; b=loz2c0sV/eNqnYi0C2m1KgS+RJ7Wwx4mrYXoAw67U+5iKDhk8ww6aOZsNFJCot/J7M7NWY qeHSfa4VFNhPqjb8weRQVtDf8HrlnMdiMwdsIsFIMTpp9zaTmds0ePUlGJ28qpzVN8OtWm mvSXUu8Rbi1xb9PO7PdonE2ucgMu1ig= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3A7E163E28; Wed, 24 May 2023 17:19:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6EE9C433A0; Wed, 24 May 2023 17:19:30 +0000 (UTC) From: Catalin Marinas <catalin.marinas@arm.com> To: Linus Torvalds <torvalds@linux-foundation.org>, Christoph Hellwig <hch@lst.de>, Robin Murphy <robin.murphy@arm.com> Cc: Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Herbert Xu <herbert@gondor.apana.org.au>, Ard Biesheuvel <ardb@kernel.org>, Isaac Manjarres <isaacmanjarres@google.com>, Saravana Kannan <saravanak@google.com>, Alasdair Kergon <agk@redhat.com>, Daniel Vetter <daniel@ffwll.ch>, Joerg Roedel <joro@8bytes.org>, Mark Brown <broonie@kernel.org>, Mike Snitzer <snitzer@kernel.org>, "Rafael J. Wysocki" <rafael@kernel.org>, linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 06/15] drivers/gpu: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Date: Wed, 24 May 2023 18:18:55 +0100 Message-Id: <20230524171904.3967031-7-catalin.marinas@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524171904.3967031-1-catalin.marinas@arm.com> References: <20230524171904.3967031-1-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 39067A0008 X-Stat-Signature: hxfghc8zmxn7g9z3wtmicj7dufoampg5 X-HE-Tag: 1684948776-459884 X-HE-Meta: U2FsdGVkX1/YXh8NjpPfOwQE1vtv+l6FQGbb2j26X68x6A+FrqxGgZNv8yKRDSL+xiArYDhW1HFmkHUTvv9mYakf07lU9MbsKlmKO5YbXmeBVgE1wioAXnNpM/0ym3jwyqWUBpkREqyA6bx8quhJBptWC/CZU7h2RLJvdFUy8U6igqLdsWuKVEda8ygTQuy6auOZGYam9ed7juCYtnaP74qN7vdlK5UEngCwB3k8WhdfWCz+SLymD3ylRbwC2yqwAEJzLHFp2cu6vBjfXQBmXhO+ohna4t8Z3lxNuoFawaRtv8P8yMWjz9Aj3gxkCgdkab+UbnJcqvdEXifS89Vgu1dx2WOT5ta9yJgNan+N2EMx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QwR8KHWgZjpNCaZqSjpNmYd0pQsDAzpS9qocQkIVOE//zBMYgiqBVjyTs0luXeh X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
mm, dma, arm64: Reduce ARCH_KMALLOC_MINALIGN to 8
|
expand
|
diff --git a/drivers/gpu/drm/drm_managed.c b/drivers/gpu/drm/drm_managed.c index 4cf214de50c4..3a5802f60e65 100644 --- a/drivers/gpu/drm/drm_managed.c +++ b/drivers/gpu/drm/drm_managed.c @@ -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)
ARCH_DMA_MINALIGN represents the minimum (static) alignment for safe DMA operations while ARCH_KMALLOC_MINALIGN is the minimum kmalloc() objects alignment. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Daniel Vetter <daniel@ffwll.ch> --- drivers/gpu/drm/drm_managed.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)