From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DD2532F761 for ; Mon, 26 Jan 2026 10:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.67.36.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769422498; cv=none; b=bvM2xG/cgizJ6pKl3+eSCSnaeJinVx4CYANe+JGjBTu6VMcgYxByggyMPwngYTOb6z9nj7nmWaYpNQDqPY6VfZ+ihDcvMZdQdmluseBEJs2HXW1Hy9YSTl4pSTCtgSg9X/GQMfbYL7XAgtev+iqJ/dbP45aoOUgOpFiL0UCvYVM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769422498; c=relaxed/simple; bh=Rwl08LlMK5tYxXpdB6OUAqXrc88pfu1wm02Z38tXUrE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=L5vrxGuAEZ9t0iJNCf0FvDMkqvLolqUpir9Vocdq6mFDBQxbyz2n+BoCzWv2N7zbLD8Vd2qr9njA45l1836E8vmdux3cvuWIEp+e7utAwjYctfYrnabzA2Uvzj5Ra1g75CU4XwKuDNqXOyK9na7eXM/435VtMVHrZsly7PNmPEQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net; spf=pass smtp.mailfrom=posteo.net; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b=hNwJOWGk; arc=none smtp.client-ip=185.67.36.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=posteo.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b="hNwJOWGk" Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B18F2240103 for ; Mon, 26 Jan 2026 11:14:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1769422488; bh=E6JNIXiL4/1bW0+UR+jZtVn2Er2iWLO91YkvCOZjL/A=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=hNwJOWGkuy9s5Vl4Ecc7RozjABWGHRW71P7Ia51tTQaflGzXkf7uURBXgHE0i0wax s9PxnBQI3TpgkIs2XjIcc2bktcRFiuKpnDcbXYDcx+NYh41JricKsbjNSyko4kMDVj TN9vJilx/BfhCbim1axucVJ85xrs4+RF2J6WMHFqHcTtH5x4/7iM3YREeIExSek3U1 BAVIpzN41R3uH2FBw4wMeU/8T9p9E5AMjH4qMKyhancoL3rKKE9fM7gmyAgiYmIG50 cLsygKVFVXyDB/5rc2oHuyed8CaIAHip6A/pZO7Dv95D+2Pqftax9e6ReF54jN9jz9 U6h6k3uvBE5rw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4f04CP3GGZz6tws; Mon, 26 Jan 2026 11:14:41 +0100 (CET) Date: Mon, 26 Jan 2026 10:14:46 +0000 From: Wilken Gottwalt To: Andy Shevchenko Cc: Wolfram Sang , linux-renesas-soc@vger.kernel.org, Alexandre Torgue , Andy Shevchenko , Antonio Borneo , Arnd Bergmann , Baolin Wang , Bjorn Andersson , Boqun Feng , Chen-Yu Tsai , Chunyan Zhang , Danilo Krummrich , David Lechner , Greg Kroah-Hartman , Ingo Molnar , Jernej Skrabec , Jonathan Cameron , Jonathan Corbet , Konrad Dybcio , Lee Jones , Linus Walleij , 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 , Maxime Coquelin , Nuno =?ISO-8859-1?Q?S=E1?= , Orson Zhai , Peter Zijlstra , "Rafael J. Wysocki" , Samuel Holland , Shuah Khan , Srinivas Kandagatla , Thomas Gleixner , Waiman Long , Will Deacon Subject: Re: [RFC PATCH 0/4] hwspinlock: refactor headers into public provider/consumer pair Message-ID: <20260126111440.67394323@posteo.net> In-Reply-To: References: <20260125184654.17843-6-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 26 Jan 2026 11:59:43 +0200 Andy Shevchenko 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