From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753392Ab1AYR71 (ORCPT ); Tue, 25 Jan 2011 12:59:27 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:49125 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424Ab1AYR7U (ORCPT ); Tue, 25 Jan 2011 12:59:20 -0500 Message-Id: <20110125174907.611431020@chello.nl> User-Agent: quilt/0.48-1 Date: Tue, 25 Jan 2011 18:31:19 +0100 From: Peter Zijlstra To: Andrea Arcangeli , Avi Kivity , Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-foundation.org, Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Peter Zijlstra , Paul McKenney , Yanmin Zhang , Jeff Dike Subject: [PATCH 08/25] um: Preemptible mmu_gather References: <20110125173111.720927511@chello.nl> Content-Disposition: inline; filename=peter_zijlstra-um-preemptible_mmu_gather.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix up the um mmu_gather code to conform to the new API. Cc: Jeff Dike Signed-off-by: Peter Zijlstra --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: [PATCH 08/25] um: Preemptible mmu_gather Date: Tue, 25 Jan 2011 18:31:19 +0100 Message-ID: <20110125174907.611431020@chello.nl> References: <20110125173111.720927511@chello.nl> Return-path: Content-Disposition: inline; filename=peter_zijlstra-um-preemptible_mmu_gather.patch Sender: owner-linux-mm@kvack.org To: Andrea Arcangeli , Avi Kivity , Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-fo Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Peter Zijlstra , Paul McKenney , Yanmin Zhang , Jeff Dike List-Id: linux-arch.vger.kernel.org Fix up the um mmu_gather code to conform to the new API. Cc: Jeff Dike Signed-off-by: Peter Zijlstra --- 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by kanga.kvack.org (Postfix) with ESMTP id 290D16B00E8 for ; Tue, 25 Jan 2011 12:59:10 -0500 (EST) Message-Id: <20110125174907.611431020@chello.nl> Date: Tue, 25 Jan 2011 18:31:19 +0100 From: Peter Zijlstra Subject: [PATCH 08/25] um: Preemptible mmu_gather References: <20110125173111.720927511@chello.nl> Content-Disposition: inline; filename=peter_zijlstra-um-preemptible_mmu_gather.patch Sender: owner-linux-mm@kvack.org To: Andrea Arcangeli , Avi Kivity , Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-foundation.org, Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Peter Zijlstra , Paul McKenney , Yanmin Zhang , Jeff Dike List-ID: Fix up the um mmu_gather code to conform to the new API. Cc: Jeff Dike Signed-off-by: Peter Zijlstra --- 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org