aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/appldata/appldata_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/appldata/appldata_os.c')
-rw-r--r--arch/s390/appldata/appldata_os.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c
index eb44f9f8ab91..55c80ffd42b9 100644
--- a/arch/s390/appldata/appldata_os.c
+++ b/arch/s390/appldata/appldata_os.c
@@ -9,6 +9,9 @@
9 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> 9 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
10 */ 10 */
11 11
12#define KMSG_COMPONENT "appldata"
13#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
14
12#include <linux/module.h> 15#include <linux/module.h>
13#include <linux/init.h> 16#include <linux/init.h>
14#include <linux/slab.h> 17#include <linux/slab.h>
@@ -22,7 +25,6 @@
22#include "appldata.h" 25#include "appldata.h"
23 26
24 27
25#define MY_PRINT_NAME "appldata_os" /* for debug messages, etc. */
26#define LOAD_INT(x) ((x) >> FSHIFT) 28#define LOAD_INT(x) ((x) >> FSHIFT)
27#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) 29#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
28 30
@@ -143,21 +145,16 @@ static void appldata_get_os_data(void *data)
143 (unsigned long) ops.data, new_size, 145 (unsigned long) ops.data, new_size,
144 ops.mod_lvl); 146 ops.mod_lvl);
145 if (rc != 0) 147 if (rc != 0)
146 P_ERROR("os: START NEW DIAG 0xDC failed, " 148 pr_err("Starting a new OS data collection "
147 "return code: %d, new size = %i\n", rc, 149 "failed with rc=%d\n", rc);
148 new_size);
149 150
150 rc = appldata_diag(APPLDATA_RECORD_OS_ID, 151 rc = appldata_diag(APPLDATA_RECORD_OS_ID,
151 APPLDATA_STOP_REC, 152 APPLDATA_STOP_REC,
152 (unsigned long) ops.data, ops.size, 153 (unsigned long) ops.data, ops.size,
153 ops.mod_lvl); 154 ops.mod_lvl);
154 if (rc != 0) 155 if (rc != 0)
155 P_ERROR("os: STOP OLD DIAG 0xDC failed, " 156 pr_err("Stopping a faulty OS data "
156 "return code: %d, old size = %i\n", rc, 157 "collection failed with rc=%d\n", rc);
157 ops.size);
158 else
159 P_INFO("os: old record size = %i stopped\n",
160 ops.size);
161 } 158 }
162 ops.size = new_size; 159 ops.size = new_size;
163 } 160 }
@@ -178,8 +175,8 @@ static int __init appldata_os_init(void)
178 max_size = sizeof(struct appldata_os_data) + 175 max_size = sizeof(struct appldata_os_data) +
179 (NR_CPUS * sizeof(struct appldata_os_per_cpu)); 176 (NR_CPUS * sizeof(struct appldata_os_per_cpu));
180 if (max_size > APPLDATA_MAX_REC_SIZE) { 177 if (max_size > APPLDATA_MAX_REC_SIZE) {
181 P_ERROR("Max. size of OS record = %i, bigger than maximum " 178 pr_err("Maximum OS record size %i exceeds the maximum "
182 "record size (%i)\n", max_size, APPLDATA_MAX_REC_SIZE); 179 "record size %i\n", max_size, APPLDATA_MAX_REC_SIZE);
183 rc = -ENOMEM; 180 rc = -ENOMEM;
184 goto out; 181 goto out;
185 } 182 }