Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753210AbdFVLOc (ORCPT ); Thu, 22 Jun 2017 07:14:32 -0400 Received: from terminus.zytor.com ([65.50.211.136]:35991 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752827AbdFVLOa (ORCPT ); Thu, 22 Jun 2017 07:14:30 -0400 Date: Thu, 22 Jun 2017 04:08:50 -0700 From: tip-bot for Andy Lutomirski Message-ID: Cc: arjan@linux.intel.com, akpm@linux-foundation.org, peterz@infradead.org, torvalds@linux-foundation.org, tglx@linutronix.de, luto@kernel.org, bp@suse.de, jpoimboe@redhat.com, linux-kernel@vger.kernel.org, brgerst@gmail.com, bp@alien8.de, hpa@zytor.com, dvlasenk@redhat.com, dave.hansen@intel.com, nadav.amit@gmail.com, mgorman@suse.de, riel@redhat.com, mingo@kernel.org Reply-To: riel@redhat.com, mingo@kernel.org, mgorman@suse.de, nadav.amit@gmail.com, dave.hansen@intel.com, dvlasenk@redhat.com, hpa@zytor.com, bp@alien8.de, brgerst@gmail.com, linux-kernel@vger.kernel.org, jpoimboe@redhat.com, bp@suse.de, luto@kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, peterz@infradead.org, akpm@linux-foundation.org, arjan@linux.intel.com In-Reply-To: <3acc7ad02a2ec060d2321a1e0f6de1cb90069517.1498022414.git.luto@kernel.org> References: <3acc7ad02a2ec060d2321a1e0f6de1cb90069517.1498022414.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/mm] x86/mm: Remove reset_lazy_tlbstate() Git-Commit-ID: d54368127a11c6da0776c109a4c65a7b6a815f32 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2422 Lines: 67 Commit-ID: d54368127a11c6da0776c109a4c65a7b6a815f32 Gitweb: http://git.kernel.org/tip/d54368127a11c6da0776c109a4c65a7b6a815f32 Author: Andy Lutomirski AuthorDate: Tue, 20 Jun 2017 22:22:09 -0700 Committer: Ingo Molnar CommitDate: Thu, 22 Jun 2017 10:57:50 +0200 x86/mm: Remove reset_lazy_tlbstate() The only call site also calls idle_task_exit(), and idle_task_exit() puts us into a clean state by explicitly switching to init_mm. Signed-off-by: Andy Lutomirski Reviewed-by: Rik van Riel Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Mel Gorman Cc: Nadav Amit Cc: Peter Zijlstra Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/3acc7ad02a2ec060d2321a1e0f6de1cb90069517.1498022414.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/include/asm/tlbflush.h | 8 -------- arch/x86/kernel/smpboot.c | 1 - 2 files changed, 9 deletions(-) diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h index 5f78c6a..50ea348 100644 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h @@ -259,14 +259,6 @@ void native_flush_tlb_others(const struct cpumask *cpumask, #define TLBSTATE_OK 1 #define TLBSTATE_LAZY 2 -static inline void reset_lazy_tlbstate(void) -{ - this_cpu_write(cpu_tlbstate.state, 0); - this_cpu_write(cpu_tlbstate.loaded_mm, &init_mm); - - WARN_ON(read_cr3_pa() != __pa_symbol(swapper_pg_dir)); -} - static inline void arch_tlbbatch_add_mm(struct arch_tlbflush_unmap_batch *batch, struct mm_struct *mm) { diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index f04479a..6169a56 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1589,7 +1589,6 @@ void native_cpu_die(unsigned int cpu) void play_dead_common(void) { idle_task_exit(); - reset_lazy_tlbstate(); /* Ack it */ (void)cpu_report_death();