From: Helge Deller Date: Fri, 17 Nov 2023 15:43:52 +0000 (+0100) Subject: parisc/power: Fix power soft-off when running on qemu X-Git-Tag: v6.5.13~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b57e254d5ef4074e6534babde99c2b00266c5f1d;p=thirdparty%2Fkernel%2Fstable.git parisc/power: Fix power soft-off when running on qemu commit 6ad6e15a9c46b8f0932cd99724f26f3db4db1cdf upstream. Firmware returns the physical address of the power switch, so need to use gsc_writel() instead of direct memory access. Fixes: d0c219472980 ("parisc/power: Add power soft-off when running on qemu") Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # v6.0+ Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index 6ee0717e34eca..332bcc0053a5e 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c @@ -201,7 +201,7 @@ static struct notifier_block parisc_panic_block = { static int qemu_power_off(struct sys_off_data *data) { /* this turns the system off via SeaBIOS */ - *(int *)data->cb_data = 0; + gsc_writel(0, (unsigned long) data->cb_data); pdc_soft_power_button(1); return NOTIFY_DONE; }