Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932256AbcK1Ijm (ORCPT ); Mon, 28 Nov 2016 03:39:42 -0500 Received: from mga11.intel.com ([192.55.52.93]:4988 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932111AbcK1Ijd (ORCPT ); Mon, 28 Nov 2016 03:39:33 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,563,1473145200"; d="scan'208";a="196402937" Date: Mon, 28 Nov 2016 16:39:31 +0800 From: Aaron Lu To: Linus Torvalds Cc: Linux Memory Management List , Dave Hansen , Andrew Morton , "Kirill A. Shutemov" , Huang Ying , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] tlb: export tlb_flush_mmu_tlbonly Message-ID: <20161128083931.GB21738@aaronlu.sh.intel.com> References: <026b73f6-ca1d-e7bb-766c-4aaeb7071ce6@intel.com> <20161128083715.GA21738@aaronlu.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161128083715.GA21738@aaronlu.sh.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1245 Lines: 36 The mmu gather logic for tlb flush will be used in mremap case so export this function. Signed-off-by: Aaron Lu --- include/asm-generic/tlb.h | 1 + mm/memory.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index c6d667187608..0f1861db935c 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -119,6 +119,7 @@ struct mmu_gather { void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end); void tlb_flush_mmu(struct mmu_gather *tlb); +void tlb_flush_mmu_tlbonly(struct mmu_gather *tlb); void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end); extern bool __tlb_remove_page_size(struct mmu_gather *tlb, struct page *page, diff --git a/mm/memory.c b/mm/memory.c index e18c57bdc75c..130d82f7d8a2 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -238,7 +238,7 @@ void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long __tlb_reset_range(tlb); } -static void tlb_flush_mmu_tlbonly(struct mmu_gather *tlb) +void tlb_flush_mmu_tlbonly(struct mmu_gather *tlb) { if (!tlb->end) return; -- 2.5.5