From patchwork Tue Jul 28 03:33:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688043 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 737B5913 for ; Tue, 28 Jul 2020 03:35:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3F6E020714 for ; Tue, 28 Jul 2020 03:35:22 +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="LR4TT1gn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F6E020714 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 41A576B002B; Mon, 27 Jul 2020 23:35:21 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3A3CF6B002C; Mon, 27 Jul 2020 23:35:21 -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 293626B002D; Mon, 27 Jul 2020 23:35:21 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id 0DFF16B002B for ; Mon, 27 Jul 2020 23:35:21 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id CAB26181AC9BF for ; Tue, 28 Jul 2020 03:35:20 +0000 (UTC) X-FDA: 77086069200.24.hole64_0409ef126f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id A829E1A4A7 for ; Tue, 28 Jul 2020 03:35:20 +0000 (UTC) X-Spam-Summary: 1,0,0,7e829ccd89cd01ea,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1542:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3353:3865:3866:3867:3870:3871:4250:5007:6119:6261:6653:7514:7903:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30070,0,RBL:209.85.214.193:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yggptkipq3d7s61mi3w7kdfux1mocp4wmggw7f6zqxukenwdy93wiysy7qesn.uspqzchdfrkcpfxqgzqbzcc5q1c4hkdur41i6ftor11rgwhucyahsn8z9ijaz9c.e-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:24,LUA_SUMMARY:none X-HE-Tag: hole64_0409ef126f66 X-Filterd-Recvd-Size: 5201 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:20 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id b9so9187355plx.6 for ; Mon, 27 Jul 2020 20:35:20 -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=WECce0LBXYVjXbrlpo11bHUpze9GJI1lVnSDe0W+y+4=; b=LR4TT1gn/htVF8c/22u1u+36l6MbOY8omKK1QrfKFh7EpljJaFABhwWa9g2ldtcZqp HWOYXXLyiVVdT7tvogFpfVRRJ5NlpM5E/1VlbSLLohpKtL5qu+Eb+GFwFshEelFxMS+4 756Ga65My7y8NdfBf/I+FUmwNY1tMNDdcArxacDOeyD4ipsFlFdBMoHjZabadWx7Cb+G AFIG8FjoYXAjBqVBSu/3Lq30DcpDkkHu29sCZ8oj+ICdNqnoBYxgyyZJPFiR5ClFTrX9 qdlvfZMYbV93inruHyenWeSb9Ews0pMS5keHZ17XGcfc6GHkP7AcYQsXFdUkcPG4A1zC TPEg== 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=WECce0LBXYVjXbrlpo11bHUpze9GJI1lVnSDe0W+y+4=; b=PMe+GYPa7Nyv12BwDALaf2bCRQpjPYOtvPsNegvuW4tgSrUoYdrGMpMJOnNV6s3BoN 9br0KzXXgG3fZblSRM6CKkms9iIC5+L8HRZBxswiZDLH84SavxcPzfcr4VEGP1+fyUeW u5LrK4aJkbZBfNfzAoVcmEMrVvpGuEeay5Drow6AJMafK8vmaZY0OFKuKKEuv+9AaSR2 BgO2HWZZhCFd1v+v/LWLq26/02n+0DOtjDpQya1/F2N0NKY4apZBH1wCmyTigviG45wY e7WJUQcjzPrsInFMokdvK7KPn/E54hx8nD9CTwTW48LuIX+9qX9w4Y8KEgDMFxURjbhD HF2w== X-Gm-Message-State: AOAM530JRo+rZ51jSo+/LmjP017PcvbAf2oNFz+hqBJyGltPNshvN0pd Zas/9+84D7ulCXRkktyoKBY= X-Google-Smtp-Source: ABdhPJzuslCQp+8HbB3cDYhA5hqXaz9y/HEvXL86aufZSOGtcy8wjOcm865BoW4An1+Ax+pq2VZyIg== X-Received: by 2002:a17:902:bb83:: with SMTP id m3mr19664485pls.209.1595907319521; Mon, 27 Jul 2020 20:35:19 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:19 -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 , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 16/24] powerpc: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:57 +1000 Message-Id: <20200728033405.78469-17-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: A829E1A4A7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/mmu_context.h | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index 1a474f6b1992..242bd987247b 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h @@ -14,7 +14,9 @@ /* * Most if the context management is out of line */ +#define init_new_context init_new_context extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); +#define destroy_context destroy_context extern void destroy_context(struct mm_struct *mm); #ifdef CONFIG_SPAPR_TCE_IOMMU struct mm_iommu_table_group_mem_t; @@ -237,27 +239,15 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, } #define switch_mm_irqs_off switch_mm_irqs_off - -#define deactivate_mm(tsk,mm) do { } while (0) - -/* - * After we have set current->mm to a new value, this activates - * the context for the new mm so we see the new mappings. - */ -static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) -{ - switch_mm(prev, next, current); -} - -/* We don't currently use enter_lazy_tlb() for anything */ +#ifdef CONFIG_PPC_BOOK3E_64 +#define enter_lazy_tlb enter_lazy_tlb static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { /* 64-bit Book3E keeps track of current PGD in the PACA */ -#ifdef CONFIG_PPC_BOOK3E_64 get_paca()->pgd = NULL; -#endif } +#endif extern void arch_exit_mmap(struct mm_struct *mm); @@ -300,5 +290,7 @@ static inline int arch_dup_mmap(struct mm_struct *oldmm, return 0; } +#include + #endif /* __KERNEL__ */ #endif /* __ASM_POWERPC_MMU_CONTEXT_H */