From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f200.google.com (mail-ot0-f200.google.com [74.125.82.200]) by kanga.kvack.org (Postfix) with ESMTP id 4AA8A6B02F4 for ; Wed, 21 Jun 2017 01:22:23 -0400 (EDT) Received: by mail-ot0-f200.google.com with SMTP id 63so60379244otc.5 for ; Tue, 20 Jun 2017 22:22:23 -0700 (PDT) Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id y62si4619285oig.359.2017.06.20.22.22.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 22:22:22 -0700 (PDT) From: Andy Lutomirski Subject: [PATCH v3 03/11] x86/mm: Remove reset_lazy_tlbstate() Date: Tue, 20 Jun 2017 22:22:09 -0700 Message-Id: <3acc7ad02a2ec060d2321a1e0f6de1cb90069517.1498022414.git.luto@kernel.org> In-Reply-To: References: In-Reply-To: References: Sender: owner-linux-mm@kvack.org List-ID: To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Linus Torvalds , Andrew Morton , Mel Gorman , "linux-mm@kvack.org" , Nadav Amit , Rik van Riel , Dave Hansen , Arjan van de Ven , Peter Zijlstra , Andy Lutomirski 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 Signed-off-by: Andy Lutomirski --- 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org