Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5031367iog; Wed, 22 Jun 2022 10:29:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uv+qMY305M/vcva2QVFnCa4DGKD2+RkoDe3YtPCGvOMchxuC77L2UexPz7y3Zv0Jdi82BJ X-Received: by 2002:a17:906:848b:b0:718:c04a:5131 with SMTP id m11-20020a170906848b00b00718c04a5131mr4020292ejx.70.1655918983021; Wed, 22 Jun 2022 10:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655918983; cv=none; d=google.com; s=arc-20160816; b=C3b84xWj1B0Yill6Hj8DLkNn9wuRvtpGKU2bGaabq8WJ6I/h+TU/3fIjb5eul4YP7d CmwGd8gqpc89f6Ny4+na3aXfxTZ/ZUNs+uLRhC41jldvxbJn0/dYLwXglEjqu6rGcwob IFUu56KgjlpIFp7w80j4TTOCanN8RKwgQsvlNeXazN8X/+I+ZfLVYZIeWvzA+2kWBa0J Mk+Cky+9G+L2g3fCgD5gyWrJtTsBlXAawEdFIrAWRK/NfJEfazPo7b9exTx9iPX5njjH lm2WkexIODF0oKrnQz28/sbMipfFG5T+FwbGRe2S+h+CwcvoTFm42sb4BsQcJte7diJt 9R1A== 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=XWqaDkKUd/jV7rB+UjSRkd1kaMysn+ZADPP6fQ0ioK0=; b=EsAsNdp+KCFczazR4FKuze5QHiOTyDKRGJB3SZoaiYavu2BuYzANKWJLstCFQ1e5kS +qVv9djZuayUXT9IhpJfSrHV2whh4tl4wOhl9D3V46M+6Jp7I0O/8P8wP6AGjuX3a9sH W84VHf/9o2zWQJepGzz8Uxi1bltSeF4Nqk8Z9qiMtPS1gDWyCZRgKRFjAyg7DKJdQjcm mlMCPiNuN+hQchcaO1KdxYsounD6TvndIj0IZeozMOb7ivrLLsAeJBMsyOf5355hWi9O tOZfClb5FwQ/PW8+s8K+7JHi8OO2MKHtKDjmL0droMqm7nSI3AXrlHzLf2jSTF3+WlJi Jvpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D1pF3q3O; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a056402194100b00435bf35d093si896807edz.366.2022.06.22.10.29.17; Wed, 22 Jun 2022 10:29:43 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=D1pF3q3O; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358637AbiFVQ1R (ORCPT + 99 others); Wed, 22 Jun 2022 12:27:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350478AbiFVQ1Q (ORCPT ); Wed, 22 Jun 2022 12:27:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BE83F8BA for ; Wed, 22 Jun 2022 09:27:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1D00061913 for ; Wed, 22 Jun 2022 16:27:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03AF3C34114; Wed, 22 Jun 2022 16:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655915234; bh=DyYH6uhmU3zMb9mouFy6uFvKCKUdXZL2QKDEo9cMQ6Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D1pF3q3OV1E0qnjTJ39Cl/qlC0tc/6MJhpW6XeIjEae7qHLfIa0e3Aa/7bMOGpCqG 4xeEkGNo/pbhXtd3hSkfusVcHkz/rvZ3Yu7JrKRu7VTi6acVHfLArDjxvBvMKB7mrN i40OfSFaH+I2uBbnLxAFaY0lctI5NlrTPzJPyA/31yoZoRNL8oBNZm9UTq+8iQBG/Q yVH5Px98afK1GYtsKBPwUQDYSkP3niBeTx94pkOkVy9S2LRQfW/hwrtmzW4JRPZays 7ONpB2vSJsddTDbkH8jxB/+SnRCRg7C65sZjjxNORWIDfEfFp0+gPleY/yKkD2+kHs kfvsYi9f9hdFA== Date: Wed, 22 Jun 2022 17:27:09 +0100 From: Mark Brown To: Dong Aisheng Cc: Aisheng Dong , "linux-kernel@vger.kernel.org" , "l.stach@pengutronix.de" , Peng Fan , "shawnguo@kernel.org" Subject: Re: [PATCH RFC 1/2] regmap: add option to disable debugfs Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VcQDeV43aI8PD0Ko" Content-Disposition: inline In-Reply-To: X-Cookie: Truckers welcome. X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 --VcQDeV43aI8PD0Ko Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 23, 2022 at 12:05:46AM +0800, Dong Aisheng wrote: > On Wed, Jun 22, 2022 at 8:36 PM Mark Brown wrote: > > On Wed, Jun 22, 2022 at 06:12:49PM +0800, Dong Aisheng wrote: > > > > > NOTE: i didn't fix _regmap_write() as i.MX controls regmap write well in driver > > > with power enabled first, so don't have issues in reality. > > I can't tell what you think the problem is with _regmap_write()? > Because from what I see, _regmap_write() seems still can write to HW > register even with cache_only mode set theoretically. Ah, I see - we don't enforce cache_only if bypass is enabled somehow, but we will complain if you try to enable both at the same time so I'm not sure that's an issue? > > > - WARN_ON(map->cache_bypass && enable); > > > +// WARN_ON(map->cache_bypass && enable); > > What is the purpose of this change? Why would the combination of cache > > only and bypass modes work be a good idea, and how should things behave > > in that case? > Because without this change, there will be a kernel dump caused by > WARN_ON when drivers call regcache_cache_only(map, true) after power > is off. There's no cache used in the imx blkctl driver. So map->cache_bypass > is default to true. cache_bypass is only going to be true if something enabled bypass, why would a device that doesn't use a cache enable bypass? It does get turned on transiently by things like patching but those only make sense if the device can be accessed so caceh_only shouldn't be on then. --VcQDeV43aI8PD0Ko Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmKzQtwACgkQJNaLcl1U h9BB7Qf/QfSoUpqy0MvH/JvWmZwOVLno2deYkhInVLyqUuLwPvh/GT/q6VOMiho9 FIykZbViiNKvegquav32trRYCkfIDc1qN3p00y1iXudZs5fQ/AWcxy47yAcOjOvN CWye/H2quJTdKC+lNc6VVjR6u2FuRtUHfB9okNnYzqrDbeWutUHgDL8WA+kan9X1 JrtOTtr5iP9Ps+KjYI/uZY5F5Gi5yu8zXN9BBsq/CzVjugC4JFe63SWnTOCfQFeG fYxI9BZpE3ikkXPhlkzsuf1keuaRs4CqjNj9vY8Y8TstMl7UTecLNqs7/SzdCFyD la5/sOJ+CQMDpPeZGgd02VtTFKmE9w== =u7Zw -----END PGP SIGNATURE----- --VcQDeV43aI8PD0Ko--