mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: linux-kernel@vger.kernel.org, Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Mark Brown <broonie@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>
Subject: [PATCH v1 0/3] regcache: Avoid accessing non-initialised cache
Date: Tue, 10 Feb 2026 17:09:07 +0100	[thread overview]
Message-ID: <20260210161058.53093-1-andriy.shevchenko@linux.intel.com> (raw)

FIXME cover letter

Some caches may not allow writes before full initialisation is done.
In particular on REGMAP_MAPLE caches when we want to populate cache
with the values (reg_defaults_raw == NULL && num_reg_defaults_raw != 0)
from HW, the NULL pointer dereference may happen. Address this by moving
the IO after cache initialisation is done.

Andy Shevchenko (3):
  regcache: Remove duplicate check in regcache_hw_init()
  regcache: Split regcache_count_cacheable_registers() helper
  regcache: Move HW readback after cache initialisation

 drivers/base/regmap/regcache.c | 44 ++++++++++++++++++++--------------
 1 file changed, 26 insertions(+), 18 deletions(-)

-- 
2.50.1


             reply	other threads:[~2026-02-10 16:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10 16:09 Andy Shevchenko [this message]
2026-02-10 16:09 ` [PATCH v1 1/3] regcache: Remove duplicate check in regcache_hw_init() Andy Shevchenko
2026-02-10 16:09 ` [PATCH v1 2/3] regcache: Split regcache_count_cacheable_registers() helper Andy Shevchenko
2026-02-10 16:09 ` [PATCH v1 3/3] regcache: Move HW readback after cache initialisation Andy Shevchenko
2026-02-22 23:53   ` Mark Brown
2026-02-25 19:07 ` [PATCH v1 0/3] regcache: Avoid accessing non-initialised cache Mark Brown

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=20260210161058.53093-1-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=rafael@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®