Skip to content

Commit

Permalink
[S390] sysinfo: display capacity adjustment indicator
Browse files Browse the repository at this point in the history
Display machine capacity adjustment indicator and capacity
change reason if available in /proc/sysinfo.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Oct 25, 2010
1 parent 8b8c12b commit 7aca2ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/s390/include/asm/sysinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
#define __ASM_S390_SYSINFO_H

struct sysinfo_1_1_1 {
char reserved_0[32];
unsigned short :16;
unsigned char ccr;
unsigned char cai;
char reserved_0[28];
char manufacturer[16];
char type[4];
char reserved_1[12];
Expand Down
7 changes: 7 additions & 0 deletions arch/s390/kernel/sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ static int stsi_1_1_1(struct sysinfo_1_1_1 *info, char *page, int len)
"Model Temp. Capacity: %-16.16s %08u\n",
info->model_temp_cap,
*(u32 *) info->model_temp_cap_rating);
if (info->cai) {
len += sprintf(page + len,
"Capacity Adj. Ind.: %d\n",
info->cai);
len += sprintf(page + len, "Capacity Ch. Reason: %d\n",
info->ccr);
}
return len;
}

Expand Down

0 comments on commit 7aca2ed

Please sign in to comment.