[PATCH 13/20] um: Preemptible mmu_gather

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Saturday, August 28, 2010 - 7:16 am

Fix up the um mmu_gather code to conform to the new API.

Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 arch/um/include/asm/tlb.h |   16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

Index: linux-2.6/arch/um/include/asm/tlb.h
===================================================================
--- linux-2.6.orig/arch/um/include/asm/tlb.h
+++ linux-2.6/arch/um/include/asm/tlb.h
@@ -22,9 +22,6 @@ struct mmu_gather {
 	unsigned int		fullmm; /* non-zero means full mm flush */
 };
 
-/* Users of the generic TLB shootdown code must declare this storage space. */
-DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);
-
 static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,
 					  unsigned long address)
 {
@@ -47,20 +44,13 @@ static inline void init_tlb_gather(struc
 	}
 }
 
-/* tlb_gather_mmu
- *	Return a pointer to an initialized struct mmu_gather.
- */
-static inline struct mmu_gather *
-tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
+static inline void
+tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int full_mm_flush)
 {
-	struct mmu_gather *tlb = &get_cpu_var(mmu_gathers);
-
 	tlb->mm = mm;
 	tlb->fullmm = full_mm_flush;
 
 	init_tlb_gather(tlb);
-
-	return tlb;
 }
 
 extern void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
@@ -87,8 +77,6 @@ tlb_finish_mmu(struct mmu_gather *tlb, u
 
 	/* keep the page table cache within bounds */
 	check_pgt_cache();
-
-	put_cpu_var(mmu_gathers);
 }
 
 /* tlb_remove_page


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/20] mm: Preemptibility -v4, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 01/20] powerpc: Use call_rcu_sched() for pagetables, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 02/20] mm: Improve page_lock_anon_vma() comment, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 05/20] mm: Simplify anon_vma refcounts, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 06/20] mm: Use refcounts for page_lock_anon_vma(), Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 07/20] mm: Preemptible mmu_gather, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 08/20] powerpc: Preemptible mmu_gather, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 09/20] sparc: Preemptible mmu_gather, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 10/20] s390: preemptible mmu_gather, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 12/20] sh: Preemptible mmu_gather, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 13/20] um: Preemptible mmu_gather, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 14/20] ia64: Preemptible mmu_gather, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 16/20] lockdep, mutex: Provide mutex_lock_nest_lock, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 17/20] mutex: Provide mutex_is_contended, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 19/20] mm: Extended batches for generic mmu_gather, Peter Zijlstra, (Sat Aug 28, 7:16 am)
[PATCH 20/20] mm: Optimize page_lock_anon_vma() fast-path, Peter Zijlstra, (Sat Aug 28, 7:16 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Peter Zijlstra, (Sat Aug 28, 7:32 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Piotr Hosowicz, (Sat Aug 28, 7:56 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Peter Zijlstra, (Sat Aug 28, 8:10 am)
Re: [PATCH 05/20] mm: Simplify anon_vma refcounts, Pekka Enberg, (Sat Aug 28, 8:13 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Piotr Hosowicz, (Sat Aug 28, 8:17 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Pekka Enberg, (Sat Aug 28, 8:19 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Peter Zijlstra, (Sat Aug 28, 8:23 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Peter Zijlstra, (Sat Aug 28, 8:27 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Piotr Hosowicz, (Sat Aug 28, 9:01 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, David Miller, (Sat Aug 28, 3:28 pm)
Re: [PATCH 00/20] mm: Preemptibility -v4, Peter Zijlstra, (Sat Aug 28, 3:41 pm)
Re: [PATCH 00/20] mm: Preemptibility -v4, Piotr Hosowicz, (Sun Aug 29, 5:46 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Peter Zijlstra, (Sun Aug 29, 6:37 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Piotr Hosowicz, (Sun Aug 29, 6:43 am)
Re: [PATCH 14/20] ia64: Preemptible mmu_gather, Peter Zijlstra, (Mon Aug 30, 8:44 am)
Re: [PATCH 01/20] powerpc: Use call_rcu_sched() for pagetables, Benjamin Herrenschmidt, (Mon Aug 30, 11:10 pm)
Re: [PATCH 08/20] powerpc: Preemptible mmu_gather, Benjamin Herrenschmidt, (Mon Aug 30, 11:26 pm)
Re: [PATCH 08/20] powerpc: Preemptible mmu_gather, Benjamin Herrenschmidt, (Mon Aug 30, 11:31 pm)
Re: [PATCH 08/20] powerpc: Preemptible mmu_gather, Peter Zijlstra, (Tue Aug 31, 2:14 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Piotr Hosowicz, (Tue Aug 31, 7:02 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Piotr Hosowicz, (Tue Aug 31, 7:14 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Piotr Hosowicz, (Thu Sep 2, 7:53 am)
Re: [PATCH 00/20] mm: Preemptibility -v4, Alex,Shi, (Mon Sep 13, 10:36 pm)
Re: [PATCH 00/20] mm: Preemptibility -v4, Peter Zijlstra, (Tue Sep 14, 12:42 am)