From: Hugh Dickins Date: Tue, 31 Oct 2006 18:40:39 +0000 (+0000) Subject: [POWERPC] Make high hugepage areas preempt safe X-Git-Tag: v3.12-rc1~31920^2~20^2~253^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96268889ee369b36203b7a06e8aabb197270216e;p=kernel%2Fkernel-generic.git [POWERPC] Make high hugepage areas preempt safe Checking source for other get_paca()->field preemption dangers found that open_high_hpage_areas does a structure copy into its paca while preemption is enabled: unsafe however gcc accomplishes it. Just remove that copy: it's done safely afterwards by on_each_cpu, as in open_low_hpage_areas. Signed-off-by: Hugh Dickins Acked-by: David Gibson Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 5615acc..fd68b74 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -480,9 +480,6 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas) mm->context.high_htlb_areas |= newareas; - /* 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();