s390/hypfs_diag0c: fix virtual vs physical address confusion

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>
This commit is contained in:
Heiko Carstens 2024-01-17 15:35:17 +01:00
parent 49c372ae74
commit e98eda926b
4 changed files with 20 additions and 5 deletions

View 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()]);
}
/*

View 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);

View 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
*/

View 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