diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-09-14 11:30:52 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-09-19 08:01:46 -0400 |
commit | 8fed04d0f6aedf99b3d811ba58d38bb7f938a47a (patch) | |
tree | c0119afa2bf361697e2a2690157854e1496cef1c /arch/powerpc/kernel | |
parent | 5e46e29e6a977a71f6b5bed414b7bcdbff5a6a43 (diff) |
powerpc/64s/hash: remove user SLB data from the paca
User SLB mappig data is copied into the PACA from the mm->context so
it can be accessed by the SLB miss handlers.
After the C conversion, SLB miss handlers now run with relocation on,
and user SLB misses are able to take recursive kernel SLB misses, so
the user SLB mapping data can be removed from the paca and accessed
directly.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/paca.c | 22 |
2 files changed, 0 insertions, 31 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 89cf15566c4e..ce3ac40fd96e 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -181,15 +181,6 @@ int main(void) | |||
181 | OFFSET(PACAIRQSOFTMASK, paca_struct, irq_soft_mask); | 181 | OFFSET(PACAIRQSOFTMASK, paca_struct, irq_soft_mask); |
182 | OFFSET(PACAIRQHAPPENED, paca_struct, irq_happened); | 182 | OFFSET(PACAIRQHAPPENED, paca_struct, irq_happened); |
183 | OFFSET(PACA_FTRACE_ENABLED, paca_struct, ftrace_enabled); | 183 | OFFSET(PACA_FTRACE_ENABLED, paca_struct, ftrace_enabled); |
184 | #ifdef CONFIG_PPC_BOOK3S | ||
185 | OFFSET(PACACONTEXTID, paca_struct, mm_ctx_id); | ||
186 | #ifdef CONFIG_PPC_MM_SLICES | ||
187 | OFFSET(PACALOWSLICESPSIZE, paca_struct, mm_ctx_low_slices_psize); | ||
188 | OFFSET(PACAHIGHSLICEPSIZE, paca_struct, mm_ctx_high_slices_psize); | ||
189 | OFFSET(PACA_SLB_ADDR_LIMIT, paca_struct, mm_ctx_slb_addr_limit); | ||
190 | DEFINE(MMUPSIZEDEFSIZE, sizeof(struct mmu_psize_def)); | ||
191 | #endif /* CONFIG_PPC_MM_SLICES */ | ||
192 | #endif | ||
193 | 184 | ||
194 | #ifdef CONFIG_PPC_BOOK3E | 185 | #ifdef CONFIG_PPC_BOOK3E |
195 | OFFSET(PACAPGD, paca_struct, pgd); | 186 | OFFSET(PACAPGD, paca_struct, pgd); |
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index 0ee3e6d50f28..0cf84e30d1cd 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -258,25 +258,3 @@ void __init free_unused_pacas(void) | |||
258 | printk(KERN_DEBUG "Allocated %u bytes for %u pacas\n", | 258 | printk(KERN_DEBUG "Allocated %u bytes for %u pacas\n", |
259 | paca_ptrs_size + paca_struct_size, nr_cpu_ids); | 259 | paca_ptrs_size + paca_struct_size, nr_cpu_ids); |
260 | } | 260 | } |
261 | |||
262 | void copy_mm_to_paca(struct mm_struct *mm) | ||
263 | { | ||
264 | #ifdef CONFIG_PPC_BOOK3S | ||
265 | mm_context_t *context = &mm->context; | ||
266 | |||
267 | get_paca()->mm_ctx_id = context->id; | ||
268 | #ifdef CONFIG_PPC_MM_SLICES | ||
269 | VM_BUG_ON(!mm->context.slb_addr_limit); | ||
270 | get_paca()->mm_ctx_slb_addr_limit = mm->context.slb_addr_limit; | ||
271 | memcpy(&get_paca()->mm_ctx_low_slices_psize, | ||
272 | &context->low_slices_psize, sizeof(context->low_slices_psize)); | ||
273 | memcpy(&get_paca()->mm_ctx_high_slices_psize, | ||
274 | &context->high_slices_psize, TASK_SLICE_ARRAY_SZ(mm)); | ||
275 | #else /* CONFIG_PPC_MM_SLICES */ | ||
276 | get_paca()->mm_ctx_user_psize = context->user_psize; | ||
277 | get_paca()->mm_ctx_sllp = context->sllp; | ||
278 | #endif | ||
279 | #else /* !CONFIG_PPC_BOOK3S */ | ||
280 | return; | ||
281 | #endif | ||
282 | } | ||