git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull bugzilla-5452 into release branch
[pandora-kernel.git]
/
arch
/
powerpc
/
kernel
/
lparcfg.c
diff --git
a/arch/powerpc/kernel/lparcfg.c
b/arch/powerpc/kernel/lparcfg.c
index
e789fef
..
2cbde86
100644
(file)
--- a/
arch/powerpc/kernel/lparcfg.c
+++ b/
arch/powerpc/kernel/lparcfg.c
@@
-37,7
+37,7
@@
#include <asm/prom.h>
#include <asm/vdso_datapage.h>
#include <asm/prom.h>
#include <asm/vdso_datapage.h>
-#define MODULE_VERS "1.
6
"
+#define MODULE_VERS "1.
7
"
#define MODULE_NAME "lparcfg"
/* #define LPARCFG_DEBUG */
#define MODULE_NAME "lparcfg"
/* #define LPARCFG_DEBUG */
@@
-56,7
+56,7
@@
static unsigned long get_purr(void)
unsigned long sum_purr = 0;
int cpu;
unsigned long sum_purr = 0;
int cpu;
- for_each_cpu(cpu) {
+ for_each_
possible_
cpu(cpu) {
sum_purr += lppaca[cpu].emulated_time_base;
#ifdef PURR_DEBUG
sum_purr += lppaca[cpu].emulated_time_base;
#ifdef PURR_DEBUG
@@
-149,17
+149,17
@@
static void log_plpar_hcall_return(unsigned long rc, char *tag)
if (rc == 0) /* success, return */
return;
/* check for null tag ? */
if (rc == 0) /* success, return */
return;
/* check for null tag ? */
- if (rc == H_H
ardware
)
+ if (rc == H_H
ARDWARE
)
printk(KERN_INFO
"plpar-hcall (%s) failed with hardware fault\n", tag);
printk(KERN_INFO
"plpar-hcall (%s) failed with hardware fault\n", tag);
- else if (rc == H_F
unction
)
+ else if (rc == H_F
UNCTION
)
printk(KERN_INFO
"plpar-hcall (%s) failed; function not allowed\n", tag);
printk(KERN_INFO
"plpar-hcall (%s) failed; function not allowed\n", tag);
- else if (rc == H_A
uthority
)
+ else if (rc == H_A
UTHORITY
)
printk(KERN_INFO
printk(KERN_INFO
- "plpar-hcall (%s) failed; not authorized to this
function\n",
- tag);
- else if (rc == H_P
arameter
)
+ "plpar-hcall (%s) failed; not authorized to this
"
+
" function\n",
tag);
+ else if (rc == H_P
ARAMETER
)
printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n",
tag);
else
printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n",
tag);
else
@@
-209,7
+209,7
@@
static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs)
unsigned long dummy;
rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);
unsigned long dummy;
rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);
- if (rc != H_A
uthority
)
+ if (rc != H_A
UTHORITY
)
log_plpar_hcall_return(rc, "H_PIC");
}
log_plpar_hcall_return(rc, "H_PIC");
}
@@
-222,7
+222,7
@@
static unsigned long get_purr(void)
int cpu;
struct cpu_usage *cu;
int cpu;
struct cpu_usage *cu;
- for_each_cpu(cpu) {
+ for_each_
possible_
cpu(cpu) {
cu = &per_cpu(cpu_usage_array, cpu);
sum_purr += cu->current_tb;
}
cu = &per_cpu(cpu_usage_array, cpu);
sum_purr += cu->current_tb;
}
@@
-242,7
+242,7
@@
static void parse_system_parameter_string(struct seq_file *m)
{
int call_status;
{
int call_status;
- char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
+
unsigned
char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
if (!local_buffer) {
printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
__FILE__, __FUNCTION__, __LINE__);
if (!local_buffer) {
printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
__FILE__, __FUNCTION__, __LINE__);
@@
-254,7
+254,8
@@
static void parse_system_parameter_string(struct seq_file *m)
call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
NULL,
SPLPAR_CHARACTERISTICS_TOKEN,
call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
NULL,
SPLPAR_CHARACTERISTICS_TOKEN,
- __pa(rtas_data_buf));
+ __pa(rtas_data_buf),
+ RTAS_DATA_BUF_SIZE);
memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
spin_unlock(&rtas_data_buf_lock);
memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
spin_unlock(&rtas_data_buf_lock);
@@
-275,7
+276,7
@@
static void parse_system_parameter_string(struct seq_file *m)
#ifdef LPARCFG_DEBUG
printk(KERN_INFO "success calling get-system-parameter \n");
#endif
#ifdef LPARCFG_DEBUG
printk(KERN_INFO "success calling get-system-parameter \n");
#endif
- splpar_strlen = local_buffer[0] *
1
6 + local_buffer[1];
+ splpar_strlen = local_buffer[0] *
25
6 + local_buffer[1];
local_buffer += 2; /* step over strlen value */
memset(workbuffer, 0, SPLPAR_MAXLENGTH);
local_buffer += 2; /* step over strlen value */
memset(workbuffer, 0, SPLPAR_MAXLENGTH);
@@
-529,13
+530,13
@@
static ssize_t lparcfg_write(struct file *file, const char __user * buf,
retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr,
*new_weight_ptr);
retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr,
*new_weight_ptr);
- if (retval == H_S
uccess || retval == H_Constrained
) {
+ if (retval == H_S
UCCESS || retval == H_CONSTRAINED
) {
retval = count;
retval = count;
- } else if (retval == H_B
usy
) {
+ } else if (retval == H_B
USY
) {
retval = -EBUSY;
retval = -EBUSY;
- } else if (retval == H_H
ardware
) {
+ } else if (retval == H_H
ARDWARE
) {
retval = -EIO;
retval = -EIO;
- } else if (retval == H_P
arameter
) {
+ } else if (retval == H_P
ARAMETER
) {
retval = -EINVAL;
} else {
printk(KERN_WARNING "%s: received unknown hv return code %ld",
retval = -EINVAL;
} else {
printk(KERN_WARNING "%s: received unknown hv return code %ld",