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 X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2B5EC433C1 for ; Sat, 20 Mar 2021 11:29:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2C126199C for ; Sat, 20 Mar 2021 11:29:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229634AbhCTL2o (ORCPT ); Sat, 20 Mar 2021 07:28:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:58028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbhCTL2n (ORCPT ); Sat, 20 Mar 2021 07:28:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2414761978; Sat, 20 Mar 2021 09:07:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616231253; bh=6VAVAR5i6qrEizhLfVsId2rG69qGPlpUE5EC8IW9Oaw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V11S2IsfG2Qutx8qrWX090WK1T4VGvz/EoZJP/BciJOybprxR4hZ4MaCSoPFKXmCM xI2n6/x/cJ/RJQB1JLBHmjrNafcoWn4z5TWvtV/krSaokagOvr+DeLzV80OQvFj1LO Q5q0Pluj8iEEhN1DXvXUwps4sY1QKjK24N+Bsp+JkjGqo2rnOJSUpLy0YFpM5FG2OP Z9g1cLsBm1qzggxKeg3xyaxN45UYLm2K/MacW+nYZ2J/PlseOY5Bfz4xbMStprTeFc wsDTjEnLQofwLI8N4KCJDh5n1CSNzsL0v0mzmllZ0yPU6BACjkEF5vCE7BthOeQupM FEvZ1jbP4b9Jw== Date: Sat, 20 Mar 2021 17:07:26 +0800 From: Peter Chen To: Christoph Hellwig Cc: Sanket Parmar , pawell@cadence.com, a-govindraju@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kurahul@cadence.com, gregkh@linuxfoundation.org, kishon@ti.com Subject: Re: [PATCH v2] usb: cdns3: Optimize DMA request buffer allocation Message-ID: <20210320090726.GA28364@b29397-desktop> References: <1616008439-15494-1-git-send-email-sparmar@cadence.com> <20210318073245.GA645121@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210318073245.GA645121@infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On 21-03-18 07:32:45, Christoph Hellwig wrote: > On Wed, Mar 17, 2021 at 08:13:59PM +0100, Sanket Parmar wrote: > > dma_alloc_coherent() might fail on the platform with a small > > DMA region. > > > > To avoid such failure in cdns3_prepare_aligned_request_buf(), > > dma_alloc_coherent() is replaced with dma_alloc_noncoherent() > > to allocate aligned request buffer of dynamic length. > > > > Reported-by: Aswath Govindraju > > Signed-off-by: Sanket Parmar > > Looks good to me: > > Reviewed-by: Christoph Hellwig Hi Christoph, I would like to confirm the dma_alloc_noncoherent allocates the memory less than PAGE_SIZE if buffer size it would like to allocate is small (eg, 64 bytes)? -- Thanks, Peter Chen