mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
powerpc: Add function to copy mm_context_t to the paca
This adds a function to copy the mm->context to the paca. This is only a basic conversion for now but will be used more extensively in the next patch. This also adds #ifdef CONFIG_PPC_BOOK3S around this code since it's not used elsewhere. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
1b855e167b
commit
c395465da6
5 changed files with 18 additions and 5 deletions
|
@ -882,7 +882,8 @@ void demote_segment_4k(struct mm_struct *mm, unsigned long addr)
|
|||
slice_set_range_psize(mm, addr, 1, MMU_PAGE_4K);
|
||||
copro_flush_all_slbs(mm);
|
||||
if ((get_paca_psize(addr) != MMU_PAGE_4K) && (current->mm == mm)) {
|
||||
get_paca()->context = mm->context;
|
||||
|
||||
copy_mm_to_paca(&mm->context);
|
||||
slb_flush_and_rebolt();
|
||||
}
|
||||
}
|
||||
|
@ -949,7 +950,7 @@ static void check_paca_psize(unsigned long ea, struct mm_struct *mm,
|
|||
{
|
||||
if (user_region) {
|
||||
if (psize != get_paca_psize(ea)) {
|
||||
get_paca()->context = mm->context;
|
||||
copy_mm_to_paca(&mm->context);
|
||||
slb_flush_and_rebolt();
|
||||
}
|
||||
} else if (get_paca()->vmalloc_sllp !=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue