diff options
author | Michael Neuling <mikey@neuling.org> | 2006-08-07 02:19:19 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-08-08 03:08:56 -0400 |
commit | 2f6093c84730b4bad65bcd0f2f904a5769b1dfc5 (patch) | |
tree | ab4e64a0520e944062f418e91706ff968e23a6ea /include/asm-powerpc/lppaca.h | |
parent | 452b5e21216011f2f068e80443568f5f3f3f4d63 (diff) |
[POWERPC] Implement SLB shadow buffer
This adds a shadow buffer for the SLBs and regsiters it with PHYP.
Only the bolted SLB entries (top 3) are shadowed.
The SLB shadow buffer tells the hypervisor what the kernel needs to
have in the SLB for the kernel to be able to function. The hypervisor
can use this information to speed up partition context switches.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/lppaca.h')
-rw-r--r-- | include/asm-powerpc/lppaca.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asm-powerpc/lppaca.h b/include/asm-powerpc/lppaca.h index 4dc514aabfe..942bb450baf 100644 --- a/include/asm-powerpc/lppaca.h +++ b/include/asm-powerpc/lppaca.h | |||
@@ -27,7 +27,9 @@ | |||
27 | // | 27 | // |
28 | // | 28 | // |
29 | //---------------------------------------------------------------------------- | 29 | //---------------------------------------------------------------------------- |
30 | #include <linux/cache.h> | ||
30 | #include <asm/types.h> | 31 | #include <asm/types.h> |
32 | #include <asm/mmu.h> | ||
31 | 33 | ||
32 | /* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k | 34 | /* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k |
33 | * alignment is sufficient to prevent this */ | 35 | * alignment is sufficient to prevent this */ |
@@ -133,5 +135,22 @@ struct lppaca { | |||
133 | 135 | ||
134 | extern struct lppaca lppaca[]; | 136 | extern struct lppaca lppaca[]; |
135 | 137 | ||
138 | /* | ||
139 | * SLB shadow buffer structure as defined in the PAPR. The save_area | ||
140 | * contains adjacent ESID and VSID pairs for each shadowed SLB. The | ||
141 | * ESID is stored in the lower 64bits, then the VSID. | ||
142 | */ | ||
143 | struct slb_shadow { | ||
144 | u32 persistent; // Number of persistent SLBs x00-x03 | ||
145 | u32 buffer_length; // Total shadow buffer length x04-x07 | ||
146 | u64 reserved; // Alignment x08-x0f | ||
147 | struct { | ||
148 | u64 esid; | ||
149 | u64 vsid; | ||
150 | } save_area[SLB_NUM_BOLTED]; // x10-x40 | ||
151 | } ____cacheline_aligned; | ||
152 | |||
153 | extern struct slb_shadow slb_shadow[]; | ||
154 | |||
136 | #endif /* __KERNEL__ */ | 155 | #endif /* __KERNEL__ */ |
137 | #endif /* _ASM_POWERPC_LPPACA_H */ | 156 | #endif /* _ASM_POWERPC_LPPACA_H */ |