public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Wilken Gottwalt <wilken.gottwalt@posteo.net>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	linux-renesas-soc@vger.kernel.org,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Antonio Borneo" <antonio.borneo@foss.st.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Baolin Wang" <baolin.wang@linux.alibaba.com>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Chen-Yu Tsai" <wens@kernel.org>,
	"Chunyan Zhang" <zhang.lyra@gmail.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	"Lee Jones" <lee@kernel.org>, "Linus Walleij" <linusw@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-spi@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-sunxi@lists.linux.dev, "Mark Brown" <broonie@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Orson Zhai" <orsonzhai@gmail.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Samuel Holland" <samuel@sholland.org>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Srinivas Kandagatla" <srini@kernel.org>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Waiman Long" <longman@redhat.com>,
	"Will Deacon" <will@kernel.org>
Subject: Re: [RFC PATCH 0/4] hwspinlock: refactor headers into public provider/consumer pair
Date: Mon, 26 Jan 2026 10:14:46 +0000	[thread overview]
Message-ID: <20260126111440.67394323@posteo.net> (raw)
In-Reply-To: <aXc7DxsqiCGdfzxi@smile.fi.intel.com>

On Mon, 26 Jan 2026 11:59:43 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Sun, Jan 25, 2026 at 07:46:51PM +0100, Wolfram Sang wrote:
> > TLDR: I want to create a hwspinlock provider outside of the hwspinlock
> > directory. So, I refactored the headers into a provider/consumer pair.
> > Which seems to me like a reasonable seperation anyhow. No functional
> > changes. My build tests went fine and buildbots are happy, too.
> > 
> > Longer explanation:
> > 
> > There is a device (MFIS) in newer Renesas SoCs which combines various
> > things like hwspinlocks, mailboxes and other stuff. Sadly, these are not
> > strictly separated. Registers are kind of mixed and its register
> > unprotection scheme will need one of its own locks. I tried various
> > paths to handle this device (MFD, auxiliary bus) but I concluded that
> > the sub-device dependencies give enough reasons for a single driver in
> > drivers/soc/. So, this series will allow me to instantiate a hwspinlock
> > provider from the other directory.
> > 
> > Patches 1+2 do the actual refactoring with a fallback being in place. I
> > used '-B' with git-format-patch in this RFC, so the actual changes are
> > more visible when the headers are moved.
> > 
> > Patch 3 converts all the users. There are not many. We could try to get
> > all the acks for this single patch. Or I can break it into single
> > patches and send them to subsystems. I don't mind.
> > 
> > Patch 4 simply removes the fallback.
> > 
> > Looking forward to comments on this approach. If the hwspinlock
> > maintainers like it as is, I would kindly propose to apply patches 1+2
> > after 7.0-rc1 comes out. This might sound a bit hasty, but a) I want to
> > avoid chasing a moving target and b) this would remove one dependency of
> > the hwspinlock driver I originally intend to upstream, of course.
> > 
> > I would take care of patches 3+4 as needed.
> > 
> > A branch can be found here:
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/hwspinlock/refactor-includes
> > 
> > Patches are based on linux-next as of 2026-01-21.
> > 
> > Opinions?
> 
> I don't like the idea of sharing internal stuff. Why would we need to have
> a struct hwspinlock to be visible?
> 

I see what Wolfram wants to achieve. It is the same issue I encounterd while I
wrote the sun6i hwspinlock driver. Currently it is impossible to write external
(out-of-kernel-tree) drivers because of internal structures. And it was a pain
in the ass for testing purposes. I prefer to be able to write external hwspinlock
drivers.

greetings

  parent reply	other threads:[~2026-01-26 10:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-25 18:46 [RFC PATCH 0/4] hwspinlock: refactor headers into public provider/consumer pair Wolfram Sang
2026-01-25 18:46 ` [RFC PATCH 2/4] hwspinlock: refactor existing headers into consumer.h Wolfram Sang
2026-01-26  9:59 ` [RFC PATCH 0/4] hwspinlock: refactor headers into public provider/consumer pair Andy Shevchenko
2026-01-26 10:13   ` Wolfram Sang
2026-01-26 10:20     ` Andy Shevchenko
2026-01-26 10:29       ` Wolfram Sang
2026-01-27 11:41         ` Wolfram Sang
2026-02-09 11:14           ` Wolfram Sang
2026-02-09 11:35             ` Andy Shevchenko
2026-02-09 16:13             ` Bjorn Andersson
2026-02-09 19:51               ` Wolfram Sang
2026-02-09 21:37                 ` Bjorn Andersson
2026-02-10  7:20                 ` Andy Shevchenko
2026-02-10 10:44                   ` Wolfram Sang
2026-02-10 15:14                     ` Andy Shevchenko
2026-01-26 10:14   ` Wilken Gottwalt [this message]
2026-01-26 10:16     ` Wolfram Sang
2026-01-26 10:22     ` Andy Shevchenko

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=20260126111440.67394323@posteo.net \
    --to=wilken.gottwalt@posteo.net \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andersson@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=antonio.borneo@foss.st.com \
    --cc=arnd@arndb.de \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=boqun.feng@gmail.com \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dakr@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jic23@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=lee@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=longman@redhat.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mingo@redhat.com \
    --cc=nuno.sa@analog.com \
    --cc=orsonzhai@gmail.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=samuel@sholland.org \
    --cc=skhan@linuxfoundation.org \
    --cc=srini@kernel.org \
    --cc=tglx@kernel.org \
    --cc=wens@kernel.org \
    --cc=will@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=zhang.lyra@gmail.com \
    /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