From patchwork Thu May 18 17:33:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 13247173 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 52ACBC77B7D for ; Thu, 18 May 2023 17:34:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C717590000D; Thu, 18 May 2023 13:34:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C2196900003; Thu, 18 May 2023 13:34:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE89390000D; Thu, 18 May 2023 13:34:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 9E303900003 for ; Thu, 18 May 2023 13:34:40 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5E87FA0938 for ; Thu, 18 May 2023 17:34:40 +0000 (UTC) X-FDA: 80804075520.03.7959404 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf18.hostedemail.com (Postfix) with ESMTP id B0C4C1C0012 for ; Thu, 18 May 2023 17:34:38 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; spf=pass (imf18.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=1684431278; 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=rq19jP8KoV6cfikLmjA5jQ41EC5pXyhnoRUI2FjO7tU=; b=K4OS6SIKdYqrTmyGcPNNJrwpjujvZwBn5ecmDZbjDPdGkg628CoZj5OwM/bTqwkvvFdPGp inOUJUXn4MUSQAISNLFdyi6IyxadAFch7kSW54jHB29hptYO2ZXKIhYLia3dPEQFWJntuY jwCixEg7mc/clrGV9Cc18jZG4Fm+dI0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684431278; a=rsa-sha256; cv=none; b=xZP9I+2Ej9/EPmmrmZeldE6O6XjLD/LJ4Qfym1m+xBGnb39GmXwBpm7GSFyUonqr6mQirv FHyxx1sBcnJBXMH2M6Bwgg2dPbIomAsce8zkY/CBo+xwvGAWVz3F6Zygqpr/89LwkryPFN 5oc0irc5XNpkyWJ+LpOgugYNhz86L2M= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; spf=pass (imf18.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 D1B336515A; Thu, 18 May 2023 17:34:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDC7AC433EF; Thu, 18 May 2023 17:34:33 +0000 (UTC) From: Catalin Marinas To: Linus Torvalds , Arnd Bergmann , Christoph Hellwig , Greg Kroah-Hartman Cc: 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" , Robin Murphy , linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 07/15] drivers/usb: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Date: Thu, 18 May 2023 18:33:55 +0100 Message-Id: <20230518173403.1150549-8-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 X-Rspamd-Queue-Id: B0C4C1C0012 X-Rspam-User: X-Stat-Signature: odzgayo48cyz3gtcwzr8kharyj3rykuy X-Rspamd-Server: rspam03 X-HE-Tag: 1684431278-999077 X-HE-Meta: U2FsdGVkX185Uy7UyXm69mMzyJ3eqncP+qmzLjBAAt3w5OMe5MZA9ApVi0Nfwie5iSLvXQFTXEeDt2g9c1GWAaKjX04SmTMU7E2P3lLLh0e1Fuw5vZ8CkFCelJeJYFhvIB6+Hh6UQ6KAalEVSpuvtKM91pSWxWZ0RyIPia0yhi4eeP2Ct02Av1gflNQno4iKPgobLCrWb02CWPrGApX1HPxqLvc93aNpa1czvVjdYOOyQksh658JKzhzWEAhOQaLRgBOWZ4jcEIQiuTnlcsZ1B681hNqRHSNY/07zNmsKhAuSGUCXTi8cdvYL3eTj4MADW9zxL/ytMcOY5989KVBazZeMFYO8LORcuxEKjP0BM7TjSO4yzucvOHAEeVQX8/4Yd65DSbOuuwBh44igX8w89g0fsqnAZEy7vvydyvcjAmlPqX6iUTFJdKvpXCPNvCVTQD91KHT1so5pyTdJ+oSHdJM+uIf0eRgdw/GrRwd+YldWkT1QgSgVcDNNMruZcef7BMqRYWZO5t6oLCOKSSJAfc9knUh8Hq1YmmATtLDCV2F4gWCVD5QebCpD+DZRfLEesMT2edeNZCSaWnyuDp3xao9TgATALzQXsRtYRR9cweLdiTr3+f6PaZzFnb5hxGXye9jUU/7oIzPK27bHpvEOK0iGo+kG0wJFAs4SKykd32C0MRuDqOUbx7FXMtKjQy5/Lc05IQEgX8TY20KL0n/dY2w1dqc3JDfvnjH5Dt/VLzN66EsYmsk8dzkBFMts+TjMBEvz4yNA0Pv14Sga4+e9s6QfPZqzEKal4CMBe6QjxTahahWlUH9xkUWbaV4l7hbQN7oYRAcIS/FD9WFDaeAfTdUDqr8fAR/zuQjV/FFhzgGbXUhfygNjWyao1zCBJqNHQ27Rli49ZUeuB+x1JPBchok6Az46ThxyqW3c3Byk1Z4MvVFu2SRcA2xuGBa5A9D6i/pFuFP2yQ77Jlf/oL 2N3exXBG urji6TM9Zvs16Ha+Yr+Z7NbTFFS+poIzn/eoB+pr6f+OVYnUCh4YT+yvXaVd4Gdo/jDQLevUku0QGX2HKl7CnQxMMU4CG6u2GzUlmAkXHq6PM3eY+kAEdh6DkItTAxEfEZUu2YMLR2tRe84laMC3+4K0pTb8Vck06pmUxJbtlBYXl968MBa7zGXCykPc9D8kDB5O1fuyw/RyJAXZkPDKNtbOyWDJkk2rGbYDyAhThyUEbYGitikitgS45UTkLN76zAO2oYP0f2Xq+h2h6qDpROJ10VT8Rzup4ilCvEtyKxxIvLjJRWH7mdJsATSClZhN+igN5Lr9r6uoW0Nf3N5YQrLCqHipxc94FlGXGjvMi1RxTtEVysJNyPRXvjKS6DoOC+QAgIdkadXGG+RK5MKwhleVVwEIsNdOq1fefGbIh+duFVUaqUUhMCW5ZHIqfED286LRQl+SGttnpqlqNFEP+oGqkFBEp7QGA7uDEq2S4SMQAbjTSnD4ckl61YGDDdtW4DMpWwLgm8CvyZreuXvC14rQuzrRE94u9jjQoJh0j6Bk3rTOByRqOx4xDtAO5yAGMulKm 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: Greg Kroah-Hartman Acked-by: Greg Kroah-Hartman --- drivers/usb/core/buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index fbb087b728dc..e21d8d106977 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -34,13 +34,13 @@ void __init usb_init_pool_max(void) { /* * The pool_max values must never be smaller than - * ARCH_KMALLOC_MINALIGN. + * ARCH_DMA_MINALIGN. */ - if (ARCH_KMALLOC_MINALIGN <= 32) + if (ARCH_DMA_MINALIGN <= 32) ; /* Original value is okay */ - else if (ARCH_KMALLOC_MINALIGN <= 64) + else if (ARCH_DMA_MINALIGN <= 64) pool_max[0] = 64; - else if (ARCH_KMALLOC_MINALIGN <= 128) + else if (ARCH_DMA_MINALIGN <= 128) pool_max[0] = 0; /* Don't use this pool */ else BUILD_BUG(); /* We don't allow this */