microblaze: reset: Provide a power off handler through an unaligned PC
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 13 Sep 2026 23:50:11 +0000 (01:50 +0200)
committerMichal Simek <michal.simek@amd.com>
Mon, 14 Sep 2026 09:40:25 +0000 (11:40 +0200)
commit7d376ea6a7f9518929b0621aa06c4bd348374098
treebcfb1d9ac67cd8dedd9841e9c0f3a860047fb4c6
parent4ebcbacb0b0adf827cd9475f36f866deda39cbfd
microblaze: reset: Provide a power off handler through an unaligned PC

microblaze is missing a generic architecture-wide power off mechanism.

To enable KUnit for microblaze it is necessary for KUnit to shut down
the machine in a way that QEMU will recognize. The machines emulated by
QEMU do not provide machine-specific power off functionality which could
be used.
However at least the petalogix-s3adsp1800 machine will abort if an
unaligned instruction is executed. An ugly message will be printed but
that is not an issue for KUnit.

Make use of this to provide a power off handler.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: David Gow <david@davidgow.net>
Link: https://patch.msgid.link/20260914-kunit-microblaze-v2-4-7d5756e858f8@weissschuh.net
Signed-off-by: Michal Simek <michal.simek@amd.com>
arch/microblaze/Kconfig
arch/microblaze/kernel/reset.c