]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[S390] sysinfo: display capacity adjustment indicator
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 25 Oct 2010 14:10:16 +0000 (16:10 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 25 Oct 2010 14:10:15 +0000 (16:10 +0200)
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>
arch/s390/include/asm/sysinfo.h
arch/s390/kernel/sysinfo.c

index 22bdb2a0ee5f00724d02e67e814c41f4aa115e49..c2ece4dd6c0a5676c9cb92d9a1cf448ead8ff07e 100644 (file)
 #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];
index a0ffc7717ed62994609a66b22202982b1c867dba..a91274b4eb8fdc3296a24566ffba85f05b6b1139 100644 (file)
@@ -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;
 }