Skip to content

Commit

Permalink
s390: Make diag224 public
Browse files Browse the repository at this point in the history
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 <frankja@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
  • Loading branch information
Janosch Frank authored and Christian Borntraeger committed Jun 10, 2016
1 parent e435dc3 commit 022bd2d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
14 changes: 0 additions & 14 deletions arch/s390/hypfs/hypfs_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,20 +360,6 @@ static void *diag204_store(void)

/* Diagnose 224 functions */

static int diag224(void *ptr)
{
int rc = -EOPNOTSUPP;

diag_stat_inc(DIAG_STAT_X224);
asm volatile(
" diag %1,%2,0x224\n"
"0: lhi %0,0x0\n"
"1:\n"
EX_TABLE(0b,1b)
: "+d" (rc) :"d" (0), "d" (ptr) : "memory");
return rc;
}

static int diag224_get_name_table(void)
{
/* memory must be below 2GB */
Expand Down
1 change: 1 addition & 0 deletions arch/s390/include/asm/diag.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,5 @@ struct diag204_x_phys_cpu {
} __packed;

int diag204(unsigned long subcode, unsigned long size, void *addr);
int diag224(void *ptr);
#endif /* _ASM_S390_DIAG_H */
15 changes: 15 additions & 0 deletions arch/s390/kernel/diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,18 @@ int diag210(struct diag210 *addr)
return ccode;
}
EXPORT_SYMBOL(diag210);

int diag224(void *ptr)
{
int rc = -EOPNOTSUPP;

diag_stat_inc(DIAG_STAT_X224);
asm volatile(
" diag %1,%2,0x224\n"
"0: lhi %0,0x0\n"
"1:\n"
EX_TABLE(0b,1b)
: "+d" (rc) :"d" (0), "d" (ptr) : "memory");
return rc;
}
EXPORT_SYMBOL(diag224);

0 comments on commit 022bd2d

Please sign in to comment.