diff options
Diffstat (limited to 'arch/powerpc/kernel/lparcfg.c')
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 1b73508ecb2b..2cbde865d4f5 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
38 | #include <asm/vdso_datapage.h> | 38 | #include <asm/vdso_datapage.h> |
39 | 39 | ||
40 | #define MODULE_VERS "1.6" | 40 | #define MODULE_VERS "1.7" |
41 | #define MODULE_NAME "lparcfg" | 41 | #define MODULE_NAME "lparcfg" |
42 | 42 | ||
43 | /* #define LPARCFG_DEBUG */ | 43 | /* #define LPARCFG_DEBUG */ |
@@ -149,17 +149,17 @@ static void log_plpar_hcall_return(unsigned long rc, char *tag) | |||
149 | if (rc == 0) /* success, return */ | 149 | if (rc == 0) /* success, return */ |
150 | return; | 150 | return; |
151 | /* check for null tag ? */ | 151 | /* check for null tag ? */ |
152 | if (rc == H_Hardware) | 152 | if (rc == H_HARDWARE) |
153 | printk(KERN_INFO | 153 | printk(KERN_INFO |
154 | "plpar-hcall (%s) failed with hardware fault\n", tag); | 154 | "plpar-hcall (%s) failed with hardware fault\n", tag); |
155 | else if (rc == H_Function) | 155 | else if (rc == H_FUNCTION) |
156 | printk(KERN_INFO | 156 | printk(KERN_INFO |
157 | "plpar-hcall (%s) failed; function not allowed\n", tag); | 157 | "plpar-hcall (%s) failed; function not allowed\n", tag); |
158 | else if (rc == H_Authority) | 158 | else if (rc == H_AUTHORITY) |
159 | printk(KERN_INFO | 159 | printk(KERN_INFO |
160 | "plpar-hcall (%s) failed; not authorized to this function\n", | 160 | "plpar-hcall (%s) failed; not authorized to this" |
161 | tag); | 161 | " function\n", tag); |
162 | else if (rc == H_Parameter) | 162 | else if (rc == H_PARAMETER) |
163 | printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n", | 163 | printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n", |
164 | tag); | 164 | tag); |
165 | else | 165 | else |
@@ -209,7 +209,7 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) | |||
209 | unsigned long dummy; | 209 | unsigned long dummy; |
210 | rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); | 210 | rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); |
211 | 211 | ||
212 | if (rc != H_Authority) | 212 | if (rc != H_AUTHORITY) |
213 | log_plpar_hcall_return(rc, "H_PIC"); | 213 | log_plpar_hcall_return(rc, "H_PIC"); |
214 | } | 214 | } |
215 | 215 | ||
@@ -242,7 +242,7 @@ static void parse_system_parameter_string(struct seq_file *m) | |||
242 | { | 242 | { |
243 | int call_status; | 243 | int call_status; |
244 | 244 | ||
245 | char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); | 245 | unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); |
246 | if (!local_buffer) { | 246 | if (!local_buffer) { |
247 | printk(KERN_ERR "%s %s kmalloc failure at line %d \n", | 247 | printk(KERN_ERR "%s %s kmalloc failure at line %d \n", |
248 | __FILE__, __FUNCTION__, __LINE__); | 248 | __FILE__, __FUNCTION__, __LINE__); |
@@ -254,7 +254,8 @@ static void parse_system_parameter_string(struct seq_file *m) | |||
254 | call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1, | 254 | call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1, |
255 | NULL, | 255 | NULL, |
256 | SPLPAR_CHARACTERISTICS_TOKEN, | 256 | SPLPAR_CHARACTERISTICS_TOKEN, |
257 | __pa(rtas_data_buf)); | 257 | __pa(rtas_data_buf), |
258 | RTAS_DATA_BUF_SIZE); | ||
258 | memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH); | 259 | memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH); |
259 | spin_unlock(&rtas_data_buf_lock); | 260 | spin_unlock(&rtas_data_buf_lock); |
260 | 261 | ||
@@ -275,7 +276,7 @@ static void parse_system_parameter_string(struct seq_file *m) | |||
275 | #ifdef LPARCFG_DEBUG | 276 | #ifdef LPARCFG_DEBUG |
276 | printk(KERN_INFO "success calling get-system-parameter \n"); | 277 | printk(KERN_INFO "success calling get-system-parameter \n"); |
277 | #endif | 278 | #endif |
278 | splpar_strlen = local_buffer[0] * 16 + local_buffer[1]; | 279 | splpar_strlen = local_buffer[0] * 256 + local_buffer[1]; |
279 | local_buffer += 2; /* step over strlen value */ | 280 | local_buffer += 2; /* step over strlen value */ |
280 | 281 | ||
281 | memset(workbuffer, 0, SPLPAR_MAXLENGTH); | 282 | memset(workbuffer, 0, SPLPAR_MAXLENGTH); |
@@ -529,13 +530,13 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, | |||
529 | retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, | 530 | retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, |
530 | *new_weight_ptr); | 531 | *new_weight_ptr); |
531 | 532 | ||
532 | if (retval == H_Success || retval == H_Constrained) { | 533 | if (retval == H_SUCCESS || retval == H_CONSTRAINED) { |
533 | retval = count; | 534 | retval = count; |
534 | } else if (retval == H_Busy) { | 535 | } else if (retval == H_BUSY) { |
535 | retval = -EBUSY; | 536 | retval = -EBUSY; |
536 | } else if (retval == H_Hardware) { | 537 | } else if (retval == H_HARDWARE) { |
537 | retval = -EIO; | 538 | retval = -EIO; |
538 | } else if (retval == H_Parameter) { | 539 | } else if (retval == H_PARAMETER) { |
539 | retval = -EINVAL; | 540 | retval = -EINVAL; |
540 | } else { | 541 | } else { |
541 | printk(KERN_WARNING "%s: received unknown hv return code %ld", | 542 | printk(KERN_WARNING "%s: received unknown hv return code %ld", |