mirror of
https://github.com/adulau/aha.git
synced 2025-01-03 14:43:17 +00:00
[S390] convert monreader printks to pr_xxx macros.
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
e7534b0ec9
commit
a4f5a299cf
1 changed files with 17 additions and 24 deletions
|
@ -7,6 +7,9 @@
|
||||||
* Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
|
* Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define KMSG_COMPONENT "monreader"
|
||||||
|
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/moduleparam.h>
|
#include <linux/moduleparam.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
@ -24,19 +27,6 @@
|
||||||
#include <asm/ebcdic.h>
|
#include <asm/ebcdic.h>
|
||||||
#include <asm/extmem.h>
|
#include <asm/extmem.h>
|
||||||
|
|
||||||
//#define MON_DEBUG /* Debug messages on/off */
|
|
||||||
|
|
||||||
#define MON_NAME "monreader"
|
|
||||||
|
|
||||||
#define P_INFO(x...) printk(KERN_INFO MON_NAME " info: " x)
|
|
||||||
#define P_ERROR(x...) printk(KERN_ERR MON_NAME " error: " x)
|
|
||||||
#define P_WARNING(x...) printk(KERN_WARNING MON_NAME " warning: " x)
|
|
||||||
|
|
||||||
#ifdef MON_DEBUG
|
|
||||||
#define P_DEBUG(x...) printk(KERN_DEBUG MON_NAME " debug: " x)
|
|
||||||
#else
|
|
||||||
#define P_DEBUG(x...) do {} while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MON_COLLECT_SAMPLE 0x80
|
#define MON_COLLECT_SAMPLE 0x80
|
||||||
#define MON_COLLECT_EVENT 0x40
|
#define MON_COLLECT_EVENT 0x40
|
||||||
|
@ -172,7 +162,7 @@ static int mon_send_reply(struct mon_msg *monmsg,
|
||||||
} else
|
} else
|
||||||
monmsg->replied_msglim = 1;
|
monmsg->replied_msglim = 1;
|
||||||
if (rc) {
|
if (rc) {
|
||||||
P_ERROR("read, IUCV reply failed with rc = %i\n\n", rc);
|
pr_err("Reading monitor data failed with rc=%i\n", rc);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -251,7 +241,8 @@ static void mon_iucv_path_severed(struct iucv_path *path, u8 ipuser[16])
|
||||||
{
|
{
|
||||||
struct mon_private *monpriv = path->private;
|
struct mon_private *monpriv = path->private;
|
||||||
|
|
||||||
P_ERROR("IUCV connection severed with rc = 0x%X\n", ipuser[0]);
|
pr_err("z/VM *MONITOR system service disconnected with rc=%i\n",
|
||||||
|
ipuser[0]);
|
||||||
iucv_path_sever(path, NULL);
|
iucv_path_sever(path, NULL);
|
||||||
atomic_set(&monpriv->iucv_severed, 1);
|
atomic_set(&monpriv->iucv_severed, 1);
|
||||||
wake_up(&mon_conn_wait_queue);
|
wake_up(&mon_conn_wait_queue);
|
||||||
|
@ -266,8 +257,7 @@ static void mon_iucv_message_pending(struct iucv_path *path,
|
||||||
memcpy(&monpriv->msg_array[monpriv->write_index]->msg,
|
memcpy(&monpriv->msg_array[monpriv->write_index]->msg,
|
||||||
msg, sizeof(*msg));
|
msg, sizeof(*msg));
|
||||||
if (atomic_inc_return(&monpriv->msglim_count) == MON_MSGLIM) {
|
if (atomic_inc_return(&monpriv->msglim_count) == MON_MSGLIM) {
|
||||||
P_WARNING("IUCV message pending, message limit (%i) reached\n",
|
pr_warning("The read queue for monitor data is full\n");
|
||||||
MON_MSGLIM);
|
|
||||||
monpriv->msg_array[monpriv->write_index]->msglim_reached = 1;
|
monpriv->msg_array[monpriv->write_index]->msglim_reached = 1;
|
||||||
}
|
}
|
||||||
monpriv->write_index = (monpriv->write_index + 1) % MON_MSGLIM;
|
monpriv->write_index = (monpriv->write_index + 1) % MON_MSGLIM;
|
||||||
|
@ -311,8 +301,8 @@ static int mon_open(struct inode *inode, struct file *filp)
|
||||||
rc = iucv_path_connect(monpriv->path, &monreader_iucv_handler,
|
rc = iucv_path_connect(monpriv->path, &monreader_iucv_handler,
|
||||||
MON_SERVICE, NULL, user_data_connect, monpriv);
|
MON_SERVICE, NULL, user_data_connect, monpriv);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
P_ERROR("iucv connection to *MONITOR failed with "
|
pr_err("Connecting to the z/VM *MONITOR system service "
|
||||||
"IPUSER SEVER code = %i\n", rc);
|
"failed with rc=%i\n", rc);
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto out_path;
|
goto out_path;
|
||||||
}
|
}
|
||||||
|
@ -353,7 +343,8 @@ static int mon_close(struct inode *inode, struct file *filp)
|
||||||
*/
|
*/
|
||||||
rc = iucv_path_sever(monpriv->path, user_data_sever);
|
rc = iucv_path_sever(monpriv->path, user_data_sever);
|
||||||
if (rc)
|
if (rc)
|
||||||
P_ERROR("close, iucv_sever failed with rc = %i\n", rc);
|
pr_warning("Disconnecting the z/VM *MONITOR system service "
|
||||||
|
"failed with rc=%i\n", rc);
|
||||||
|
|
||||||
atomic_set(&monpriv->iucv_severed, 0);
|
atomic_set(&monpriv->iucv_severed, 0);
|
||||||
atomic_set(&monpriv->iucv_connected, 0);
|
atomic_set(&monpriv->iucv_connected, 0);
|
||||||
|
@ -469,7 +460,8 @@ static int __init mon_init(void)
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (!MACHINE_IS_VM) {
|
if (!MACHINE_IS_VM) {
|
||||||
P_ERROR("not running under z/VM, driver not loaded\n");
|
pr_err("The z/VM *MONITOR record device driver cannot be "
|
||||||
|
"loaded without z/VM\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,7 +470,8 @@ static int __init mon_init(void)
|
||||||
*/
|
*/
|
||||||
rc = iucv_register(&monreader_iucv_handler, 1);
|
rc = iucv_register(&monreader_iucv_handler, 1);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
P_ERROR("failed to register with iucv driver\n");
|
pr_err("The z/VM *MONITOR record device driver failed to "
|
||||||
|
"register with IUCV\n");
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,8 +481,8 @@ static int __init mon_init(void)
|
||||||
goto out_iucv;
|
goto out_iucv;
|
||||||
}
|
}
|
||||||
if (rc != SEG_TYPE_SC) {
|
if (rc != SEG_TYPE_SC) {
|
||||||
P_ERROR("segment %s has unsupported type, should be SC\n",
|
pr_err("The specified *MONITOR DCSS %s does not have the "
|
||||||
mon_dcss_name);
|
"required type SC\n", mon_dcss_name);
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
goto out_iucv;
|
goto out_iucv;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue