diff options
| author | Helge Deller <[email protected]> | 2023-11-17 15:43:52 +0000 |
|---|---|---|
| committer | Helge Deller <[email protected]> | 2023-11-18 17:59:30 +0000 |
| commit | 6ad6e15a9c46b8f0932cd99724f26f3db4db1cdf (patch) | |
| tree | 790254502a22b02fe540bdfe0ebf5790d0111e41 | |
| parent | parisc: Replace strlcpy() with strscpy() (diff) | |
| download | kernel-6ad6e15a9c46b8f0932cd99724f26f3db4db1cdf.tar.gz kernel-6ad6e15a9c46b8f0932cd99724f26f3db4db1cdf.zip | |
parisc/power: Fix power soft-off when running on qemu
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 <[email protected]>
Cc: [email protected] # v6.0+
| -rw-r--r-- | drivers/parisc/power.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index 539d8920c202..bb0d92461b08 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c @@ -176,7 +176,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; } |
