diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-09-15 01:30:55 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-09-19 22:01:56 +1000 |
commit | 2e1626744e8da01eb5a2a0aaa3f365e41f1feb49 (patch) | |
tree | c6cfa4d7777c2b16ceb42d72f85921409b003e1d /arch/powerpc/mm | |
parent | e83cbf7fb7d17618a5d8a415d5c7bb760812a5cb (diff) | |
download | linux-2e1626744e8da01eb5a2a0aaa3f365e41f1feb49.tar.gz linux-2e1626744e8da01eb5a2a0aaa3f365e41f1feb49.tar.bz2 linux-2e1626744e8da01eb5a2a0aaa3f365e41f1feb49.zip |
powerpc/64s/hash: provide arch_setup_exec hooks for hash slice setup
This will be used by the SLB code in the next patch, but for now this
sets the slb_addr_limit to the correct size for 32-bit tasks.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/mmu_context_book3s64.c | 5 | ||||
-rw-r--r-- | arch/powerpc/mm/slice.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/mmu_context_book3s64.c index dbd8f762140b..f7352c66b6b8 100644 --- a/arch/powerpc/mm/mmu_context_book3s64.c +++ b/arch/powerpc/mm/mmu_context_book3s64.c @@ -84,6 +84,11 @@ static int hash__init_new_context(struct mm_struct *mm) return index; } +void hash__setup_new_exec(void) +{ + slice_setup_new_exec(); +} + static int radix__init_new_context(struct mm_struct *mm) { unsigned long rts_field; diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index 606f424aac47..fc5b3a1ec666 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c @@ -746,6 +746,20 @@ void slice_init_new_context_exec(struct mm_struct *mm) bitmap_fill(mask->high_slices, SLICE_NUM_HIGH); } +#ifdef CONFIG_PPC_BOOK3S_64 +void slice_setup_new_exec(void) +{ + struct mm_struct *mm = current->mm; + + slice_dbg("slice_setup_new_exec(mm=%p)\n", mm); + + if (!is_32bit_task()) + return; + + mm->context.slb_addr_limit = DEFAULT_MAP_WINDOW; +} +#endif + void slice_set_range_psize(struct mm_struct *mm, unsigned long start, unsigned long len, unsigned int psize) { |