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>
This commit is contained in:

committed by
Michael Ellerman

szülő
126b11b294
commit
425d331462
@@ -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;
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user