Skip to content

Commit 022bd2d

Browse files
Janosch Frankborntraeger
authored andcommitted
s390: Make diag224 public
Diag204's cpu structures only contain the cpu type by means of an index in the diag224 name table. Hence, to be able to use diag204 in any meaningful way, we also need a usable diag224 interface. Signed-off-by: Janosch Frank <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]>
1 parent e435dc3 commit 022bd2d

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

arch/s390/hypfs/hypfs_diag.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -360,20 +360,6 @@ static void *diag204_store(void)
360360

361361
/* Diagnose 224 functions */
362362

363-
static int diag224(void *ptr)
364-
{
365-
int rc = -EOPNOTSUPP;
366-
367-
diag_stat_inc(DIAG_STAT_X224);
368-
asm volatile(
369-
" diag %1,%2,0x224\n"
370-
"0: lhi %0,0x0\n"
371-
"1:\n"
372-
EX_TABLE(0b,1b)
373-
: "+d" (rc) :"d" (0), "d" (ptr) : "memory");
374-
return rc;
375-
}
376-
377363
static int diag224_get_name_table(void)
378364
{
379365
/* memory must be below 2GB */

arch/s390/include/asm/diag.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,5 @@ struct diag204_x_phys_cpu {
205205
} __packed;
206206

207207
int diag204(unsigned long subcode, unsigned long size, void *addr);
208+
int diag224(void *ptr);
208209
#endif /* _ASM_S390_DIAG_H */

arch/s390/kernel/diag.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,18 @@ int diag210(struct diag210 *addr)
218218
return ccode;
219219
}
220220
EXPORT_SYMBOL(diag210);
221+
222+
int diag224(void *ptr)
223+
{
224+
int rc = -EOPNOTSUPP;
225+
226+
diag_stat_inc(DIAG_STAT_X224);
227+
asm volatile(
228+
" diag %1,%2,0x224\n"
229+
"0: lhi %0,0x0\n"
230+
"1:\n"
231+
EX_TABLE(0b,1b)
232+
: "+d" (rc) :"d" (0), "d" (ptr) : "memory");
233+
return rc;
234+
}
235+
EXPORT_SYMBOL(diag224);

0 commit comments

Comments
 (0)