aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/paca.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/paca.h')
-rw-r--r--include/asm-powerpc/paca.h36
1 files changed, 10 insertions, 26 deletions
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h
index 92c765c35bd0..c9add8f1ad94 100644
--- a/include/asm-powerpc/paca.h
+++ b/include/asm-powerpc/paca.h
@@ -14,15 +14,16 @@
14 */ 14 */
15#ifndef _ASM_POWERPC_PACA_H 15#ifndef _ASM_POWERPC_PACA_H
16#define _ASM_POWERPC_PACA_H 16#define _ASM_POWERPC_PACA_H
17#ifdef __KERNEL__
17 18
18#include <linux/config.h> 19#include <linux/config.h>
19#include <asm/types.h> 20#include <asm/types.h>
20#include <asm/lppaca.h> 21#include <asm/lppaca.h>
21#include <asm/iseries/it_lp_reg_save.h>
22#include <asm/mmu.h> 22#include <asm/mmu.h>
23 23
24register struct paca_struct *local_paca asm("r13"); 24register struct paca_struct *local_paca asm("r13");
25#define get_paca() local_paca 25#define get_paca() local_paca
26#define get_lppaca() (get_paca()->lppaca_ptr)
26 27
27struct task_struct; 28struct task_struct;
28 29
@@ -31,9 +32,9 @@ struct task_struct;
31 * 32 *
32 * This structure is not directly accessed by firmware or the service 33 * This structure is not directly accessed by firmware or the service
33 * processor except for the first two pointers that point to the 34 * processor except for the first two pointers that point to the
34 * lppaca area and the ItLpRegSave area for this CPU. Both the 35 * lppaca area and the ItLpRegSave area for this CPU. The lppaca
35 * lppaca and ItLpRegSave objects are currently contained within the 36 * object is currently contained within the PACA but it doesn't need
36 * PACA but they do not need to be. 37 * to be.
37 */ 38 */
38struct paca_struct { 39struct paca_struct {
39 /* 40 /*
@@ -48,7 +49,9 @@ struct paca_struct {
48 * accessed by the firmware 49 * accessed by the firmware
49 */ 50 */
50 struct lppaca *lppaca_ptr; /* Pointer to LpPaca for PLIC */ 51 struct lppaca *lppaca_ptr; /* Pointer to LpPaca for PLIC */
51 struct ItLpRegSave *reg_save_ptr; /* Pointer to LpRegSave for PLIC */ 52#ifdef CONFIG_PPC_ISERIES
53 void *reg_save_ptr; /* Pointer to LpRegSave for PLIC */
54#endif /* CONFIG_PPC_ISERIES */
52 55
53 /* 56 /*
54 * MAGIC: the spinlock functions in arch/ppc64/lib/locks.c 57 * MAGIC: the spinlock functions in arch/ppc64/lib/locks.c
@@ -59,11 +62,11 @@ struct paca_struct {
59 u16 lock_token; /* Constant 0x8000, used in locks */ 62 u16 lock_token; /* Constant 0x8000, used in locks */
60 u16 paca_index; /* Logical processor number */ 63 u16 paca_index; /* Logical processor number */
61 64
62 u32 default_decr; /* Default decrementer value */
63 u64 kernel_toc; /* Kernel TOC address */ 65 u64 kernel_toc; /* Kernel TOC address */
64 u64 stab_real; /* Absolute address of segment table */ 66 u64 stab_real; /* Absolute address of segment table */
65 u64 stab_addr; /* Virtual address of segment table */ 67 u64 stab_addr; /* Virtual address of segment table */
66 void *emergency_sp; /* pointer to emergency stack */ 68 void *emergency_sp; /* pointer to emergency stack */
69 u64 data_offset; /* per cpu data offset */
67 s16 hw_cpu_id; /* Physical processor number */ 70 s16 hw_cpu_id; /* Physical processor number */
68 u8 cpu_start; /* At startup, processor spins until */ 71 u8 cpu_start; /* At startup, processor spins until */
69 /* this becomes non-zero. */ 72 /* this becomes non-zero. */
@@ -90,31 +93,12 @@ struct paca_struct {
90 struct task_struct *__current; /* Pointer to current */ 93 struct task_struct *__current; /* Pointer to current */
91 u64 kstack; /* Saved Kernel stack addr */ 94 u64 kstack; /* Saved Kernel stack addr */
92 u64 stab_rr; /* stab/slb round-robin counter */ 95 u64 stab_rr; /* stab/slb round-robin counter */
93 u64 next_jiffy_update_tb; /* TB value for next jiffy update */
94 u64 saved_r1; /* r1 save for RTAS calls */ 96 u64 saved_r1; /* r1 save for RTAS calls */
95 u64 saved_msr; /* MSR saved here by enter_rtas */ 97 u64 saved_msr; /* MSR saved here by enter_rtas */
96 u8 proc_enabled; /* irq soft-enable flag */ 98 u8 proc_enabled; /* irq soft-enable flag */
97
98 /* not yet used */
99 u64 exdsi[8]; /* used for linear mapping hash table misses */
100
101 /*
102 * iSeries structure which the hypervisor knows about -
103 * this structure should not cross a page boundary.
104 * The vpa_init/register_vpa call is now known to fail if the
105 * lppaca structure crosses a page boundary.
106 * The lppaca is also used on POWER5 pSeries boxes.
107 * The lppaca is 640 bytes long, and cannot readily change
108 * since the hypervisor knows its layout, so a 1kB
109 * alignment will suffice to ensure that it doesn't
110 * cross a page boundary.
111 */
112 struct lppaca lppaca __attribute__((__aligned__(0x400)));
113#ifdef CONFIG_PPC_ISERIES
114 struct ItLpRegSave reg_save;
115#endif
116}; 99};
117 100
118extern struct paca_struct paca[]; 101extern struct paca_struct paca[];
119 102
103#endif /* __KERNEL__ */
120#endif /* _ASM_POWERPC_PACA_H */ 104#endif /* _ASM_POWERPC_PACA_H */