[PATCH] ppc64: Fix 32bit largepage issue

Anton Blanchard anton at samba.org
Mon Feb 21 11:16:16 EST 2005


Hi,

The paca holds a shadow of the context struct, used for the real mode
SLB handler. When we open up a new segment we have to sync up the paca
copy otherwise we will instantiate small page SLB entries until the
next context switch (at which point we resync the paca copy).

Anton

Signed-off-by: Anton Blanchard <anton at samba.org>

diff -puN arch/ppc64/mm/hugetlbpage.c~fix_32bit_largepage arch/ppc64/mm/hugetlbpage.c
--- gr_work/arch/ppc64/mm/hugetlbpage.c~fix_32bit_largepage	2005-02-20 17:32:00.795862566 -0600
+++ gr_work-anton/arch/ppc64/mm/hugetlbpage.c	2005-02-20 17:32:00.806855265 -0600
@@ -264,6 +264,10 @@ static int open_low_hpage_segs(struct mm
 				return -EBUSY;
 
 	mm->context.htlb_segs |= newsegs;
+
+	/* update the paca copy of the context struct */
+	get_paca()->context = mm->context;
+
 	/* the context change must make it to memory before the flush,
 	 * so that further SLB misses do the right thing. */
 	mb();
_



More information about the Linuxppc64-dev mailing list