diff options
Diffstat (limited to 'arch/powerpc/mm/pgtable.c')
-rw-r--r-- | arch/powerpc/mm/pgtable.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c index 6a3997f98dfb..6e72788598f8 100644 --- a/arch/powerpc/mm/pgtable.c +++ b/arch/powerpc/mm/pgtable.c | |||
@@ -33,8 +33,6 @@ | |||
33 | 33 | ||
34 | #include "mmu_decl.h" | 34 | #include "mmu_decl.h" |
35 | 35 | ||
36 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | ||
37 | |||
38 | #ifdef CONFIG_SMP | 36 | #ifdef CONFIG_SMP |
39 | 37 | ||
40 | /* | 38 | /* |
@@ -43,7 +41,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
43 | * freeing a page table page that is being walked without locks | 41 | * freeing a page table page that is being walked without locks |
44 | */ | 42 | */ |
45 | 43 | ||
46 | static DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); | ||
47 | static unsigned long pte_freelist_forced_free; | 44 | static unsigned long pte_freelist_forced_free; |
48 | 45 | ||
49 | struct pte_freelist_batch | 46 | struct pte_freelist_batch |
@@ -97,12 +94,10 @@ static void pte_free_submit(struct pte_freelist_batch *batch) | |||
97 | 94 | ||
98 | void pgtable_free_tlb(struct mmu_gather *tlb, void *table, unsigned shift) | 95 | void pgtable_free_tlb(struct mmu_gather *tlb, void *table, unsigned shift) |
99 | { | 96 | { |
100 | /* This is safe since tlb_gather_mmu has disabled preemption */ | 97 | struct pte_freelist_batch **batchp = &tlb->arch.batch; |
101 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); | ||
102 | unsigned long pgf; | 98 | unsigned long pgf; |
103 | 99 | ||
104 | if (atomic_read(&tlb->mm->mm_users) < 2 || | 100 | if (atomic_read(&tlb->mm->mm_users) < 2) { |
105 | cpumask_equal(mm_cpumask(tlb->mm), cpumask_of(smp_processor_id()))){ | ||
106 | pgtable_free(table, shift); | 101 | pgtable_free(table, shift); |
107 | return; | 102 | return; |
108 | } | 103 | } |
@@ -124,10 +119,9 @@ void pgtable_free_tlb(struct mmu_gather *tlb, void *table, unsigned shift) | |||
124 | } | 119 | } |
125 | } | 120 | } |
126 | 121 | ||
127 | void pte_free_finish(void) | 122 | void pte_free_finish(struct mmu_gather *tlb) |
128 | { | 123 | { |
129 | /* This is safe since tlb_gather_mmu has disabled preemption */ | 124 | struct pte_freelist_batch **batchp = &tlb->arch.batch; |
130 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); | ||
131 | 125 | ||
132 | if (*batchp == NULL) | 126 | if (*batchp == NULL) |
133 | return; | 127 | return; |