From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 405E7C3DA7F for ; Mon, 12 Aug 2024 11:23:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=R32FDpsYtJG2hgQh3BA8H4vlTdZTabDQRfL2kg4nWqY=; b=QQzwSP5eG1qAyDcsz/EaKR27Zy cpUbaINUguwzkG6GcpBvOt4XG0urhho1WdHDrvpviCLq+13lT9HiBwSHKXinAnr8QSR6UPhSOriXp rjCf8MtaXkO2sy6mUH5gGmiHF9RkqoejMKTtoBk8RwU5PX66tqlsFoBlpKC/cUSvxa2P3EsX5LrXG TMBl5GK/zAJ7v21FfgA/LWiPWpoQOsdTH7TnWNjU5RC4gOymez5QsmT2Wr7rYW2MAg35KXyVfO5FL /DZspzL68OnuGAryxBDoZecHV/clk7V3fC50zZqHBLRQh8NPYqOw+yUpioT/kD9r1n2+6zbZadTiq wJti+IbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdT91-000000007us-0yLb; Mon, 12 Aug 2024 11:23:23 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdT7w-000000007h0-3oAB for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2024 11:22:18 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A3A7B60C17; Mon, 12 Aug 2024 11:22:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0886CC32782; Mon, 12 Aug 2024 11:22:12 +0000 (UTC) Date: Mon, 12 Aug 2024 12:22:10 +0100 From: Catalin Marinas To: Baruch Siach Cc: Christoph Hellwig , Marek Szyprowski , Will Deacon , Robin Murphy , iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Petr =?utf-8?B?VGVzYcWZw61r?= , Ramon Fried , Elad Nachman Subject: Re: [PATCH v6 RESED 1/2] dma: replace zone_dma_bits by zone_dma_limit Message-ID: References: <17c067618b93e5d71f19c37826d54db4299621a3.1723359916.git.baruch@tkos.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17c067618b93e5d71f19c37826d54db4299621a3.1723359916.git.baruch@tkos.co.il> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240812_042217_031705_5A096707 X-CRM114-Status: GOOD ( 10.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Aug 11, 2024 at 10:09:35AM +0300, Baruch Siach wrote: > From: Catalin Marinas > > Hardware DMA limit might not be power of 2. When RAM range starts above > 0, say 4GB, DMA limit of 30 bits should end at 5GB. A single high bit > can not encode this limit. > > Use plain address for DMA zone limit. > > Since DMA zone can now potentially span beyond 4GB physical limit of > DMA32, make sure to use DMA zone for GFP_DMA32 allocations in that case. > > Signed-off-by: Catalin Marinas > Co-developed-by: Baruch Siach > Signed-off-by: Baruch Siach You might want to say that no functional change is expected with this patch. The patch looks fine. Reviewed-by: Catalin Marinas