From patchwork Wed May 31 15:48:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 13262462 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 9D8F2C77B73 for ; Wed, 31 May 2023 15:49:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A4D88E0009; Wed, 31 May 2023 11:49:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 354DB8E0003; Wed, 31 May 2023 11:49:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 244588E0009; Wed, 31 May 2023 11:49:22 -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 13A518E0003 for ; Wed, 31 May 2023 11:49:22 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E9A481C7216 for ; Wed, 31 May 2023 15:49:21 +0000 (UTC) X-FDA: 80850984522.15.22C3E06 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf12.hostedemail.com (Postfix) with ESMTP id 4DB5B40018 for ; Wed, 31 May 2023 15:49:20 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf12.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=1685548160; 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=P3GKCRqSal+FoaPUZC73tQFjQIUPiL6KpjJp1J/vlzY=; b=obyb3MU0/+brEIkxX12KdoUks2k/17+Vxr3zOd9T2BKhBmvM0fG4tfq5bvczA5kid0aD49 iq9+pjdxPUZ7SndZejpuPqiZxNQIwYlBHNw9ldj3kOUgXgrueelGDgW86y3ceiBmKGorsP mqOTJWLjNw4yiKFNELoRMtdWrADDjKY= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf12.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=1685548160; a=rsa-sha256; cv=none; b=tmJr1EcZGVHkX06R21tnZg6ZOy5Puf5dDOi7zbgRqhRYEvWRX5poucQGQeDz2PIKDP2ODF 9x6w3j75xBd4LSlRdFMjq8vUdu5m1TBkPDmUR2TbC+RdvkUYneifVyDbXsOQJsmS3eqGyf yvCWvTbGZbMGhD0aabAQZbp4AgEVGPQ= 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 7CFF563DA1; Wed, 31 May 2023 15:49:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EBEEC433AA; Wed, 31 May 2023 15:49:15 +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 09/17] dm-crypt: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Date: Wed, 31 May 2023 16:48:28 +0100 Message-Id: <20230531154836.1366225-10-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-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 4DB5B40018 X-Stat-Signature: 58o9hqx5zae7mxqg4b6mmchqejjjqtqq X-HE-Tag: 1685548160-612513 X-HE-Meta: U2FsdGVkX18xhvOEt6dkXaQcnQ4N6XFH0vNbN7YG2aU77l0tMlVrQ7HQHvJUzvHU2RYaeaMHxOp3/2tr8Tpw99I3xHRe/9lLoLfSJ11JKZSLfaxIGJJp+maf/2rRB4vhbgqgIvpyDll/FNw7i9TITDEk9RDsMLLmun6pzdk/Lv39E6LTrCJ8c/XR0UjT5fj/94LfWBESIPwJRFvqaLjceAMmug/UaVwdgWJCzwP4igCZJ2kE+vT5gPc25vrGxKOQUj248g1DGYzdBVCYGf/Eah5fGn1oss9HpKrjm4gMdJzHCJMJ1EigBxtDHmzAAPVfV6J8HzttcMuVih9IVaSmfPXD1GL6tG1d7nyHBB0T78fvxXjR8x9L3UjXpAGF1uGjPTzhk5zsDLL9cHgzHuoMFODv0NhphDCaIXKRJ9t392geohsl+Qrxyq1jU0cK8b8maxKUNWmu+YeqUp6H3kMC1lgqM4yWbYiZxg0Eom5xzjCqbQAdXOyDyx5as7dtAFay6Tztz8BSr4AtmZbLcLwHqzS1JTG7GSIy4+RlafBPHA+OXnzcwAcMf9ib3qwfCMRzjGzvg9ORj/F3BE2mObO9EuIZw3d2gqwbiDWhFfMZQH0bIxzn5BcI1zmzizyohcfdCLxY6x8HzoRZcoDRtdxQsvgwXvu59C3AwKIUfgmfG5vLj+6LtE5HlHTKtA8hCXOrIlIikzy0+Ml+NDRSKNBRjXJW9JiHzPdihxiVSOgzgXs8cMmxdgw/Aj8WWH+jRoG34nukMKhillbDIPcDyISAiyipwF8896WoXqVIpG9VcE3zzntE9uEFWb9ZAaS5Mo3HNsAaU73R5RQJnn+ICtrMVoe9B2KyBItPcOpcji8bMzfHy8ieuxjgmCfG1iEvJkNpZRV2+/uKmJ/mr9wk8RM8tBz82CJ98m76G2YaiSRedELubzzi3JcAXHGAPGUJE973dhHUcO/WgnQJi+fIuYe J9HYBPra n20VHMcindtiJeuJv+SJVw5MZ2/c/RrNDMwM4KHkcwQr8kCsEcxwftGkg8YdY9UXR9nHBdICY3qk4EUJv8ffWRhhIVvelfGx7zJ06sqMK6e0gLsr0vLqj7QNb0TzleCuVY2RcjLejiOFJ182Fzf/g0C2X0mhVZyTuC5IwSYgJdX+yozSXdFJwxCh/5wMcOQivqhd8s+XHenSh+PLlh5vM+j3F4zQvK1EdhYJg8aY3ta3N9wsPzA79LiQqED1vtYddECX5XhCGC2mlKuTalYV28Q0An/DS2sntTnQCj1gu3dTC5vMJXsRlNCX1JBSlQjgBKP9Ad7mzqrCq6zIQvBFyraNHWgmLCkD9yQhKYqGBOJi9CmHNGWt+iI1XuuK3VIGnI63cPGQnyrP8T6/V61dQT13RsuePT8M10MtmasREmCR4eZ5wU9VouRbqWO/YkRBdAXRbnqcrAda2SkTSMhPJfN/Jradm8ebyKlujlthgeStafjbw2vq20kaYH7ceEfyjYBe4jxo+XCZpMXrIoMehBN+cOnjJCIz0V7lI6/qcuSH27RlQ13kKBQcBd/FCC/NygBq4Uvx07eVvryZBsiQV6Wvunw== 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 Cc: Alasdair Kergon Cc: Mike Snitzer --- drivers/md/dm-crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 8b47b913ee83..ebbd8f7db880 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -3256,7 +3256,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) cc->per_bio_data_size = ti->per_io_data_size = ALIGN(sizeof(struct dm_crypt_io) + cc->dmreq_start + additional_req_size, - ARCH_KMALLOC_MINALIGN); + ARCH_DMA_MINALIGN); ret = mempool_init(&cc->page_pool, BIO_MAX_VECS, crypt_page_alloc, crypt_page_free, cc); if (ret) {