public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add QEMU virt-ctrl driver and update m68k virt
@ 2026-01-12 18:22 Kuan-Wei Chiu
  2026-01-12 18:22 ` [PATCH 1/2] power: reset: Add QEMU virt-ctrl driver Kuan-Wei Chiu
  2026-01-12 18:22 ` [PATCH 2/2] m68k: virt: Switch to qemu-virt-ctrl driver Kuan-Wei Chiu
  0 siblings, 2 replies; 8+ messages in thread
From: Kuan-Wei Chiu @ 2026-01-12 18:22 UTC (permalink / raw)
  To: geert, sre
  Cc: jserv, eleanor15x, linux-kernel, linux-m68k, linux-pm,
	Kuan-Wei Chiu

Introduce a generic platform driver for the QEMU 'virt-ctrl' device [1]
and transitions the m68k 'virt' machine to use it, replacing
architecture-specific hooks.

The new driver ('qemu-virt-ctrl') registers a restart handler and
populates the global 'pm_power_off' callback.

On the m68k side, the platform initialization is updated to register
the 'qemu-virt-ctrl' platform device. Additionally, the 'mach_reset'
hook is bridged to 'do_kernel_restart()' to ensure the kernel's restart
handler chain is correctly invoked.

Verified on QEMU m68k virt. Both system reset and power-off were
confirmed functional by invoking 'reboot(LINUX_REBOOT_CMD_RESTART)' and
'reboot(LINUX_REBOOT_CMD_POWER_OFF)' from userspace.

Link: https://gitlab.com/qemu-project/qemu/-/blob/v10.2.0/hw/misc/virt_ctrl.c [1]

Kuan-Wei Chiu (2):
  power: reset: Add QEMU virt-ctrl driver
  m68k: virt: Switch to qemu-virt-ctrl driver

 MAINTAINERS                          |  6 ++
 arch/m68k/virt/config.c              | 42 +-----------
 arch/m68k/virt/platform.c            | 20 +++++-
 drivers/power/reset/Kconfig          | 10 +++
 drivers/power/reset/Makefile         |  1 +
 drivers/power/reset/qemu-virt-ctrl.c | 98 ++++++++++++++++++++++++++++
 6 files changed, 133 insertions(+), 44 deletions(-)
 create mode 100644 drivers/power/reset/qemu-virt-ctrl.c

-- 
2.52.0.457.g6b5491de43-goog


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-01-30 21:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12 18:22 [PATCH 0/2] Add QEMU virt-ctrl driver and update m68k virt Kuan-Wei Chiu
2026-01-12 18:22 ` [PATCH 1/2] power: reset: Add QEMU virt-ctrl driver Kuan-Wei Chiu
2026-01-14 10:01   ` Daniel Palmer
2026-01-15  6:15     ` Kuan-Wei Chiu
2026-01-15 13:29       ` Daniel Palmer
2026-01-15 15:21         ` Kuan-Wei Chiu
2026-01-30 21:55   ` Sebastian Reichel
2026-01-12 18:22 ` [PATCH 2/2] m68k: virt: Switch to qemu-virt-ctrl driver Kuan-Wei Chiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox