Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2097448pxf; Sat, 20 Mar 2021 04:30:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw34++Oz0Nc/5TtT2Gu286jbVxKzSj+IIv1NUKKxdAez2/MhmuUxGydn4xRYc9fV84rdFPa X-Received: by 2002:a17:907:2d24:: with SMTP id gs36mr9092704ejc.344.1616239838373; Sat, 20 Mar 2021 04:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616239838; cv=none; d=google.com; s=arc-20160816; b=e+HS41GV7XIISwCSWvp1nNbKJx5y2TeobeVd8LAVFPRB89ecvkFUG5/sNBz4KWIZsf Og8JStvI+36p3xRwPXMb50SAg7kcVIKIX1FXLRNXxyBWSktb3d4TfelSlKlH2mbrLhJt 7JDAs/UkSYCVeDivmyGu+Dpzl6Lw/EC7oz+nv/mnu4Kq2EMzepu5c1PBNT3OYM+sSGcX 8+NB8Zdr7f5QLeLM7NnHGZCZmq8i6x1O4N46tiN4uTyJ6QiG0S+z5Bs1qTQ/giSht/4j 9yZJCIpFPA2wPPnlC2YXE5X+coPCEfz2b11opnpgVD0cT1Oj2F6McGEbj6YUK3ynLjuT wiGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=G8YLnUh4caOyCZOSjcTZfh2QnqUHUCagkBGMnDkZdzw=; b=abVa0Ckgc7VjC9gWFzVu+j5FukH1mQjSOaCbZ7xcNj1gshlroZJvPxuSW9bAnGBkkp tQ/gzRAt8kb8/GwlXmk+J3Ms+RJzyLxryQQfEqchG4rvgGDvwygyQ3VqycCiZLn2Yzrf NJd8AtULHMTiL6/rqHU7BSKmbDYVNGznSmNTxT8I2D6C7ozK3uMdYM6tjrtV15DqJRgB hSnMoEf41j5/NkTlB7nT3qArXWRy1crPWnsTDHv0dzh4CCsgKleYkiFzYTlRtY2f5Ail KqcHcK3pP/0Ff5RH+qjIF87nu1vz+WC8VMGXlEg8JkGKID0661dT+WjsCE16A9zP3M3z UHNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V11S2Isf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si6385988ejm.291.2021.03.20.04.30.12; Sat, 20 Mar 2021 04:30:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V11S2Isf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229445AbhCTL2o (ORCPT + 99 others); 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-kernel@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