]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ppc64/kernel/lparcfg.c
Allow PCI config space syscalls to be used by 64-bit processes.
[linux-2.6-omap-h63xx.git] / arch / ppc64 / kernel / lparcfg.c
index 02e96627fa6604999b3ac6aafd926fea185e2676..cae19bbd5acd9d790ef84945b678872ffd1c2593 100644 (file)
@@ -29,7 +29,7 @@
 #include <asm/iSeries/HvLpConfig.h>
 #include <asm/lppaca.h>
 #include <asm/hvcall.h>
-#include <asm/cputable.h>
+#include <asm/firmware.h>
 #include <asm/rtas.h>
 #include <asm/system.h>
 #include <asm/time.h>
@@ -273,6 +273,7 @@ static void parse_system_parameter_string(struct seq_file *m)
                if (!workbuffer) {
                        printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
                               __FILE__, __FUNCTION__, __LINE__);
+                       kfree(local_buffer);                    
                        return;
                }
 #ifdef LPARCFG_DEBUG
@@ -377,7 +378,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
 
        partition_active_processors = lparcfg_count_active_processors();
 
-       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
+       if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
                unsigned long h_entitled, h_unallocated;
                unsigned long h_aggregation, h_resource;
                unsigned long pool_idle_time, pool_procs;
@@ -568,10 +569,10 @@ struct file_operations lparcfg_fops = {
 int __init lparcfg_init(void)
 {
        struct proc_dir_entry *ent;
-       mode_t mode = S_IRUSR;
+       mode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
 
        /* Allow writing if we have FW_FEATURE_SPLPAR */
-       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
+       if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
                lparcfg_fops.write = lparcfg_write;
                mode |= S_IWUSR;
        }