From patchwork Wed May 24 17:18:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 13254346 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 DBB39C77B7C for ; Wed, 24 May 2023 17:19:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7723A90000A; Wed, 24 May 2023 13:19:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7210F900002; Wed, 24 May 2023 13:19:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 60FD490000A; Wed, 24 May 2023 13:19:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 52812900002 for ; Wed, 24 May 2023 13:19:42 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0001B120A02 for ; Wed, 24 May 2023 17:19:41 +0000 (UTC) X-FDA: 80825810604.11.AE0697C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf11.hostedemail.com (Postfix) with ESMTP id 39C5B40005 for ; Wed, 24 May 2023 17:19:40 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf11.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=1684948780; 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=OFntC3g+5HI/dxvE3WP/tx4UalrJ9XINHQN9zbowMvYis5W5dhWx0c/MjdiObl4V9+mMMe 3gHzN88ITC6ND+08Zt0znY1tWGjwOotUYtyvyzCrzabrXExxCo4TAbc+PXDqxXmtN4kv0V 4BvmdEO9rKiCWyFgrV5QjR7HfaNS7G8= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf11.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=1684948780; a=rsa-sha256; cv=none; b=1QoE0WKes4mCg+QfyOM/6EX28/PuNG2us5CYWh+xJ0Xebb26aN2et+nW9QD/OJgrb88gDE 6hN9m06deb07CBf3WX+wuTuZppaHvGD+Gd4Dw5YdLfMetyw3FTEK+gWU09GqzuZSw6jIqP owZJoo4eg5TGfL6+6NSnoe3w5QWXaPY= 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 54378638B6; Wed, 24 May 2023 17:19:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AFB4C433D2; Wed, 24 May 2023 17:19:34 +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 07/15] drivers/usb: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Date: Wed, 24 May 2023 18:18:56 +0100 Message-Id: <20230524171904.3967031-8-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-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 39C5B40005 X-Stat-Signature: z6wki585shm5aj4rymja18grqhafux4g X-HE-Tag: 1684948780-735271 X-HE-Meta: U2FsdGVkX186i78peWxHQKvdxUrDuHCKXsh4dKTYmvX4VqCHfTVxOl2/tadf8z8cbPWHeIK8XhuOHkG7ynYOIVkUKOE9/8cELMh0vcyEQ0s19tG0V/mJSpBk5ay4vOj3WE5iAITHQsRm4XsWGPQgQPBE0StHfh+VCe0EJnICWMX+7X2KACLg1C6rYU/MifksMHqL1JoAr1clLJxHo/Rp0iX3LQ76e7NYM03Xng4YgNTjZsHRskzos1ECVjXMel87bKKtEFq5JkmKg1GDN19Dby7FZ6iaQYlm+YPvbWDMjFALElvQsy5MiAa8qJfaHXEEhZfc6tuMKE9Zph/G15ha2DsBVFkRUoi938TPk7hxPbq5H+55J95uejlSHMtCcunlvWiDo0UWDz+Pa9EFS3/L7TfH1Q6S5MTp0fwP/ZEnGG+nUW7BN/nj99PmqagiGl5VBuoC9x5o0348Ox3QPaVksK290NVqyGDIPdUHZ2HOYrUwx3Zs1/YIeTglHuPAZTu72+aIiEnbOF+Shl6WNB6oJ2Z+955s24dS3N9zIM221egBzJaic60Uej2lqHkv4uVwYdx4gSY8DVYvgMChzNWQHfcZbpsjjSJFOpT+rXLYwQuP6NwiFLByo0C5Pn2cpelj1S8QA4ZlTiN2ZlQ/GD81ueJB0kLFZPr6YGfq5XhFi6HQlY+2quh9KqJ89CT3f+yIkhoGyqCkdXwv95HBr/zwNIUsEHzPhEvu8v4pfcsNAbqei6Tp/xCyc7I8RUaloT6mxgNmP+Em7l4YWdPXpep9Dh4dz2TGSVlud6P1xHcqK1y0MjYr5XWj1mrPVrrKsixwRtzm5AoDwBW9KhlzuPQ/wx3NyFA7/MH0zLr8t7g5SOd2JhcQkxqHMqiwFlKbbg89pxUk9JUFxNp4rux142tBRKF1Y5bSFOXtp8thGq5FpmiF542ajPXZWpaJn1dJ51QeVvtsrVsM0zHqQ3Xp+xT 8imMVKdK gKhq/yo7ME72kb9u15eRrbWZh+y6WJok0vSYiIx7VIELtNRbe8RjC7uH04h3zRpm9kLFxUWKoE9cGVvVesjB2bvyY3AjEObIYAoM7bD+MK9CO4H9fGIwtmFzeiKvFbqu6S4kq8QZSkeA71t3nrcJy3IHYPDxhXTvD7juHo8WAyIxxb7uVfF+ToChapSl1WjJ/MbDYqcjWQrDGII1zzoECKzs+jzx4Qlkj9bqQD4Sm+EiaRqNbgO8Dcd0F1QU9QUZQEhbF0UdIXFN2X/SZTf36J3Jx40aEdB/x6zMqL3qGYnSXUqO1Fn7YSUYO1XE8cmA08sIbhVuyXIwL58QQ+OpLNksEAK4hKtuD4T1UX0av3pa56RBO4lVGiNxvBZe1BiDbgAOnfr3Azc7I8zI7wFlAbNVgzJje3djb6fd1u6Z+EbwCf9iopdeV0L+m4UDG1SOj8aKUkJnTGlk03mSG4fBkoZxjD7oC3kHSgu2fFMfLr78MkAv24j6mHq0mfZWZh0AJMF0qN8T6g0RsTU9jQP8SsjNsxGr3DD6dieXwNs99rwB/BdDpWCIMAP9haABMkDHKZhxQ 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 */