diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-09-14 17:30:55 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-10-14 09:04:09 +0200 |
commit | 425d33146260a4a2e8a1ba64003d6c8ff3bdfcc4 (patch) | |
tree | 03f21e8e410e7996af9c902b3f1b17623603beef /arch/powerpc/mm/slice.c | |
parent | powerpc/64s/hash: Add SLB allocation status bitmaps (diff) | |
download | linux-425d33146260a4a2e8a1ba64003d6c8ff3bdfcc4.tar.xz linux-425d33146260a4a2e8a1ba64003d6c8ff3bdfcc4.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 '')
-rw-r--r-- | arch/powerpc/mm/slice.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index 205fe557ca10..546dd07c8083 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c @@ -757,6 +757,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) { |