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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 3A400CD8CAA for ; Tue, 9 Jun 2026 13:46:18 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4gZVYh74kzz2ySf; Tue, 09 Jun 2026 23:46:16 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1781012776; cv=none; b=NkMUFFTS0eYgjd3il+1NUxuk/KxrYZfaFvK1Ck1g7Dj9FsLyIJ3k9H5iITqwkp8eijAhxxs4K1alBDMoNhHswI/U1LeFlDtB+a+MbfBlXpkgC0GPJt5VmNFLPuEXHW5NL3ybIIs9TKAuHppggFjZpDvEfnl7ZfTxqNLDMwlUEkIH2bNLNgyloyw5hCcsb4ZQ4KR8/PgIdt4QPAJnXq2FH8aMwNM9I0Z5OJl5hvy1VB05oZ8qh+fD0wWU2XxA4qNbUEp4MytXJyHlDxnvxNR8D7zkGbtCflmuhmHuyrthI3VFxutyw7eMI6K/c0zYLxHmvwxRXbMt/EaTtDJ1a2uWIQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1781012776; c=relaxed/relaxed; bh=+mWd+ch6pOgiAbwKKWra1mBPRdC1ZbBp2SVnO0VQq9Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kpXm9eH2dN3xvpW4hL30W2fu+k0YUMpvc0si1FCPdpee5e36sx1aQI72VI9m/gmi+6kWG7IOo3Dl+z3DMx7+ANUVxYvrY4LbEtZDdhL2SDwXgWcw2LdgbiZbsF4kFuNdU7briOnE+H6oGVg2H+uYt+KJWYfUXrKjWHfTVsvw3sVicM3aYTkZT0n17DwtCCrkHCBlwVxhGMz5Ib/VEB3gfsvmOsB6voZeMNh93R27+9zS+Ngn1Ni855pOAhgkpbTDQUA86uy3LA6HlV6lsdyAFEmqREKRHG0336HtMb9JhqqYbS9ZvzZ1q9KAVFeClSP9O65hpyoF3cR+/jerWAliQA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=oYrRuOCH; dkim-atps=neutral; spf=pass (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=catalin.marinas@arm.com; receiver=lists.ozlabs.org) smtp.mailfrom=arm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=oYrRuOCH; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=arm.com (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=catalin.marinas@arm.com; receiver=lists.ozlabs.org) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lists.ozlabs.org (Postfix) with ESMTP id 4gZVYh2LBGz2xll for ; Tue, 09 Jun 2026 23:46:16 +1000 (AEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0D20B2680; Tue, 9 Jun 2026 06:45:40 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 474453F905; Tue, 9 Jun 2026 06:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1781012744; bh=hPU8IDMY/1bigood4PJh0IZ3C11zD9lylepa8mUtOe0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oYrRuOCHy40/LOMBgqLu/oSgePxQ/mEJvhjlcrmFG7n5JH5hYFOLq53vSRXwMoF4K WsW1KucEpt3XAT202ZIToMDDzs85/wgGVIarAdGuD75zD75OG/1q8Da0LYudlb70WF JMHFfuqPz/yyRGv++Hfm4quhY9yzz7uhfEXlBEaY= Date: Tue, 9 Jun 2026 14:45:37 +0100 From: Catalin Marinas To: "Aneesh Kumar K.V (Arm)" Cc: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, Robin Murphy , Marek Szyprowski , Will Deacon , Marc Zyngier , Steven Price , Suzuki K Poulose , Jiri Pirko , Jason Gunthorpe , Mostafa Saleh , Petr Tesarik , Alexey Kardashevskiy , Dan Williams , Xu Yilun , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , x86@kernel.org, stable@vger.kernel.org, Michael Kelley Subject: Re: [PATCH v6 14/20] dma-direct: return struct page from dma_direct_alloc_from_pool() Message-ID: References: <20260604083959.1265923-1-aneesh.kumar@kernel.org> <20260604083959.1265923-15-aneesh.kumar@kernel.org> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260604083959.1265923-15-aneesh.kumar@kernel.org> On Thu, Jun 04, 2026 at 02:09:53PM +0530, Aneesh Kumar K.V (Arm) wrote: > Commit 5b138c534fda ("dma-direct: factor out a dma_direct_alloc_from_pool > helper") changed dma_direct_alloc_from_pool() to return the CPU address > from dma_alloc_from_pool(). That fits dma_direct_alloc(), but > dma_direct_alloc_pages() also uses the helper and expects a struct page *. > > Fix this by making dma_direct_alloc_from_pool() return the struct page * > again, and pass the CPU address back through an out-parameter for the > dma_direct_alloc() caller. > > Fixes: 5b138c534fda ("dma-direct: factor out a dma_direct_alloc_from_pool helper") > Cc: stable@vger.kernel.org > > Tested-by: Michael Kelley > Tested-by: Mostafa Saleh > Signed-off-by: Aneesh Kumar K.V (Arm) Nit: remove the empty line after Cc: stable. It may confuse tooling. -- Catalin