diff options
Diffstat (limited to 'arch/s390/appldata')
-rw-r--r-- | arch/s390/appldata/appldata.h | 4 | ||||
-rw-r--r-- | arch/s390/appldata/appldata_base.c | 12 | ||||
-rw-r--r-- | arch/s390/appldata/appldata_os.c | 21 |
3 files changed, 16 insertions, 21 deletions
diff --git a/arch/s390/appldata/appldata.h b/arch/s390/appldata/appldata.h index 17a2636fec0a..f0b23fc759ba 100644 --- a/arch/s390/appldata/appldata.h +++ b/arch/s390/appldata/appldata.h | |||
@@ -26,10 +26,6 @@ | |||
26 | #define CTL_APPLDATA_NET_SUM 2125 | 26 | #define CTL_APPLDATA_NET_SUM 2125 |
27 | #define CTL_APPLDATA_PROC 2126 | 27 | #define CTL_APPLDATA_PROC 2126 |
28 | 28 | ||
29 | #define P_INFO(x...) printk(KERN_INFO MY_PRINT_NAME " info: " x) | ||
30 | #define P_ERROR(x...) printk(KERN_ERR MY_PRINT_NAME " error: " x) | ||
31 | #define P_WARNING(x...) printk(KERN_WARNING MY_PRINT_NAME " status: " x) | ||
32 | |||
33 | struct appldata_ops { | 29 | struct appldata_ops { |
34 | struct list_head list; | 30 | struct list_head list; |
35 | struct ctl_table_header *sysctl_header; | 31 | struct ctl_table_header *sysctl_header; |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index a06a47cdd5e0..27b70d8a359c 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -10,6 +10,9 @@ | |||
10 | * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> | 10 | * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define KMSG_COMPONENT "appldata" | ||
14 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
15 | |||
13 | #include <linux/module.h> | 16 | #include <linux/module.h> |
14 | #include <linux/init.h> | 17 | #include <linux/init.h> |
15 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
@@ -32,7 +35,6 @@ | |||
32 | #include "appldata.h" | 35 | #include "appldata.h" |
33 | 36 | ||
34 | 37 | ||
35 | #define MY_PRINT_NAME "appldata" /* for debug messages, etc. */ | ||
36 | #define APPLDATA_CPU_INTERVAL 10000 /* default (CPU) time for | 38 | #define APPLDATA_CPU_INTERVAL 10000 /* default (CPU) time for |
37 | sampling interval in | 39 | sampling interval in |
38 | milliseconds */ | 40 | milliseconds */ |
@@ -390,8 +392,8 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, | |||
390 | (unsigned long) ops->data, ops->size, | 392 | (unsigned long) ops->data, ops->size, |
391 | ops->mod_lvl); | 393 | ops->mod_lvl); |
392 | if (rc != 0) { | 394 | if (rc != 0) { |
393 | P_ERROR("START DIAG 0xDC for %s failed, " | 395 | pr_err("Starting the data collection for %s " |
394 | "return code: %d\n", ops->name, rc); | 396 | "failed with rc=%d\n", ops->name, rc); |
395 | module_put(ops->owner); | 397 | module_put(ops->owner); |
396 | } else | 398 | } else |
397 | ops->active = 1; | 399 | ops->active = 1; |
@@ -401,8 +403,8 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, | |||
401 | (unsigned long) ops->data, ops->size, | 403 | (unsigned long) ops->data, ops->size, |
402 | ops->mod_lvl); | 404 | ops->mod_lvl); |
403 | if (rc != 0) | 405 | if (rc != 0) |
404 | P_ERROR("STOP DIAG 0xDC for %s failed, " | 406 | pr_err("Stopping the data collection for %s " |
405 | "return code: %d\n", ops->name, rc); | 407 | "failed with rc=%d\n", ops->name, rc); |
406 | module_put(ops->owner); | 408 | module_put(ops->owner); |
407 | } | 409 | } |
408 | spin_unlock(&appldata_ops_lock); | 410 | spin_unlock(&appldata_ops_lock); |
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 | } |