public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Cc: Yanko Kaneti <yaneti@declera.com>,
	linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
	Sebastian Reichel <sre@kernel.org>, Yixun Lan <dlan@gentoo.org>,
	Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	"open list:RISC-V ARCHITECTURE:Keyword:riscv"
	<linux-riscv@lists.infradead.org>,
	"open list:RISC-V SPACEMIT SoC Support:Keyword:spacemit"
	<spacemit@lists.linux.dev>,
	"open list:SYSTEM RESET/SHUTDOWN DRIVERS"
	<linux-pm@vger.kernel.org>
Subject: Re: [PATCH v5 2/2] mfd: simple-mfd-i2c: add a reboot cell for the SpacemiT P1 chip
Date: Wed, 11 Mar 2026 07:46:31 +0100	[thread overview]
Message-ID: <abEPxzhpQSzkfbaI@aurel32.net> (raw)
In-Reply-To: <DGZM6WUAVPPS.20Y0NIZYI4572@linux.spacemit.com>

Hi,

On 2026-03-11 10:58, Troy Mitchell wrote:
> On Wed Mar 4, 2026 at 4:38 AM CST, Aurelien Jarno wrote:
>  Hi, Aurelien and Yanko,
> > Hi,
> >
> > On 2026-03-02 22:34, Yanko Kaneti wrote:
> >> Hello,
> >> 
> >> On Mon, 2026-03-02 at 21:08 +0100, Aurelien Jarno wrote:
> >> > On 2026-03-01 23:16, Aurelien Jarno wrote:
> >> > > On 2026-02-27 13:29, Yanko Kaneti wrote:
> >> > > > On Thu, 2026-02-26 at 22:32 +0100, Aurelien Jarno wrote:
> >> > > > > Hi,
> >> > > > > 
> >> > > > > On 2026-02-26 16:32, Yanko Kaneti wrote:
> >> > > > > > Hello,
> >> > > > > > 
> >> > > > > > On Mon, 2025-11-03 at 00:02 +0100, Aurelien Jarno wrote:
> >> > > > > > > Add a "spacemit-p1-reboot" cell for the SpacemiT P1 chip.
> >> > > > > > > 
> >> > > > > > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> >> > > > > > > ---
> >> > > > > > > v5: no changes
> >> > > > > > > 
> >> > > > > > >  drivers/mfd/simple-mfd-i2c.c | 1 +
> >> > > > > > >  1 file changed, 1 insertion(+)
> >> > > > > > > 
> >> > > > > > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
> >> > > > > > > index 0a607a1e3ca1d..542d378cdcd1f 100644
> >> > > > > > > --- a/drivers/mfd/simple-mfd-i2c.c
> >> > > > > > > +++ b/drivers/mfd/simple-mfd-i2c.c
> >> > > > > > > @@ -99,6 +99,7 @@ static const struct regmap_config spacemit_p1_regmap_config = {
> >> > > > > > >  };
> >> > > > > > >  
> >> > > > > > >  static const struct mfd_cell spacemit_p1_cells[] = {
> >> > > > > > > +	{ .name = "spacemit-p1-reboot", },
> >> > > > > > >  	{ .name = "spacemit-p1-regulator", },
> >> > > > > > >  	{ .name = "spacemit-p1-rtc", },
> >> > > > > > >  };
> >> > > > > > 
> >> > > > > > Perhaps its safe to merge this one now that everything P1 and I2C is
> >> > > > > > already in linus tip ?
> >> > > > > 
> >> > > > > Unfortunately, this patchset is still missing:
> >> > > > > https://lore.kernel.org/all/20260207-b4-k3-i2c-pio-v7-0-626942d94d91@linux.spacemit.com/
> >> > > > > 
> >> > > > > This means the reboots work most of the time, but are not 100% reliable, 
> >> > > > > and that's the reason why this patch got blocked from merging.
> >> > > > 
> >> > > > I see. Thanks. Sounds to me like sometimes working compared to never
> >> > > > working is better , but anyway..
> >> > > 
> >> > > I agree with that, but the decision was to hold on this patch until the 
> >> > > I2C PIO part got merged.
> >> > > 
> >> > > > FWIW  with this patch and the pio patcheset I get this rcu splat on
> >> > > > reboot (which is still working). Similar splat is there without the pio
> >> > > > patcheset.
> >> > > 
> >> > > I haven't been able to reproduce the issue here after 10+ reboots on a 
> >> > > BPI-F3 board, but I tried the patch on top of 6.19. I'll try to build a 
> >> > > 7.0.0-rc2 kernel and report back.
> >> > 
> >> > I have tried that, and I am still unable to reproduce the issue with a 
> >> > 7.0.0-rc2 kernel and a BPI-F3 board.
> >> 
> >> I can still see it on every reboot (with the patches that allow reboot
> >> to work). Do you have CONFIG_PREEMPT_RCU in your config ? its default on
> >> when anything PREEMPT is selected. In Fedora its CONFIG_PREEMPT_DYNAMIC
> >> that flips it.
> >
> > Thanks for the hint, that option was not activated here, it's not the 
> > riscv64 defconfig. With it I am also able to reproduce the issue. I'll 
> > try to debug that and report back.
> I have sent a patch to address this issue here[1].
> 
> Could you please test it on your hardware when you have a chance?
> 
>                         - Troy
> 
> Link:
> https://lore.kernel.org/all/20260311-v7-0-rc1-rv-dis-int-before-restart-v1-1-bc46b4351cac@linux.dev/ [1]

Thanks, I confirm it fixes the issue \o/.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                     http://aurel32.net

  reply	other threads:[~2026-03-11  6:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-02 23:01 [PATCH v5 0/2] driver: reset: spacemit-p1: add driver for poweroff/reboot Aurelien Jarno
2025-11-02 23:01 ` [PATCH v5 1/2] " Aurelien Jarno
2025-11-02 23:02 ` [PATCH v5 2/2] mfd: simple-mfd-i2c: add a reboot cell for the SpacemiT P1 chip Aurelien Jarno
2026-02-26 14:32   ` Yanko Kaneti
2026-02-26 21:32     ` Aurelien Jarno
2026-02-27 11:29       ` Yanko Kaneti
2026-03-01 22:16         ` Aurelien Jarno
2026-03-02 20:08           ` Aurelien Jarno
2026-03-02 20:34             ` Yanko Kaneti
2026-03-03 20:38               ` Aurelien Jarno
2026-03-11  2:58                 ` Troy Mitchell
2026-03-11  6:46                   ` Aurelien Jarno [this message]
2026-03-11  7:08                   ` Yanko Kaneti
2026-03-11  7:48                     ` Troy Mitchell
2025-11-03  0:48 ` (subset) [PATCH v5 0/2] driver: reset: spacemit-p1: add driver for poweroff/reboot Sebastian Reichel
2025-11-04  1:24   ` Troy Mitchell
2025-11-05  9:34     ` Lee Jones
2025-11-05  9:42       ` Troy Mitchell
2025-11-05 10:08         ` Lee Jones
2025-11-05 10:11           ` Lee Jones
2025-11-05 13:10             ` Troy Mitchell
2025-11-05 22:49         ` Aurelien Jarno
2025-11-06  1:03           ` Troy Mitchell
2025-11-05  9:35     ` Lee Jones
2025-11-05  9:40       ` Troy Mitchell

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=abEPxzhpQSzkfbaI@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=dlan@gentoo.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=sre@kernel.org \
    --cc=troy.mitchell@linux.spacemit.com \
    --cc=yaneti@declera.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