]> err.no Git - linux-2.6/commitdiff
[S390] Add new fields for System z10 to /proc/sysinfo
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 17 Apr 2008 05:46:10 +0000 (07:46 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 17 Apr 2008 05:47:01 +0000 (07:47 +0200)
Add permanent and temporary model capacity and the corresponding
capacity value fields for the three capacity identifiers to the
output of /proc/sysinfo.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
drivers/s390/sysinfo.c
include/asm-s390/sysinfo.h

index 43fffa3b099dda5bf3b6cbc43e88b235e338c8b8..c3e4ab07b9ccc4e9e1df807ada9e0c5341f76ad2 100644 (file)
@@ -35,6 +35,8 @@ static int stsi_1_1_1(struct sysinfo_1_1_1 *info, char *page, int len)
        EBCASC(info->sequence, sizeof(info->sequence));
        EBCASC(info->plant, sizeof(info->plant));
        EBCASC(info->model_capacity, sizeof(info->model_capacity));
+       EBCASC(info->model_perm_cap, sizeof(info->model_perm_cap));
+       EBCASC(info->model_temp_cap, sizeof(info->model_temp_cap));
        len += sprintf(page + len, "Manufacturer:         %-16.16s\n",
                       info->manufacturer);
        len += sprintf(page + len, "Type:                 %-4.4s\n",
@@ -57,8 +59,18 @@ static int stsi_1_1_1(struct sysinfo_1_1_1 *info, char *page, int len)
                       info->sequence);
        len += sprintf(page + len, "Plant:                %-4.4s\n",
                       info->plant);
-       len += sprintf(page + len, "Model Capacity:       %-16.16s\n",
-                      info->model_capacity);
+       len += sprintf(page + len, "Model Capacity:       %-16.16s %08u\n",
+                      info->model_capacity, *(u32 *) info->model_cap_rating);
+       if (info->model_perm_cap[0] != '\0')
+               len += sprintf(page + len,
+                              "Model Perm. Capacity: %-16.16s %08u\n",
+                              info->model_perm_cap,
+                              *(u32 *) info->model_perm_cap_rating);
+       if (info->model_temp_cap[0] != '\0')
+               len += sprintf(page + len,
+                              "Model Temp. Capacity: %-16.16s %08u\n",
+                              info->model_temp_cap,
+                              *(u32 *) info->model_temp_cap_rating);
        return len;
 }
 
index 014f2a24664e49e1cd01a4a44771a653e8a05ccc..abe10ae15e468d9e8e6733fd26e4a5b0d3bdc7e6 100644 (file)
@@ -20,6 +20,11 @@ struct sysinfo_1_1_1 {
        char sequence[16];
        char plant[4];
        char model[16];
+       char model_perm_cap[16];
+       char model_temp_cap[16];
+       char model_cap_rating[4];
+       char model_perm_cap_rating[4];
+       char model_temp_cap_rating[4];
 };
 
 struct sysinfo_1_2_1 {