aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2010-10-25 16:10:16 +0200
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-10-25 16:10:15 +0200
commit7aca2eda5c2a45884ff0ce0bb1ebfa8f83c1e0f9 (patch)
treebf07bbce708b750c7db2e700224d4273051d38be /arch/s390
parent8b8c12b120071d1db2212a439ccfebcb0ab0cf2a (diff)
downloadkernel_samsung_smdk4412-7aca2eda5c2a45884ff0ce0bb1ebfa8f83c1e0f9.zip
kernel_samsung_smdk4412-7aca2eda5c2a45884ff0ce0bb1ebfa8f83c1e0f9.tar.gz
kernel_samsung_smdk4412-7aca2eda5c2a45884ff0ce0bb1ebfa8f83c1e0f9.tar.bz2
[S390] sysinfo: display capacity adjustment indicator
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>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/sysinfo.h5
-rw-r--r--arch/s390/kernel/sysinfo.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/arch/s390/include/asm/sysinfo.h b/arch/s390/include/asm/sysinfo.h
index 22bdb2a..c2ece4d 100644
--- a/arch/s390/include/asm/sysinfo.h
+++ b/arch/s390/include/asm/sysinfo.h
@@ -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];
diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c
index a0ffc77..a91274b 100644
--- a/arch/s390/kernel/sysinfo.c
+++ b/arch/s390/kernel/sysinfo.c
@@ -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;
}