Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4722476b authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman
Browse files

powerpc/64s: mm_context.addr_limit is only used on hash



Radix keeps no meaningful state in addr_limit, so remove it from radix
code and rename to slb_addr_limit to make it clear it applies to hash
only.

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 85e3f1ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -606,7 +606,7 @@ extern void slb_set_size(u16 size);

/* 4 bits per slice and we have one slice per 1TB */
#define SLICE_ARRAY_SIZE	(H_PGTABLE_RANGE >> 41)
#define TASK_SLICE_ARRAY_SZ(x)	((x)->context.addr_limit >> 41)
#define TASK_SLICE_ARRAY_SZ(x)	((x)->context.slb_addr_limit >> 41)

#ifndef __ASSEMBLY__

+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ typedef struct {
#ifdef CONFIG_PPC_MM_SLICES
	u64 low_slices_psize;	/* SLB page size encodings */
	unsigned char high_slices_psize[SLICE_ARRAY_SIZE];
	unsigned long addr_limit;
	unsigned long slb_addr_limit;
#else
	u16 sllp;		/* SLB page size encoding */
#endif
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ struct paca_struct {
#ifdef CONFIG_PPC_MM_SLICES
	u64 mm_ctx_low_slices_psize;
	unsigned char mm_ctx_high_slices_psize[SLICE_ARRAY_SIZE];
	unsigned long addr_limit;
	unsigned long mm_ctx_slb_addr_limit;
#else
	u16 mm_ctx_user_psize;
	u16 mm_ctx_sllp;
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ int main(void)
#ifdef CONFIG_PPC_MM_SLICES
	OFFSET(PACALOWSLICESPSIZE, paca_struct, mm_ctx_low_slices_psize);
	OFFSET(PACAHIGHSLICEPSIZE, paca_struct, mm_ctx_high_slices_psize);
	DEFINE(PACA_ADDR_LIMIT, offsetof(struct paca_struct, addr_limit));
	OFFSET(PACA_SLB_ADDR_LIMIT, paca_struct, mm_ctx_slb_addr_limit);
	DEFINE(MMUPSIZEDEFSIZE, sizeof(struct mmu_psize_def));
#endif /* CONFIG_PPC_MM_SLICES */
#endif
+2 −2
Original line number Diff line number Diff line
@@ -262,8 +262,8 @@ void copy_mm_to_paca(struct mm_struct *mm)

	get_paca()->mm_ctx_id = context->id;
#ifdef CONFIG_PPC_MM_SLICES
	VM_BUG_ON(!mm->context.addr_limit);
	get_paca()->addr_limit = mm->context.addr_limit;
	VM_BUG_ON(!mm->context.slb_addr_limit);
	get_paca()->mm_ctx_slb_addr_limit = mm->context.slb_addr_limit;
	get_paca()->mm_ctx_low_slices_psize = context->low_slices_psize;
	memcpy(&get_paca()->mm_ctx_high_slices_psize,
	       &context->high_slices_psize, TASK_SLICE_ARRAY_SZ(mm));
Loading