forked from Minki/linux
powerpc: Fix build break due to paca mm_context_t changes
Commit2fc251a8dd
("powerpc: Copy only required pieces of the mm_context_t to the paca") broke the build for CONFIG_PPC_STD_MMU_64=y and CONFIG_PPC_MM_SLICES=n. That only happens for a kernel built with 4K pages and HUGETLB disabled, which is why we missed it. Fix it by adding a mm_ctx_user_psize member to the paca and populating it in the appropriate places. Fixes:2fc251a8dd
("powerpc: Copy only required pieces of the mm_context_t to the paca") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
7b8ad495d5
commit
c33e54fafa
@ -138,6 +138,7 @@ struct paca_struct {
|
|||||||
u64 mm_ctx_low_slices_psize;
|
u64 mm_ctx_low_slices_psize;
|
||||||
unsigned char mm_ctx_high_slices_psize[SLICE_ARRAY_SIZE];
|
unsigned char mm_ctx_high_slices_psize[SLICE_ARRAY_SIZE];
|
||||||
#else
|
#else
|
||||||
|
u16 mm_ctx_user_psize;
|
||||||
u16 mm_ctx_sllp;
|
u16 mm_ctx_sllp;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -212,6 +213,7 @@ static inline void copy_mm_to_paca(mm_context_t *context)
|
|||||||
memcpy(&get_paca()->mm_ctx_high_slices_psize,
|
memcpy(&get_paca()->mm_ctx_high_slices_psize,
|
||||||
&context->high_slices_psize, SLICE_ARRAY_SIZE);
|
&context->high_slices_psize, SLICE_ARRAY_SIZE);
|
||||||
#else
|
#else
|
||||||
|
get_paca()->mm_ctx_user_psize = context->user_psize;
|
||||||
get_paca()->mm_ctx_sllp = context->sllp;
|
get_paca()->mm_ctx_sllp = context->sllp;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -866,7 +866,7 @@ static unsigned int get_paca_psize(unsigned long addr)
|
|||||||
#else
|
#else
|
||||||
unsigned int get_paca_psize(unsigned long addr)
|
unsigned int get_paca_psize(unsigned long addr)
|
||||||
{
|
{
|
||||||
return get_paca()->context.user_psize;
|
return get_paca()->mm_ctx_user_psize;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user