]> err.no Git - linux-2.6/commitdiff
[PATCH] powerpc: Remove ItLpRegSave area from the paca
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 24 Nov 2005 05:34:45 +0000 (16:34 +1100)
committerPaul Mackerras <paulus@samba.org>
Mon, 9 Jan 2006 03:50:32 +0000 (14:50 +1100)
On iSeries, the paca contains, amongst other things an ItLpRegSave
structure used by the hypervisor to save registers.  The hypervisor
locates this area through a pointer at the beginning of the paca, so
the structure itself can be located elsewhere.  This patch moves the
reg_save area out into its own array.  This reduces the amount of
iSeries specific gunk which is visible to general powerpc code via
paca.h

Built and booted on POWER5 LPAR and iSeries RS64.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/paca.c
arch/powerpc/platforms/iseries/lpardata.c
include/asm-powerpc/iseries/it_lp_reg_save.h
include/asm-powerpc/paca.h

index a7b68f911eb130b0dcadf2fce7840ef9a12aa0bd..25420406c8c0cf0d8f48cbb26ddc8485f2e9d43b 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/page.h>
 #include <asm/lppaca.h>
 #include <asm/iseries/it_lp_queue.h>
+#include <asm/iseries/it_lp_reg_save.h>
 #include <asm/paca.h>
 
 
@@ -26,8 +27,7 @@ extern unsigned long __toc_start;
 
 /* The Paca is an array with one entry per processor.  Each contains an
  * lppaca, which contains the information shared between the
- * hypervisor and Linux.  Each also contains an ItLpRegSave area which
- * is used by the hypervisor to save registers.
+ * hypervisor and Linux.
  * On systems with hardware multi-threading, there are two threads
  * per processor.  The Paca array must contain an entry for each thread.
  * The VPD Areas will give a max logical processors = 2 * max physical
@@ -57,11 +57,7 @@ extern unsigned long __toc_start;
 #ifdef CONFIG_PPC_ISERIES
 #define PACA_INIT_ISERIES(number)                                          \
        .lppaca_ptr = &paca[number].lppaca,                                 \
-       .reg_save_ptr = &paca[number].reg_save,                             \
-       .reg_save = {                                                       \
-               .xDesc = 0xd397d9e2,    /* "LpRS" */                        \
-               .xSize = sizeof(struct ItLpRegSave)                         \
-       }
+       .reg_save_ptr = &iseries_reg_save[number],
 
 #define PACA_INIT(number)                                                  \
 {                                                                          \
index bb8c91537f35f7f6df54be8724f3b1044267746d..ea72385aaf0a991791a7d9a8d809e89903fd5bae 100644 (file)
@@ -225,3 +225,10 @@ struct ItVpdAreas itVpdAreas = {
                0,0
        }
 };
+
+struct ItLpRegSave iseries_reg_save[] = {
+       [0 ... (NR_CPUS-1)] = {
+               .xDesc = 0xd397d9e2,    /* "LpRS" */
+               .xSize = sizeof(struct ItLpRegSave),
+       },
+};
index 288044b702dee394dc6e2c43a732358e17a34d19..81824e1bb7675ddf70f797d47d0946ff721560bb 100644 (file)
@@ -81,4 +81,6 @@ struct ItLpRegSave {
        u8      xRsvd3[176];    // Reserved                     350-3FF
 };
 
+extern struct ItLpRegSave iseries_reg_save[];
+
 #endif /* _ITLPREGSAVE_H */
index 92c765c35bd0738d452d2bc702c2f6d941525c8b..73693db546b3ab9c48a059d308b71133480b60cc 100644 (file)
@@ -18,7 +18,6 @@
 #include       <linux/config.h>
 #include       <asm/types.h>
 #include       <asm/lppaca.h>
-#include       <asm/iseries/it_lp_reg_save.h>
 #include       <asm/mmu.h>
 
 register struct paca_struct *local_paca asm("r13");
@@ -31,9 +30,9 @@ struct task_struct;
  *
  * This structure is not directly accessed by firmware or the service
  * processor except for the first two pointers that point to the
- * lppaca area and the ItLpRegSave area for this CPU.  Both the
- * lppaca and ItLpRegSave objects are currently contained within the
- * PACA but they do not need to be.
+ * lppaca area and the ItLpRegSave area for this CPU.  The lppaca
+ * object is currently contained within the PACA but it doesn't need
+ * to be.
  */
 struct paca_struct {
        /*
@@ -48,7 +47,9 @@ struct paca_struct {
         * accessed by the firmware
         */
        struct lppaca *lppaca_ptr;      /* Pointer to LpPaca for PLIC */
-       struct ItLpRegSave *reg_save_ptr; /* Pointer to LpRegSave for PLIC */
+#ifdef CONFIG_PPC_ISERIES
+       void *reg_save_ptr; /* Pointer to LpRegSave for PLIC */
+#endif /* CONFIG_PPC_ISERIES */
 
        /*
         * MAGIC: the spinlock functions in arch/ppc64/lib/locks.c
@@ -110,9 +111,6 @@ struct paca_struct {
         * cross a page boundary.
         */
        struct lppaca lppaca __attribute__((__aligned__(0x400)));
-#ifdef CONFIG_PPC_ISERIES
-       struct ItLpRegSave reg_save;
-#endif
 };
 
 extern struct paca_struct paca[];