aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-10-31 13:50:46 -0400
committerChris Metcalf <cmetcalf@tilera.com>2014-11-11 15:51:42 -0500
commitf47436734dc89ece62654d4db8d08163a89dd7ca (patch)
tree1977a1e352588c026c87cc1fc34c93fabba6f2b7 /arch/tile/kernel/machine_kexec.c
parentebd25caf7d511312d1a9724ab5752e9e661dfe60 (diff)
tile: Use the more common pr_warn instead of pr_warning
And other message logging neatening. Other miscellanea: o coalesce formats o realign arguments o standardize a couple of macros o use __func__ instead of embedding the function name Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/kernel/machine_kexec.c')
-rw-r--r--arch/tile/kernel/machine_kexec.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/arch/tile/kernel/machine_kexec.c b/arch/tile/kernel/machine_kexec.c
index f0b54a934712..008aa2faef55 100644
--- a/arch/tile/kernel/machine_kexec.c
+++ b/arch/tile/kernel/machine_kexec.c
@@ -77,16 +77,13 @@ void machine_crash_shutdown(struct pt_regs *regs)
77int machine_kexec_prepare(struct kimage *image) 77int machine_kexec_prepare(struct kimage *image)
78{ 78{
79 if (num_online_cpus() > 1) { 79 if (num_online_cpus() > 1) {
80 pr_warning("%s: detected attempt to kexec " 80 pr_warn("%s: detected attempt to kexec with num_online_cpus() > 1\n",
81 "with num_online_cpus() > 1\n", 81 __func__);
82 __func__);
83 return -ENOSYS; 82 return -ENOSYS;
84 } 83 }
85 if (image->type != KEXEC_TYPE_DEFAULT) { 84 if (image->type != KEXEC_TYPE_DEFAULT) {
86 pr_warning("%s: detected attempt to kexec " 85 pr_warn("%s: detected attempt to kexec with unsupported type: %d\n",
87 "with unsupported type: %d\n", 86 __func__, image->type);
88 __func__,
89 image->type);
90 return -ENOSYS; 87 return -ENOSYS;
91 } 88 }
92 return 0; 89 return 0;
@@ -131,8 +128,8 @@ static unsigned char *kexec_bn2cl(void *pg)
131 */ 128 */
132 csum = ip_compute_csum(pg, bhdrp->b_size); 129 csum = ip_compute_csum(pg, bhdrp->b_size);
133 if (csum != 0) { 130 if (csum != 0) {
134 pr_warning("%s: bad checksum %#x (size %d)\n", 131 pr_warn("%s: bad checksum %#x (size %d)\n",
135 __func__, csum, bhdrp->b_size); 132 __func__, csum, bhdrp->b_size);
136 return 0; 133 return 0;
137 } 134 }
138 135
@@ -160,8 +157,7 @@ static unsigned char *kexec_bn2cl(void *pg)
160 while (*desc != '\0') { 157 while (*desc != '\0') {
161 desc++; 158 desc++;
162 if (((unsigned long)desc & PAGE_MASK) != (unsigned long)pg) { 159 if (((unsigned long)desc & PAGE_MASK) != (unsigned long)pg) {
163 pr_info("%s: ran off end of page\n", 160 pr_info("%s: ran off end of page\n", __func__);
164 __func__);
165 return 0; 161 return 0;
166 } 162 }
167 } 163 }
@@ -195,20 +191,18 @@ static void kexec_find_and_set_command_line(struct kimage *image)
195 } 191 }
196 192
197 if (command_line != 0) { 193 if (command_line != 0) {
198 pr_info("setting new command line to \"%s\"\n", 194 pr_info("setting new command line to \"%s\"\n", command_line);
199 command_line);
200 195
201 hverr = hv_set_command_line( 196 hverr = hv_set_command_line(
202 (HV_VirtAddr) command_line, strlen(command_line)); 197 (HV_VirtAddr) command_line, strlen(command_line));
203 kunmap_atomic(command_line); 198 kunmap_atomic(command_line);
204 } else { 199 } else {
205 pr_info("%s: no command line found; making empty\n", 200 pr_info("%s: no command line found; making empty\n", __func__);
206 __func__);
207 hverr = hv_set_command_line((HV_VirtAddr) command_line, 0); 201 hverr = hv_set_command_line((HV_VirtAddr) command_line, 0);
208 } 202 }
209 if (hverr) 203 if (hverr)
210 pr_warning("%s: hv_set_command_line returned error: %d\n", 204 pr_warn("%s: hv_set_command_line returned error: %d\n",
211 __func__, hverr); 205 __func__, hverr);
212} 206}
213 207
214/* 208/*