Message ID | 20230518173403.1150549-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 6C943C7EE23 for <linux-mm@archiver.kernel.org>; Thu, 18 May 2023 17:34:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0B1F990000C; Thu, 18 May 2023 13:34:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0613A900003; Thu, 18 May 2023 13:34:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E453090000C; Thu, 18 May 2023 13:34:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D6007900003 for <linux-mm@kvack.org>; Thu, 18 May 2023 13:34:36 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A26D0A093B for <linux-mm@kvack.org>; Thu, 18 May 2023 17:34:36 +0000 (UTC) X-FDA: 80804075352.11.551BDBB Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf13.hostedemail.com (Postfix) with ESMTP id 0190520002 for <linux-mm@kvack.org>; Thu, 18 May 2023 17:34:34 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf13.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=1684431275; 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=3Zfg7nSZ02RjenyT7TPvDWhMeYiOooKFIqWNAGFsoTZ46yZhoA8y/aynNSfYRgCpUe8rgv VM5BhLX6+Vn0ZMIsg6wP/rO9XEb2dAOEBeZzuE4ooVLxfHXr8p1544Rf8cntjpVR4sCPCT 8Gx9CiMJBb41ycikuohypbBjQ3W1a0E= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf13.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=1684431275; a=rsa-sha256; cv=none; b=FeMCjUDQTuAGHJgf41i5SI9r2vfcRuU/xRnd+LUQos7pFn8I4jZNR2qAGfb/ydrxA1PvOF x+ITh0Cd+HIjmlkuTR3BDkNzboOfeq4xkVydHLKc3mTkxlC9X4geguKB0z79SJEm2xASpy Jk0WkmIj8KDLMk1elz0jxNvFlk6crPI= 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 1C9D665155; Thu, 18 May 2023 17:34:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D58C5C433B3; Thu, 18 May 2023 17:34:29 +0000 (UTC) From: Catalin Marinas <catalin.marinas@arm.com> To: Linus Torvalds <torvalds@linux-foundation.org>, Arnd Bergmann <arnd@arndb.de>, Christoph Hellwig <hch@lst.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: 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>, Robin Murphy <robin.murphy@arm.com>, linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 06/15] drivers/gpu: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Date: Thu, 18 May 2023 18:33:54 +0100 Message-Id: <20230518173403.1150549-7-catalin.marinas@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518173403.1150549-1-catalin.marinas@arm.com> References: <20230518173403.1150549-1-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0190520002 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: hifqobd5yns8fty3wap7w3o816eus9bt X-HE-Tag: 1684431274-890578 X-HE-Meta: U2FsdGVkX1/koQXqJL70nCie9t0wdxjHOBfiAb4t44RDhVrDSRNaTKEzGszCY7dVF5l/6vMclWjWZG5zs2ArbwdS6AfZWGElyPGtsE1FSM2sf6P9hTnRAcOFaX9zoI7CjDbl8Z9x7it5myqUWSAljyseYZIlctC++3UzOvBt7PGWs+jRt/nIEHC+1H50FQf2Vw5mI6K+WSZo6OIEH9u1s4kRI4Ck10P8fYJYS0CZOw/Oepfn4AQw9PpCSZf3k9utZ1zqoTrk/W9Ac3uyOR79zFMCjiH9M0ZgIbVDsX5GszDoqMiPWR2FVeacJnpcBaUA2S0lPuwaAHxAotv7d1z48W/LKYF5XJ4bJQa0mB261GtyduQBaD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HRtL4khXv8xjwcvWQKtE92MufK6phk+r5SnCoxEbDGQR6wpDektoxFVQ/FfdUU 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(-)