s390/hypfs_diag0c: fix virtual vs physical address confusion
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 17 Jan 2024 14:35:17 +0000 (15:35 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 9 Feb 2024 12:58:13 +0000 (13:58 +0100)
Add missing virt_to_phys() translation to diag0c(). This doesn't fix a
bug since virtual and physical addresses are currently the same.

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/hypfs/hypfs_diag0c.c
arch/s390/include/asm/diag.h
arch/s390/kernel/diag.c
arch/s390/kernel/text_amode31.S

index 9a2786079e3a791f151900f0fb80aaaafefc9e97..4131f0daa5ead9ace2eae667fe280c830f9d9be6 100644 (file)
@@ -20,8 +20,7 @@
  */
 static void diag0c_fn(void *data)
 {
-       diag_stat_inc(DIAG_STAT_X00C);
-       diag_amode31_ops.diag0c(((void **)data)[smp_processor_id()]);
+       diag0c(((void **)data)[smp_processor_id()]);
 }
 
 /*
index 79ff1f940611d2d8a8ca3d7b239c384d34a6b95c..20b94220113b3d385f8f9f8e9229d63aa92e7caf 100644 (file)
@@ -44,6 +44,13 @@ enum diag_stat_enum {
 void diag_stat_inc(enum diag_stat_enum nr);
 void diag_stat_inc_norecursion(enum diag_stat_enum nr);
 
+struct hypfs_diag0c_entry;
+
+/*
+ * Diagnose 0c: Pseudo Timer
+ */
+void diag0c(struct hypfs_diag0c_entry *data);
+
 /*
  * Diagnose 10: Release page range
  */
@@ -334,7 +341,7 @@ struct diag_ops {
        int (*diag26c)(unsigned long rx, unsigned long rx1, enum diag26c_sc subcode);
        int (*diag14)(unsigned long rx, unsigned long ry1, unsigned long subcode);
        int (*diag8c)(struct diag8c *addr, struct ccw_dev_id *devno, size_t len);
-       void (*diag0c)(struct hypfs_diag0c_entry *entry);
+       void (*diag0c)(unsigned long rx);
        void (*diag308_reset)(void);
 };
 
@@ -344,7 +351,7 @@ extern struct diag210 *__diag210_tmp_amode31;
 int _diag210_amode31(struct diag210 *addr);
 int _diag26c_amode31(unsigned long rx, unsigned long rx1, enum diag26c_sc subcode);
 int _diag14_amode31(unsigned long rx, unsigned long ry1, unsigned long subcode);
-void _diag0c_amode31(struct hypfs_diag0c_entry *entry);
+void _diag0c_amode31(unsigned long rx);
 void _diag308_reset_amode31(void);
 int _diag8c_amode31(struct diag8c *addr, struct ccw_dev_id *devno, size_t len);
 
index c33a95cfcc14613c954a28794d2080cf7dadc373..d8d97f970af4ce9946a2ec197468f09e74e3693d 100644 (file)
@@ -146,6 +146,15 @@ void notrace diag_stat_inc_norecursion(enum diag_stat_enum nr)
 }
 EXPORT_SYMBOL(diag_stat_inc_norecursion);
 
+/*
+ * Diagnose 0c: Pseudo Timer
+ */
+void diag0c(struct hypfs_diag0c_entry *data)
+{
+       diag_stat_inc(DIAG_STAT_X00C);
+       diag_amode31_ops.diag0c(virt_to_phys(data));
+}
+
 /*
  * Diagnose 14: Input spool file manipulation
  */
index 14c6d25c035f4a11018a1f0fa636a8b09c1aea27..c0a70efa2426d8a5bfc974253da744f8d744efeb 100644 (file)
@@ -90,7 +90,7 @@ SYM_FUNC_START(_diag26c_amode31)
 SYM_FUNC_END(_diag26c_amode31)
 
 /*
- * void _diag0c_amode31(struct hypfs_diag0c_entry *entry)
+ * void _diag0c_amode31(unsigned long rx)
  */
 SYM_FUNC_START(_diag0c_amode31)
        sam31