From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: [PATCH 12/20] sh: Preemptible mmu_gather Date: Sat, 28 Aug 2010 16:16:49 +0200 Message-ID: <20100828142456.241504270@chello.nl> References: <20100828141637.421594670@chello.nl> Return-path: Content-Disposition: inline; filename=mm-preempt-tlb-gather-sh.patch Sender: linux-kernel-owner@vger.kernel.org To: Andrea Arcangeli , Avi Kivity , Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-fou Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Peter Zijlstra , Paul McKenney , Yanmin Zhang , Stephen Rothwell , Paul Mundt List-Id: linux-arch.vger.kernel.org Fix up the sh mmu_gahter code to conform to the new API. Cc: Paul Mundt Signed-off-by: Peter Zijlstra --- arch/sh/include/asm/tlb.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) Index: linux-2.6/arch/sh/include/asm/tlb.h =================================================================== --- linux-2.6.orig/arch/sh/include/asm/tlb.h +++ linux-2.6/arch/sh/include/asm/tlb.h @@ -23,8 +23,6 @@ struct mmu_gather { unsigned long start, end; }; -DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); - static inline void init_tlb_gather(struct mmu_gather *tlb) { tlb->start = TASK_SIZE; @@ -36,17 +34,13 @@ static inline void init_tlb_gather(struc } } -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; } static inline void @@ -57,8 +51,6 @@ tlb_finish_mmu(struct mmu_gather *tlb, u /* keep the page table cache within bounds */ check_pgt_cache(); - - put_cpu_var(mmu_gathers); } static inline void From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from casper.infradead.org ([85.118.1.10]:42794 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753546Ab0H1O1x (ORCPT ); Sat, 28 Aug 2010 10:27:53 -0400 Message-ID: <20100828142456.241504270@chello.nl> Date: Sat, 28 Aug 2010 16:16:49 +0200 From: Peter Zijlstra Subject: [PATCH 12/20] sh: Preemptible mmu_gather References: <20100828141637.421594670@chello.nl> Content-Disposition: inline; filename=mm-preempt-tlb-gather-sh.patch Sender: linux-arch-owner@vger.kernel.org List-ID: 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, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Peter Zijlstra , Paul McKenney , Yanmin Zhang , Stephen Rothwell , Paul Mundt Message-ID: <20100828141649.5Y0RYWCQNKAhCvExCidvYTtS00iPmyR4kokmwu7CTKs@z> Fix up the sh mmu_gahter code to conform to the new API. Cc: Paul Mundt Signed-off-by: Peter Zijlstra --- arch/sh/include/asm/tlb.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) Index: linux-2.6/arch/sh/include/asm/tlb.h =================================================================== --- linux-2.6.orig/arch/sh/include/asm/tlb.h +++ linux-2.6/arch/sh/include/asm/tlb.h @@ -23,8 +23,6 @@ struct mmu_gather { unsigned long start, end; }; -DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); - static inline void init_tlb_gather(struct mmu_gather *tlb) { tlb->start = TASK_SIZE; @@ -36,17 +34,13 @@ static inline void init_tlb_gather(struc } } -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; } static inline void @@ -57,8 +51,6 @@ tlb_finish_mmu(struct mmu_gather *tlb, u /* keep the page table cache within bounds */ check_pgt_cache(); - - put_cpu_var(mmu_gathers); } static inline void