From patchwork Tue Jul 28 03:34:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688059 Return-Path: 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 DD0C51746 for ; Tue, 28 Jul 2020 03:35:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A7B2D206D4 for ; Tue, 28 Jul 2020 03:35:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="raIuuV8u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7B2D206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 838F48D0005; Mon, 27 Jul 2020 23:35:50 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7C16F8D0002; Mon, 27 Jul 2020 23:35:50 -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 5C6648D0005; Mon, 27 Jul 2020 23:35:50 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id 43C2F8D0002 for ; Mon, 27 Jul 2020 23:35:50 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0E4AB180AD815 for ; Tue, 28 Jul 2020 03:35:50 +0000 (UTC) X-FDA: 77086070460.21.geese03_3b14bc926f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id DC9B3180442C0 for ; Tue, 28 Jul 2020 03:35:49 +0000 (UTC) X-Spam-Summary: 1,0,0,bdfcded81f19842f,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3167:3352:3868:3874:4321:5007:6261:6653:7514:7903:9413:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:12986:13069:13311:13357:13846:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054,0,RBL:209.85.216.66:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yr9pi9xw5jixi45j91pcaf6csy1op14xwq8heqmwjwc4f18f675145i9wwnei.dkuhwndrfbatpe6qdrt8jfagwkhs6srndbjr4s381zbu44cpjrr7kx8sngu8tb7.4-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: geese03_3b14bc926f66 X-Filterd-Recvd-Size: 4653 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:49 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id k71so10768421pje.0 for ; Mon, 27 Jul 2020 20:35:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fAvZz66+QaBdG22l2e4wGzGeeBoM/iwnQLAAqOO4w3k=; b=raIuuV8uCiFBJ/lHrBNbzsGk6I9fJmFLp7oA7Q4Zq8ne0fPffDvdDzPmwQf8MDa9H5 iq6RaDgDS0JPxC41pfFYr066sTtd/e/ecBTBQKanlt4nsYCx3YqeTiUOq7wlnd9t+5BA sISbSV3NUsfPoqd2v2x8llQ4NvPeMI3BHgiuuqyp/2eZg0Vx1vsvgJd+VVvWOyHfCmFP gjCKPkS8RMRmqcXB80sZMpzqlrJxbDN/Sgs1ZeJXVb9HN9iw2AF2NowzhdO1hYYpYA1f nZ09ejKNF/qR/kzz0RUyUv2jBoYLOuGa+5R4TEhDHgYlV10N2aAOgVqcRWMksd3p7pq7 rlEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fAvZz66+QaBdG22l2e4wGzGeeBoM/iwnQLAAqOO4w3k=; b=hW3jQVCnIXrUKQPHdoKU9E9lhXKbUQG1ZmLk8tTsIPS4iGmsy7m9EzJqaklm7FttRR NsOENpp5Dah3S1w/OkUo51sQT02eXZjpafVqngg42Gy0hiPrqt1oof117LnHXquCrSRW /FegHsXWeGBD5p/MqmZ7m4QDGe+Z4aOVZOpi33ACppSrmy7A6q+wFtLh/bxKFXds5X9j jkJzpBKQZsBxnopeD/EawZZYmQDavH8GrS50dY9g7lNc6MXzn9LlqcwfSnrABrQPZDTe y8DVr+rSGk7MtgU19Wo61TSQBBwsTGWKEQFveKtP24zwbn0JlRzZOOJHClISKIiIaWMj X25w== X-Gm-Message-State: AOAM532D0MKLHNJwxDOv227tDkXK8PJfLJtdl4FVhLUbMThi1qbf1sDX ak6EXuDvWwrs1iqNMe78N0wmHpr3 X-Google-Smtp-Source: ABdhPJx4KFc9AQIC7ArYHaqefa7TK8k/yMc05XMGZylzBAVOeed4XSg5Bld4PxWgP8XSWWG1WcH1Qw== X-Received: by 2002:a17:902:b113:: with SMTP id q19mr21395986plr.170.1595907348803; Mon, 27 Jul 2020 20:35:48 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:48 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH 23/24] x86: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:34:04 +1000 Message-Id: <20200728033405.78469-24-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: DC9B3180442C0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Nicholas Piggin Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/mmu_context.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index 47562147e70b..255750548433 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h @@ -92,12 +92,14 @@ static inline void switch_ldt(struct mm_struct *prev, struct mm_struct *next) } #endif +#define enter_lazy_tlb enter_lazy_tlb extern void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk); /* * Init a new mm. Used on mm copies, like at fork() * and on mm's that are brand-new, like at execve(). */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -117,6 +119,8 @@ static inline int init_new_context(struct task_struct *tsk, init_new_context_ldt(mm); return 0; } + +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { destroy_context_ldt(mm); @@ -215,4 +219,6 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma, unsigned long __get_current_cr3_fast(void); +#include + #endif /* _ASM_X86_MMU_CONTEXT_H */