All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dong Aisheng <dongas86@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Aisheng Dong <aisheng.dong@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
	Peng Fan <peng.fan@nxp.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>
Subject: Re: [PATCH RFC 1/2] regmap: add option to disable debugfs
Date: Thu, 23 Jun 2022 01:01:12 +0800	[thread overview]
Message-ID: <CAA+hA=SsTeTF80dL6cT6Ef7Y9Q3Fhj4Jp0S-_nk=UK1HsZ4hYw@mail.gmail.com> (raw)
In-Reply-To: <YrNH8/eaYHYeAWNJ@sirena.org.uk>

On Thu, Jun 23, 2022 at 12:48 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, Jun 23, 2022 at 12:42:51AM +0800, Dong Aisheng wrote:
> > On Thu, Jun 23, 2022 at 12:27 AM Mark Brown <broonie@kernel.org> wrote:
>
> > > 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.
>
> > It was enabled by default according to the code:
> > __regmap_init -> regcache_init
>
> Ah, right.  That makes sense - we should relax the check to only apply
> if there is actually a cache.

If we don't remove the WARN_ON in regcache_cache_only(), how
would you suggest the fix?
Otherwise we can't call regcache_cache_only() for imx blkctl which does not
have a cache.

diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 2eaffd3224c9..da1702fd57cc 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -495,7 +495,7 @@ EXPORT_SYMBOL_GPL(regcache_drop_region);
 void regcache_cache_only(struct regmap *map, bool enable)
 {
        map->lock(map->lock_arg);
-       WARN_ON(map->cache_bypass && enable);
+//     WARN_ON(map->cache_bypass && enable);
        map->cache_only = enable;
        trace_regmap_cache_only(map, enable);
        map->unlock(map->lock_arg);

Regards
Aisheng

  reply	other threads:[~2022-06-22 17:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 13:47 [PATCH RFC 0/2] regmap: option to disable debugfs Dong Aisheng
2022-06-20 13:47 ` [PATCH RFC 1/2] regmap: add " Dong Aisheng
2022-06-20 15:05   ` Mark Brown
2022-06-20 15:47     ` Aisheng Dong
2022-06-20 15:49       ` Mark Brown
2022-06-20 16:15         ` Aisheng Dong
2022-06-20 17:51           ` Mark Brown
2022-06-21 14:56             ` Aisheng Dong
2022-06-21 15:31               ` Mark Brown
2022-06-21 18:16                 ` Aisheng Dong
2022-06-22  8:08                   ` Lucas Stach
2022-06-22  8:18                     ` Aisheng Dong
2022-06-22  8:35                       ` Lucas Stach
2022-06-22 12:25                     ` Mark Brown
2022-06-22 10:12                   ` Dong Aisheng
2022-06-22 12:36                     ` Mark Brown
2022-06-22 16:05                       ` Dong Aisheng
2022-06-22 16:27                         ` Mark Brown
2022-06-22 16:42                           ` Dong Aisheng
2022-06-22 16:48                             ` Mark Brown
2022-06-22 17:01                               ` Dong Aisheng [this message]
2022-06-22 17:07                                 ` Mark Brown
2022-06-20 13:47 ` [PATCH RFC 2/2] soc: imx8m-blk-ctrl: do not export debugfs Dong Aisheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA+hA=SsTeTF80dL6cT6Ef7Y9Q3Fhj4Jp0S-_nk=UK1HsZ4hYw@mail.gmail.com' \
    --to=dongas86@gmail.com \
    --cc=aisheng.dong@nxp.com \
    --cc=broonie@kernel.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.