From patchwork Tue Sep 1 14:15:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748295 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 DBE8C14E5 for ; Tue, 1 Sep 2020 14:17:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A8A96206EF for ; Tue, 1 Sep 2020 14:17:42 +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="GRbCB90G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8A96206EF 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 4F14E900017; Tue, 1 Sep 2020 10:17:34 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4A50590000D; Tue, 1 Sep 2020 10:17:34 -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 392D1900017; Tue, 1 Sep 2020 10:17:34 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id 1AD3890000D for ; Tue, 1 Sep 2020 10:17:34 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D51038248076 for ; Tue, 1 Sep 2020 14:17:33 +0000 (UTC) X-FDA: 77214695586.18.step65_5506f1827098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 0102C100EC66E for ; Tue, 1 Sep 2020 14:17:27 +0000 (UTC) X-Spam-Summary: 1,0,0,2475b42e4b2c322c,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:5007:6261:6653:7514:7903:9413:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13846:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30055,0,RBL:209.85.215.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04yrbc46cng33szwdojktra6i4wn8yct73hwsga8ou8cgzyeje675145i9wwfym.wfyzkkurfbatpe6qdrt8jfagwkhs6srndbjr4s381zbu4xy1fyszjqzsngu8tb7.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: step65_5506f1827098 X-Filterd-Recvd-Size: 4716 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:17:17 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id 5so758663pgl.4 for ; Tue, 01 Sep 2020 07:17:17 -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=LFi90LdQN/Zk1sYT6T5v1lAFBWcv/lCT8hsQFua3q/w=; b=GRbCB90GdyZUi+VoPIPMsixFWPMZj2oy9F/AbKWnvm2FipfPGJ6rm1dMmzM76rSyHW JoXy8WZcBi9L4LHS8bOCZneb74jcAg2PgKNesxYbnnRM5Rc/oWTEtQ+IvnHzBLFz0Kea veq7Mb55DSVQMLTba9tXuO+bS1eTjmewXYheXfJbA90kC33Uqs1QRFN73OHttlpaXWAm 9EecoPIEZ/PbWi/A7BXMwxe3xCT7cqF8nF4WCBrrt8t/9nYioy6zQb+02nqwpuqL9ub7 tU5UKXd3G1H6ILcgpOPP70ReSgB9LFSoycIi2CuJhMvJIdABGd5WZ98GzniWuw5u/0fn CERg== 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=LFi90LdQN/Zk1sYT6T5v1lAFBWcv/lCT8hsQFua3q/w=; b=PYR5Kz9LOYGjD6PCy7/C0/E9rnio0izRxfQjrwsKy8gbwHR7t9W5wRK0L3ChLVogxF JZEJsvI+FoW/OqaR61+MqvuxsjMy4Owr7Ht4dmw++XsQMogqxjSkkXpLh20MImnPkDJp Ou+CY5YiWp7rZ79JUtprr2e8U/qkdrvRowYedy9l9zSlpkODRvrkKcn6/bMDMl4XLjRO RlNr5QYa3V+pDr1wnpC71FEYXHNVHi3hDTQTillSwCwdgGz0L0CXfTHZbduPzE2uuRM+ KMJb7ufEBgTCT4qz4DhShGIleHJ6fpSnRs76InJB0iSohqSl1eMiOEwPxcCKqTdW0tcw B+MA== X-Gm-Message-State: AOAM532L94TNiZbV9TojqmPu80UsQYNfpuhHsvPixQNpDtLpfPj1FGYJ L/QRzev10okAPBdAAE4XB8c= X-Google-Smtp-Source: ABdhPJzPQFVQko+EtVWd2JEHXsa40beM/TRyiCuAQFGgp5jdZ8vubIaNgK+HxHvBH8DRG3SBsKKPuA== X-Received: by 2002:aa7:9d8b:: with SMTP id f11mr2043036pfq.5.1598969836473; Tue, 01 Sep 2020 07:17:16 -0700 (PDT) Received: from bobo.ibm.com ([203.185.249.227]) by smtp.gmail.com with ESMTPSA id w9sm2212816pgg.76.2020.09.01.07.17.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:17:16 -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" , Peter Zijlstra Subject: [PATCH v3 22/23] x86: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:38 +1000 Message-Id: <20200901141539.1757549-23-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200901141539.1757549-1-npiggin@gmail.com> References: <20200901141539.1757549-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 0102C100EC66E X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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" Acked-by: Peter Zijlstra (Intel) Signed-off-by: Nicholas Piggin --- 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 d98016b83755..36afcbea6a9f 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h @@ -91,12 +91,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) { @@ -116,6 +118,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); @@ -214,4 +218,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 */