summaryrefslogtreecommitdiff
path: root/drivers/parisc
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-11-17 18:43:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-28 20:07:14 +0300
commit72a90e7eb4a19744c99c22c3a4d3b28508a3ff91 (patch)
tree92e4ed91275c8daf6c314fc6198ebdf79ec3fc08 /drivers/parisc
parent40b6914f42780973ba86451dae065f96ca591695 (diff)
downloadlinux-72a90e7eb4a19744c99c22c3a4d3b28508a3ff91.tar.xz
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 <deller@gmx.de> Cc: stable@vger.kernel.org # v6.0+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/power.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c
index 6ee0717e34ec..332bcc0053a5 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;
}