]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/iseries/lpardata.c
[POWERPC] iSeries: Use alternate paca structure for booting
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / iseries / lpardata.c
index bb8c91537f35f7f6df54be8724f3b1044267746d..dc8470850a811f4485e8e62b7498571f22fb30af 100644 (file)
@@ -6,7 +6,6 @@
  * as published by the Free Software Foundation; either version
  * 2 of the License, or (at your option) any later version.
  */
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/threads.h>
 #include <linux/module.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 #include <asm/abs_addr.h>
-#include <asm/iseries/it_lp_naca.h>
 #include <asm/lppaca.h>
 #include <asm/iseries/it_lp_reg_save.h>
 #include <asm/paca.h>
 #include <asm/iseries/lpar_map.h>
-#include <asm/iseries/it_exp_vpd_panel.h>
 #include <asm/iseries/it_lp_queue.h>
+#include <asm/iseries/alpaca.h>
 
 #include "naca.h"
 #include "vpd_areas.h"
@@ -28,6 +26,8 @@
 #include "ipl_parms.h"
 #include "processor_vpd.h"
 #include "release_data.h"
+#include "it_exp_vpd_panel.h"
+#include "it_lp_naca.h"
 
 /* The HvReleaseData is the root of the information shared between
  * the hypervisor and Linux.
@@ -93,10 +93,7 @@ struct ItLpNaca itLpNaca = {
        .xPirEnvironMode = 0,           /* Piranha stuff */
        .xPirConsoleMode = 0,
        .xPirDasdMode = 0,
-       .xLparInstalled = 0,
-       .xSysPartitioned = 0,
-       .xHwSyncedTBs = 0,
-       .xIntProcUtilHmt = 0,
+       .flags = 0,
        .xSpVpdFormat = 0,
        .xIntProcRatio = 0,
        .xPlicVrmIndex = 0,             /* VRM index of PLIC */
@@ -131,14 +128,12 @@ struct ItLpNaca itLpNaca = {
                (u64)instruction_access_slb_iSeries /* 0x480 I-SLB */
        }
 };
-EXPORT_SYMBOL(itLpNaca);
 
 /* May be filled in by the hypervisor so cannot end up in the BSS */
 struct ItIplParmsReal xItIplParmsReal __attribute__((__section__(".data")));
 
 /* May be filled in by the hypervisor so cannot end up in the BSS */
 struct ItExtVpdPanel xItExtVpdPanel __attribute__((__section__(".data")));
-EXPORT_SYMBOL(xItExtVpdPanel);
 
 #define maxPhysicalProcessors 32
 
@@ -165,6 +160,40 @@ struct SpCommArea xSpCommArea = {
        .xFormat = 1,
 };
 
+#define ALPACA_INIT(number)                                            \
+{                                                                      \
+       .lppaca_ptr = &lppaca[number],                                  \
+       .reg_save_ptr = &iseries_reg_save[number],                      \
+}
+
+struct alpaca alpaca[] = {
+       ALPACA_INIT( 0),
+#if NR_CPUS > 1
+       ALPACA_INIT( 1), ALPACA_INIT( 2), ALPACA_INIT( 3),
+#if NR_CPUS > 4
+       ALPACA_INIT( 4), ALPACA_INIT( 5), ALPACA_INIT( 6), ALPACA_INIT( 7),
+#if NR_CPUS > 8
+       ALPACA_INIT( 8), ALPACA_INIT( 9), ALPACA_INIT(10), ALPACA_INIT(11),
+       ALPACA_INIT(12), ALPACA_INIT(13), ALPACA_INIT(14), ALPACA_INIT(15),
+       ALPACA_INIT(16), ALPACA_INIT(17), ALPACA_INIT(18), ALPACA_INIT(19),
+       ALPACA_INIT(20), ALPACA_INIT(21), ALPACA_INIT(22), ALPACA_INIT(23),
+       ALPACA_INIT(24), ALPACA_INIT(25), ALPACA_INIT(26), ALPACA_INIT(27),
+       ALPACA_INIT(28), ALPACA_INIT(29), ALPACA_INIT(30), ALPACA_INIT(31),
+#if NR_CPUS > 32
+       ALPACA_INIT(32), ALPACA_INIT(33), ALPACA_INIT(34), ALPACA_INIT(35),
+       ALPACA_INIT(36), ALPACA_INIT(37), ALPACA_INIT(38), ALPACA_INIT(39),
+       ALPACA_INIT(40), ALPACA_INIT(41), ALPACA_INIT(42), ALPACA_INIT(43),
+       ALPACA_INIT(44), ALPACA_INIT(45), ALPACA_INIT(46), ALPACA_INIT(47),
+       ALPACA_INIT(48), ALPACA_INIT(49), ALPACA_INIT(50), ALPACA_INIT(51),
+       ALPACA_INIT(52), ALPACA_INIT(53), ALPACA_INIT(54), ALPACA_INIT(55),
+       ALPACA_INIT(56), ALPACA_INIT(57), ALPACA_INIT(58), ALPACA_INIT(59),
+       ALPACA_INIT(60), ALPACA_INIT(61), ALPACA_INIT(62), ALPACA_INIT(63),
+#endif
+#endif
+#endif
+#endif
+};
+
 /* The LparMap data is now located at offset 0x6000 in head.S
  * It was put there so that the HvReleaseData could address it
  * with a 32-bit offset as required by the iSeries hypervisor
@@ -191,7 +220,7 @@ struct ItVpdAreas itVpdAreas = {
        .xSlicVpdLens = {                       /* VPD lengths */
                0,0,0,                  /*  0 - 2 */
                sizeof(xItExtVpdPanel), /*       3 Extended VPD   */
-               sizeof(struct paca_struct),     /*       4 length of Paca  */
+               sizeof(struct alpaca),  /*       4 length of (fake) Paca  */
                0,                      /*       5 */
                sizeof(struct ItIplParmsReal),/* 6 length of IPL parms */
                26992,                  /*       7 length of MS VPD */
@@ -209,7 +238,7 @@ struct ItVpdAreas itVpdAreas = {
        .xSlicVpdAdrs = {                       /* VPD addresses */
                0,0,0,                  /*       0 -  2 */
                &xItExtVpdPanel,        /*       3 Extended VPD */
-               &paca[0],               /*       4 first Paca */
+               &alpaca[0],             /*       4 first (fake) Paca */
                0,                      /*       5 */
                &xItIplParmsReal,       /*       6 IPL parms */
                &xMsVpd,                /*       7 MS Vpd */
@@ -225,3 +254,10 @@ struct ItVpdAreas itVpdAreas = {
                0,0
        }
 };
+
+struct ItLpRegSave iseries_reg_save[] = {
+       [0 ... (NR_CPUS-1)] = {
+               .xDesc = 0xd397d9e2,    /* "LpRS" */
+               .xSize = sizeof(struct ItLpRegSave),
+       },
+};