Skip to content

Commit

Permalink
[POWERPC] Make high hugepage areas preempt safe
Browse files Browse the repository at this point in the history
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 <hugh@veritas.com>
Acked-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Hugh Dickins authored and Paul Mackerras committed Nov 1, 2006
1 parent 5fe8e8b commit 9626888
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/powerpc/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 9626888

Please sign in to comment.