aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/appldata/appldata_base.c
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@de.ibm.com>2008-07-14 03:59:34 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2008-07-14 04:02:21 -0400
commitd3ae942d185bdb9b84a661889fc3349044eeb260 (patch)
treea57d939390186bbc3f31ff150b9a633c719663a5 /arch/s390/appldata/appldata_base.c
parentd5ddc809bf3e63a9cd6d02062f6a7c86bcff7fea (diff)
[S390] Cleanup appldata printk messages.
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/appldata/appldata_base.c')
-rw-r--r--arch/s390/appldata/appldata_base.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 803f3645edf6..9cb3d92447a3 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -5,7 +5,7 @@
5 * Exports appldata_register_ops() and appldata_unregister_ops() for the 5 * Exports appldata_register_ops() and appldata_unregister_ops() for the
6 * data gathering modules. 6 * data gathering modules.
7 * 7 *
8 * Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH. 8 * Copyright IBM Corp. 2003, 2008
9 * 9 *
10 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> 10 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
11 */ 11 */
@@ -108,9 +108,6 @@ static LIST_HEAD(appldata_ops_list);
108 */ 108 */
109static void appldata_timer_function(unsigned long data) 109static void appldata_timer_function(unsigned long data)
110{ 110{
111 P_DEBUG(" -= Timer =-\n");
112 P_DEBUG("CPU: %i, expire_count: %i\n", smp_processor_id(),
113 atomic_read(&appldata_expire_count));
114 if (atomic_dec_and_test(&appldata_expire_count)) { 111 if (atomic_dec_and_test(&appldata_expire_count)) {
115 atomic_set(&appldata_expire_count, num_online_cpus()); 112 atomic_set(&appldata_expire_count, num_online_cpus());
116 queue_work(appldata_wq, (struct work_struct *) data); 113 queue_work(appldata_wq, (struct work_struct *) data);
@@ -128,14 +125,11 @@ static void appldata_work_fn(struct work_struct *work)
128 struct appldata_ops *ops; 125 struct appldata_ops *ops;
129 int i; 126 int i;
130 127
131 P_DEBUG(" -= Work Queue =-\n");
132 i = 0; 128 i = 0;
133 get_online_cpus(); 129 get_online_cpus();
134 spin_lock(&appldata_ops_lock); 130 spin_lock(&appldata_ops_lock);
135 list_for_each(lh, &appldata_ops_list) { 131 list_for_each(lh, &appldata_ops_list) {
136 ops = list_entry(lh, struct appldata_ops, list); 132 ops = list_entry(lh, struct appldata_ops, list);
137 P_DEBUG("list_for_each loop: %i) active = %u, name = %s\n",
138 ++i, ops->active, ops->name);
139 if (ops->active == 1) { 133 if (ops->active == 1) {
140 ops->callback(ops->data); 134 ops->callback(ops->data);
141 } 135 }
@@ -212,7 +206,6 @@ __appldata_vtimer_setup(int cmd)
212 0, 1); 206 0, 1);
213 } 207 }
214 appldata_timer_active = 1; 208 appldata_timer_active = 1;
215 P_INFO("Monitoring timer started.\n");
216 break; 209 break;
217 case APPLDATA_DEL_TIMER: 210 case APPLDATA_DEL_TIMER:
218 for_each_online_cpu(i) 211 for_each_online_cpu(i)
@@ -221,7 +214,6 @@ __appldata_vtimer_setup(int cmd)
221 break; 214 break;
222 appldata_timer_active = 0; 215 appldata_timer_active = 0;
223 atomic_set(&appldata_expire_count, num_online_cpus()); 216 atomic_set(&appldata_expire_count, num_online_cpus());
224 P_INFO("Monitoring timer stopped.\n");
225 break; 217 break;
226 case APPLDATA_MOD_TIMER: 218 case APPLDATA_MOD_TIMER:
227 per_cpu_interval = (u64) (appldata_interval*1000 / 219 per_cpu_interval = (u64) (appldata_interval*1000 /
@@ -313,10 +305,8 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp,
313 } 305 }
314 interval = 0; 306 interval = 0;
315 sscanf(buf, "%i", &interval); 307 sscanf(buf, "%i", &interval);
316 if (interval <= 0) { 308 if (interval <= 0)
317 P_ERROR("Timer CPU interval has to be > 0!\n");
318 return -EINVAL; 309 return -EINVAL;
319 }
320 310
321 get_online_cpus(); 311 get_online_cpus();
322 spin_lock(&appldata_timer_lock); 312 spin_lock(&appldata_timer_lock);
@@ -324,9 +314,6 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp,
324 __appldata_vtimer_setup(APPLDATA_MOD_TIMER); 314 __appldata_vtimer_setup(APPLDATA_MOD_TIMER);
325 spin_unlock(&appldata_timer_lock); 315 spin_unlock(&appldata_timer_lock);
326 put_online_cpus(); 316 put_online_cpus();
327
328 P_INFO("Monitoring CPU interval set to %u milliseconds.\n",
329 interval);
330out: 317out:
331 *lenp = len; 318 *lenp = len;
332 *ppos += len; 319 *ppos += len;
@@ -406,23 +393,16 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
406 P_ERROR("START DIAG 0xDC for %s failed, " 393 P_ERROR("START DIAG 0xDC for %s failed, "
407 "return code: %d\n", ops->name, rc); 394 "return code: %d\n", ops->name, rc);
408 module_put(ops->owner); 395 module_put(ops->owner);
409 } else { 396 } else
410 P_INFO("Monitoring %s data enabled, "
411 "DIAG 0xDC started.\n", ops->name);
412 ops->active = 1; 397 ops->active = 1;
413 }
414 } else if ((buf[0] == '0') && (ops->active == 1)) { 398 } else if ((buf[0] == '0') && (ops->active == 1)) {
415 ops->active = 0; 399 ops->active = 0;
416 rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC, 400 rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC,
417 (unsigned long) ops->data, ops->size, 401 (unsigned long) ops->data, ops->size,
418 ops->mod_lvl); 402 ops->mod_lvl);
419 if (rc != 0) { 403 if (rc != 0)
420 P_ERROR("STOP DIAG 0xDC for %s failed, " 404 P_ERROR("STOP DIAG 0xDC for %s failed, "
421 "return code: %d\n", ops->name, rc); 405 "return code: %d\n", ops->name, rc);
422 } else {
423 P_INFO("Monitoring %s data disabled, "
424 "DIAG 0xDC stopped.\n", ops->name);
425 }
426 module_put(ops->owner); 406 module_put(ops->owner);
427 } 407 }
428 spin_unlock(&appldata_ops_lock); 408 spin_unlock(&appldata_ops_lock);
@@ -468,7 +448,6 @@ int appldata_register_ops(struct appldata_ops *ops)
468 ops->sysctl_header = register_sysctl_table(ops->ctl_table); 448 ops->sysctl_header = register_sysctl_table(ops->ctl_table);
469 if (!ops->sysctl_header) 449 if (!ops->sysctl_header)
470 goto out; 450 goto out;
471 P_INFO("%s-ops registered!\n", ops->name);
472 return 0; 451 return 0;
473out: 452out:
474 spin_lock(&appldata_ops_lock); 453 spin_lock(&appldata_ops_lock);
@@ -490,7 +469,6 @@ void appldata_unregister_ops(struct appldata_ops *ops)
490 spin_unlock(&appldata_ops_lock); 469 spin_unlock(&appldata_ops_lock);
491 unregister_sysctl_table(ops->sysctl_header); 470 unregister_sysctl_table(ops->sysctl_header);
492 kfree(ops->ctl_table); 471 kfree(ops->ctl_table);
493 P_INFO("%s-ops unregistered!\n", ops->name);
494} 472}
495/********************** module-ops management <END> **************************/ 473/********************** module-ops management <END> **************************/
496 474
@@ -553,14 +531,9 @@ static int __init appldata_init(void)
553{ 531{
554 int i; 532 int i;
555 533
556 P_DEBUG("sizeof(parameter_list) = %lu\n",
557 sizeof(struct appldata_parameter_list));
558
559 appldata_wq = create_singlethread_workqueue("appldata"); 534 appldata_wq = create_singlethread_workqueue("appldata");
560 if (!appldata_wq) { 535 if (!appldata_wq)
561 P_ERROR("Could not create work queue\n");
562 return -ENOMEM; 536 return -ENOMEM;
563 }
564 537
565 get_online_cpus(); 538 get_online_cpus();
566 for_each_online_cpu(i) 539 for_each_online_cpu(i)
@@ -571,8 +544,6 @@ static int __init appldata_init(void)
571 register_hotcpu_notifier(&appldata_nb); 544 register_hotcpu_notifier(&appldata_nb);
572 545
573 appldata_sysctl_header = register_sysctl_table(appldata_dir_table); 546 appldata_sysctl_header = register_sysctl_table(appldata_dir_table);
574
575 P_DEBUG("Base interface initialized.\n");
576 return 0; 547 return 0;
577} 548}
578 549