mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miguel Ojeda <ojeda@kernel.org>
To: mmyangfl@gmail.com
Cc: fkan@apm.com, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, sre@kernel.org,
	Aurelien Jarno <aurelien@aurel32.net>,
	Anand Moon <linux.amoon@gmail.com>
Subject: Re: [PATCH] power: reset: syscon-reboot: Use devm_register_sys_off_handler(RESTART)
Date: Wed, 25 Nov 2026 18:28:37 +0100	[thread overview]
Message-ID: <20261125172837.29526-1-ojeda@kernel.org> (raw)
In-Reply-To: <20261026092049.84858-1-mmyangfl@gmail.com>

On Mon, 26 Oct 2026 17:20:47 +0800 David Yang <mmyangfl@gmail.com> wrote:
>
> +	err = devm_register_sys_off_handler(dev, SYS_OFF_MODE_RESTART,
> +					    priority, syscon_restart_handle,
> +					    ctx);

In linux-next (next-20261123), booting riscv64 under QEMU, I am seeing:

    syscon-reboot reboot: can't register restart handler (err=-16)
    syscon-reboot reboot: probe with driver syscon-reboot failed with error -16

My LLM says:

  The SBI SRST restart handler (`sbi_srst_reboot_nb`) is already registered
  at priority 192, which is also the default one for this driver, and
  `register_sys_off_handler()` only allows one handler per non-default
  priority, unlike `register_restart_handler()`.

  The following patch moves the SBI one to `SYS_OFF_PRIO_FIRMWARE`, and
  with both patches on top of v7.4-rc4 the driver probes again:

    https://lore.kernel.org/all/20261118104935.1716-2-linux.amoon@gmail.com/

Cc'ing Anand and Aurelien.

I hope that helps!

Cheers,
Miguel

      parent reply	other threads:[~2026-11-25 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  9:20 David Yang
2026-11-09  1:23 ` Sebastian Reichel
2026-11-25 17:28 ` Miguel Ojeda [this message]

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=20261125172837.29526-1-ojeda@kernel.org \
    --to=ojeda@kernel.org \
    --cc=aurelien@aurel32.net \
    --cc=fkan@apm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=mmyangfl@gmail.com \
    --cc=sre@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®