hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/s390/hypfs/hypfs_diag0c.c
....@@ -16,26 +16,12 @@
1616 #define DBFS_D0C_HDR_VERSION 0
1717
1818 /*
19
- * Execute diagnose 0c in 31 bit mode
20
- */
21
-static void diag0c(struct hypfs_diag0c_entry *entry)
22
-{
23
- diag_stat_inc(DIAG_STAT_X00C);
24
- asm volatile (
25
- " sam31\n"
26
- " diag %0,%0,0x0c\n"
27
- " sam64\n"
28
- : /* no output register */
29
- : "a" (entry)
30
- : "memory");
31
-}
32
-
33
-/*
3419 * Get hypfs_diag0c_entry from CPU vector and store diag0c data
3520 */
3621 static void diag0c_fn(void *data)
3722 {
38
- diag0c(((void **) data)[smp_processor_id()]);
23
+ diag_stat_inc(DIAG_STAT_X00C);
24
+ diag_dma_ops.diag0c(((void **) data)[smp_processor_id()]);
3925 }
4026
4127 /*
....@@ -54,8 +40,7 @@
5440 if (!cpu_vec)
5541 goto fail_put_online_cpus;
5642 /* Note: Diag 0c needs 8 byte alignment and real storage */
57
- diag0c_data = kzalloc(sizeof(struct hypfs_diag0c_hdr) +
58
- cpu_count * sizeof(struct hypfs_diag0c_entry),
43
+ diag0c_data = kzalloc(struct_size(diag0c_data, entry, cpu_count),
5944 GFP_KERNEL | GFP_DMA);
6045 if (!diag0c_data)
6146 goto fail_kfree_cpu_vec;
....@@ -125,7 +110,8 @@
125110 {
126111 if (!MACHINE_IS_VM)
127112 return 0;
128
- return hypfs_dbfs_create_file(&dbfs_file_0c);
113
+ hypfs_dbfs_create_file(&dbfs_file_0c);
114
+ return 0;
129115 }
130116
131117 /*