Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4565418pxb; Tue, 22 Feb 2022 01:20:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPVw1oO+cgXe1AFMD5MjyR+zWP0GmjF8YOSLCNe7hD1l/plGTlD6uY/TajpFKE5+ysTr7a X-Received: by 2002:a63:6442:0:b0:362:ad55:f5e5 with SMTP id y63-20020a636442000000b00362ad55f5e5mr18942154pgb.180.1645521601411; Tue, 22 Feb 2022 01:20:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645521601; cv=none; d=google.com; s=arc-20160816; b=chS46EXKYPfaJNiJIciagJrztE/ENPyo9bLZUV6OY2qBP1bl1k8RjDtLKttA3PjpIi GBwuCTX0PLPuWzolsybsTi53Jz6g/MTtH5Uv3OxyZ5G7tsFCYJFjmqwLwtltqVUOfZ61 HgmED5xNwUEPn8UWoz9Xo6ZsMWvO6CK3dA1CVNZLj1Z5qNVHV5p0gosJOJEiLiKH7s64 iuNpIesKuQvrODBEMEDDzG5xPi484wvVFbrV/QqbR1LHU7erdVfi+v52RpJokfw5CGB6 rTsjKANbnjP/yYilTxi3sZ2AKuDT19FUT3AKYU6AfIf+G3D/6v23CSdxWXMQJl3p0v8K Z1Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MoNbjhhTiDXg2GYw+PhdfTZ6/GdGXOLZiAKfDMexz8A=; b=Ie6yLlD2r5XSP4fNSzffkkRaoaoZy9OwN9SOc2zk7AJ+f41EeiiHZwkndnlWGU8+H0 lPPTR2X9sL1yTlvuHsGfvcN7chAeWiH3BheTaVJBOMUOzfZVU22gtmuddN2+BbnlopJa kdyxC2rGNeFfjodrr8W49jv5+g9r/fzy0GtMsNLi4I8hwxiOJ9yeAsbGrF036DK1TP5R Q0EnFrbc+x6kk3h3+bvzl45ebOghRA5TRTu4SkIcbYEALDZb/U6rqzeOLkUx2QT1gsmb nPHD7m5X8vmRi3C5WmAlpd4+OdT2fdWlEIRoxDk3Jd/Pj2Ykl+8kOl5Ae0Vf4w8b639o iwow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bs7BoJ32; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 22si1565737pjb.121.2022.02.22.01.19.47; Tue, 22 Feb 2022 01:20:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bs7BoJ32; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230130AbiBVJPF (ORCPT + 99 others); Tue, 22 Feb 2022 04:15:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229882AbiBVJPC (ORCPT ); Tue, 22 Feb 2022 04:15:02 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 241B7D5F51 for ; Tue, 22 Feb 2022 01:14:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645521276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MoNbjhhTiDXg2GYw+PhdfTZ6/GdGXOLZiAKfDMexz8A=; b=bs7BoJ32Fd+7z6E57RFiwFnlvyRNHWNSB70c2Ai3XBOD+paIYB/GSYAZXGLoo2rOA5ulXc iOCim+gUt62LIW+cbmucIn7vO44zOQOOtuDqX3B/iDUk/GB06ON6md+bW9dXLoxqdCy+PP XFggcLENdkyUWksOjm0//blTo4G9fbw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-518-uLiWcP7WMAmHRnPM-YkjDw-1; Tue, 22 Feb 2022 04:14:30 -0500 X-MC-Unique: uLiWcP7WMAmHRnPM-YkjDw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4AB2D1091DA0; Tue, 22 Feb 2022 09:14:24 +0000 (UTC) Received: from localhost (ovpn-12-122.pek2.redhat.com [10.72.12.122]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71121710C1; Tue, 22 Feb 2022 09:14:19 +0000 (UTC) Date: Tue, 22 Feb 2022 17:14:16 +0800 From: Baoquan He To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, cl@linux.com, 42.hyeyoo@gmail.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, David.Laight@aculab.com, david@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, linux-crypto@vger.kernel.org, steffen.klassert@secunet.com, netdev@vger.kernel.org, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, linux-s390@vger.kernel.org, michael@walle.cc, linux-i2c@vger.kernel.org, wsa@kernel.org Subject: Re: [PATCH 21/22] mmc: wbsd: Use dma_alloc_noncoherent() for dma buffer Message-ID: References: <20220219005221.634-1-bhe@redhat.com> <20220219005221.634-22-bhe@redhat.com> <20220219071730.GG26711@lst.de> <20220220084044.GC93179@MiWiFi-R3L-srv> <20220222084530.GA6210@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220222084530.GA6210@lst.de> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/22/22 at 09:45am, Christoph Hellwig wrote: > On Sun, Feb 20, 2022 at 04:40:44PM +0800, Baoquan He wrote: > > On 02/19/22 at 08:17am, Christoph Hellwig wrote: > > > On Sat, Feb 19, 2022 at 08:52:20AM +0800, Baoquan He wrote: > > > > if (request_dma(dma, DRIVER_NAME)) > > > > goto err; > > > > > > > > + dma_set_mask_and_coherent(mmc_dev(host->mmc), DMA_BIT_MASK(24)); > > > > > > This also sets the streaming mask, but the driver doesn't seem to make > > > use of that. Please document it in the commit log. > > > > Thanks for reviewing. I will change it to dma_set_mask(), and describe > > this change in patch log. > > No, if you change it, it should be dma_set_coherent_mask only as it is > not using streaming mappings. I suspect dma_set_mask_and_coherent is > the right thing if the driver ever wants to use streaming mapping, > it would just need to be documented in the commit message. It will serve dma_alloc_noncoherent() calling later, should be streaming mapping?