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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 961F5C433F5 for ; Tue, 22 Feb 2022 09:14:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC01F8D0002; Tue, 22 Feb 2022 04:14:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B6EF18D0001; Tue, 22 Feb 2022 04:14:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5DD88D0002; Tue, 22 Feb 2022 04:14:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 94BCB8D0001 for ; Tue, 22 Feb 2022 04:14:33 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 429E82122E for ; Tue, 22 Feb 2022 09:14:33 +0000 (UTC) X-FDA: 79169855226.03.3B35BD3 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf10.hostedemail.com (Postfix) with ESMTP id A892DC0006 for ; Tue, 22 Feb 2022 09:14:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645521272; 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=U+l7ug4H58gCB+/FnGZmt6LkAbTxeKqOLYB4A0fs7OOEFY9shts5e9w2Kc+BjgezlXFwjX cvQXa7Z/XbekPAqg1VNgdPs18jhq8zYSiIBMZw7VUrm77Kdev+cueh59EX9mY7Yjk6jN07 P1j4Yv5kuxrvfp3yR4UnscNvvq2jkQs= 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 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=U+l7ug4H; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf10.hostedemail.com: domain of bhe@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=bhe@redhat.com X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: A892DC0006 X-Stat-Signature: t73iatt895k9r4fbowq51u5tckzwi98t X-HE-Tag: 1645521272-496578 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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?