diff options
author | Michael Neuling <mikey@neuling.org> | 2015-10-28 00:54:06 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-12-19 06:13:12 -0500 |
commit | c395465da68bfc3a238d5bc15f862e33e6e9ecec (patch) | |
tree | 0d337e9be2ae4a34b8ccd9314c5265499746ff33 /arch/powerpc/mm/hash_utils_64.c | |
parent | 1b855e167b90fcb353977c08932d0a52eb8ae5b9 (diff) |
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>
Diffstat (limited to 'arch/powerpc/mm/hash_utils_64.c')
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 4233dcccbaf7..03279eac0957 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -882,7 +882,8 @@ void demote_segment_4k(struct mm_struct *mm, unsigned long addr) | |||
882 | slice_set_range_psize(mm, addr, 1, MMU_PAGE_4K); | 882 | slice_set_range_psize(mm, addr, 1, MMU_PAGE_4K); |
883 | copro_flush_all_slbs(mm); | 883 | copro_flush_all_slbs(mm); |
884 | if ((get_paca_psize(addr) != MMU_PAGE_4K) && (current->mm == mm)) { | 884 | if ((get_paca_psize(addr) != MMU_PAGE_4K) && (current->mm == mm)) { |
885 | get_paca()->context = mm->context; | 885 | |
886 | copy_mm_to_paca(&mm->context); | ||
886 | slb_flush_and_rebolt(); | 887 | slb_flush_and_rebolt(); |
887 | } | 888 | } |
888 | } | 889 | } |
@@ -949,7 +950,7 @@ static void check_paca_psize(unsigned long ea, struct mm_struct *mm, | |||
949 | { | 950 | { |
950 | if (user_region) { | 951 | if (user_region) { |
951 | if (psize != get_paca_psize(ea)) { | 952 | if (psize != get_paca_psize(ea)) { |
952 | get_paca()->context = mm->context; | 953 | copy_mm_to_paca(&mm->context); |
953 | slb_flush_and_rebolt(); | 954 | slb_flush_and_rebolt(); |
954 | } | 955 | } |
955 | } else if (get_paca()->vmalloc_sllp != | 956 | } else if (get_paca()->vmalloc_sllp != |