From patchwork Wed May 24 17:18:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 13254347 Return-Path: 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 1091EC7EE2E for ; Wed, 24 May 2023 17:19:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8D0B790000B; Wed, 24 May 2023 13:19:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 880F8900002; Wed, 24 May 2023 13:19:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7498E90000B; Wed, 24 May 2023 13:19:46 -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 669E6900002 for ; Wed, 24 May 2023 13:19:46 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 3347CAE58D for ; Wed, 24 May 2023 17:19:46 +0000 (UTC) X-FDA: 80825810772.25.6335DB9 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 79FA8100009 for ; Wed, 24 May 2023 17:19:44 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf14.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=1684948784; a=rsa-sha256; cv=none; b=hCszq3yYkcOKzJvFhRHgu9Y4cEcB6I1oxTYF9ulksX+Qs0Se5qINeSYgwzoAx9D/TwUmFa mvwy8jIRIIfhx61jG5XYxjmQiSlsKTpI3K2Q2W8jWawEEEvfScbg3ccYcaykK7SfNrGpCO +5Nn2BQrHF2sdiVpBJHq00GmyFKiyus= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf14.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=1684948784; 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=+fgUtZ7z2bEcsaerci/jffnaSF7K1ZtF0r/2TxWeNAQ=; b=5s4GcyQvOg/gTBlri6LOZ92Iq33FeZKR43gdVDp6DksK+E9e3/K+jqa2yVrZVRfVJLd7cf DQOT+UnNXkx3jrsb02gmHBrm2VuGTaEwhW8L4arIMwFJUvKkYcLrtvTqIwM6Vl9kKqSKP+ fL6SJ7umproJngM6lIUpg6ump1/w4eY= 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 6FD2663F99; Wed, 24 May 2023 17:19:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2979DC433EF; Wed, 24 May 2023 17:19:39 +0000 (UTC) From: Catalin Marinas To: Linus Torvalds , Christoph Hellwig , Robin Murphy Cc: Arnd Bergmann , Greg Kroah-Hartman , Will Deacon , Marc Zyngier , Andrew Morton , Herbert Xu , Ard Biesheuvel , Isaac Manjarres , Saravana Kannan , Alasdair Kergon , Daniel Vetter , Joerg Roedel , Mark Brown , Mike Snitzer , "Rafael J. Wysocki" , linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 08/15] drivers/spi: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Date: Wed, 24 May 2023 18:18:57 +0100 Message-Id: <20230524171904.3967031-9-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 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 79FA8100009 X-Stat-Signature: gfysed3rmtzcu45495c4g8woy7m9j7ac X-Rspam-User: X-HE-Tag: 1684948784-747603 X-HE-Meta: U2FsdGVkX1+EiuVDPgCtSLQJrIDjOE6p/Ol3fSMJLyAwzjn5C9j8VEtnfg7tqNDDwWtMoh+NwJYE7KMc1agw6yVNadttxLeiFVP+DHNLK1MX4i5QksZsKkRIEIOEYPHz6wyQx758LhrUC6NGABtVSb9qarSO9wjCj52tR9Wad46sO4PEUJTQdsVYsuH0s4HyHsYcCgyxSPxKeu7dRkIMVKa4/ouuc4M/IcEDP7NcDwnYg+6uFHaWm/F8E7Pw48i9fA9Gz5ylJsUZks1xrxxJCHBcM6PktKlPthbdAl/ZSxlmgFoT2Vz8Re5CNlaBsY7Hqb8IR+U5KWYrNhvUNClibNr2QwQFNXrE3gjHns+Gd4N3EU0GNDNKjqnGjHTmUIlAGQOvKMbwRyKYlRKvrnIXJ7AgOHCd70ZSNUGjU5Y3Y8EwGF5k8By5rGK0MehW0V1b1kVya4CUNjftN1mBlXZvXej7yXyqYbO/p+4oc4jxzU7un84uGU+5UG6T6AXl2HI/GU/hS41SfXo8yvXQU6lmEBOGJ7liyVNjlu8UXSUiyGggofuX5tn14uyGrdfl3XBPI+aG2iFBsO/XznRNbzW/auS5Dm3gDlk7bG1Matp1V2/GYjHNZAXohRGKN6JX8nusfa/toCavb9R2Cm2BJI6YC/fugvvWcQIfh8rUFijt6RRZIEa8y90jLSyFKFZgUIN3mdgsREcBcGWKPdmRJTZ8noBcHSAiyrqlO1OLg0/1KFg/WlLuMWhC9OcRShnoJD7b2avQ7xC4RgAQPnozH0nriOIy5bLoccNoxX/lTQ0UKL/Ulp2Jyo2qtRe2E0AndF8MON620PtlB5XFALU+A/GsG/Rf+kxfDybmw1U4M+glJafhgcF3bML3R+JeRifKCF3J/nkOgQHL0GhOva5qjEkGZlLVj06w10Gkf5tIs2F29gM6pYnZfIEprVg9tSEOLIw4/2GvrqXT11JNwBGl8OB PdAONHPJ 0BUYc4KuOuWCPr9IBNfE9CidoH7Xc8vpMLJOcg8hE8vu/laelDYqkFzGsOv/ymi5HZPYKPZvTRHmjFEEPfrFpjxq+U4wUW2/lO/bLrff68I+VLrs8J6JYTPwtwrzwm6KZzAg/m5XbMH7rKybtvVi3bNBAFFLruD3ziUrGANqvEmtNB105r9ebAa1a+uZu3d1AYI0WUEvVmUPyNpq4toeLAiDeV2YEqXq2VWcExNv6pcipJizGs4EVLD8S0HAdxSJuMlKGH6FG/bXr+mkSnUnIWcULo2DHX9jPN/kQdAYjxI2V6m7wR3HFrTBV7ph1LoNXrCkZ4Jv4EBP2HCEzNOPktvdqh4ijPtqVrw7y5aeb9qI8gmKPh8FZJU8v1jf87AdJwZPS6kZP8h/eMbq7Oh7CRn9qyvwWFWl3/3QHIBXSsyyT4g8VtGFOkeCZpUtPhjt5I4XrooXthryWRfMlOOZd0nWR3kZudL6GEg+Qebc73hNHHUKEIDimo46cTbBNIZnojZRW2NMZ2O4byQ5WUeDdPmDjDr3lOm7Ov5TmMnnVrUqOLHG1bDBOYu0JznLOyDIkzvEp 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: 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 Acked-by: Mark Brown --- drivers/spi/spidev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 39d94c850839..8d009275a59d 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -237,7 +237,7 @@ static int spidev_message(struct spidev_data *spidev, /* Ensure that also following allocations from rx_buf/tx_buf will meet * DMA alignment requirements. */ - unsigned int len_aligned = ALIGN(u_tmp->len, ARCH_KMALLOC_MINALIGN); + unsigned int len_aligned = ALIGN(u_tmp->len, ARCH_DMA_MINALIGN); k_tmp->len = u_tmp->len;