]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/lparcfg.c
powerpc: iSeries build fixes
[karo-tx-linux.git] / arch / powerpc / kernel / lparcfg.c
index e45ce48ec12642bc972c9fa57142ef21135166cd..9dda16ccde78600f0444f0db8a9579fed4397e41 100644 (file)
 #include <asm/time.h>
 #include <asm/iseries/it_exp_vpd_panel.h>
 #include <asm/prom.h>
-#include <asm/systemcfg.h>
+#include <asm/vdso_datapage.h>
 
 #define MODULE_VERS "1.6"
 #define MODULE_NAME "lparcfg"
 
 /* #define LPARCFG_DEBUG */
 
-/* find a better place for this function... */
-static void log_plpar_hcall_return(unsigned long rc, char *tag)
-{
-       if (rc == 0)            /* success, return */
-               return;
-/* check for null tag ? */
-       if (rc == H_Hardware)
-               printk(KERN_INFO
-                      "plpar-hcall (%s) failed with hardware fault\n", tag);
-       else if (rc == H_Function)
-               printk(KERN_INFO
-                      "plpar-hcall (%s) failed; function not allowed\n", tag);
-       else if (rc == H_Authority)
-               printk(KERN_INFO
-                      "plpar-hcall (%s) failed; not authorized to this function\n",
-                      tag);
-       else if (rc == H_Parameter)
-               printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n",
-                      tag);
-       else
-               printk(KERN_INFO
-                      "plpar-hcall (%s) failed with unexpected rc(0x%lx)\n",
-                      tag, rc);
-
-}
-
 static struct proc_dir_entry *proc_ppc64_lparcfg;
 #define LPARCFG_BUFF_SIZE 4096
 
@@ -172,6 +146,31 @@ static int lparcfg_data(struct seq_file *m, void *v)
 /*
  * Methods used to fetch LPAR data when running on a pSeries platform.
  */
+/* find a better place for this function... */
+static void log_plpar_hcall_return(unsigned long rc, char *tag)
+{
+       if (rc == 0)            /* success, return */
+               return;
+/* check for null tag ? */
+       if (rc == H_Hardware)
+               printk(KERN_INFO
+                      "plpar-hcall (%s) failed with hardware fault\n", tag);
+       else if (rc == H_Function)
+               printk(KERN_INFO
+                      "plpar-hcall (%s) failed; function not allowed\n", tag);
+       else if (rc == H_Authority)
+               printk(KERN_INFO
+                      "plpar-hcall (%s) failed; not authorized to this function\n",
+                      tag);
+       else if (rc == H_Parameter)
+               printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n",
+                      tag);
+       else
+               printk(KERN_INFO
+                      "plpar-hcall (%s) failed with unexpected rc(0x%lx)\n",
+                      tag, rc);
+
+}
 
 /*
  * H_GET_PPP hcall returns info in 4 parms.
@@ -369,7 +368,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
        lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL);
 
        if (lrdrp == NULL) {
-               partition_potential_processors = _systemcfg->processorCount;
+               partition_potential_processors = vdso_data->processorCount;
        } else {
                partition_potential_processors = *(lrdrp + 4);
        }