Message ID | 20200717111349.883694582@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=4F7u=A4=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 410B414E3 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 17 Jul 2020 11:14:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0306D2070E for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 17 Jul 2020 11:14:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="yjSqa+5f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0306D2070E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E99A08D0036; Fri, 17 Jul 2020 07:14:26 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DAFCB8D0038; Fri, 17 Jul 2020 07:14:26 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A72AE8D0037; Fri, 17 Jul 2020 07:14:26 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 61B038D0036 for <linux-mm@kvack.org>; Fri, 17 Jul 2020 07:14:26 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1624A1826F617 for <linux-mm@kvack.org>; Fri, 17 Jul 2020 11:14:26 +0000 (UTC) X-FDA: 77047309332.20.mom25_3d078c126f0a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id DCF0E181BE98B for <linux-mm@kvack.org>; Fri, 17 Jul 2020 11:14:25 +0000 (UTC) X-Spam-Summary: 1,0,0,0a1635b3331cd4de,d41d8cd98f00b204,peterz@infradead.org,,RULES_HIT:41:152:355:379:800:960:965:966:968:973:988:989:1183:1260:1261:1277:1313:1314:1345:1431:1437:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:1981:2194:2196:2198:2199:2200:2201:2393:2559:2562:2731:2903:3138:3139:3140:3141:3142:3352:3865:3867:3870:3871:3872:4250:4385:4390:4395:5007:6119:6261:6653:6742:8634:10004:10400:11026:11657:11658:11914:12043:12048:12296:12297:12438:12517:12519:13069:13311:13357:14181:14394:14659:14721:21080:21451:21627:30003:30054:30055,0,RBL:205.233.59.134:@infradead.org:.lbl8.mailshell.net-62.8.55.100 64.201.201.201;04y8t6nzc4ogpsbdwrd4e69twkmjzopyr7tpfxmp4ew7yxep9ygf6x1anupmdip.csby15uzisrq7y8tx9jq1htmhm6epgkfby68puhp93tzcrmfooe8o6n7m99wfy8.a-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: mom25_3d078c126f0a X-Filterd-Recvd-Size: 3542 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf33.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Fri, 17 Jul 2020 11:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=mXdH0EdEU6Cy2G+amp6Zc6DclrxoI0Xq6oO6KLBpmqE=; b=yjSqa+5fwh6Wy8j+pNJsjC/qU1 B2W55tXrcly0UqYSpaENQEh4QFIfSAwqFfE+vAJgyC6OLtPX9la8lpviT1MifASoGfPTlDnAlsFvJ 1c7lO2spg8rO5c925FNqxh1Z9SaTqtPcBMJ2TFskFB3abEcjcuuaM3ZvTLwzF6SNJJP0jWPMprbG/ wDNzdmdXu8XExJClvzvqC7btCKV0ixVINJH7odcI9gFbt8hDwfQyEzNMiQmv+yNKd/h1tTAO/7mmI DdVsystUlYxe9pki8bthn8jpHCIaw8jgSwxbdgw4wr0T2AMqTmkLQ82Lfkon8Q/Fl65+OKpC0AK1a mraN58Yg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwOJZ-0001Zo-Nd; Fri, 17 Jul 2020 11:14:05 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 82068306FFE; Fri, 17 Jul 2020 13:14:04 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id CBE5F203D4097; Fri, 17 Jul 2020 13:14:02 +0200 (CEST) Message-ID: <20200717111349.883694582@infradead.org> User-Agent: quilt/0.66 Date: Fri, 17 Jul 2020 13:10:14 +0200 From: Peter Zijlstra <peterz@infradead.org> To: Will Deacon <will@kernel.org>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>, Andrew Morton <akpm@linux-foundation.org>, Nick Piggin <npiggin@gmail.com>, Peter Zijlstra <peterz@infradead.org> Cc: linux-arch@vger.kernel.org, linux-sh@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org>, "David S. Miller" <davem@davemloft.net>, Helge Deller <deller@gmx.de>, Geert Uytterhoeven <geert@linux-m68k.org>, Paul Burton <paulburton@kernel.org>, Tony Luck <tony.luck@intel.com>, Richard Henderson <rth@twiddle.net>, Nick Hu <nickhu@andestech.com>, Paul Walmsley <paul.walmsley@sifive.com>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, Christoph Hellwig <hch@lst.de> Subject: [PATCH v2 09/11] nds32/tlb: Fix __p*_free_tlb() References: <20200717111005.024867618@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Rspamd-Queue-Id: DCF0E181BE98B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Fixup page directory freeing
|
expand
|
--- a/arch/nds32/include/asm/tlb.h +++ b/arch/nds32/include/asm/tlb.h @@ -6,6 +6,11 @@ #include <asm-generic/tlb.h> -#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte) +#define __pte_free_tlb(tlb, pte, address) \ +do { \ + pgtable_pte_page_dtor(pte); \ + tlb_remove_table((tlb), (pte)); \ +} while (0) + #endif
Just like regular pages, page directories need to observe the following order: 1) unhook 2) TLB invalidate 3) free to ensure it is safe against concurrent accesses. Even though NDS32 is UP only, we still need to observe this order because mmu_gather is preemptible. NDS32 does not in fact have PMDs. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> --- arch/nds32/include/asm/tlb.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)