From patchwork Wed May 31 15:48:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 13262461 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 A968AC7EE31 for ; Wed, 31 May 2023 15:49:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 41A3A8E0008; Wed, 31 May 2023 11:49:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3CAB68E0003; Wed, 31 May 2023 11:49:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 292528E0008; Wed, 31 May 2023 11:49:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 17D708E0003 for ; Wed, 31 May 2023 11:49:18 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id E8215ADCFD for ; Wed, 31 May 2023 15:49:17 +0000 (UTC) X-FDA: 80850984354.29.E19ABE7 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 4196210001A for ; Wed, 31 May 2023 15:49:16 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685548156; 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=LzhCnp1fBClzPdXzdYT4tiFTDQ4AYEPkUunrnhK6v+RwiyvoRlRyuXmuoSd4n4Ht917Ret S8qunu1fWuRdwINZ/pTHihYDnptKyxURRIqLQD0i9jzxdRS7TEuc4TnA10+FUisKFNuzQb Phr3GqE5zAyV1y72WZtajrJRL8CJnFw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685548156; a=rsa-sha256; cv=none; b=iKalRi1szyIjv+L8HfRTHz8stMQfQVuAAk7gfK3pG2HxGO1RcHaoz7EkyMiQE8VL2HpNBQ FyUliKjdFeTdQ055uj8caEQ83PTQJjPvQnaLJJZ97L7s8b0uI9tdgtPWPqlCjHHMQIq/AC euXo7nktGJN9seLv9bjHAlMuSSOTntA= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none) 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 7016663D92; Wed, 31 May 2023 15:49:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25B5EC4339E; Wed, 31 May 2023 15:49:11 +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" , Jonathan Cameron , linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 08/17] drivers/spi: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Date: Wed, 31 May 2023 16:48:27 +0100 Message-Id: <20230531154836.1366225-9-catalin.marinas@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230531154836.1366225-1-catalin.marinas@arm.com> References: <20230531154836.1366225-1-catalin.marinas@arm.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4196210001A X-Rspam-User: X-Stat-Signature: omfndbngbmanxwgw9gqfqnzu4m4bfihh X-Rspamd-Server: rspam03 X-HE-Tag: 1685548156-953570 X-HE-Meta: U2FsdGVkX18rHd4C9a6CWeJ4niqHMCczbxESTvW5496wimyldhJHFP2+UfajETWDO38i/Kiigd2qjpBKhRSUdTDfrxXiuoS7kR2ANZk0ES1CyIzJ8ILF6Rsn0D8lSuabq8JO/GZrqyXZcVFHpehIhEAO2CORvetuqVQlHnIMi9DoKMeXju6oEK+BDdjwuA5cahjRqplwE5v1WkgLhJDdN+fqV21OkYN3LluUOkCjxnu/Zhue5s0rN/umYRzCorDExF0TvxumBzGIaeNTD2YAxWjQrYGLpMYGCQH5diSLkRy77l2lbPpr9BoH3OYsMBVpUGAZxZ9tQsCZ+U5BjlduOPy0x5M7olsEQoTCsshQLMJhzXk/U8N/lFRJqNP1mA1BbI+QnYIcv3hdZG+Iwll0Y0XACAgKSueUNYfLlOdWlCIDE+B+JZjmFN9RSaca/gsXWHBkLV4DGscJO8gSSJgIWuwxXC5M1PfR6wYNcZD46m//XQj3N/KJmu6A7FuQraFUT5O1qOuM1DkoOWJBNYFtrJlKl0YeWcyPmGWHFps9X14tzxHbo+PW8EMZm+no76DuCHa2Pi/010iFMZHv9hyKJEPOYCFWPr2LQzhpfFZybLZywRuzIwXJndnq/1p9OY/nUZR+xo2nU0t4pY7JiKSoJMWaLRnECxk1ociubI+hASjYPHwHYzEFDq8eyTmyis7MLHNuJjNucruR9Fp+uRqeeqwe8K8Vy3MkePY9OMKHmItO7SvATwBPiPneGvAmSuPOIp7aEzERi4plK4jQpUAJuU3/tg6a6mKCyABH4k42LtqnZMc9xPtpNrtQKuvHXCWvw0WRCHpibqPXcUZA7qdZdYB6qHga7hbCyZPE8LnbBnmH7odsKn9KxbRnRPWd47l6Fa83HqGkrziNMyD97fDOdGpOU/HuIVQ3p9fKyvTvYHfQW0QqZDpBOvzwowqPA1DX7Fo0VK5r8Ej3MUlMTpy fw+HvPv2 EbCDgDIq4zdgPFxCFO0GmipT4BSulDCz3b0rqvcDWaWl6Jo+YImIbfW3+RX6Cuna2uXC84v9drjC6RnBbG8YR71ngNqf5TGm8m880lSq5EcBWT73+yus0FRhJ/DqhWJuzINl4F1x6auq/INRlihm5XM21IYWL9gS4Qjhd5YisXKkun+h0DS7zO+dQIliYlP9LPIf6A7+M0bn4e38YxyXfCTuu3VJK7nzFCt5GhkB9y+DBZFb8ozAOi7bGoG+l8qSfuW7gG6SGWiEUX/WQFIQv/uZkc0Esggzmio8mHGH4B14Xi/e/DgnxwH0DiZnhhh+I7XDa3UJmeMd1GEnQ8YYoQ0pG4caFqblG1HZ/m3gMlcr/uyKgUpAqooRx1cgUlczybWJGCAdIugTrzY1iHPPpQPFh0rE5F5ZFK0bzfBPf0vRkD6jXI2zUFomu4zqunomplo723T/RoIuocXaDJi8JxGtCxohKt6NLh4QKSezbPeFX07uePl1yAi+Do0XGeQNRScd/Ld5LZaiNnOdl2JQ4QuuSIbV4ukqUWCSvb8aO+EISgaryWfBw4ZdVPOUVZFo2/pIC 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;