From patchwork Tue Sep 1 14:15:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748273 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 8E6AD138A for ; Tue, 1 Sep 2020 14:17:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 52A8F206EB for ; Tue, 1 Sep 2020 14:17:18 +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="BxF08WZg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52A8F206EB 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 7D77F90000C; Tue, 1 Sep 2020 10:17:17 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 78787900002; Tue, 1 Sep 2020 10:17:17 -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 69E8090000C; Tue, 1 Sep 2020 10:17:17 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 547E3900002 for ; Tue, 1 Sep 2020 10:17:17 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 06EA0181AEF1F for ; Tue, 1 Sep 2020 14:17:17 +0000 (UTC) X-FDA: 77214694914.14.stick11_58009e127098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 3430018229835 for ; Tue, 1 Sep 2020 14:17:02 +0000 (UTC) X-Spam-Summary: 1,0,0,567d586a5e7730af,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41: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:4321:5007:6119:6261:6653:7514:7903:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13255:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30070,0,RBL:209.85.216.65:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y8d5jxabzhi4jtj14z4pd93nzzeocp4wmggw7fh8pk5wygfwmr8ngmu53tmea.uctowjehrt7by8k33oyunuwngnyj1h49tacbfqdfby9w1id11jtsqho7idn8ajw.1-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:neutral,Custom_rules:0:0:0,LFtime:62,LUA_SUMMARY:none X-HE-Tag: stick11_58009e127098 X-Filterd-Recvd-Size: 5027 Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:50 +0000 (UTC) Received: by mail-pj1-f65.google.com with SMTP id nv17so691994pjb.3 for ; Tue, 01 Sep 2020 07:16:50 -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=czZmpjb3vWAAbgZB/UHnONa23SwklaXJVc63sdY/64U=; b=BxF08WZg7f9I9Et2+jcWpVaEzPjARaog5uM5wGwG4A58L3P0zaVBFSmpRtrYT6Hy0W bKOQSv85r2Fkq2HviYC2riKtzPV6ReyulkO7gR214ovKByXCloxpk+/fHJjwRWkryA1X TTgsWzcq8LK326EbUzegAFcO2haF3IQLJEcS7BDHgFvEUC48w+8ePTaVSr8G/d2S/G1L bZGFFm/WYLmc1vGGVcq/8nbBrjCVXfJwI9PW44HCjeKraYST3Cd0XckNAD5no3j4Wt5H uP3ZVzkLnLNLQ4U60lo2QOjU4i1QXJ+ooiqDUUe9iUn0vKTL4JrCKKLafGzybt/7LLfq g+jw== 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=czZmpjb3vWAAbgZB/UHnONa23SwklaXJVc63sdY/64U=; b=d1JDMtvtFDVmiNxzIl6Lk8IiLLxcf45wLYB9ex/wZfnLxMto2eSyO2hmr4bD4XYdhq KgLS30wEVy2SCjhmfDYoiN4N3PbwqRSG1BM5JuPbRl2ptvbRbWEkJ/vgPeNVLkxwdayL YVUNVm6bvx9eg33+nbcEcnN9iXAxm/gGl5NOlK//OK1on8KGWJK9zgKvW0m/daEcla6h oqaWXYYtM8OM9eDae0IIh5x1sFedIY+ZEnLfDZTWbGBf6pJWUgKXsO7aqZYBGa7BWQUF 5wgaV1UHhKubovsaIxhoxZt3Z0RrzSXduTvr9FlVYVAa/UiWOH+07B/DZeJrPC/Pqy2q GI8g== X-Gm-Message-State: AOAM531Km55WvNO0GlKJhO4O/HyZrp+yGzx93m+VxI/ntyOzdG0CZrcd V6vzE2EonLs5pF3fUZBlazQ= X-Google-Smtp-Source: ABdhPJxhNbtvq/3SFlenMBvIZJCfMciJFkJ0i1FlBjYooCyqjinZrlhhJXw4FKe0Q5JjFy8BKa4yrw== X-Received: by 2002:a17:90a:de87:: with SMTP id n7mr1784368pjv.208.1598969809728; Tue, 01 Sep 2020 07:16:49 -0700 (PDT) Received: from bobo.ibm.com ([203.185.249.227]) by smtp.gmail.com with ESMTPSA id w9sm2212816pgg.76.2020.09.01.07.16.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:49 -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 , linuxppc-dev@lists.ozlabs.org, Michael Ellerman Subject: [PATCH v3 16/23] powerpc: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:32 +1000 Message-Id: <20200901141539.1757549-17-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: 3430018229835 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: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman (powerpc) Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/mmu_context.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index 7f3658a97384..a3a12a8341b2 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; @@ -235,27 +237,26 @@ 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. */ +#define activate_mm activate_mm 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); @@ -298,5 +299,7 @@ static inline int arch_dup_mmap(struct mm_struct *oldmm, return 0; } +#include + #endif /* __KERNEL__ */ #endif /* __ASM_POWERPC_MMU_CONTEXT_H */