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>
This commit is contained in:
Nicholas Piggin
2018-09-15 01:30:52 +10:00
committed by Michael Ellerman
parent 5e46e29e6a
commit 8fed04d0f6
8 changed files with 40 additions and 103 deletions

View File

@@ -347,8 +347,6 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm)
get_paca()->slb_cache_ptr = 0;
}
copy_mm_to_paca(mm);
/*
* preload some userspace segments into the SLB.
* Almost all 32 and 64bit PowerPC executables are linked at
@@ -375,6 +373,24 @@ void slb_set_size(u16 size)
mmu_slb_size = size;
}
static void cpu_flush_slb(void *parm)
{
struct mm_struct *mm = parm;
unsigned long flags;
if (mm != current->active_mm)
return;
local_irq_save(flags);
slb_flush_and_rebolt();
local_irq_restore(flags);
}
void core_flush_all_slbs(struct mm_struct *mm)
{
on_each_cpu(cpu_flush_slb, mm, 1);
}
void slb_initialize(void)
{
unsigned long linear_llp, vmalloc_llp, io_llp;