From patchwork Wed May 31 15:48:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 13262460 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 9A14BC77B7A for ; Wed, 31 May 2023 15:49:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3570E8E000A; Wed, 31 May 2023 11:49:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 306F68E0009; Wed, 31 May 2023 11:49:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F6B48E000A; Wed, 31 May 2023 11:49:14 -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 1106B8E0009 for ; Wed, 31 May 2023 11:49:14 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id CFB3C40267 for ; Wed, 31 May 2023 15:49:13 +0000 (UTC) X-FDA: 80850984186.14.8D8F9BA Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf03.hostedemail.com (Postfix) with ESMTP id 3818220029 for ; Wed, 31 May 2023 15:49:11 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; spf=pass (imf03.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685548152; a=rsa-sha256; cv=none; b=NpYkzXRKDV2Teff7YRPSoDgTCKuhKUbIdg4X45J4gSfMlvFwOVCrGeDvGLVfKtrNALRSXq Nkr9nTwBUWBKHKgbQ60wK+WwilIwgy7tiFi02Qx0WCOu3TJgoHd9S6doiO/TDJxt/qnq0N fAW+zn1b/Kyd/PUsyveJ4XVgP0dm/V0= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; spf=pass (imf03.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=1685548152; 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=ZmV86imfVMATseoJlCRYow7aoFQuclO2qwE8MVqrGZI=; b=qaa9dmFi+MdxyUVETatRXlOgQAgi0m6n5NZAFmBLWuh1OKG2gZFadXg8KOpnnJY7OYTW0U /a89pPf39KrmdcVTqPorFArY6kSrnSrsw7S1poWVhU8WB3tcWO0mHeklrZ6SVEshdCaGF/ qzy1o6nHpBs24RvC9RCpNX285Du7+gU= 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 52424638F6; Wed, 31 May 2023 15:49:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9AD7C433AA; Wed, 31 May 2023 15:49:06 +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 07/17] drivers/usb: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Date: Wed, 31 May 2023 16:48:26 +0100 Message-Id: <20230531154836.1366225-8-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: rspam06 X-Rspamd-Queue-Id: 3818220029 X-Stat-Signature: xx1u689nrco15s4xec6pzc5tes5iu1qx X-HE-Tag: 1685548151-329178 X-HE-Meta: U2FsdGVkX1/iQJPH940Er9tPM5gTBNBaxRqMwGgBBeZ2wMU5eNwk2X/1OPGvIiaV3GHR6cmebpEWUCO12YsjDSE2XXheBNGGR9eGCBAnLzw9ZYcTCOxIjj1a1dwqNYzfNNhdswwLFtOewvsFMN33ZQqv4djuLF/jCt5LCmKOT81uinXNpjvBMlVX5UroHFR1cJgBb33YpacNm2wJMe1XOyjonGpN4uz5t9eLMLBSdxUmIBmO3smfWIX2zYlhzWk7rzGRa2o3nF6oaapRygI9uhx4uDvRsR5l5xK9gl7+VKcMDKQ8TvvOjPkaY3SFq0Bn2Z06ov8nrUDhoRjhFDAA7/o0cZz7RLb5PUMd4x891N49j/vGREGkYADeUtC8VGSTwAgYfzvuZADi0z+RBr3Ykcs5SGvg7P071VN2mai4r1UioYT5w6HwFILjPdoq/jgyE2g7XUN7gebva9kVBIcausiCo0wR4hcS+Idvfd3slVdgcFbDXEA+XlDmpryVrdxpXEpIfztzsMcJ6FTjeMj7Jk/mzkSefSCzUV5TRpvYsqJ1v7G0MP70d8EhAXP1MR+4+n09Z5Vg+4TPxLdkC+1UijbZ35tGQpqFsE1fHfzLO4j/7zYwpEaqgGed9lWXYiVGqeY7xHu2yGYbLqgpOlJE9EIDfeluBXLzX5sDclOfWENEPI2LyMe3IO5VpRoi0dqlmzZgglo2hJE+YkHPjEVR3E+A3i+Hm1hFjZWX/T7BkX6+QVy4lPKDn7j9qfGJUgpefYrZgtefaOz04uTMsPrg8iJe8hKsIgYKvertYUFqghLN2znit6lYqmbJjfTmPnTukWIRw8+uzf7nX98abnsdmCNZLCGA7d9umcofkfs5WZthsTmu25sR8VHeGNS6PlPLIeo9Nvj4rkXLNM1tdMhGtuYygnXxt7I4ZfqqV0nJaqCd0SsRqdwM0zyIv+dfH28TbGYmQxCazCHu7HVsUWs kYjMr4Ll FDseBzNQZ3olT9YW3bXVKMjAtXIwfjoMEt1f34Nxuhcf7FsS0pvYoY9E8RCQzTu/Xx7CmTvjg7G04+N+DCy3AOoP4hKLut0iROaBfHd2/TPHThZF8tupI/wHjWYMiuYnBk2s83We5d0hvH7TxmQKT/W3A932TsyirHqv8/x9JUzwft8XSnvFaQHn+Le4Vpp+RqVCIO4d6E2rRMNLltc9U0XM1+p37Rn8HEMT7tXeRazN/GacK4z9Ze5Pn1RdIvL+qlKfUE4sTwCTu7+nTatlWZcGkdsUtZW/j/a4iCyc1E4uGNGMTFU+qc3D29OPWS1i+/TK3xrRvM9Z2YdIci9TkWG/AB3gxaMCsKnN9S4UyAL0qS3notKSWcq1MGNlML1viebJgFtA8sHi8xCBTI/gZYg9b58xMnXt/IDAgqpbsp6JmXgDNf5BnUNP/SectiRgfDHSbnezYgs1x2YyExiz3yyjhZHFQdGHy6PRHless/RCrxMh7TCkxAQ08A80pke77WrwOqZBb9R3EvH+IaFvtChc/Cj6Gz6JtiSFZZiM7M/FrJkqd54vPuKCf8OSRVSupu5C0 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: 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 */