X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc64%2Fmm%2Fhugetlbpage.c;h=403c79bea03e90d4ea54d89ec4cbecfd20af7069;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=9416e53dfc23989cc15882113ce898b2934b6d38;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c index 9416e53df..403c79bea 100644 --- a/arch/ppc64/mm/hugetlbpage.c +++ b/arch/ppc64/mm/hugetlbpage.c @@ -377,6 +377,7 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long addr; hugepte_t *ptep; struct page *page; + int cpu; int local = 0; cpumask_t tmp; @@ -385,7 +386,8 @@ void unmap_hugepage_range(struct vm_area_struct *vma, BUG_ON((end % HPAGE_SIZE) != 0); /* XXX are there races with checking cpu_vm_mask? - Anton */ - tmp = cpumask_of_cpu(smp_processor_id()); + cpu = get_cpu(); + tmp = cpumask_of_cpu(cpu); if (cpus_equal(vma->vm_mm->cpu_vm_mask, tmp)) local = 1; @@ -408,6 +410,7 @@ void unmap_hugepage_range(struct vm_area_struct *vma, put_page(page); } + put_cpu(); // mm->rss -= (end - start) >> PAGE_SHIFT; vx_rsspages_sub(mm, (end - start) >> PAGE_SHIFT);