diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2009-09-11 04:28:53 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-09-11 04:29:51 -0400 |
commit | 11af97e18ea8c310d73b59f1361e6f04444e05a8 (patch) | |
tree | 966dab912e7f64b686c1ebfb2a652321ca66dd65 /arch/s390/kernel/early.c | |
parent | edc44fa03ed7bc9847787e080190cf1d7ed68ceb (diff) |
[S390] kernel: Print an error message if kernel NSS cannot be defined
If a named saved system (NSS) cannot be defined or saved, print out an
error message with the return code of the underlying z/VM CP command.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/early.c')
-rw-r--r-- | arch/s390/kernel/early.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 734deeaa7361..bf8b4ae7ff2d 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -6,6 +6,9 @@ | |||
6 | * Heiko Carstens <heiko.carstens@de.ibm.com> | 6 | * Heiko Carstens <heiko.carstens@de.ibm.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #define KMSG_COMPONENT "setup" | ||
10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
11 | |||
9 | #include <linux/compiler.h> | 12 | #include <linux/compiler.h> |
10 | #include <linux/init.h> | 13 | #include <linux/init.h> |
11 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
@@ -16,6 +19,7 @@ | |||
16 | #include <linux/module.h> | 19 | #include <linux/module.h> |
17 | #include <linux/pfn.h> | 20 | #include <linux/pfn.h> |
18 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
22 | #include <linux/kernel.h> | ||
19 | #include <asm/ebcdic.h> | 23 | #include <asm/ebcdic.h> |
20 | #include <asm/ipl.h> | 24 | #include <asm/ipl.h> |
21 | #include <asm/lowcore.h> | 25 | #include <asm/lowcore.h> |
@@ -140,6 +144,8 @@ static noinline __init void create_kernel_nss(void) | |||
140 | __cpcmd(defsys_cmd, NULL, 0, &response); | 144 | __cpcmd(defsys_cmd, NULL, 0, &response); |
141 | 145 | ||
142 | if (response != 0) { | 146 | if (response != 0) { |
147 | pr_err("Defining the Linux kernel NSS failed with rc=%d\n", | ||
148 | response); | ||
143 | kernel_nss_name[0] = '\0'; | 149 | kernel_nss_name[0] = '\0'; |
144 | return; | 150 | return; |
145 | } | 151 | } |
@@ -152,8 +158,11 @@ static noinline __init void create_kernel_nss(void) | |||
152 | * max SAVESYS_CMD_SIZE | 158 | * max SAVESYS_CMD_SIZE |
153 | * On error: response contains the numeric portion of cp error message. | 159 | * On error: response contains the numeric portion of cp error message. |
154 | * for SAVESYS it will be >= 263 | 160 | * for SAVESYS it will be >= 263 |
161 | * for missing privilege class, it will be 1 | ||
155 | */ | 162 | */ |
156 | if (response > SAVESYS_CMD_SIZE) { | 163 | if (response > SAVESYS_CMD_SIZE || response == 1) { |
164 | pr_err("Saving the Linux kernel NSS failed with rc=%d\n", | ||
165 | response); | ||
157 | kernel_nss_name[0] = '\0'; | 166 | kernel_nss_name[0] = '\0'; |
158 | return; | 167 | return; |
159 | } | 168 | } |