Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1671351

[PATCH v3 03/11] x86/mm: Remove reset_lazy_tlbstate()

From Andy Lutomirski <luto@kernel.org>
Newsgroups linux.kernel
Subject [PATCH v3 03/11] x86/mm: Remove reset_lazy_tlbstate()
Date 2017-06-21 07:30 +0200
Message-ID <tUGng-1Tn-19@gated-at.bofh.it> (permalink)
References <tUGnf-1Tn-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
 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 5f78c6a77578..50ea3482e1d1 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 f04479a8f74f..6169a56aab49 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();
-- 
2.9.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v3 03/11] x86/mm: Remove reset_lazy_tlbstate() Andy Lutomirski <luto@kernel.org> - 2017-06-21 07:30 +0200
  Re: [PATCH v3 03/11] x86/mm: Remove reset_lazy_tlbstate() Thomas Gleixner <tglx@linutronix.de> - 2017-06-21 10:10 +0200
  Re: [PATCH v3 03/11] x86/mm: Remove reset_lazy_tlbstate() Borislav Petkov <bp@alien8.de> - 2017-06-21 12:00 +0200
  [tip:x86/mm] x86/mm: Remove reset_lazy_tlbstate() tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2017-06-22 13:20 +0200

csiph-web