diff options
author | Andy Lutomirski <luto@kernel.org> | 2017-06-21 01:22:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-22 04:57:50 -0400 |
commit | d54368127a11c6da0776c109a4c65a7b6a815f32 (patch) | |
tree | 3afb29742158d5498042ab10438912ba6e2d9c98 | |
parent | 7353425881b170a24990b4d3bdcd14b1156fa8bd (diff) |
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 <luto@kernel.org>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Nadav Amit <nadav.amit@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/3acc7ad02a2ec060d2321a1e0f6de1cb90069517.1498022414.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/include/asm/tlbflush.h | 8 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 1 |
2 files changed, 0 insertions, 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, | |||
259 | #define TLBSTATE_OK 1 | 259 | #define TLBSTATE_OK 1 |
260 | #define TLBSTATE_LAZY 2 | 260 | #define TLBSTATE_LAZY 2 |
261 | 261 | ||
262 | static inline void reset_lazy_tlbstate(void) | ||
263 | { | ||
264 | this_cpu_write(cpu_tlbstate.state, 0); | ||
265 | this_cpu_write(cpu_tlbstate.loaded_mm, &init_mm); | ||
266 | |||
267 | WARN_ON(read_cr3_pa() != __pa_symbol(swapper_pg_dir)); | ||
268 | } | ||
269 | |||
270 | static inline void arch_tlbbatch_add_mm(struct arch_tlbflush_unmap_batch *batch, | 262 | static inline void arch_tlbbatch_add_mm(struct arch_tlbflush_unmap_batch *batch, |
271 | struct mm_struct *mm) | 263 | struct mm_struct *mm) |
272 | { | 264 | { |
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) | |||
1589 | void play_dead_common(void) | 1589 | void play_dead_common(void) |
1590 | { | 1590 | { |
1591 | idle_task_exit(); | 1591 | idle_task_exit(); |
1592 | reset_lazy_tlbstate(); | ||
1593 | 1592 | ||
1594 | /* Ack it */ | 1593 | /* Ack it */ |
1595 | (void)cpu_report_death(); | 1594 | (void)cpu_report_death(); |