diff options
author | Alexander Gordeev <agordeev@linux.ibm.com> | 2021-06-18 09:39:12 +0300 |
---|---|---|
committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2022-12-01 12:58:04 +0300 |
commit | 5c2e5a0cf5b12c156b0cb07af43b51627c086480 (patch) | |
tree | bd5b9271732eff13b5fc28198546086204fdb96a /drivers/s390/cio/chsc_sch.c | |
parent | 1143f6f55d967ab414a10a559d58a2700f32a54d (diff) | |
download | linux-5c2e5a0cf5b12c156b0cb07af43b51627c086480.tar.xz |
s390/cio: sort out physical vs virtual pointers usage
This does not fix a real bug, since virtual addresses
are currently indentical to physical ones.
Use virt_to_phys() for intparm interrupt parameter to
convert a 64-bit virtual address to the 32-bit physical
address, which is expected to be below 2GB.
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chsc_sch.c')
-rw-r--r-- | drivers/s390/cio/chsc_sch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c index 962dfa25a310..180ab899289c 100644 --- a/drivers/s390/cio/chsc_sch.c +++ b/drivers/s390/cio/chsc_sch.c @@ -11,6 +11,7 @@ #include <linux/slab.h> #include <linux/compat.h> #include <linux/device.h> +#include <linux/io.h> #include <linux/module.h> #include <linux/uaccess.h> #include <linux/miscdevice.h> @@ -85,7 +86,7 @@ static int chsc_subchannel_probe(struct subchannel *sch) if (!private) return -ENOMEM; dev_set_drvdata(&sch->dev, private); - ret = cio_enable_subchannel(sch, (u32)(unsigned long)sch); + ret = cio_enable_subchannel(sch, (u32)virt_to_phys(sch)); if (ret) { CHSC_MSG(0, "Failed to enable 0.%x.%04x: %d\n", sch->schid.ssid, sch->schid.sch_no, ret); |