From patchwork Wed Aug 26 14:52:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738725 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 876A5109B for ; Wed, 26 Aug 2020 14:54:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4ADDB2078D for ; Wed, 26 Aug 2020 14:54:30 +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="gAZmM9ij" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4ADDB2078D 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 36B1D6B0033; Wed, 26 Aug 2020 10:54:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2F1D06B0036; Wed, 26 Aug 2020 10:54:25 -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 191F26B0037; Wed, 26 Aug 2020 10:54:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id EF0AB6B0033 for ; Wed, 26 Aug 2020 10:54:24 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B5EE7249F for ; Wed, 26 Aug 2020 14:54:24 +0000 (UTC) X-FDA: 77193015648.18.brick72_120a23627065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 6943A100ED0D0 for ; Wed, 26 Aug 2020 14:54:24 +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.216.68:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04yg78tkxak7dhh64t9rt5tru45wsyct73hwsga8ou8cgzyeje675145i9wwfym.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: brick72_120a23627065 X-Filterd-Recvd-Size: 4759 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:54:23 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id mw10so978327pjb.2 for ; Wed, 26 Aug 2020 07:54:23 -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=gAZmM9ijM6uRIbJgMuK6cdpxSCGL3X0aN2OJWq4mKPGIHQoe4uUXiMmjTeFHWBxeev gZnQaTfWdEDCpUVkS6o8neOVCDd16NmRnSGLN0nwvc9ysWGgKOFIDrdeqvM9kYXcoweJ +OYgRha6cGCWmqXx4soJtzKRuCBJQy6Prrr8yrhGaggR1EHGnKKLJ4JVDLgiOM/E6M5+ x+X24U/Zr4fK2SyfswMohxENGL6EsmlmuPVtJkbahGTAYGvljX/dYmB6kE4Ptg4xENcX lo8YYPolqekviooUc9V2DHClegUUoRX91emu17f5N5iuL4gsz4NkN5RFpyHzIgBZgTGl pz3g== 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=WaBcV1v22/x1vXzFiioD2Ii1QgemX2iQTC0r353Sl95feFcKJO1qGVTT+1HOd+LqFp pfGcpdOHOh5FApk/Dk/fbxuE2JE6FVRwAB6zek4Eo4arVjxV1gAUvk6asaCFjyd3IH3k JgqUbo2FtlzPicGylYt/pUkfFreRwq0odPRHfgaUHqZ+7ZiIYl7Fo8xZjamlc9wfCFgG PVoFjXTFDDdhFv8BZk7w1IfdtA1m16AA2pRlVeOMC7Q4gg1Xha0UAyF/hVX2eNs8x/80 RwSh38bQMhthYebJvRQ8zxt5O87dkDGHGWBBc9PhZ4zuGIku4FzDA8XFbA8T8VbVZ15a YWvg== X-Gm-Message-State: AOAM530bmjBDwuCo38nzMPuMquednphfFA6YZX1Qlntuq6yv9LnQxlo9 TKUh2nkWD8qPopaLbknKLtxlAGvZkFU= X-Google-Smtp-Source: ABdhPJz+w25ojokfqUyML0jgxpkh96G1H3gOrbijHk0y9SorqFJkCxJL7p4DPgIoUQtQ/C9hxH0hig== X-Received: by 2002:a17:902:bcc6:: with SMTP id o6mr12318919pls.109.1598453663185; Wed, 26 Aug 2020 07:54:23 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:54:22 -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 v2 22/23] x86: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:48 +1000 Message-Id: <20200826145249.745432-23-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 6943A100ED0D0 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 */