diff options
Diffstat (limited to 'arch/s390/mm/cmm.c')
-rw-r--r-- | arch/s390/mm/cmm.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index eb6a2ef..c66ffd8 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -23,7 +23,10 @@ #include <asm/pgalloc.h> #include <asm/diag.h> -static char *sender = "VMRMSVM"; +#ifdef CONFIG_CMM_IUCV +static char *cmm_default_sender = "VMRMSVM"; +#endif +static char *sender; module_param(sender, charp, 0400); MODULE_PARM_DESC(sender, "Guest name that may send SMSG messages (default VMRMSVM)"); @@ -427,7 +430,7 @@ static struct notifier_block cmm_power_notifier = { .notifier_call = cmm_power_event, }; -static int cmm_init(void) +static int __init cmm_init(void) { int rc = -ENOMEM; @@ -435,6 +438,15 @@ static int cmm_init(void) if (!cmm_sysctl_header) goto out_sysctl; #ifdef CONFIG_CMM_IUCV + /* convert sender to uppercase characters */ + if (sender) { + int len = strlen(sender); + while (len--) + sender[len] = toupper(sender[len]); + } else { + sender = cmm_default_sender; + } + rc = smsg_register_callback(SMSG_PREFIX, cmm_smsg_target); if (rc < 0) goto out_smsg; @@ -467,7 +479,7 @@ out_sysctl: } module_init(cmm_init); -static void cmm_exit(void) +static void __exit cmm_exit(void) { unregister_sysctl_table(cmm_sysctl_header); #ifdef CONFIG_CMM_IUCV |