From patchwork Tue Sep 1 14:15:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748337 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 6BD6513B6 for ; Tue, 1 Sep 2020 14:23:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2BFD2206CD for ; Tue, 1 Sep 2020 14:23:59 +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="G7S8DAAC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BFD2206CD 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 5550B90001B; Tue, 1 Sep 2020 10:23:58 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 50659900008; Tue, 1 Sep 2020 10:23:58 -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 3F5E590001B; Tue, 1 Sep 2020 10:23:58 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0200.hostedemail.com [216.40.44.200]) by kanga.kvack.org (Postfix) with ESMTP id 23DB6900008 for ; Tue, 1 Sep 2020 10:23:58 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D742A181AEF0B for ; Tue, 1 Sep 2020 14:23:57 +0000 (UTC) X-FDA: 77214711714.25.bikes78_3d1266327099 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 7C05C1804E512 for ; Tue, 1 Sep 2020 14:23:53 +0000 (UTC) X-Spam-Summary: 1,0,0,3ebd5d8723c21fa3,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:2:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1605:1606:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:2693:2899:3138:3139:3140:3141:3142:3865:3866:3867:3868:3871:3872:4119:4250:4321:4605:5007:6119:6261:6653:7514:7875:7903:9413:9592:10004:11026:11473:11657:11658:11914:12043:12296:12297:12438:12517:12519:12555:12895:12986:13894:14096:14394:14687:21080:21433:21444:21451:21627:21666:21987:21990:30054,0,RBL:209.85.219.65:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04yfb5wo1qeb3jg337f76rsa3toi5opk7ygamc7wswjicic6wrz3gwm7bg41rgo.8jgzy9496mq4u1m8s9g16trqsswy1yk69r8knmzqy5khspwrn18jiykxgjycokx.k-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:26,LUA_SUMMARY:none X-HE-Tag: bikes78_3d1266327099 X-Filterd-Recvd-Size: 8090 Received: from mail-qv1-f65.google.com (mail-qv1-f65.google.com [209.85.219.65]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:23:45 +0000 (UTC) Received: by mail-qv1-f65.google.com with SMTP id cy2so584238qvb.0 for ; Tue, 01 Sep 2020 07:23:45 -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=DD+NHkNz//cJ/l/7deT3g02opc5NfKv/2SZ3eKZT8h0=; b=G7S8DAAC/HQ1g+FV88jEIa/Jmk+mIymnXDOsHhmBoiLY8bdSi4j2s0Jioaz2HEhh/A jPJhu+mTn4+GpDygwJBvQ+QDADiHp3MOo0oTNtF7u3pJlTs0SjcxDlS+rASyy7mg8C2N InXYMk+m6ySJbdDz4mlBXc1sLQEQrlV8YggBPYQ0i61u6I7EXeJnDxQuumHtfkukhj/X nPP4kT3CvJ5vl/YPsPwwNRR8dMCA9WoqjXFdHdFJSM7bffPKpNxDsWoAu0iVqCvnwY/W NJiRVAvbWkjBODv8vQ+ADt2F/38EfuTi6zTWvnpDtn0QZ+/ek4fgOG8p6Omys8nVs9Jz C/ww== 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=DD+NHkNz//cJ/l/7deT3g02opc5NfKv/2SZ3eKZT8h0=; b=PKE8BQq1YCqpRk0tnmSYNldGCLfj2bRFle2YtY3tr60jQpl6NzcVbJiPOzDpVgYh1L 6UvTm1EfDakluujKqEmGxXEJN9DzyYuDqQfOXwBqw0boLOCSqAz5OVLkbdN1z6mqyZrq HSfGq/2gKK58XxD4qUIiNhCnuCtERw/72puw4FblNxg6Rwgrb01a9Mzw1SZhHd87DNeZ cvHMN90/nG/KHROOFBRQuf6z75LXF/eJua65IRNfV8GSEcGEgRirBUX0kj7Ps7RrclsU LXyrRP3DkibtROXZHKY0H9XomrBpQsBQ0gBv75ZrNuJHil0QkRJs2KVccKF9pzWnTrBe llBQ== X-Gm-Message-State: AOAM532a4fgRWYLAlFTytgbDoF7FsNZiVRtNekElafELoU3Bt3izKCCh Js98tM7C5FyixE+Z24SQw5AE/Eu8fpM= X-Google-Smtp-Source: ABdhPJyjxjgc9+p9Eqs93m0oRM6EvqZHzcjtwlF7foeZidiL83luX6Sa0saoCyXVuknBGZtaORfSLQ== X-Received: by 2002:aa7:9d8b:: with SMTP id f11mr2036814pfq.5.1598969752061; Tue, 01 Sep 2020 07:15:52 -0700 (PDT) Received: from bobo.ibm.com ([203.185.249.227]) by smtp.gmail.com with ESMTPSA id w9sm2212816pgg.76.2020.09.01.07.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:15:51 -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 , Mike Rapoport Subject: [PATCH v3 01/23] asm-generic: add generic MMU versions of mmu context functions Date: Wed, 2 Sep 2020 00:15:17 +1000 Message-Id: <20200901141539.1757549-2-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: 7C05C1804E512 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: Many of these are no-ops on many architectures, so extend mmu_context.h to cover MMU and NOMMU, and split the NOMMU bits out to nommu_context.h Cc: linux-arch@vger.kernel.org Acked-by: Mike Rapoport Acked-by: Arnd Bergmann Signed-off-by: Nicholas Piggin --- arch/c6x/include/asm/mmu_context.h | 6 +++ arch/microblaze/include/asm/mmu_context.h | 2 +- arch/sh/include/asm/mmu_context.h | 2 +- include/asm-generic/mmu_context.h | 58 +++++++++++++++++------ include/asm-generic/nommu_context.h | 19 ++++++++ 5 files changed, 71 insertions(+), 16 deletions(-) create mode 100644 arch/c6x/include/asm/mmu_context.h create mode 100644 include/asm-generic/nommu_context.h diff --git a/arch/c6x/include/asm/mmu_context.h b/arch/c6x/include/asm/mmu_context.h new file mode 100644 index 000000000000..d2659d0a3297 --- /dev/null +++ b/arch/c6x/include/asm/mmu_context.h @@ -0,0 +1,6 @@ +#ifndef _ASM_C6X_MMU_CONTEXT_H +#define _ASM_C6X_MMU_CONTEXT_H + +#include + +#endif /* _ASM_C6X_MMU_CONTEXT_H */ diff --git a/arch/microblaze/include/asm/mmu_context.h b/arch/microblaze/include/asm/mmu_context.h index f74f9da07fdc..34004efb3def 100644 --- a/arch/microblaze/include/asm/mmu_context.h +++ b/arch/microblaze/include/asm/mmu_context.h @@ -2,5 +2,5 @@ #ifdef CONFIG_MMU # include #else -# include +# include #endif diff --git a/arch/sh/include/asm/mmu_context.h b/arch/sh/include/asm/mmu_context.h index f664e51e8a15..461b1304580b 100644 --- a/arch/sh/include/asm/mmu_context.h +++ b/arch/sh/include/asm/mmu_context.h @@ -133,7 +133,7 @@ static inline void switch_mm(struct mm_struct *prev, #define set_TTB(pgd) do { } while (0) #define get_TTB() (0) -#include +#include #endif /* CONFIG_MMU */ diff --git a/include/asm-generic/mmu_context.h b/include/asm-generic/mmu_context.h index 6be9106fb6fb..91727065bacb 100644 --- a/include/asm-generic/mmu_context.h +++ b/include/asm-generic/mmu_context.h @@ -3,44 +3,74 @@ #define __ASM_GENERIC_MMU_CONTEXT_H /* - * Generic hooks for NOMMU architectures, which do not need to do - * anything special here. + * Generic hooks to implement no-op functionality. */ -#include - struct task_struct; struct mm_struct; +/* + * enter_lazy_tlb - Called when "tsk" is about to enter lazy TLB mode. + * + * @mm: the currently active mm context which is becoming lazy + * @tsk: task which is entering lazy tlb + * + * tsk->mm will be NULL + */ +#ifndef enter_lazy_tlb static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { } +#endif +/** + * init_new_context - Initialize context of a new mm_struct. + * @tsk: task struct for the mm + * @mm: the new mm struct + * @return: 0 on success, -errno on failure + */ +#ifndef init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { return 0; } +#endif +/** + * destroy_context - Undo init_new_context when the mm is going away + * @mm: old mm struct + */ +#ifndef destroy_context static inline void destroy_context(struct mm_struct *mm) { } +#endif -static inline void deactivate_mm(struct task_struct *task, - struct mm_struct *mm) -{ -} - -static inline void switch_mm(struct mm_struct *prev, - struct mm_struct *next, - struct task_struct *tsk) +/** + * activate_mm - called after exec switches the current task to a new mm, to switch to it + * @prev_mm: previous mm of this task + * @next_mm: new mm + */ +#ifndef activate_mm +static inline void activate_mm(struct mm_struct *prev_mm, + struct mm_struct *next_mm) { + switch_mm(prev_mm, next_mm, current); } +#endif -static inline void activate_mm(struct mm_struct *prev_mm, - struct mm_struct *next_mm) +/** + * dectivate_mm - called when an mm is released after exit or exec switches away from it + * @tsk: the task + * @mm: the old mm + */ +#ifndef deactivate_mm +static inline void deactivate_mm(struct task_struct *tsk, + struct mm_struct *mm) { } +#endif #endif /* __ASM_GENERIC_MMU_CONTEXT_H */ diff --git a/include/asm-generic/nommu_context.h b/include/asm-generic/nommu_context.h new file mode 100644 index 000000000000..4f916f9e16cd --- /dev/null +++ b/include/asm-generic/nommu_context.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_GENERIC_NOMMU_H +#define __ASM_GENERIC_NOMMU_H + +/* + * Generic hooks for NOMMU architectures, which do not need to do + * anything special here. + */ +#include + +static inline void switch_mm(struct mm_struct *prev, + struct mm_struct *next, + struct task_struct *tsk) +{ +} + +#include + +#endif /* __ASM_GENERIC_NOMMU_H */ From patchwork Tue Sep 1 14:15:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748253 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 C793814E5 for ; Tue, 1 Sep 2020 14:16:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8C1BB206EF for ; Tue, 1 Sep 2020 14:16:23 +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="dbCIVvEz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C1BB206EF 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 6059F900005; Tue, 1 Sep 2020 10:16:22 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5B4D4900002; Tue, 1 Sep 2020 10:16:22 -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 4A4A2900005; Tue, 1 Sep 2020 10:16:22 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id 2A8A3900002 for ; Tue, 1 Sep 2020 10:16:22 -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 D544C181AEF1F for ; Tue, 1 Sep 2020 14:16:21 +0000 (UTC) X-FDA: 77214692562.24.knee28_1b1847a27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 7DAD81AA7F for ; Tue, 1 Sep 2020 14:16:06 +0000 (UTC) X-Spam-Summary: 1,0,0,ccf264cb51bbdb0b,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2538:2559:2562:3138:3139:3140:3141:3142:3352:3867:3873:4321:5007:6119:6261:6653:7514:7875:9036:9413:9592:10004:11026:11232:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:12986:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04ygrr6jfdfup15xzghq6irknw58cycoysjgun7fsagosm8nucaxb98pxrbzbjw.8qsohjo8ka1wxq3a7c63yu4nui94tq4okqdrp9o3dktn3ztn5fadgzxo1bm7u19.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:26,LUA_SUMMARY:none X-HE-Tag: knee28_1b1847a27098 X-Filterd-Recvd-Size: 4898 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:15:57 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id k13so583831plk.13 for ; Tue, 01 Sep 2020 07:15:57 -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=Ypq4V2n6hl0lHX9y7DtLS7ZcrqEPUBbxsLMtFlrStVc=; b=dbCIVvEzwJuO+omKZYGl30Jm5UXT6FFIqT47ktoREvEjVKZpwSdT69hMlvg9PQwQTB mihJpL+5DkDOOetBf+zFTpyVQwWusTQRnbfIEJFcWW/xufoyBvc96pPwyonS9uDO3hC7 UqU7+RTGCP5VYQTurJ4gv5xZx7OFv1ZNE8QVXUbXBIt+4EGknUwjyClJ2vW3fmCJ/5dN cnC3XBy8kpEArVpfpSMgPkUUVLVBMjEv0vf/4VDXr0xzgW6qowREjyPH69ksazjSqQac xMuvOnpQwhE/S5FZkTD3LPeL49fFgNQfzKIJGovNvaAA3UrTdMfv3xsrJ9+ATYugLsLX kRjw== 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=Ypq4V2n6hl0lHX9y7DtLS7ZcrqEPUBbxsLMtFlrStVc=; b=Oi6b6BZv/mIXDylaXyGjb+hZDjZS1HS25R9IE5rJiSiuFCWI/yuTmnnUMDCjsPTYDZ igAfsS6xDtOxBTG9BDZsmLGwyoN34wfFxF/D+LptD39kXfe3CA4n8tFXnf5qfry/P6CO +GMGMxfOgIF8r5HdRvT9vYUavJQtNJ4s4hQZv+vqufoucs6DvW/MeZtrLbITnqkx0fkX c0/QCsjgfWa6f4PVgKM3w70f+5h/pkkEnsmFvI7UjGuJd+KgRKUrnjhl4918dckScexe mT7YgAdxsZxxG5wk84Kk54LQhQiG8Yl0rJdjPJRzYllIjw56a4nf8MF5GLUJbS+ay1Ep qpQg== X-Gm-Message-State: AOAM530CnDXT8LdWZwNCMD4Eibi3YAoOv2WHX2TKhwVtb54+AyZ/YtHN bwJsSUc6cJS2hE3zJsA4LPw= X-Google-Smtp-Source: ABdhPJyO0woqavVhMdTRr3W6I7mhJVIY/BQdP03aVwxP6SXaAUdSR9MeoyVKLSK/fY6DFmxiP+ZOjA== X-Received: by 2002:a17:902:7e86:: with SMTP id z6mr1573791pla.316.1598969756406; Tue, 01 Sep 2020 07:15:56 -0700 (PDT) Received: from bobo.ibm.com ([203.185.249.227]) by smtp.gmail.com with ESMTPSA id w9sm2212816pgg.76.2020.09.01.07.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:15:55 -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 , Richard Henderson , Ivan Kokshaysky , Matt Turner , linux-alpha@vger.kernel.org Subject: [PATCH v3 02/23] alpha: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:18 +1000 Message-Id: <20200901141539.1757549-3-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: 7DAD81AA7F 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: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Signed-off-by: Nicholas Piggin Acked-by: Matt Turner --- Please ack or nack if you object to this being mered via Arnd's tree. arch/alpha/include/asm/mmu_context.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/alpha/include/asm/mmu_context.h b/arch/alpha/include/asm/mmu_context.h index 6d7d9bc1b4b8..4eea7c616992 100644 --- a/arch/alpha/include/asm/mmu_context.h +++ b/arch/alpha/include/asm/mmu_context.h @@ -214,8 +214,6 @@ ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) tbiap(); } -#define deactivate_mm(tsk,mm) do { } while (0) - #ifdef CONFIG_ALPHA_GENERIC # define switch_mm(a,b,c) alpha_mv.mv_switch_mm((a),(b),(c)) # define activate_mm(x,y) alpha_mv.mv_activate_mm((x),(y)) @@ -229,6 +227,7 @@ ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) # endif #endif +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -242,12 +241,7 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) return 0; } -extern inline void -destroy_context(struct mm_struct *mm) -{ - /* Nothing to do. */ -} - +#define enter_lazy_tlb enter_lazy_tlb static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { @@ -255,6 +249,8 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) = ((unsigned long)mm->pgd - IDENT_ADDR) >> PAGE_SHIFT; } +#include + #ifdef __MMU_EXTERN_INLINE #undef __EXTERN_INLINE #undef __MMU_EXTERN_INLINE From patchwork Tue Sep 1 14:15:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748249 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 EE62114E5 for ; Tue, 1 Sep 2020 14:16:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B5AB6206EF for ; Tue, 1 Sep 2020 14:16:16 +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="T4A+W2yS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5AB6206EF 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 B5D23900003; Tue, 1 Sep 2020 10:16:15 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B0D18900002; Tue, 1 Sep 2020 10:16:15 -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 9FD75900003; Tue, 1 Sep 2020 10:16:15 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0083.hostedemail.com [216.40.44.83]) by kanga.kvack.org (Postfix) with ESMTP id 74FDC900002 for ; Tue, 1 Sep 2020 10:16:15 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 10FCD180AD807 for ; Tue, 1 Sep 2020 14:16:15 +0000 (UTC) X-FDA: 77214692310.29.shoe24_020678f27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 4C10018085D18 for ; Tue, 1 Sep 2020 14:16:03 +0000 (UTC) X-Spam-Summary: 1,0,0,f2a46d2345e37e30,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:3354:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:5007:6261:6653:7514:7903:9413:10004:11026:11232:11473:11657:11658:11914:12043:12050:12109:12296:12297:12438:12517:12519:12555:12895:12986:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21611:21627:21666:21990:30054:30075,0,RBL:209.85.210.193:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y8kniud5jb5k3rr9t58w1dw16btoct3idiajqtuppn7mdij9uhbtzciggeac3.rjp3759g4hna768xdzzmzefixpwfta8wuazb4tkkmf1ej3dh5sgtnxm8j4bgu45.h-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:26,LUA_SUMMARY:none X-HE-Tag: shoe24_020678f27098 X-Filterd-Recvd-Size: 5536 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:00 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id u128so860100pfb.6 for ; Tue, 01 Sep 2020 07:16:00 -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=xhdYKbDeI//C8isyTeQG6V0bhJKWBijBvpr1V+gnGEs=; b=T4A+W2yS6M5KQnbIW9fn7O3Z6p924HgMcAZBjnTcSLjeYEM2j7i/Q+gVdvgLlbx/Wr 4YVEKAwqatc9fn619WYBKrZzsiY/FPP3CKmmOSV6pRdWWoXCJqKVxKsnY1e3ZdiLnhMu K2WcQ9fh7POdOAW80IZXpBXTDJlaBHagPqVvbCYzlx+yMxtyzKwvl1fNG5rMazAdAfO5 orQ6MJDdjLIpPRrMM/mwdJM1HYWX1aB6rVs/OupzKnoQzBYUTb78Lfv4vWvQdSVPg3f0 jrpCAVBdpVqD+xODHrRTY2EC9Wh1ISt4tbvBbfVfBCy6QRabIU+JXYWatUpMvsW6kJbZ Ws7A== 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=xhdYKbDeI//C8isyTeQG6V0bhJKWBijBvpr1V+gnGEs=; b=EMw9Fvwd1xBbGCmnb484SiB/hwXoEoeXza0Ts2h8flOJZ/NZdGnmFoT+hy034QJr6x egjMgN5VIogNtz0TcyWpDqjT1ITyTPPfoel56kQyUlDy8KbHfxIhevOsWW6fQmX+iKJu YJzyW1O2rEaPtbchZKWLucywh43opsHmR9CVUHMHm3CFsF+U6F8jm+EYjELA995xgx58 JNXr1JjjvDiK4xHxP37GZu/tr3b6reJUcT4MB42xD3OG5q3AGv8thhLiuXtup5aWOBCa FWjkod7WS+X9ZR8oPysyO5pGaQNNpXY5+TrrN1hgSlDPNocyBpbctOW2UsNi+7BQVKp7 Cjsg== X-Gm-Message-State: AOAM530auloCPnBW1mNI9Qc4LIn6tapEPpMF7Qi2NBRHRostJMLd2a/N xp1e+mdkMxuG6nzdrU3GQAr+/74RIY4= X-Google-Smtp-Source: ABdhPJyKaGdo4eiu4sBDOVDt2zOUFHP2Y2dgCjCgoPnDlnvF1oh4LLAgz1Slfa92Cw8toERGdtmjmQ== X-Received: by 2002:a63:4923:: with SMTP id w35mr1641283pga.368.1598969760130; Tue, 01 Sep 2020 07:16:00 -0700 (PDT) Received: from bobo.ibm.com ([203.185.249.227]) by smtp.gmail.com with ESMTPSA id w9sm2212816pgg.76.2020.09.01.07.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:15:59 -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 , Vineet Gupta , linux-snps-arc@lists.infradead.org Subject: [PATCH v3 03/23] arc: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:19 +1000 Message-Id: <20200901141539.1757549-4-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: 4C10018085D18 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: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Nicholas Piggin Acked-by: Vineet Gupta #arch/arc --- Please ack or nack if you object to this being mered via Arnd's tree. arch/arc/include/asm/mmu_context.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arc/include/asm/mmu_context.h b/arch/arc/include/asm/mmu_context.h index 3a5e6a5b9ed6..df164066e172 100644 --- a/arch/arc/include/asm/mmu_context.h +++ b/arch/arc/include/asm/mmu_context.h @@ -102,6 +102,7 @@ static inline void get_new_mmu_context(struct mm_struct *mm) * Initialize the context related info for a new mm_struct * instance. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -113,6 +114,7 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) return 0; } +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { unsigned long flags; @@ -153,13 +155,13 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, } /* - * Called at the time of execve() to get a new ASID - * Note the subtlety here: get_new_mmu_context() behaves differently here - * vs. in switch_mm(). Here it always returns a new ASID, because mm has - * an unallocated "initial" value, while in latter, it moves to a new ASID, - * only if it was unallocated + * activate_mm defaults (in asm-generic) to switch_mm and is called at the + * time of execve() to get a new ASID Note the subtlety here: + * get_new_mmu_context() behaves differently here vs. in switch_mm(). Here + * it always returns a new ASID, because mm has an unallocated "initial" + * value, while in latter, it moves to a new ASID, only if it was + * unallocated */ -#define activate_mm(prev, next) switch_mm(prev, next, NULL) /* it seemed that deactivate_mm( ) is a reasonable place to do book-keeping * for retiring-mm. However destroy_context( ) still needs to do that because @@ -168,8 +170,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, * there is a good chance that task gets sched-out/in, making it's ASID valid * again (this teased me for a whole day). */ -#define deactivate_mm(tsk, mm) do { } while (0) -#define enter_lazy_tlb(mm, tsk) +#include #endif /* __ASM_ARC_MMU_CONTEXT_H */ From patchwork Tue Sep 1 14:15:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748251 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 C773E138A for ; Tue, 1 Sep 2020 14:16:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8AEEF206CD for ; Tue, 1 Sep 2020 14:16:19 +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="Rb4ZX3as" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AEEF206CD 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 A7318900004; Tue, 1 Sep 2020 10:16:17 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A230F900002; Tue, 1 Sep 2020 10:16: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 91273900004; Tue, 1 Sep 2020 10:16:17 -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 73EC2900002 for ; Tue, 1 Sep 2020 10:16:17 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 36E2112C9 for ; Tue, 1 Sep 2020 14:16:17 +0000 (UTC) X-FDA: 77214692394.22.coat20_5810ef027098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id D76A018038C50 for ; Tue, 1 Sep 2020 14:16:10 +0000 (UTC) X-Spam-Summary: 1,0,0,dc97c6e74aad9a23,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:2693:3138:3139:3140:3141:3142:3353:3865:3867:3871:3873:4250:5007:6119:6261:6653:7514:7903:9413:9592:10004:11026:11232:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13894:13972:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30034:30054,0,RBL:209.85.216.68:@gmail.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100;04yga1k4xsrbdyi8x5c91upamautsoc4frdze4wjpnfu3pmigtqqr6g4czg37b8.8ais3kai81zmafm3u1s7gy1dmaius48j737h3tpax56fwtgcm35qedxsyku1h65.o-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:25,LUA_SUMMARY:none X-HE-Tag: coat20_5810ef027098 X-Filterd-Recvd-Size: 4927 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:05 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id b16so479170pjp.0 for ; Tue, 01 Sep 2020 07:16:05 -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=cqrgjgkwQOLPKBKvSr9gJrTOHEBDRQ8iqEq+YmYLPME=; b=Rb4ZX3asfwOJg4osK9f8BVD5bqX4bXtB9PhlYShZ/rsHMNJrSi7aW2zu7V3aeOSrJm L2LbvTedaoP87o2rocKNCt0/zGqCSl8eyW69u7bu2hDSiC9BpP5v7sW099OXDjyBdWWo 3Dg8HtuVdHhv4tO9TNdQ9p7FPLbxF6eKt5KtLUEe04377yijdLe6uEt3jFztB5iQJPK4 PJPMg87eK/AzEN4h8pHk8gZr/ac06hwgAeEbRZnmntpetDHiMSbEIcMeq5Hkn+vjZ4Lw qOoGZEdbd+2uUXFX4RlrE4zjEFdoITSaRAxqiXKYn3VD6kqvA2fIF/XqYX5/ac3wnZzd 7oQA== 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=cqrgjgkwQOLPKBKvSr9gJrTOHEBDRQ8iqEq+YmYLPME=; b=DKL+utP4071076CQutMQvW54lu2SiOxn+CnmRxhQXhV9WUl1sSlnmdlko92UPGWizh XQnl2MmnygnMA+5opXHF6cBJNu9WncRlc/tadr77616moHcQ7LlVU/SJRI5HkxrChHNm GwtF51hClzNRyNABjb7ZVQzaaLVtFybRmTgpZuE+EiCIRMVOt24VGfqIFWEu+boC2JY/ MioxeJoYLEttSI6VAq+SRj2rP/jMfN6zj1QgyATCFnXjL6t0tyK4CuKiTJ5jhOAMoYDo Q3dGn0FftYOgBaiDPyvDs4H4O7azRA58gPCN1g95vfwpdSy2MD+LtlpPNDhwr6hOfDng ePKw== X-Gm-Message-State: AOAM532/nnlLExd9XkorHdlcuSgQYCwu4nck8wO/szY464bst/SrtHL5 IgtCFmREJ31OpT+3MM1OOP0= X-Google-Smtp-Source: ABdhPJzlSzEv9CsAxwBinDg5rdhmsaopGLA6RpgIsGSWM/G1oTk+NhLtBCJS2/eCVKKOb3FB1mzI9A== X-Received: by 2002:a17:90a:4e42:: with SMTP id t2mr1758800pjl.121.1598969763778; Tue, 01 Sep 2020 07:16:03 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:03 -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 , Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 04/23] arm: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:20 +1000 Message-Id: <20200901141539.1757549-5-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: D76A018038C50 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: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Nicholas Piggin --- Please ack or nack if you object to this being mered via Arnd's tree. arch/arm/include/asm/mmu_context.h | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index f99ed524fe41..84e58956fcab 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h @@ -26,6 +26,8 @@ void __check_vmalloc_seq(struct mm_struct *mm); #ifdef CONFIG_CPU_HAS_ASID void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk); + +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -92,32 +94,10 @@ static inline void finish_arch_post_lock_switch(void) #endif /* CONFIG_MMU */ -static inline int -init_new_context(struct task_struct *tsk, struct mm_struct *mm) -{ - return 0; -} - - #endif /* CONFIG_CPU_HAS_ASID */ -#define destroy_context(mm) do { } while(0) #define activate_mm(prev,next) switch_mm(prev, next, NULL) -/* - * This is called when "tsk" is about to enter lazy TLB mode. - * - * mm: describes the currently active mm context - * tsk: task which is entering lazy tlb - * cpu: cpu number which is entering lazy tlb - * - * tsk->mm will be NULL - */ -static inline void -enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* * This is the actual mm switch as far as the scheduler * is concerned. No registers are touched. We avoid @@ -149,6 +129,6 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, #endif } -#define deactivate_mm(tsk,mm) do { } while (0) +#include #endif From patchwork Tue Sep 1 14:15:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748289 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 16970138A for ; Tue, 1 Sep 2020 14:17:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D6DF4206CD for ; Tue, 1 Sep 2020 14:17:36 +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="VtIsRogd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6DF4206CD 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 B5BC9900015; Tue, 1 Sep 2020 10:17:29 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AE2DB90000D; Tue, 1 Sep 2020 10:17:29 -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 9AD72900015; Tue, 1 Sep 2020 10:17:29 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id 7DB6F90000D for ; Tue, 1 Sep 2020 10:17:29 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 3A6D7181AEF21 for ; Tue, 1 Sep 2020 14:17:29 +0000 (UTC) X-FDA: 77214695418.05.trip33_040058d27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 9FCB91826B6B5 for ; Tue, 1 Sep 2020 14:17:23 +0000 (UTC) X-Spam-Summary: 1,0,0,b0eff19c2f212fc7,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:2693:2890:3138:3139:3140:3141:3142:3352:3872:3873:3876:4042:4250:5007:6261:6653:7514:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21450:21451:21611:21627:21666:21740:30001:30054,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yfdicgf4ac1g7f3j4et9erw5qttop1aebo746gt41d7ndxj45fos7xthf51mw.hh546ri3atkgg1jb5xgi1b7bzu91ennd8ak5hshnwwbmc8zcuuaxtj5sh1kfnzq.g-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: trip33_040058d27098 X-Filterd-Recvd-Size: 4626 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:09 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id y6so605149plt.3 for ; Tue, 01 Sep 2020 07:16:08 -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=u6Dup+ArfJ1cGNtaPdNiGwIK5zxtRVAfzzcCu/uBGUo=; b=VtIsRogdzz/B4ItJXOYG0iCNVWxRGKUQreNEa3CcflLUskSxARaPoPP2PSbjw18Tkb 9uMw5aOoeqEMnAN3muUKRO6Ufe6NtCgF9KWdYlfKVTAaJYX3WG0tVcL8VEXZBJP7e8Wx Ijz5TwF8bXrHhFkR5Qm2WLFbiR7Z85F7SZhZsztZ+UQlr0YgXcPMxAvDolgs8Q/kUiqq V9Z4zuaJ/2rRZ5wE1tRYEHRvc2Xb+4vU2izP65TQEQK56/rBGIFIIM1YVFkCiKR88pGM T2ZAp2ajUmITAdEl2d+dZGes0KnwDskLcy5mLbYLM6tuSjEg52KFVvelL7TzEFUOvkrM 5ryg== 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=u6Dup+ArfJ1cGNtaPdNiGwIK5zxtRVAfzzcCu/uBGUo=; b=MtRc22YRMXM5DZgyMxen72ps8P9EkLuBZZJYB6XLIVSBVYUZcIWdeKtJan0m6MdYa+ TeFIgYssg/JewJtFGW5vEMt9a69KgFJ0bsdIZDh5RQrd8NJlj5ZbgSmcAefAu3JE/UCX +gSgsjkU5knrCAXLilC/JOVDo/UTAvHqEYZD/jAambEuqpaVQ7GplvlJ1397j5/8CDF+ d3qNxNv45wl6fwycgtHeUeDDDwPx+eyykwfc6BSMfo9cdh1TAuFUONTPK7dY1cd60vJF s3psUVPXvjdNti4xpMUG2nyp+4jNGXR4+dDYj49ESq4oY2uNulQeLq6m475ANGuv+odR Vs8g== X-Gm-Message-State: AOAM530rolpA3yfArO0IKDeyuQInj4vN4sq6DB2VYuZ+2GO2zz0HPEsQ mRxpR5lNuTn3eT5OBmMVlAH/uR5R+0o= X-Google-Smtp-Source: ABdhPJyAinElz1sorI3kdkH6fqTFkR16OPVqZrPUyKnI8QoHoDqnjFXfTtMHJRA7puFOHsWIzJotcg== X-Received: by 2002:a17:90a:c255:: with SMTP id d21mr1859599pjx.212.1598969768315; Tue, 01 Sep 2020 07:16:08 -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.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:07 -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 , Will Deacon , linux-arm-kernel@lists.infradead.org, Catalin Marinas Subject: [PATCH v3 05/23] arm64: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:21 +1000 Message-Id: <20200901141539.1757549-6-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: 9FCB91826B6B5 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: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Acked-by: Catalin Marinas Signed-off-by: Nicholas Piggin --- arch/arm64/include/asm/mmu_context.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index f2d7537d6f83..fe2862aa1dad 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h @@ -174,7 +174,6 @@ static inline void cpu_replace_ttbr1(pgd_t *pgdp) * Setting a reserved TTBR0 or EPD0 would work, but it all gets ugly when you * take CPU migration into account. */ -#define destroy_context(mm) do { } while(0) void check_and_switch_context(struct mm_struct *mm); #define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; }) @@ -202,6 +201,7 @@ static inline void update_saved_ttbr0(struct task_struct *tsk, } #endif +#define enter_lazy_tlb enter_lazy_tlb static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { @@ -242,12 +242,11 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, update_saved_ttbr0(tsk, next); } -#define deactivate_mm(tsk,mm) do { } while (0) -#define activate_mm(prev,next) switch_mm(prev, next, current) - void verify_cpu_asid_bits(void); void post_ttbr_update_workaround(void); +#include + #endif /* !__ASSEMBLY__ */ #endif /* !__ASM_MMU_CONTEXT_H */ From patchwork Tue Sep 1 14:15:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748279 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 7F72614E5 for ; Tue, 1 Sep 2020 14:17:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4AA07206EB for ; Tue, 1 Sep 2020 14:17:23 +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="q/L+aoGR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AA07206EB 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 E8F34900002; Tue, 1 Sep 2020 10:17:19 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E69C590000D; Tue, 1 Sep 2020 10:17:19 -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 CBB5B900002; Tue, 1 Sep 2020 10:17:19 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id 8DCFA90000D for ; Tue, 1 Sep 2020 10:17:19 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 45FEF181AEF1F for ; Tue, 1 Sep 2020 14:17:19 +0000 (UTC) X-FDA: 77214694998.17.gate18_0b0eefe27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 9574C1802659B for ; Tue, 1 Sep 2020 14:16:28 +0000 (UTC) X-Spam-Summary: 1,0,0,6eed6046bce4bde6,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:3352:3876:3877:4321:5007:6114:6261:6642:6653:7514:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:30054,0,RBL:209.85.214.194:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yriws6ifiaoyqky639z8sfeuqnzycjk5dxm5wtzms7xejtorybp74i9cyeg3d.uf3siiy3z1dhym7n63a7k8rbducbtp373o6qmfcfj343cpe3ygkru7nb74n8rue.a-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:26,LUA_SUMMARY:none X-HE-Tag: gate18_0b0eefe27098 X-Filterd-Recvd-Size: 4130 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:12 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id c15so604088plq.4 for ; Tue, 01 Sep 2020 07:16:12 -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=+cGML8t0IrnDZlw59Ro+Eu895qkrrnKIgTl4NIzGBZ4=; b=q/L+aoGRQrWIn3GYU9nuKy9oC2d5bDbHhhRro1r90MDLWrwe1RmfZXOp6jivtRHnQt Pms8OjK6Bmlq936jr8qBCqmyJqZgIXsMxB9QH0VtREPg1O3kn2ActM2ghM7PVDI9Keqh 2eyD0PfIPWXBmuEZ4YIF0wHZjh0znY4x9t6701ZagEU8SZNQSxKIwHogz2hwbcIS9lMm Ifw2lpDuMXSebyFfdrFEpDJ5R854gI85YjQrxyI+gAzVGFlXHYpO3KEEblQUz+KvX/kZ k9vEfLpBosQBSMti5oQIbOSsUuLEeeEvjKD08vTZAWCk/yEfqyfoiLt3a26sK2zzlXbd iwpw== 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=+cGML8t0IrnDZlw59Ro+Eu895qkrrnKIgTl4NIzGBZ4=; b=htzZS+z5xUt7/Ww3+F9whjpOxmSx5keFJDXsQXjxwALnd5Rwzuft7ZA7xhvC7qCkQO 03Ky6R1NOSjtbvyo2lAEZlxi5jPQVJbE2KkWVc4UF1a5SQRf54PwlMPfclJEP+WEdHib OMrCPHXGMCSkHGT+glMSUNpmWfm9sxQPZiGnn7gdgLlXXohdUW3dahhJ1sR8U6MjFTco /cWLy3SRy0KA8OQ/fD4UpCotYWP1uXg7bmg6K1pKstygCykAXw/HZZOcaug+NEp20aVP xJqhbnHs0Xae1Wt0pRnwAJ41gvWNwzh0ct7XusbNjTJQh+qvvjRkkP7dfoC3dI7lh1Gx 65gg== X-Gm-Message-State: AOAM531UvXi4GiZVbCFrX3crPFpShGahgMZl7RNmZvTaIaHtOjULAr6t uDiwA4z7Y8t1yKWnZz26Cn8= X-Google-Smtp-Source: ABdhPJylqMXQGKTlmnPfp26Mn7dao1YgWG7htPyEpONiO22Ggga6Tlf4bzQNnEnK7C93V4kGf7L02Q== X-Received: by 2002:a17:902:323:: with SMTP id 32mr1579212pld.59.1598969772004; Tue, 01 Sep 2020 07:16:12 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:11 -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 , linux-csky@vger.kernel.org, Guo Ren Subject: [PATCH v3 06/23] csky: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:22 +1000 Message-Id: <20200901141539.1757549-7-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: 9574C1802659B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: linux-csky@vger.kernel.org Acked-by: Guo Ren Signed-off-by: Nicholas Piggin --- arch/csky/include/asm/mmu_context.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/csky/include/asm/mmu_context.h b/arch/csky/include/asm/mmu_context.h index abdf1f1cb6ec..b227d29393a8 100644 --- a/arch/csky/include/asm/mmu_context.h +++ b/arch/csky/include/asm/mmu_context.h @@ -24,11 +24,6 @@ #define cpu_asid(mm) (atomic64_read(&mm->context.asid) & ASID_MASK) #define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.asid, 0); 0; }) -#define activate_mm(prev,next) switch_mm(prev, next, current) - -#define destroy_context(mm) do {} while (0) -#define enter_lazy_tlb(mm, tsk) do {} while (0) -#define deactivate_mm(tsk, mm) do {} while (0) void check_and_switch_context(struct mm_struct *mm, unsigned int cpu); @@ -46,4 +41,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, flush_icache_deferred(next); } + +#include + #endif /* __ASM_CSKY_MMU_CONTEXT_H */ From patchwork Tue Sep 1 14:15:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748261 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 6D29114E5 for ; Tue, 1 Sep 2020 14:16:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 34BCD206EF for ; Tue, 1 Sep 2020 14:16:39 +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="jY0Xaw9J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34BCD206EF 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 47ED5900006; Tue, 1 Sep 2020 10:16:38 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 45459900002; Tue, 1 Sep 2020 10:16:38 -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 343BD900006; Tue, 1 Sep 2020 10:16:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0065.hostedemail.com [216.40.44.65]) by kanga.kvack.org (Postfix) with ESMTP id 1E516900002 for ; Tue, 1 Sep 2020 10:16:38 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id AC3A73635 for ; Tue, 1 Sep 2020 14:16:37 +0000 (UTC) X-FDA: 77214693234.03.look87_130497e27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id F1BF912B5E for ; Tue, 1 Sep 2020 14:16:33 +0000 (UTC) X-Spam-Summary: 40,2.5,0,2fd285fca382781c,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:3867:3868:3871:4250:4321:5007:6119:6261:6653:7514:7875:7903:9413:9592:10011:10241:11026:11657:11658:11914:12043:12109:12296:12297:12517:12519:12555:12895:12986:13141:13230:13255:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30075,0,RBL:209.85.214.194:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yrrjyyep8x35zadpoginqrmd61dopoitpz3q1gor3rhpc1d4e88nuik7d1cph.7kp4ygk6riinq7r6djaee6h36hcxanjyoutp57y3gwa45u3p5af3r666oiwyjwo.r-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:1:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: look87_130497e27098 X-Filterd-Recvd-Size: 5115 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:16 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id y6so593490plk.10 for ; Tue, 01 Sep 2020 07:16:16 -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=eCO6eQrXV/q62wlJ5dCHYkGXNXvcNXkjUmp1GwIXZy0=; b=jY0Xaw9JClMjKguKr4toi3p2h52MIKL8klJRnYZgFU374fx+7NSFwezgNkVvksRVOy DYkQbHh7OHKuhcayw9z3bY5GcYg3oGuCrZLLRFoB/4MZq3ZzD4tuKb048U8PY8HJPD3G WkGilznMqAHXKZWW5arP54iwQAqH+klI5v08g+l3XG4qDb39FE7bdubGz787QJKoEjSu Q0hRLmVw+tp2JsWReiv9abKKc6uOy/oAhdh1NYAXW+W8LPsIa5SNCDXVCxlP54ntb8qu cXcSVccpvMjq65/ErNO7QIUO9gnI+msCcv1artDIopurRB/jlS5gQB4fO6Dxm7udd3PF yOtw== 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=eCO6eQrXV/q62wlJ5dCHYkGXNXvcNXkjUmp1GwIXZy0=; b=Uw7gXA+jsvCZy2UmO6npDpasSK3c08CuaEC3KxkPBdiwcIbIiIckT4IfqP8LQrFsZm 9VZbAEv6w6Re3l3l2cBbcwvoyH08vqaomF1P8Wj017OeRnuRlEHtSL8oyjU2WvU4ZFfr cFwFhhJJbNqIoi0NivlhKT2zp9w9sEHvNbBI7McTx44ypnQIfKjL1a6jcy2joP892tZK 0qiiO2D8sbR92jDpNYd68uZ60bmfskXYcPWnRhDrDRIXrcXQdHbMBsdxnPcxysgE/Hsc U+mutz31T4Vuw48uOJS/3o8/wxN/MXQwhwzGJFUPeBcYjDf5I0Gg+I1+EPw8tnDeJOkW vXzA== X-Gm-Message-State: AOAM5336QJmAcpYCWG7FhIHoS5JDchtppiI0cOmlKhQxR/0OnIZipGBi pfqfU0gBBpXl/GBw9nzGjY8= X-Google-Smtp-Source: ABdhPJzDhqPmNMs02kXqTuJ5TNQPQLwR0ghPHSND126V9lWl/ABU+Fbr19n8k+R38sdwk7u1/fCSsQ== X-Received: by 2002:a17:90b:1b45:: with SMTP id nv5mr1839791pjb.35.1598969775636; Tue, 01 Sep 2020 07:16:15 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:15 -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 , linux-hexagon@vger.kernel.org, Brian Cain Subject: [PATCH v3 07/23] hexagon: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:23 +1000 Message-Id: <20200901141539.1757549-8-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: F1BF912B5E X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: linux-hexagon@vger.kernel.org Acked-by: Brian Cain Signed-off-by: Nicholas Piggin --- arch/hexagon/include/asm/mmu_context.h | 33 ++++---------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/arch/hexagon/include/asm/mmu_context.h b/arch/hexagon/include/asm/mmu_context.h index cdc4adc0300a..81947764c47d 100644 --- a/arch/hexagon/include/asm/mmu_context.h +++ b/arch/hexagon/include/asm/mmu_context.h @@ -15,39 +15,13 @@ #include #include -static inline void destroy_context(struct mm_struct *mm) -{ -} - /* * VM port hides all TLB management, so "lazy TLB" isn't very * meaningful. Even for ports to architectures with visble TLBs, * this is almost invariably a null function. + * + * mm->context is set up by pgd_alloc, so no init_new_context required. */ -static inline void enter_lazy_tlb(struct mm_struct *mm, - struct task_struct *tsk) -{ -} - -/* - * Architecture-specific actions, if any, for memory map deactivation. - */ -static inline void deactivate_mm(struct task_struct *tsk, - struct mm_struct *mm) -{ -} - -/** - * init_new_context - initialize context related info for new mm_struct instance - * @tsk: pointer to a task struct - * @mm: pointer to a new mm struct - */ -static inline int init_new_context(struct task_struct *tsk, - struct mm_struct *mm) -{ - /* mm->context is set up by pgd_alloc */ - return 0; -} /* * Switch active mm context @@ -74,6 +48,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, /* * Activate new memory map for task */ +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { unsigned long flags; @@ -86,4 +61,6 @@ static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) /* Generic hooks for arch_dup_mmap and arch_exit_mmap */ #include +#include + #endif From patchwork Tue Sep 1 14:15:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748269 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 856EC14E5 for ; Tue, 1 Sep 2020 14:17:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4E982206EF for ; Tue, 1 Sep 2020 14:17:01 +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="Os1gKBY8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E982206EF 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 67BF590000B; Tue, 1 Sep 2020 10:17:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6507D900002; Tue, 1 Sep 2020 10:17:00 -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 55E3590000B; Tue, 1 Sep 2020 10:17:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0181.hostedemail.com [216.40.44.181]) by kanga.kvack.org (Postfix) with ESMTP id 06A7B900002 for ; Tue, 1 Sep 2020 10:17:00 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B2EE63636 for ; Tue, 1 Sep 2020 14:16:59 +0000 (UTC) X-FDA: 77214694158.30.pies67_37062bc27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 3CEEF180B45BA for ; Tue, 1 Sep 2020 14:16:46 +0000 (UTC) X-Spam-Summary: 1,0,0,ade79e9fd1fc9546,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:3867:3871:3873:4043:4250:5007:6117:6119:6261:6653:7514:7903:9413:9592:10004:11026:11232: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:30003:30034:30054:30064,0,RBL:209.85.215.196:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yrqk1tg8w48b6njst18oasm4kytocqqbywfsbki3tjbisu3k88hffgiuoocg9.i3o1euuwk83q1oi8x8eyghyhqwrt1c7otgibbzed6zs1wq3wzo5xidnupj9dd1p.a-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:25,LUA_SUMMARY:none X-HE-Tag: pies67_37062bc27098 X-Filterd-Recvd-Size: 5297 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:20 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id i10so764036pgk.1 for ; Tue, 01 Sep 2020 07:16: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=FmD6S4VqHjRXcx/+V5HKXlkHBAdRWWNIZL1IhjQV5u0=; b=Os1gKBY83fa3BnKaf2/Fgk8+qHXbsizFP4X+5zkibqdpKESKqO2CxfOAmi3rzOYHE9 Vy0JGM/Mv/4WaF4mgO5D+ynpZZDqC/uI150cLaBW+aebDIZjOIRcxe8TrmaOByhj/lPv cMeOj+VRtfOgnNnztpMePFyY9BNSXZdESlVNAoSuMN2AS20JXT3BgCLrKKPueKJ97z/g sQER9bZ7UXcV2ZWFpj2aEoRBqVY9zK8yM+hswomMc3+qTQ/8XPrNIo7EjbQbceHHHw/O AtYWM+wBVuhixvDMKauTGbbMsdCCwCbKnMvXUL6gwdvjFBQqA2nPzs9P4KzmQUXW5Mfb aErQ== 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=FmD6S4VqHjRXcx/+V5HKXlkHBAdRWWNIZL1IhjQV5u0=; b=YTzyxxyz8+TKfkoxNlbEUF76klvfoKybscF2TrNX6LZMwWHaambxuiNJGoDLyRmSM6 8C0fsDNm8/l4J0Ti3BttudYF6iRD/WRE9kP+qjZwVvaOZOFUsEFfK3SXN9/GJKm3yj8u j8KBWWXrepRYFNOXNMJ2AL963niXFtX2SnTJxgdzFa1vzmfjsG6fDgcdGzZhzZ7g3zm9 8LrxaS6hEjAlsa7LZza+Jx+UbkTjn0J5ozrk2O489m6CyHP6ARmKR0Uysv2oDjMXMDsl Lthcr5irt5arFYjcTzfE9WKzImumw+IGgNRNPWnWjdXBukHB0fnXjk2goB2XYffjYh3w j+Xg== X-Gm-Message-State: AOAM533ME3gn0C1byJPa4UKqLQIKbWUrcu87gRFOjWVsRGREHtFBB9w8 IrVfg8Sm2GuTPTIuL2y6NH3lDHsNWPw= X-Google-Smtp-Source: ABdhPJw2zhJr1rT1/jQq//SJBkZbAVhJfAAF70Rwlclj/9VkgPdZhOkJ0VXXHUfZHxB08QZ5FQ4xcw== X-Received: by 2002:a62:1b4a:: with SMTP id b71mr2067784pfb.235.1598969779641; Tue, 01 Sep 2020 07:16:19 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16: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 , Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org Subject: [PATCH v3 08/23] ia64: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:24 +1000 Message-Id: <20200901141539.1757549-9-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: 3CEEF180B45BA X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Signed-off-by: Nicholas Piggin --- Please ack or nack if you object to this being mered via Arnd's tree. arch/ia64/include/asm/mmu_context.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/arch/ia64/include/asm/mmu_context.h b/arch/ia64/include/asm/mmu_context.h index 2da0e2eb036b..87a0d5bc11ef 100644 --- a/arch/ia64/include/asm/mmu_context.h +++ b/arch/ia64/include/asm/mmu_context.h @@ -49,11 +49,6 @@ DECLARE_PER_CPU(u8, ia64_need_tlb_flush); extern void mmu_context_init (void); extern void wrap_mmu_context (struct mm_struct *mm); -static inline void -enter_lazy_tlb (struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* * When the context counter wraps around all TLBs need to be flushed because * an old context number might have been reused. This is signalled by the @@ -116,6 +111,7 @@ get_mmu_context (struct mm_struct *mm) * Initialize context number to some sane value. MM is guaranteed to be a * brand-new address-space, so no TLB flushing is needed, ever. */ +#define init_new_context init_new_context static inline int init_new_context (struct task_struct *p, struct mm_struct *mm) { @@ -123,12 +119,6 @@ init_new_context (struct task_struct *p, struct mm_struct *mm) return 0; } -static inline void -destroy_context (struct mm_struct *mm) -{ - /* Nothing to do. */ -} - static inline void reload_context (nv_mm_context_t context) { @@ -178,11 +168,10 @@ activate_context (struct mm_struct *mm) } while (unlikely(context != mm->context)); } -#define deactivate_mm(tsk,mm) do { } while (0) - /* * Switch from address space PREV to address space NEXT. */ +#define activate_mm activate_mm static inline void activate_mm (struct mm_struct *prev, struct mm_struct *next) { @@ -196,5 +185,7 @@ activate_mm (struct mm_struct *prev, struct mm_struct *next) #define switch_mm(prev_mm,next_mm,next_task) activate_mm(prev_mm, next_mm) +#include + # endif /* ! __ASSEMBLY__ */ #endif /* _ASM_IA64_MMU_CONTEXT_H */ From patchwork Tue Sep 1 14:15:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748263 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 A99CC138A for ; Tue, 1 Sep 2020 14:16:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 67F3C206EF for ; Tue, 1 Sep 2020 14:16:41 +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="EcXZ93WE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67F3C206EF 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 17190900007; Tue, 1 Sep 2020 10:16:39 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 14D53900002; Tue, 1 Sep 2020 10:16:39 -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 E90EC900007; Tue, 1 Sep 2020 10:16:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0127.hostedemail.com [216.40.44.127]) by kanga.kvack.org (Postfix) with ESMTP id C77C4900002 for ; Tue, 1 Sep 2020 10:16:38 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 80335181AEF1E for ; Tue, 1 Sep 2020 14:16:38 +0000 (UTC) X-FDA: 77214693276.07.patch08_2c0249727098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id E539A1803FD61 for ; Tue, 1 Sep 2020 14:16:28 +0000 (UTC) X-Spam-Summary: 1,0,0,93c08f8aced1d98b,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:966:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1543:1711:1730:1747:1777:1792:1978:1981:2194:2196:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3355:3865:3867:4117:4321:4385:4605: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:30003:30054,0,RBL:209.85.216.67:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04ygsntztygjh78actiy4ukc71yq6ypraord6ab7f4p8hotrw5m9mwrsqknoju7.cjiq758qq8rbg77phmb3tr1p5mo1j3aye68jxri7dfbogq4pcr6hs7n4ocsun77.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:neutral,Custom_rules:0:0:0,LFtime:29,LUA_SUMMARY:none X-HE-Tag: patch08_2c0249727098 X-Filterd-Recvd-Size: 6880 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:24 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id n3so700772pjq.1 for ; Tue, 01 Sep 2020 07:16:24 -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=zvhzgkhZO1kqoSQJjNzOqYAXx9WauCb1i9WMlKWlKe8=; b=EcXZ93WE2aWXzV48ZN7Escs+fQSd6CU/Wkoa2qVWkkzksQSYNoBrygJbDdbC3+0mFm DOos39pn1mYuslZY1BZQjmDfM60TESM9RQgwh98KFByz9InAAzqdWYXR13ILXuM8fxne BuOHcaAbNCCzX1jk1OSUa+t4A5smR68EiGTfYXbiQ5al2NSyNPSGnu1eHlPGGyqcr9Tn YutzC7BU5MjT25I8KkGsYu3ibgteh5r4Bina0QoZcuJqZ8N+oET50Ai109ekvayNy3Mk kr4RrCSf1K40XFImfSg/4yE+MC+pGZk9lCy2G/2ZMn57DP93xPu+ku/pZpZ1LCEZyIJr W29A== 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=zvhzgkhZO1kqoSQJjNzOqYAXx9WauCb1i9WMlKWlKe8=; b=TXTBpYich4gU+P2zJs/3PsuF/gc6wpEemVgNoJcQe9fPKonD1SZgxylSJ+4WDhotBC kYAgZ6aph6K4GvuTi4z6IDe1nHEUE3IlABNbUjpWqpRo7HBjFUj82yT+4eoXu4wvjy4t I/gkC2XjLVR8U4h+4YtVwZ/21Y5VikTBI/nRCh0GyfguDI21ygRH+0qOpetMCB0akPsu dteK+8PUtwAWeTzsT1rN+6JymezF6iqYq3Uz/1ZxhD3Q6fWS0i5A5sax8Vq1rw0z+GQZ Zy9bVqf3vNUPM1OmqJwvzNwzWmvK4zL8YumgkXlP/K/eIi/EZef5vaPg1A0lixIY23GV p9zQ== X-Gm-Message-State: AOAM53009WxDD5JilZsoVBf6k6zZZImGQE55chWlCj1KBzfDFZldAgzi pPm8UrhLPUb+E4YM5Fh9TAs= X-Google-Smtp-Source: ABdhPJxsgG44bWbTWPiAdffudfRe3VG6mhCW8Ffx7ERK3273FVgKG+24orA/GkxdBRoUGT226R4DlQ== X-Received: by 2002:a17:902:b714:: with SMTP id d20mr1587452pls.103.1598969783374; Tue, 01 Sep 2020 07:16:23 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16: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 , linux-m68k@lists.linux-m68k.org, Geert Uytterhoeven Subject: [PATCH v3 09/23] m68k: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:25 +1000 Message-Id: <20200901141539.1757549-10-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: E539A1803FD61 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: linux-m68k@lists.linux-m68k.org Acked-by: Geert Uytterhoeven Signed-off-by: Nicholas Piggin --- arch/m68k/include/asm/mmu_context.h | 37 +++++++---------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/arch/m68k/include/asm/mmu_context.h b/arch/m68k/include/asm/mmu_context.h index 993fd7e37069..d12d8a9032f6 100644 --- a/arch/m68k/include/asm/mmu_context.h +++ b/arch/m68k/include/asm/mmu_context.h @@ -5,10 +5,6 @@ #include #include -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - #ifdef CONFIG_MMU #if defined(CONFIG_COLDFIRE) @@ -58,6 +54,7 @@ static inline void get_mmu_context(struct mm_struct *mm) /* * We're finished using the context for an address space. */ +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { if (mm->context != NO_CONTEXT) { @@ -83,6 +80,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, * 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 *active_mm, struct mm_struct *mm) { @@ -90,8 +88,6 @@ static inline void activate_mm(struct mm_struct *active_mm, set_context(mm->context, mm->pgd); } -#define deactivate_mm(tsk, mm) do { } while (0) - #define prepare_arch_switch(next) load_ksp_mmu(next) static inline void load_ksp_mmu(struct task_struct *task) @@ -176,6 +172,7 @@ extern unsigned long get_free_context(struct mm_struct *mm); extern void clear_context(unsigned long context); /* set the context for a new task to unmapped */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -210,8 +207,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, activate_context(tsk->mm); } -#define deactivate_mm(tsk, mm) do { } while (0) - +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) { @@ -224,6 +220,7 @@ static inline void activate_mm(struct mm_struct *prev_mm, #include #include +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -231,8 +228,6 @@ static inline int init_new_context(struct task_struct *tsk, return 0; } -#define destroy_context(mm) do { } while(0) - static inline void switch_mm_0230(struct mm_struct *mm) { unsigned long crp[2] = { @@ -300,8 +295,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, str } } -#define deactivate_mm(tsk,mm) do { } while (0) - +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) { @@ -315,24 +309,11 @@ static inline void activate_mm(struct mm_struct *prev_mm, #endif -#else /* !CONFIG_MMU */ - -static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) -{ - return 0; -} - - -static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) -{ -} +#include -#define destroy_context(mm) do { } while (0) -#define deactivate_mm(tsk,mm) do { } while (0) +#else /* !CONFIG_MMU */ -static inline void activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) -{ -} +#include #endif /* CONFIG_MMU */ #endif /* __M68K_MMU_CONTEXT_H */ From patchwork Tue Sep 1 14:15:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748265 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 2960B138A for ; Tue, 1 Sep 2020 14:16:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E4FC920FC3 for ; Tue, 1 Sep 2020 14:16:43 +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="n0MN0ALL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4FC920FC3 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 D86C0900008; Tue, 1 Sep 2020 10:16:40 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id CBB11900002; Tue, 1 Sep 2020 10:16:40 -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 BD2B1900008; Tue, 1 Sep 2020 10:16:40 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0049.hostedemail.com [216.40.44.49]) by kanga.kvack.org (Postfix) with ESMTP id 9BE18900002 for ; Tue, 1 Sep 2020 10:16:40 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 553872492 for ; Tue, 1 Sep 2020 14:16:40 +0000 (UTC) X-FDA: 77214693360.20.boot82_0d082dd27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id D910C180C0F89 for ; Tue, 1 Sep 2020 14:16:36 +0000 (UTC) X-Spam-Summary: 1,0,0,7de70f82a158edf5,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:2198:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3353:3865:3867:4321:4605:5007:6261:6653:7514:7903:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:12986:13255:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30003:30012:30054,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04ygkchnrim5rpkp8fsbw4ycx3wegopbauhefykh8bx13r3nrr1f64zha56p3zd.5yei5tgjfhuspusbpcgdj5akaxe5mwfpgj94trbx4sytqhgj8mz6mmuxedojnie.a-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:25,LUA_SUMMARY:none X-HE-Tag: boot82_0d082dd27098 X-Filterd-Recvd-Size: 5294 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:27 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id x18so599948pll.6 for ; Tue, 01 Sep 2020 07:16:27 -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=SbWs4d0PATtiP554ptetXUDc8hVLPW+9H9C3/1CDH4M=; b=n0MN0ALLct+cMJ4zTND1afwQYuKwbfUwiewSJrLiyVpFwL8+GJdrsZYlVd9vlXIQYU XTh6Wo3T3+vBUMHVs6idMkldSEmUWED3XGBLQuAS5beYBakuO/CEZWAXWrmlynZz/8iG snPoOWizNmkCw9Xy13QUUXZQFxBWqxFjZCbahHTCHINvBPVil8ID8kctveJmCeqw//tz OjOeKhR8WtmT959HwQLPl0XIwrkYYHftLeQReLB8NIBy8fPLPBqcXrBi2x2vO6TQI3Yi CHfxx1LogDrrjU02t0v5dhyC5w8BzVQbCV1+avHraMeDxs8TKpds3zkRpMNVpQ4PhEYm mf9w== 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=SbWs4d0PATtiP554ptetXUDc8hVLPW+9H9C3/1CDH4M=; b=IPWrq6Ph4THFb+Hdo5VJlBc9MigC2aZYha2dkcsO2z/b0QKCBxpeQoJXlU4+ZQPQjj xoOCiSKhsAIdy+LQsJ5hJ/Maxm/bDMYe4H53D38xe743o00JYhmOQV2osYmUBrYGAUv0 wLhlRoBuefY33NSO2A6GSpKAmbqEyP1bCDR48EXWtGHdMHbD92YFjM51rkrjDcVIrs/h NzNdoCeXq59TVjHP9YGlI7oyjY5Ovi2Qgm+x/jC7/EDHZNl9sjTc8MpheGQ6onJ5WDRC PBauyzhkwdX6yCri8T/k2Fu+a+NTSOOOtNOzP9pD4G9KTOxlukeu67W+kF4UwkxkwA62 Xqvg== X-Gm-Message-State: AOAM531Q6HT3cVNqTOMmaeOHfU8BmO+n3AERohqbCv740fiPLdX+kB6J u/bNtPdiQi9P9mOF28XQpQs= X-Google-Smtp-Source: ABdhPJxqvB1oc8rbYwj5XOvCl1XBMBM5W/etvhoWKaO9X3Q3hghYyipAdTeftKK9fXtdMtV6D0rnyQ== X-Received: by 2002:a17:902:8a8e:: with SMTP id p14mr1587551plo.42.1598969786813; Tue, 01 Sep 2020 07:16:26 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:26 -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 , Michal Simek Subject: [PATCH v3 10/23] microblaze: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:26 +1000 Message-Id: <20200901141539.1757549-11-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: D910C180C0F89 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: Wire asm-generic/mmu_context.h to provide generic empty hooks for arch code simplification. Acked-by: Michal Simek Signed-off-by: Nicholas Piggin --- arch/microblaze/include/asm/mmu_context_mm.h | 8 ++++---- arch/microblaze/include/asm/processor.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/microblaze/include/asm/mmu_context_mm.h b/arch/microblaze/include/asm/mmu_context_mm.h index a1c7dd48454c..c2c77f708455 100644 --- a/arch/microblaze/include/asm/mmu_context_mm.h +++ b/arch/microblaze/include/asm/mmu_context_mm.h @@ -33,10 +33,6 @@ to represent all kernel pages as shared among all contexts. */ -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - # define NO_CONTEXT 256 # define LAST_CONTEXT 255 # define FIRST_CONTEXT 1 @@ -105,6 +101,7 @@ static inline void get_mmu_context(struct mm_struct *mm) /* * We're finished using the context for an address space. */ +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { if (mm->context != NO_CONTEXT) { @@ -126,6 +123,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, * 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 *active_mm, struct mm_struct *mm) { @@ -136,5 +134,7 @@ static inline void activate_mm(struct mm_struct *active_mm, extern void mmu_context_init(void); +#include + # endif /* __KERNEL__ */ #endif /* _ASM_MICROBLAZE_MMU_CONTEXT_H */ diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index 1ff5a82b76b6..616211871a6e 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h @@ -122,9 +122,6 @@ unsigned long get_wchan(struct task_struct *p); # define KSTK_EIP(task) (task_pc(task)) # define KSTK_ESP(task) (task_sp(task)) -/* FIXME */ -# define deactivate_mm(tsk, mm) do { } while (0) - # define STACK_TOP TASK_SIZE # define STACK_TOP_MAX STACK_TOP From patchwork Tue Sep 1 14:15:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748287 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 7BFEA138A for ; Tue, 1 Sep 2020 14:17:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4326B206EB for ; Tue, 1 Sep 2020 14:17:34 +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="pNUM33L8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4326B206EB 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 6EF04900012; Tue, 1 Sep 2020 10:17:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6507690000D; Tue, 1 Sep 2020 10:17:28 -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 56659900012; Tue, 1 Sep 2020 10:17:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0203.hostedemail.com [216.40.44.203]) by kanga.kvack.org (Postfix) with ESMTP id 3A73B90000D for ; Tue, 1 Sep 2020 10:17:28 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 00DE32495 for ; Tue, 1 Sep 2020 14:17:27 +0000 (UTC) X-FDA: 77214695376.19.boy85_5c06fda27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id A555B1AD8FF for ; Tue, 1 Sep 2020 14:17:23 +0000 (UTC) X-Spam-Summary: 1,0,0,41d4adaf0030cb6a,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3353:3865:3867:3871:3873:3874:4321:5007:6261:6653:7514:9413:9592:10004:11026:11232:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:30054:30075,0,RBL:209.85.210.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y8at3kjocwy57nfpq9ap4s5pfrjypibynwpiyk9c98o3ooq8jzdqcdx1dpgtr.1ou5wconcbbaj9fs4jecwuwrb7qu7hff4z8i1gnmwpap948p38df7m5sxhe8d18.s-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:27,LUA_SUMMARY:none X-HE-Tag: boy85_5c06fda27098 X-Filterd-Recvd-Size: 4996 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:54 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id m8so869486pfh.3 for ; Tue, 01 Sep 2020 07:16:53 -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=T7hl6/jzH9JaCJmjBLvvza5EUcXtSUI/1TemyK+HC9o=; b=pNUM33L87/n3oMvM1sognLh5DCDBRm6ZHKqDFXRM9BZJCR6vzswELgtbDPSBnfrTVF W9OB4D7886nLFTuXJnoHU14ASpJG3zm5zKpFFxpfxeW/6JIfgoge8+p1byr6gTf3m3z7 yCANr114qi38F/fThOZja3tYGmqXbyvtaSeFHfqRcvmNIkgmtg6PSUi6ak6DJnLjNVT3 neYukQkFNkzifFFXKRE8VdR5S2Albh+rTn6gJVNW5SVe/oV7nFKvbhfsAjjCDPahKEOO QbdngNHv7o6geqrV5yyQhDX0jg0iO8wmpF/MX5OLsURm2XnAlIjPQhnEU9ohYiHpVtnt sLMg== 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=T7hl6/jzH9JaCJmjBLvvza5EUcXtSUI/1TemyK+HC9o=; b=mCDUykDTbUPwl6SCDNHuByj46B87ZXGLETiRTT8Y/69jU62NJzy+viAHSfEf2tH/Zt 28Tf/x6EiNAZYxKIcKQoj6qEDJR1AjgB69FqYgbQNoIAD5imjCkcAAzqX6YmU/mFBPuv Sid129sJl52fLOUlxEQBhY0S5V7Lp81GHriDpQWwNWchnTw+APjoVaeYfCpxI/OHofAs HvW+YUZBlSBcpQnS5b04FxHsiAIz7X+KnHkkFpwH12iJCNY2JZsj3sRhQnD7fAP7eeV6 wSObWx65uYuCxABWr2QBrsY8GYj5ypBm55AKF7pVaaGAnacQ/ByP2+KOvVVx88/68pJj 4KVQ== X-Gm-Message-State: AOAM531ijWFi9SXIll5Xxb7Ju9TGgSlbFhnQZm9JmsD+mmJ8/uHvDYRM 7uoeJ6CcFroMUltJf2KMFn4= X-Google-Smtp-Source: ABdhPJzMGurkU7OEkWAj30u5pzoBQBXN7lJH9ysmj05h8xZeAsFILA7j+WaGXQ2T4NFEf2hyfqF7ag== X-Received: by 2002:a62:6887:: with SMTP id d129mr2000651pfc.279.1598969790530; Tue, 01 Sep 2020 07:16:30 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:30 -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 Bogendoerfer , linux-mips@vger.kernel.org Subject: [PATCH v3 11/23] mips: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:27 +1000 Message-Id: <20200901141539.1757549-12-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: A555B1AD8FF X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Nicholas Piggin Acked-by: Thomas Bogendoerfer --- Please ack or nack if you object to this being mered via Arnd's tree. arch/mips/include/asm/mmu_context.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index cddead91acd4..ed9f2d748f63 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h @@ -124,10 +124,6 @@ static inline void set_cpu_context(unsigned int cpu, #define cpu_asid(cpu, mm) \ (cpu_context((cpu), (mm)) & cpu_asid_mask(&cpu_data[cpu])) -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - extern void get_new_mmu_context(struct mm_struct *mm); extern void check_mmu_context(struct mm_struct *mm); extern void check_switch_mmu_context(struct mm_struct *mm); @@ -136,6 +132,7 @@ extern void check_switch_mmu_context(struct mm_struct *mm); * Initialize the context related info for a new mm_struct * instance. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -180,14 +177,12 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, * Destroy context related info for an mm_struct that is about * to be put to rest. */ +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { dsemul_mm_cleanup(mm); } -#define activate_mm(prev, next) switch_mm(prev, next, current) -#define deactivate_mm(tsk, mm) do { } while (0) - static inline void drop_mmu_context(struct mm_struct *mm) { @@ -237,4 +232,6 @@ drop_mmu_context(struct mm_struct *mm) local_irq_restore(flags); } +#include + #endif /* _ASM_MMU_CONTEXT_H */ From patchwork Tue Sep 1 14:15:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748355 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 31F8D138A for ; Tue, 1 Sep 2020 14:26:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F2473206EB for ; Tue, 1 Sep 2020 14:26:24 +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="GU7uDdqV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2473206EB 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 26A4890001C; Tue, 1 Sep 2020 10:26:24 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1F235900008; Tue, 1 Sep 2020 10:26:24 -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 0E33B90001C; Tue, 1 Sep 2020 10:26:24 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0202.hostedemail.com [216.40.44.202]) by kanga.kvack.org (Postfix) with ESMTP id EB260900008 for ; Tue, 1 Sep 2020 10:26:23 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8CF1533C4 for ; Tue, 1 Sep 2020 14:26:23 +0000 (UTC) X-FDA: 77214717846.16.burn33_4f0641b27099 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id DF20D100E691E for ; Tue, 1 Sep 2020 14:26:19 +0000 (UTC) X-Spam-Summary: 1,0,0,7d948e09882b6127,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:2198:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3352:3876:3877:5007:6114:6261:6642:6653:7514:9413:9592:10004:11026:11657:11658:11914:12043:12109:12296:12297:12517:12519:12555:12895:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054,0,RBL:209.85.167.196:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04yf9aqzfah9dcuc5xcpzxmt114c3opfxtkeht4zcnyra4hr8wxthoj1cwkgcc5.btff48ry6equygf1n3nkhqqgna68u8dsqd5a8pmu3wij5a18abfp9myj96ry79h.n-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:26,LUA_SUMMARY:none X-HE-Tag: burn33_4f0641b27099 X-Filterd-Recvd-Size: 4623 Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:26:02 +0000 (UTC) Received: by mail-oi1-f196.google.com with SMTP id d189so1290673oig.12 for ; Tue, 01 Sep 2020 07:26:02 -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=84583yIct+fNxRagU/I0oUzZetXb7oFAI3KOXHJQqUA=; b=GU7uDdqVLUXKlAy3ozm0T+bJe+nzKjD23SlxSVkft4wTgJRBROxw7gJGPyomn8qCwH u/cEKVj5SDdbQtMOphIetJLDAXtVhGEVZYMjphPH4q2SjibPLqfI6aH4tu0nWrhJfrVT h+KHgrPqM9JGdcOd38ddmSABNGjq6eHsvwlZrukUBwxIQxqkW96szQrDOlrA0KEB1RxL ATvyadvYsOzbc0e9JCQ2hxmfvjHCp286ulKqOps1nhFNRdnEZzxUukT/XiUyojXwTmCx ip76YWxjruQL6DgAdQyS5JZwqmcfv7f07ZD11p6WJqYYcFCCGuMr6V4niCSWI5Ydk+yS gd4Q== 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=84583yIct+fNxRagU/I0oUzZetXb7oFAI3KOXHJQqUA=; b=QifMGTBoyN8/YQ45QbBVkpQvj3tepplurUzjcDrFJbN9egEZQ+rv27XSqlxk1xFTzq LzE3mQcsHiWRaqb7b7js41UbwUuTSiMCe1mTfY2v2EeTiUC+QHtWpxI+GvgbBzYkr1za CmqTXHLmuKLDm/ZxGVnFDSDG8cxau4JuodAICC+lrP5gXRiwZBMMu/z90qo9XL7NedLf toEHvuuRXpGFm6Vy01OJo4gsXDT7fAfDpP5spm8FC7ndLGJbTiYlsA1uPRFv5SFeAdRL y6sPEmF0UL1aPizQD/5lOoyKUS825PCq9/MkhfIybwUPV+z8gjY3ewN0cSfkEgaZwXFQ cr7w== X-Gm-Message-State: AOAM530Yx/X4vzSmyhIM91C/XJbbNPqyt/6qqgXZSUbNjjuAk8AtNE12 b8LtJ0Nxl+aXbgkBNNI9W5k+9+9zfpI= X-Google-Smtp-Source: ABdhPJwajm1nSgccZzMMxt7Yj7FhrjQ9hT6dRyc0q9bLokojEP4AQzrC4eZEP48WKDdjvYfQFasvFg== X-Received: by 2002:a17:90b:4b89:: with SMTP id lr9mr1848777pjb.126.1598969794412; Tue, 01 Sep 2020 07:16:34 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:34 -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 , Nick Hu , Vincent Chen , Greentime Hu Subject: [PATCH v3 12/23] nds32: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:28 +1000 Message-Id: <20200901141539.1757549-13-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: DF20D100E691E X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Cc: Nick Hu Cc: Vincent Chen Acked-by: Greentime Hu Signed-off-by: Nicholas Piggin --- arch/nds32/include/asm/mmu_context.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/nds32/include/asm/mmu_context.h b/arch/nds32/include/asm/mmu_context.h index b8fd3d189fdc..c651bc8cacdc 100644 --- a/arch/nds32/include/asm/mmu_context.h +++ b/arch/nds32/include/asm/mmu_context.h @@ -9,6 +9,7 @@ #include #include +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -16,8 +17,6 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) return 0; } -#define destroy_context(mm) do { } while(0) - #define CID_BITS 9 extern spinlock_t cid_lock; extern unsigned int cpu_last_cid; @@ -47,10 +46,6 @@ static inline void check_context(struct mm_struct *mm) __new_context(mm); } -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { @@ -62,7 +57,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, } } -#define deactivate_mm(tsk,mm) do { } while (0) -#define activate_mm(prev,next) switch_mm(prev, next, NULL) +#include #endif From patchwork Tue Sep 1 14:15:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748267 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 5175814E5 for ; Tue, 1 Sep 2020 14:16:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1129A206EB for ; Tue, 1 Sep 2020 14:16:53 +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="WzUBSHiE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1129A206EB 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 0D46A900009; Tue, 1 Sep 2020 10:16:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0AB17900002; Tue, 1 Sep 2020 10:16:52 -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 F0321900009; Tue, 1 Sep 2020 10:16:51 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0005.hostedemail.com [216.40.44.5]) by kanga.kvack.org (Postfix) with ESMTP id DA304900002 for ; Tue, 1 Sep 2020 10:16:51 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 55348180ACF17 for ; Tue, 1 Sep 2020 14:16:51 +0000 (UTC) X-FDA: 77214693822.04.smile86_3c17ae827098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 9E26080039AF for ; Tue, 1 Sep 2020 14:16:46 +0000 (UTC) X-Spam-Summary: 1,0,0,32e8281ff5103935,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:2693:3138:3139:3140:3141:3142:3353:3865:3867:3870:3871:3873:3874:4321:5007:6261:6653:7514:7903:9413:9592:10004:11026:11232:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30064:30075,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04ygzitoy6dpjay38cxy8yqkaz9s6yc61e6z6dw9mf9fmre8nyz8d777cepegiq.5pqimwxn3r7crnjs5opkgtczfknyckt8twsaxd1m6ndcnbk1qiynitxpqnq9bbb.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:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: smile86_3c17ae827098 X-Filterd-Recvd-Size: 4887 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:38 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id c15so604687plq.4 for ; Tue, 01 Sep 2020 07:16:38 -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=rF0Gg/FItWzC1FRYFQdU1CM/THHapJ9NmHYGWF5PYaM=; b=WzUBSHiEEVYXLd5qlbZdiTvUByjDNOOf/Vsr/o61BzXL5UVg5zTZaZdPeuvbkS/Onv PCxIHdjkMKd9h4n6CHNnM+ryyaQk7hrcFKcdjwpda651L51ULnlRBFAZGUDAS0lEQ9JC MqiO+WgIQlS+BXH2RhGdF7iXG7+npVOWpxDv0K7xslMLxEoW1kjP6Zk4rDTzL79/ButI 4ao2BB6glSpr/ad775rxf48hwFYzkoC93QbS0sYI1061h63ba1DWuXWX2LQAp1/9Syy1 B8ESXA+bCOAbmc9fBwpbDG+OK+i0TVEhGJbT6408kUMiORSNRhdo5x8CqTo+TgkHoQGh 7ZAA== 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=rF0Gg/FItWzC1FRYFQdU1CM/THHapJ9NmHYGWF5PYaM=; b=iXTNQFOKFBFV1Wzuax1mJPbf1f7lnl4iUSoq8Rnm/gZJAfnu/hJngPD9e4DYblqHui eGBcvdHG7SgAEuacLM7+WHhSDZk6anhO+sH1D27aXLJbTAcj9nIoESGAjpelzrrZxZRe kYcY17byKKUCjP4vXLiWNvg4pdCbH2tmI4/VIQueSa16vDVGsD3J2O/tFxGBExYRKzSi eYzOEAjYvnMWkVcZvrD4pXXkEKCvKLPzjUxb9IZMk7SW/ck8W4YLqcf2MKp733WokHW+ L05elmsJ/8UZUW2C9dgAmpTeUyHlwHzlS+VcRvxJOwPxPAmuLBFJpsPJ10aTVF+6rgIi ONMg== X-Gm-Message-State: AOAM530ATAgNX9+IbwB8c+oG4/mQjimYVKP/of5qlgmtAZP4G0AUAkVS equUF5DseCdu63LpKHLsYKI= X-Google-Smtp-Source: ABdhPJxAWHVJz4qjW72EohwUKHF1cKxUaKdI5k8vecTZBIbH6qy//hJ4IaY8hwl1kx3ydSR74SPQwA== X-Received: by 2002:a17:90a:4541:: with SMTP id r1mr1818789pjm.88.1598969797778; Tue, 01 Sep 2020 07:16:37 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:37 -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 , Ley Foon Tan Subject: [PATCH v3 13/23] nios2: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:29 +1000 Message-Id: <20200901141539.1757549-14-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: 9E26080039AF 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: Ley Foon Tan Signed-off-by: Nicholas Piggin --- Please ack or nack if you object to this being mered via Arnd's tree. arch/nios2/include/asm/mmu_context.h | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/arch/nios2/include/asm/mmu_context.h b/arch/nios2/include/asm/mmu_context.h index 78ab3dacf579..4f99ed09b5a7 100644 --- a/arch/nios2/include/asm/mmu_context.h +++ b/arch/nios2/include/asm/mmu_context.h @@ -26,16 +26,13 @@ extern unsigned long get_pid_from_context(mm_context_t *ctx); */ extern pgd_t *pgd_current; -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* * Initialize the context related info for a new mm_struct instance. * * Set all new contexts to 0, that way the generation will never match * the currently running generation when this context is switched in. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -43,26 +40,16 @@ static inline int init_new_context(struct task_struct *tsk, return 0; } -/* - * Destroy context related info for an mm_struct that is about - * to be put to rest. - */ -static inline void destroy_context(struct mm_struct *mm) -{ -} - void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk); -static inline void deactivate_mm(struct task_struct *tsk, - struct mm_struct *mm) -{ -} - /* * 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 void activate_mm(struct mm_struct *prev, struct mm_struct *next); +#include + #endif /* _ASM_NIOS2_MMU_CONTEXT_H */ From patchwork Tue Sep 1 14:15:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748305 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 6224414E5 for ; Tue, 1 Sep 2020 14:17:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2C0F9206EB for ; Tue, 1 Sep 2020 14:17:59 +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="XxxGJfPE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C0F9206EB 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 31AB490001A; Tue, 1 Sep 2020 10:17:58 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2CA6F90000D; Tue, 1 Sep 2020 10:17:58 -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 1B99B90001A; Tue, 1 Sep 2020 10:17:58 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id 0465190000D for ; Tue, 1 Sep 2020 10:17:58 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id AB0873655 for ; Tue, 1 Sep 2020 14:17:57 +0000 (UTC) X-FDA: 77214696594.20.crate11_2d169e027098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 029E4180C0626 for ; Tue, 1 Sep 2020 14:17:53 +0000 (UTC) X-Spam-Summary: 1,0,0,2f073d862fd81a49,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3867:3870:3871:3873:4321:4605:5007:6119:6261:6653:7514:7875:7903:9413:9592:10004:11026:11232:11657:11658:11914:12043:12109:12296:12297:12517:12519:12555:12895:13069:13255:13311:13357:13894:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:30054,0,RBL:209.85.210.196:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yrriamesb6o8h1jp9r5dh9m8eeuoptpwiws8ukdb5shbktxxprcucr3bm3zhf.d4xcnk19zbwc7dwrfnphxeu9ex13e6hbhzcxawf9mfpbnpi3nhtxhy36m88ccxf.w-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:26,LUA_SUMMARY:none X-HE-Tag: crate11_2d169e027098 X-Filterd-Recvd-Size: 4658 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:42 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id m8so869161pfh.3 for ; Tue, 01 Sep 2020 07:16:42 -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=0vzoL+VsrIPHuqh1rtEB2SuTababb460vueko2jTOo4=; b=XxxGJfPETQ7BZiIuZPtIZTdbh7ieNNvvgRcIjzPetj4CA6WlA6eQmTamnSI4ThlLOp I7Bwm5vBwBcLIzkRWQszNO5+mqimneWWmxfugSbuIDaZBS1IFgcKiHHRPoGqQ9F0f1Co EtKxeYYXyyTeeVAotBk5cJhyUZaR4+HBsL5QEX1us7JCul4yTuZkY6ldhldS6dO979lI 6GMBbSl5F4bzmlOnmQPmXLMDigRNfA8+tv59CLpLU2rwgaSkfRh0VzP3KXE3IfkGNyw9 zEyx5WAdD5EPiTaL9zeyWyu9rVYM327qiAvJMWhWZCNi3jRtlhh4RqwMP6Y+qcdURY6h n5iw== 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=0vzoL+VsrIPHuqh1rtEB2SuTababb460vueko2jTOo4=; b=uPueyu+xsg+R6ZaYka6D0rwLEsf3OLJNviepY47JtnC727fPmloIUAACuC1wsCmXP6 T+pzpPIcW6iukVA6D0ExpKgfnTLSd2zLXG7tyeFujAdpColM2gClIZsJ8dKLYnjUKrYS Djwq4o2RPYE8onxpf0G0Jt64xajvKPFzfsjeD1OszyZOq+XOFOQoEIxyhFMBQ9VsVnvI T+aiwjxDm4acPbpg2B0H9wCZZUzrIXlFyEYwuOWooT/hVOxHPMGL51blphVqoBM4ueQL eLS442j32yReFPFxOWrWuBcezqqvTOnElatsSqnQRnpKO2qxEVBM/bhkZwS2VSie+/03 f89A== X-Gm-Message-State: AOAM532n6GKdiGoZioyiubyB9A1rIb0t9c6hhmcAsynAcrD06f+v/S+4 MXV7Q5laaUsteDEPF9r7Bt4= X-Google-Smtp-Source: ABdhPJxhdXGBFtIiSfY5hgzmizcaBGI6SG79Dre9MXBlOMApIf1kkDG0o9XLXTCLh5Pm5ekdjZE4cg== X-Received: by 2002:a65:5689:: with SMTP id v9mr1729375pgs.271.1598969802057; Tue, 01 Sep 2020 07:16:42 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:41 -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 , Jonas Bonn , Stefan Kristiansson , Stafford Horne , openrisc@lists.librecores.org Subject: [PATCH v3 14/23] openrisc: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:30 +1000 Message-Id: <20200901141539.1757549-15-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: 029E4180C0626 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Cc: openrisc@lists.librecores.org Signed-off-by: Nicholas Piggin --- Please ack or nack if you object to this being mered via Arnd's tree. arch/openrisc/include/asm/mmu_context.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/openrisc/include/asm/mmu_context.h b/arch/openrisc/include/asm/mmu_context.h index ced577542e29..a6702384c77d 100644 --- a/arch/openrisc/include/asm/mmu_context.h +++ b/arch/openrisc/include/asm/mmu_context.h @@ -17,13 +17,13 @@ #include +#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); extern void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk); -#define deactivate_mm(tsk, mm) do { } while (0) - #define activate_mm(prev, next) switch_mm((prev), (next), NULL) /* current active pgd - this is similar to other processors pgd @@ -32,8 +32,6 @@ extern void switch_mm(struct mm_struct *prev, struct mm_struct *next, extern volatile pgd_t *current_pgd[]; /* defined in arch/openrisc/mm/fault.c */ -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} +#include #endif From patchwork Tue Sep 1 14:15:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748271 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 A73E3138A for ; Tue, 1 Sep 2020 14:17:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6F33D206FA for ; Tue, 1 Sep 2020 14:17:07 +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="dH53Fvbw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F33D206FA 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 7FE3E90000A; Tue, 1 Sep 2020 10:17:06 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7AED8900002; Tue, 1 Sep 2020 10:17:06 -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 69E9F90000A; Tue, 1 Sep 2020 10:17:06 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0228.hostedemail.com [216.40.44.228]) by kanga.kvack.org (Postfix) with ESMTP id 50FBB900002 for ; Tue, 1 Sep 2020 10:17:06 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0FE338248076 for ; Tue, 1 Sep 2020 14:17:06 +0000 (UTC) X-FDA: 77214694452.24.tin22_3e16f7b27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 4C3511A4D0 for ; Tue, 1 Sep 2020 14:17:00 +0000 (UTC) X-Spam-Summary: 1,0,0,633709604435f7fa,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2196:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3352:3867:4321:4385:5007:6261:6642:6653:7514:8957:9413:9592:10004:11026:11657:11658:11914:12043:12109:12296:12297:12517:12519:12555:12895:12986:13069:13255:13311:13357:13894:14093:14096:14181:14384:14394:14687:14721:21080:21433:21444:21450:21451:21627:21666:21990:30054,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04ygxud43sn73hg5q7a3czzj8hs9socz8kwgyij5137q849tiuyttozbyybd887.r3ab3e9md9nyr8onuky1od9ihjjbssnw4jyfhim4rchcpct1i1d7iwwtg3j3mht.o-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:26,LUA_SUMMARY:none X-HE-Tag: tin22_3e16f7b27098 X-Filterd-Recvd-Size: 4824 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:46 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id bh1so588666plb.12 for ; Tue, 01 Sep 2020 07:16:46 -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=y4GBbdasJ+e4fXYSTpkmty5k9s9dG8wP/iD9sZCcgX8=; b=dH53FvbwzWxDPpzL9QLv3ud71sC04i3yZyx9BEpedyXYGMjxGjGFMSmDwQcpfzAEEy vpSo5/Ssw929AdvF66gJ4EUjNg01+rqWJADkqajPmugZI1cbQAXmVSj6ATR4mATxYZqH StOhG2/Q59wO/SBRFJMcUkKHyQoQdbKQJlED2G3mJ7htzmdI0Zh2Zdhs0Cv3n/p+oH/1 kE0qTNQ3Bqmrx7ekV15OYdhIAub17fAkyfseKS7B2buMfZ/qQBoGhcxLveEZcA75ymJP y6PMCBs43bHoN7cVjZVwPskK2amXulF6VSw3I15761Sa+g80a4BKj9qIorWICbpQQ+KC ENKw== 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=y4GBbdasJ+e4fXYSTpkmty5k9s9dG8wP/iD9sZCcgX8=; b=HRH+vk78Au7nBe9SQ1O9gfZha7rKhZ2AZgsG3NJC+dFB0q4HYbnEprvTKmYARELCp0 /PF6hgyqbY+CjLomNV4JnmSIekj15dBdhOY+dYcIIHLd58xucYPMyjhb2zNO5Nwn00Mh +vbXf3IMjicaxpvdX0QBnWS1FQ+Kbanj13z+uZGgtv7eNzJWnU7Dwhatfo7oT+lO7lAt 0a9Tnq1HX2VSj1m2yDuZxrJN0flLwezpczprV7/TJAPz/qyDnFm+FoUwAMIfoZiR2D4C cNn+R9x/Yz2J1y70jEdeZ4r5jEMcSqOcfHbSLnuLZgQrKY4k/K2Sdv1xPTlEY49rkauS Hvng== X-Gm-Message-State: AOAM530Bu2pwUvYeyPd1Hpm/bYB1+C7EsXtnMwsKJHRg5/S4OAnMKP+K Ffmb9Ndi6JodEKT8H975qjQ= X-Google-Smtp-Source: ABdhPJzG/volX6VbEzTef+Kk6CT0A/sPbJrNNCyu6DH4e9IuiAX8jzUmomEjOSXABzmiyGq1oa2Vnw== X-Received: by 2002:a17:902:7d85:: with SMTP id a5mr1644916plm.148.1598969805983; Tue, 01 Sep 2020 07:16:45 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:45 -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 , "James E.J. Bottomley" , linux-parisc@vger.kernel.org, Helge Deller Subject: [PATCH v3 15/23] parisc: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:31 +1000 Message-Id: <20200901141539.1757549-16-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: 4C3511A4D0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: "James E.J. Bottomley" Cc: linux-parisc@vger.kernel.org Acked-by: Helge Deller Signed-off-by: Nicholas Piggin --- arch/parisc/include/asm/mmu_context.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/parisc/include/asm/mmu_context.h b/arch/parisc/include/asm/mmu_context.h index cb5f2f730421..46f8c22c5977 100644 --- a/arch/parisc/include/asm/mmu_context.h +++ b/arch/parisc/include/asm/mmu_context.h @@ -7,16 +7,13 @@ #include #include -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* on PA-RISC, we actually have enough contexts to justify an allocator * for them. prumpf */ extern unsigned long alloc_sid(void); extern void free_sid(unsigned long); +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -26,6 +23,7 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) return 0; } +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { @@ -71,8 +69,7 @@ static inline void switch_mm(struct mm_struct *prev, } #define switch_mm_irqs_off switch_mm_irqs_off -#define deactivate_mm(tsk,mm) do { } while (0) - +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { /* @@ -90,4 +87,7 @@ static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) switch_mm(prev,next,current); } + +#include + #endif 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 */ From patchwork Tue Sep 1 14:15:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748297 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 A378314E5 for ; Tue, 1 Sep 2020 14:17:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 62EEB206EF for ; Tue, 1 Sep 2020 14:17:49 +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="CB20cpEq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62EEB206EF 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 3DF2D900018; Tue, 1 Sep 2020 10:17:48 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 38E4590000D; Tue, 1 Sep 2020 10:17:48 -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 27D26900018; Tue, 1 Sep 2020 10:17:48 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0248.hostedemail.com [216.40.44.248]) by kanga.kvack.org (Postfix) with ESMTP id 106DA90000D for ; Tue, 1 Sep 2020 10:17:48 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C67C98248076 for ; Tue, 1 Sep 2020 14:17:47 +0000 (UTC) X-FDA: 77214696174.26.shirt06_4f1365a27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id C14C41804A336 for ; Tue, 1 Sep 2020 14:17:11 +0000 (UTC) X-Spam-Summary: 1,0,0,0ce34b242900ea39,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3876:3877:4605:5007:6114:6261:6642:6653:7514:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30075,0,RBL:209.85.210.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y83nppfd1asdrdycn9fj9fr1zwhopk78sb7p1fwfmogd4umqb4fnhhmw6q1j7.q9ju75rw3uox51jhwuurd4mr3hi8hgdsdwui7ekmujgbxmo67eqcgg515aatjez.k-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: shirt06_4f1365a27098 X-Filterd-Recvd-Size: 4709 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:55 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id u20so881521pfn.0 for ; Tue, 01 Sep 2020 07:16:55 -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=V+3JHgVNweMgUhzc7j6b8ZRjCMqnC1xbmRm2pl0WCfg=; b=CB20cpEqML91DElw2lqnEobmqalA/rjf60OkO/wd35o3JQ0VTyekzIDx/QYPoD8F7s AwLtmANxAr15KN6IwOlwQ95Brx7uEGuT98kYZy0Y/JlbjGrRTw91JcloFGznUj+dsNBZ l6ApDQG4/5PJicafeXy+yZxGhrac6kzjt6vcOog+Zgv9U4ZBiDWXfYoiQhbaZv8Iz1D1 X9kejM9Q86UkBGt6doMDVld8qOp3oyG/DJj24ASee8R7OIibieQzbI6f7ZuwLI9XfX+c no3jk94IDfS2mDRSM3n7iV/Xl55YmrDtHrszCBy0ChWg/nXWzlnMwMEkkJBsty5S3vdr zM9A== 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=V+3JHgVNweMgUhzc7j6b8ZRjCMqnC1xbmRm2pl0WCfg=; b=dyHt8uCOcrdU8fEjHyZPPJFsEFdQQ36a2BQLYBO6DbMsY72Y7CN7hqE8STLcUrwNjL +Tlp1LJQWXlg6mUu25NvxN8LMyiQDfapNFJ7WSf+pQ5+KdpddCg8BrApD5GaamOQVP+t N2lcKHQo2URuAqjSbqmF/YAc1eZgaV4GBzG1K8tdl7+C5ea8Edrc0KwUY/jDn4T0cMa3 Si/duRtCZ1MJX59/xtl460aXZGB0O4Ole1aucFZMIXoRFegSOT24kei9UWySYdlcVImu 4Kx8dTkN2R5XcFPsXHUG8jF+9q5YopVp/bWjRLAZzeAwhZxMmKvtWFoLAW0N3JkIkisM 5A+g== X-Gm-Message-State: AOAM530GvRTqeMNifOvQX4uGZd5WVrbmDMUhLJ+IJVaLIo/2WnvfpKak 4TnzZ4jh78XiYn8VTyMFFb4= X-Google-Smtp-Source: ABdhPJylKehXG36qs/dxLCybNpFCCKXykAX3lh1Xfj4HAPNNOKYZVyumOMiUgeJGuiKwKNjpyRrTdA== X-Received: by 2002:a63:5ec5:: with SMTP id s188mr1704463pgb.218.1598969814810; Tue, 01 Sep 2020 07:16:54 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:54 -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 , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Pekka Enberg , Palmer Dabbelt Subject: [PATCH v3 17/23] riscv: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:33 +1000 Message-Id: <20200901141539.1757549-18-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: C14C41804A336 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: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Reviewed-by: Pekka Enberg Acked-by: Palmer Dabbelt Signed-off-by: Nicholas Piggin --- arch/riscv/include/asm/mmu_context.h | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/arch/riscv/include/asm/mmu_context.h b/arch/riscv/include/asm/mmu_context.h index 67c463812e2d..250defa06f3a 100644 --- a/arch/riscv/include/asm/mmu_context.h +++ b/arch/riscv/include/asm/mmu_context.h @@ -13,34 +13,16 @@ #include #include -static inline void enter_lazy_tlb(struct mm_struct *mm, - struct task_struct *task) -{ -} - -/* Initialize context-related info for a new mm_struct */ -static inline int init_new_context(struct task_struct *task, - struct mm_struct *mm) -{ - return 0; -} - -static inline void destroy_context(struct mm_struct *mm) -{ -} - void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *task); +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { switch_mm(prev, next, NULL); } -static inline void deactivate_mm(struct task_struct *task, - struct mm_struct *mm) -{ -} +#include #endif /* _ASM_RISCV_MMU_CONTEXT_H */ From patchwork Tue Sep 1 14:15:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748277 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 15DE014E5 for ; Tue, 1 Sep 2020 14:17:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C91D6206EB for ; Tue, 1 Sep 2020 14:17:20 +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="clQYQjHE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C91D6206EB 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 93A5590000E; Tue, 1 Sep 2020 10:17:19 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8C127900002; Tue, 1 Sep 2020 10:17:19 -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 7127090000D; Tue, 1 Sep 2020 10:17:19 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0160.hostedemail.com [216.40.44.160]) by kanga.kvack.org (Postfix) with ESMTP id 582A1900002 for ; Tue, 1 Sep 2020 10:17:19 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B2F8A180AD83A for ; Tue, 1 Sep 2020 14:17:18 +0000 (UTC) X-FDA: 77214694956.06.screw98_0e0229327098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id C4EAB1003D070 for ; Tue, 1 Sep 2020 14:17:14 +0000 (UTC) X-Spam-Summary: 1,0,0,b497a170cb1fe7ca,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1801:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3867:3873:4321:4605:5007:6261:6653:7514:9413:9592:10004:11026:11232:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054,0,RBL:209.85.214.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yrm9fe4wz7jurcfhgshtg1eqyk1yc4ygk7gyu6wphbnpnxkxxhhrngpmf7jpa.396cyuphuncgi7exjnzahiswc1jd595o7zps5gjda69ayzzxpgsonwzaxbu74yn.s-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: screw98_0e0229327098 X-Filterd-Recvd-Size: 4778 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:16:59 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id z15so598864plo.7 for ; Tue, 01 Sep 2020 07:16:59 -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=3gjRN/KamVH3sWTz8RDBj5bBWnJISflepDch8HJoRKQ=; b=clQYQjHEqBLvSIfYOAtUdto16FpX8DmsWPL+uidGuhdurAKPF6RNx3tBPXa3DwTJLh NIu3DHt9WdtfSYzBystNWWHPgSGcSyaKtlwG30k8Pu/LCGvYFGzC6RliYcDO55n5mrf0 6X2Fz2L36/qasOAQmhtLf3BXzKL0BxOuTuqorV0WR04sxZ4yCc2wZQqyHQI9XY4uAPLx dLCWCtwe7paXbmcd71RHt6E0KKaeNufjYOLTEVtT2j/KKqbYAKdovfzS9wdxiOeGqqnH F6Tz+2wtvSqA2N2eLnVINcH406141kCrDiwHmiwXYfjgxrxi6iHEFZCXlv79r5awdqht +2IQ== 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=3gjRN/KamVH3sWTz8RDBj5bBWnJISflepDch8HJoRKQ=; b=DsW5WcgdOVOpNYLZuKX8I58iJi6rFgDmu4wuJVy+nKxuqkPRK2w2L/br/h8ycTqqtQ 9oN39bAb5ZeziMDzwMTFXqU07Ah5TgisGi8tRru3qZcjE7OhkBAiCSQtfG9IhgnmECKL Dpv/3xnZd3dk2CTvCuWo5UYV/b6QMFHUP7WEnkDgnUNK7nO+ucxfCdfJmuawUmAMC9QY ODr4B9IRk6w5xiI0EVO1b5x/SVkG9dj6SIlze7/roL8fH7zt8Q2Yxt6LcIZIPP/C0PtC 2w2RgiDpOnLkx+Ve+d3DG2Jt2RuYetweEhtzNpt5r265KV1dbEW5hlp+3NFIUz693zIC iM+g== X-Gm-Message-State: AOAM532QJBBEQJm4KI3qtoDs3nRgYtUPoByiHIfnAplx+IUUsq8CKTGE ymfDrUNt+NdBJSvuqiBNW+A= X-Google-Smtp-Source: ABdhPJwf8o5Z+3C/zuq69JbjA8nGkrebFYBg2C9BnrWEmZQgV4d152UpPBXmoBoHaJDILG4ogxQpJA== X-Received: by 2002:a17:902:b405:: with SMTP id x5mr1545946plr.267.1598969819246; Tue, 01 Sep 2020 07:16:59 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:58 -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 , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org Subject: [PATCH v3 18/23] s390: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:34 +1000 Message-Id: <20200901141539.1757549-19-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: C4EAB1003D070 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: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: linux-s390@vger.kernel.org Signed-off-by: Nicholas Piggin --- Please ack or nack if you object to this being mered via Arnd's tree. arch/s390/include/asm/mmu_context.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index c9f3d8a52756..66f9cf0a07e3 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h @@ -15,6 +15,7 @@ #include #include +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -69,8 +70,6 @@ static inline int init_new_context(struct task_struct *tsk, return 0; } -#define destroy_context(mm) do { } while (0) - static inline void set_user_asce(struct mm_struct *mm) { S390_lowcore.user_asce = mm->context.asce; @@ -125,9 +124,7 @@ static inline void finish_arch_post_lock_switch(void) set_fs(current->thread.mm_segment); } -#define enter_lazy_tlb(mm,tsk) do { } while (0) -#define deactivate_mm(tsk,mm) do { } while (0) - +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { @@ -136,4 +133,6 @@ static inline void activate_mm(struct mm_struct *prev, set_user_asce(next); } +#include + #endif /* __S390_MMU_CONTEXT_H */ From patchwork Tue Sep 1 14:15:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748283 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 0BBCF138A for ; Tue, 1 Sep 2020 14:17:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BF178206EB for ; Tue, 1 Sep 2020 14:17:28 +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="vKUi3CT5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF178206EB 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 06354900010; Tue, 1 Sep 2020 10:17:23 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EDDA690000D; Tue, 1 Sep 2020 10:17:22 -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 DF1A9900010; Tue, 1 Sep 2020 10:17:22 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id C406890000D for ; Tue, 1 Sep 2020 10:17:22 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 81480824556B for ; Tue, 1 Sep 2020 14:17:22 +0000 (UTC) X-FDA: 77214695124.07.silk13_180cd3827098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 7C2D51803F9D5 for ; Tue, 1 Sep 2020 14:17:16 +0000 (UTC) X-Spam-Summary: 1,0,0,01721b2ab2c2e10d,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3867:3871:3873:3874:4321:5007:6261:6653:7514:9413:9592:10004:11026:11232:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:12986:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:30054:30075,0,RBL:209.85.210.195:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yfgca5hnfeud6dtfq3f9zwdnw7zycjbzjypw6owtj1kiryopposqnd355dz4f.rc833ujpcac5zrjiftr4irrigbxbesquctpep3gka7683nk96m8ei7kofepwkg7.q-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: silk13_180cd3827098 X-Filterd-Recvd-Size: 4904 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:17:03 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id m8so869756pfh.3 for ; Tue, 01 Sep 2020 07:17:03 -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=GA7usuAihtWp/iTn8pjSUo+agWDeKhUidbvz3amkOCk=; b=vKUi3CT5x2cUml5A3FoH5o7mANaQNhQQXmhG7RhK1IxI+2No8uNVjEZaMnr0IzA2e+ mFHVMn57j/G7jahwTvh57QZYZvU7vQqDCBPat2qS08dUl36IGB1voFOeurV2SO5lo8pV uoi4tzm9zkWj9YrnimXxoRrV14iINOLZsZYMoQrd6IWNfezf/1EGZMNSmfEZWLvvfWT1 blAfw7qPOqKSWzr1VkfaBD8C1QoL3fc8uwnEOLT9+uDmP3XOJdDnXwxVsAqWls4Hdg1N pJses5elE/RX6Oea6bkY0P/rjv6Cch/kHx1VldEEsG1ApybMcX2COkroEQky+gc3T5uU k9CQ== 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=GA7usuAihtWp/iTn8pjSUo+agWDeKhUidbvz3amkOCk=; b=fxIVtzoLzz/cAq682KTDoxp3VsQ7hmmCRZgO0uJIySxH3F9NH93GCieH/okTiAvsIr r2oD44PxiLcr9jy1Ej2zSg5i46+ZE1oby4ZU0vTAAKMnKY4bYmg48cuTxrCP1DGSuNwZ l90YnpD2Gccbu0PQQX8P0+F/n5Uhnd+AS1/b9EQqywg4W6hR5bHrLpagcPxbqLyml7gW DSz7RUToSEKXpEMcdpotWjDDF1upV/Qu3/O59KnCKqp+zgCEm61eCtFNlfcXrGB0z8Tr RiLqo4bHHpSusx+e5jwpCGq4SLvLqrMD8qP2IE2jTgMgDNMaBWj0AHaGtZRNHNxgCx/z DKAw== X-Gm-Message-State: AOAM533ovpy6RC4ZOs2TsJI950U8FRtZO5gw6Cqb7N6ThFOBWbzDiheb 1SRbtN90iIrQwa0+Q00jdfo= X-Google-Smtp-Source: ABdhPJzeqxrrUqdUUsxeoS6rzUl1Puk+QzDB+Z29ZkL6FZRno1ci3PQMh4rLsPoa0DyPjGjLi0oj/w== X-Received: by 2002:a62:fc46:: with SMTP id e67mr2009061pfh.109.1598969823177; Tue, 01 Sep 2020 07:17:03 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:17:02 -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 , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Subject: [PATCH v3 19/23] sh: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:35 +1000 Message-Id: <20200901141539.1757549-20-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: 7C2D51803F9D5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Nicholas Piggin Acked-by: Rich Felker --- Please ack or nack if you object to this being mered via Arnd's tree. arch/sh/include/asm/mmu_context.h | 5 ++--- arch/sh/include/asm/mmu_context_32.h | 9 --------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/sh/include/asm/mmu_context.h b/arch/sh/include/asm/mmu_context.h index 461b1304580b..78eef4e7d5df 100644 --- a/arch/sh/include/asm/mmu_context.h +++ b/arch/sh/include/asm/mmu_context.h @@ -84,6 +84,7 @@ static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu) * Initialize the context related info for a new mm_struct * instance. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -120,9 +121,7 @@ static inline void switch_mm(struct mm_struct *prev, activate_context(next, cpu); } -#define activate_mm(prev, next) switch_mm((prev),(next),NULL) -#define deactivate_mm(tsk,mm) do { } while (0) -#define enter_lazy_tlb(mm,tsk) do { } while (0) +#include #else diff --git a/arch/sh/include/asm/mmu_context_32.h b/arch/sh/include/asm/mmu_context_32.h index 71bf12ef1f65..bc5034fa6249 100644 --- a/arch/sh/include/asm/mmu_context_32.h +++ b/arch/sh/include/asm/mmu_context_32.h @@ -2,15 +2,6 @@ #ifndef __ASM_SH_MMU_CONTEXT_32_H #define __ASM_SH_MMU_CONTEXT_32_H -/* - * Destroy context related info for an mm_struct that is about - * to be put to rest. - */ -static inline void destroy_context(struct mm_struct *mm) -{ - /* Do nothing */ -} - #ifdef CONFIG_CPU_HAS_PTEAEX static inline void set_asid(unsigned long asid) { From patchwork Tue Sep 1 14:15:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748285 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 B8A8E138A for ; Tue, 1 Sep 2020 14:17:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7EB76206CD for ; Tue, 1 Sep 2020 14:17:31 +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="HQu5Fv4C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EB76206CD 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 E954D900011; Tue, 1 Sep 2020 10:17:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DF2B390000D; Tue, 1 Sep 2020 10:17: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 CE29F900011; Tue, 1 Sep 2020 10:17:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id AB84E90000D for ; Tue, 1 Sep 2020 10:17:25 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 731748248076 for ; Tue, 1 Sep 2020 14:17:25 +0000 (UTC) X-FDA: 77214695250.08.sleet85_191392327098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id EC0341819E64B for ; Tue, 1 Sep 2020 14:17:20 +0000 (UTC) X-Spam-Summary: 1,0,0,96b6ee4f6147d6b8,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1543:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3354:3865:3867:3871:3873:4117:4250:4321:4605:5007:6119:6261:6653:7514:9413:9592:10004:11026:11232:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:12986:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21740:30003:30045:30054,0,RBL:209.85.214.193:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y8wj7usarwdzkypnt8ubaigwk5mocmhds6stcd1ocpgqjrcfqo6gesogtw9te.d6tjgzq13y9d7ng7amn9qrowzx9r1smu4muxqjx9g3cus9ku7uo58kanz8pgghm.6-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:29,LUA_SUMMARY:none X-HE-Tag: sleet85_191392327098 X-Filterd-Recvd-Size: 6287 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:17:07 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id bh1so589139plb.12 for ; Tue, 01 Sep 2020 07:17:07 -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=logZjoG5Aka5uBmK80AuCdh5o6UuSDKs79nfaNTTOaw=; b=HQu5Fv4C4UoSmrbjuziOapFF10KA+RQNesnat24CDhKtp+EaxHPoL0yaABBLA4VseX WaGqI8GcgcXCoIDq3vY4fY1Tr/76AO3buT3pnHIj/lLEG73T2kwzVJtocvLsVUK2H91d Y7162dEqcfij+2mP32Ljy4N36bqL372dR/9rzzVuK5U2E0QOUIpOe+CyTkM4SD6u+X6/ 2OUaHe9MCdh/nvcKwlIoSCxuZHpgspfPTirZPdD1RjiFJLh7aHhWtwxnes3A8PcdSsbf uyWUmDMHGoiYM0j5QcJn7PIaMHP0BdPA+wGfOkFex1Gb/6I6VKURNeCtSJNonR0uqvbo j8IA== 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=logZjoG5Aka5uBmK80AuCdh5o6UuSDKs79nfaNTTOaw=; b=GGOuFwCpj2BehrWPBExuQDdHjhYT0ncweft5babj23yhMQg/oj8b86FVemB92FFdz4 p/ceGQkRu/SnJD5jKgpdpDunt9vwZMbGvMieocMDxbVVnUxukuvUmh0vRFxW2lwnV907 EUiYTJwmQ5eF5UVypvwuXcAIYbJUbUx8Xb6vwx/GGBFrqscp1TityxiLFSw8Ok++xPVf KU2kFHprBIb4FL+Kin+0EMCxTtKlVZfsf2M/biue7cOhbN1kx4l5o9SwsrDUN2DGiSdY SVhG3h2nv7vr9CCii7HYIavfhrhX54ihS9WkdIT8eZ4uErK9Q/Z+wtkqnb9lfK2Suqoh Ecug== X-Gm-Message-State: AOAM533Uc15LmFKYNL3XcYTlrueIe5gS26TtF+pZw+8W9aG1IOrIMZN3 239bEaivE+D9yTNstAz5OqA= X-Google-Smtp-Source: ABdhPJzQTGwzDyOFh9C1LgX+8EX+CeYkOkzlMY/Z9U1HiGXP7P3RibIekHepWjyHD++l0OigZGr5aQ== X-Received: by 2002:a17:902:b20e:: with SMTP id t14mr1622424plr.58.1598969827058; Tue, 01 Sep 2020 07:17:07 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:17:06 -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 , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH v3 20/23] sparc: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:36 +1000 Message-Id: <20200901141539.1757549-21-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: EC0341819E64B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Nicholas Piggin --- Please ack or nack if you object to this being mered via Arnd's tree. arch/sparc/include/asm/mmu_context_32.h | 10 ++++------ arch/sparc/include/asm/mmu_context_64.h | 10 +++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/sparc/include/asm/mmu_context_32.h b/arch/sparc/include/asm/mmu_context_32.h index 7ddcb8badf70..509043f81560 100644 --- a/arch/sparc/include/asm/mmu_context_32.h +++ b/arch/sparc/include/asm/mmu_context_32.h @@ -6,13 +6,10 @@ #include -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* Initialize a new mmu context. This is invoked when a new * address space instance (unique or shared) is instantiated. */ +#define init_new_context init_new_context int init_new_context(struct task_struct *tsk, struct mm_struct *mm); /* Destroy a dead context. This occurs when mmput drops the @@ -20,17 +17,18 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm); * all the page tables have been flushed. Our job is to destroy * any remaining processor-specific state. */ +#define destroy_context destroy_context void destroy_context(struct mm_struct *mm); /* Switch the current MM context. */ void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk); -#define deactivate_mm(tsk,mm) do { } while (0) - /* Activate a new MM instance for the current task. */ #define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL) +#include + #endif /* !(__ASSEMBLY__) */ #endif /* !(__SPARC_MMU_CONTEXT_H) */ diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h index 312fcee8df2b..7a8380c63aab 100644 --- a/arch/sparc/include/asm/mmu_context_64.h +++ b/arch/sparc/include/asm/mmu_context_64.h @@ -16,17 +16,16 @@ #include #include -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - extern spinlock_t ctx_alloc_lock; extern unsigned long tlb_context_cache; extern unsigned long mmu_context_bmap[]; DECLARE_PER_CPU(struct mm_struct *, per_cpu_secondary_mm); void get_new_mmu_context(struct mm_struct *mm); + +#define init_new_context init_new_context int init_new_context(struct task_struct *tsk, struct mm_struct *mm); +#define destroy_context destroy_context void destroy_context(struct mm_struct *mm); void __tsb_context_switch(unsigned long pgd_pa, @@ -136,7 +135,6 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str spin_unlock_irqrestore(&mm->context.lock, flags); } -#define deactivate_mm(tsk,mm) do { } while (0) #define activate_mm(active_mm, mm) switch_mm(active_mm, mm, NULL) #define __HAVE_ARCH_START_CONTEXT_SWITCH @@ -187,6 +185,8 @@ static inline void finish_arch_post_lock_switch(void) } } +#include + #endif /* !(__ASSEMBLY__) */ #endif /* !(__SPARC64_MMU_CONTEXT_H) */ From patchwork Tue Sep 1 14:15:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748293 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 330A7138A for ; Tue, 1 Sep 2020 14:17:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E716C206CD for ; Tue, 1 Sep 2020 14:17:39 +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="m0wh+6ZW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E716C206CD 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 23339900016; Tue, 1 Sep 2020 10:17:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1E88090000D; Tue, 1 Sep 2020 10:17:33 -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 00ED1900016; Tue, 1 Sep 2020 10:17:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id DCDCC90000D for ; Tue, 1 Sep 2020 10:17:32 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9DDA61E1B for ; Tue, 1 Sep 2020 14:17:32 +0000 (UTC) X-FDA: 77214695544.12.side48_4e055fc27098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 945491800906C for ; Tue, 1 Sep 2020 14:17:27 +0000 (UTC) X-Spam-Summary: 1,0,0,615314491559ec9e,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3867:3873:4321:5007:6261:6653:7514:9413:9592:10004:11026:11232:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:12986:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:30054,0,RBL:209.85.216.68:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04y81e6e3jprr5wigfussbp3wudm1yccuezsmjci4b5xkxmdftgk7eojtbttsju.9tzsq7u1d1hbdrft1iz64yi9hwxcdiat1hcjkq47qhdj5bkpm8kaeewkegoem91.c-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: side48_4e055fc27098 X-Filterd-Recvd-Size: 4559 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:17:12 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id gf14so633898pjb.5 for ; Tue, 01 Sep 2020 07:17:12 -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=oMyHyW/ibxSh5eYl/5ny2xFFH4uUfgxHccMgqoyeGgg=; b=m0wh+6ZWCvB6xY6mobQfA84EWeAOgcj+P2/sh51P0HP2QNZuoPLB4itoOJee1tInOQ GEjtY/zF2RIFEOTODiaE5O0lp9WTjMayA7dEE5eEQK4pNP0kPNTmHVr0qkB6H27MwLNO z+uwXWhwY4Bwnt0Y3roqq7rEOguaD1PSqR/vm24XMbtevgG/+2iY0oiKw6hkKQPT9taQ xXBkZClMgTlN+miUmXc5YALkeb7wSWbpxv0YaydGGIDZMj4VYVAvMvLfhZGKyxP4BQ6r Z+lbaCG+pJU7taGtqg9nJn7HkrrxnEpANuQO8vDFWIHah5Moa86nBAIdDRDVvK8hX/fz WfEQ== 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=oMyHyW/ibxSh5eYl/5ny2xFFH4uUfgxHccMgqoyeGgg=; b=Wh8dEYyPETmX755V9xsrgMk7jH1tIkjvjzhOp4dLC+o/HroLeKA20EeJougfoKqtV+ UrKZNoXPQUC6Jfz4GDG3P11TLs2ccyafx9TBnaSRkU16mPr6veBUulb+ziDOA1KsGjZm l1MtydvK4Y1RSXxJik2OjourqwWIozR/iK9iwdwFw6rnOzSu9ulz01QOTjZzpv3cmbx4 Ymve2YEeDGF4/H34QQ9ZnxOfVcqGD2HQ87J3X2aQFtfEE6so6UlzLxY+WXzo9nn92PQr ErNc2HBADx9HiyumD0wwhqmXfaYX/tXj7zfUN5enVHZLAES6IJGsCWBQtpPpRQBzeuk+ 2uvA== X-Gm-Message-State: AOAM533C/VDljBtf6W1lUeY5r5p1pZM52oeU+6R7rtCgwD58wRoafj+G k68kJfSFlE08CEB9/h/nxcI= X-Google-Smtp-Source: ABdhPJzbcFQsPm7Juj1VJ+J7JhZyyCQaH2ESZtwRm7LnWnuXUzY2Z/dW/q488h9lXB+CpPnMrTeagA== X-Received: by 2002:a17:90b:1284:: with SMTP id fw4mr1652373pjb.205.1598969831450; Tue, 01 Sep 2020 07:17:11 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:17:11 -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 , Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org Subject: [PATCH v3 21/23] um: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:37 +1000 Message-Id: <20200901141539.1757549-22-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: 945491800906C 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: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Signed-off-by: Nicholas Piggin --- Please ack or nack if you object to this being mered via Arnd's tree. arch/um/include/asm/mmu_context.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/um/include/asm/mmu_context.h b/arch/um/include/asm/mmu_context.h index 17ddd4edf875..f8a100770691 100644 --- a/arch/um/include/asm/mmu_context.h +++ b/arch/um/include/asm/mmu_context.h @@ -37,10 +37,9 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma, * end asm-generic/mm_hooks.h functions */ -#define deactivate_mm(tsk,mm) do { } while (0) - extern void force_flush_all(void); +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) { /* @@ -66,13 +65,12 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, } } -static inline void enter_lazy_tlb(struct mm_struct *mm, - struct task_struct *tsk) -{ -} - +#define init_new_context init_new_context extern int init_new_context(struct task_struct *task, struct mm_struct *mm); +#define destroy_context destroy_context extern void destroy_context(struct mm_struct *mm); +#include + #endif 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 */ From patchwork Tue Sep 1 14:15:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748299 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 39CB6138A for ; Tue, 1 Sep 2020 14:17:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EEE55206EB for ; Tue, 1 Sep 2020 14:17: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="vMb3r5vp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEE55206EB 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 4F139900019; Tue, 1 Sep 2020 10:17:49 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4A43090000D; Tue, 1 Sep 2020 10:17:49 -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 3914D900019; Tue, 1 Sep 2020 10:17:49 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 1663E90000D for ; Tue, 1 Sep 2020 10:17:49 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B85C5181AEF1F for ; Tue, 1 Sep 2020 14:17:48 +0000 (UTC) X-FDA: 77214696216.29.jam52_0313d4327098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 2720A18086584 for ; Tue, 1 Sep 2020 14:17:35 +0000 (UTC) X-Spam-Summary: 1,0,0,5a7794c0bf2da33f,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:3867:3871:3873:3874:4321:5007:6261:6653:7514:9413:9592:10004:11026:11232:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13255:13846:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30075,0,RBL:209.85.216.67:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yfde73itag8ptf6y9e9iuphzptjyctg85cdymadcw3ugkmm3kmnsdj8qpk8ox.f7ndu37766fnez91mxdchxukbi79n5gjp6o9drs79xm1uc6g7kstcrdfdijfsns.w-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:27,LUA_SUMMARY:none X-HE-Tag: jam52_0313d4327098 X-Filterd-Recvd-Size: 5646 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:17:21 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id mw10so676935pjb.2 for ; Tue, 01 Sep 2020 07:17:21 -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=1TuljzwT/taYwLAxWlXZZmSA1JGxC1yPToMpQKgO55w=; b=vMb3r5vpL+QhkRrXIl+ox645IRbVqx89mbaXMOnBZAhR9E+FXTLl6roBhM+GQbCeOx 1U8UUNEuDTum31qKlbKJeOcqoux35a4Jd4S0H06CPUlUiMVVwMcW3b7yMgb2KlDOJZsl Ash4DBb57qEptLWAJWXS44zYA7UeKg+1awpvzhYWEtWPcH2EN4Nl0oIYIVYRXLHK+Rkb 9Xy2yHHiGXDNl8tx9ZDunXL3KrdLKvQkAhjE0y8R0V6eOKLngbm880pThlRZU4DcPi6u sa7ZRpJ8mKy0hxGDnnoAe3NH9X9sO3PYCzJ7V8Ngevo1W7i+/cm1hBwCWCx7Xro1SlEO 6/4Q== 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=1TuljzwT/taYwLAxWlXZZmSA1JGxC1yPToMpQKgO55w=; b=HARKk0xaEtfRbnj3g/o60pdv7TpxT1/sDjQXZLy1Gsnjlm8RO6SLIrvf16Vm9giKRg qkVfy7CLzX7DRNj7k6BuVeA20O1Sz789RaLyqj6jRKwkcTZdpk1r7ehjSNZiAw4qvf5G ddfteg0wQqGU12zHYT9N8mhcLBclho47EmttvxUqzzZrC7qmVfbCF2a1dn6PS+bxpM0K gSHaBczGvacDaRQ5erbEWiDZtgwxChLVtHio9lBMkYUErDO9C9A8vpWkxFSCkTMjb2BA //EAeZuLvJxRClC/xn3Aw1E/+6CPgz3ZGcaxw03yMxgBNpSLb8wdlgjp1IPTzkKYE4cZ 5AEw== X-Gm-Message-State: AOAM531NN1leOVOQ7LbiIKvB6PR7nNpnjeRmgbk34/e6YH+XYTKrU8bU gYUe1iAYYwo8DTkuBTQyEtM= X-Google-Smtp-Source: ABdhPJxz4M3UuJfyQ/Z0oMUaKnqoDspo9LWuPGYuUcmj9p+2WrlmX/NWbSHEPJ95PYvgYV4snR8jiQ== X-Received: by 2002:a17:902:7e86:: with SMTP id z6mr1579503pla.316.1598969840395; Tue, 01 Sep 2020 07:17:20 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:17:20 -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 , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org Subject: [PATCH v3 23/23] xtensa: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:39 +1000 Message-Id: <20200901141539.1757549-24-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: 2720A18086584 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: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Nicholas Piggin Acked-by: Max Filippov --- Please ack or nack if you object to this being mered via Arnd's tree. arch/xtensa/include/asm/mmu_context.h | 11 +++-------- arch/xtensa/include/asm/nommu_context.h | 26 +------------------------ 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/arch/xtensa/include/asm/mmu_context.h b/arch/xtensa/include/asm/mmu_context.h index 74923ef3b228..e337ba9686e9 100644 --- a/arch/xtensa/include/asm/mmu_context.h +++ b/arch/xtensa/include/asm/mmu_context.h @@ -111,6 +111,7 @@ static inline void activate_context(struct mm_struct *mm, unsigned int cpu) * to -1 says the process has never run on any core. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -136,24 +137,18 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, activate_context(next, cpu); } -#define activate_mm(prev, next) switch_mm((prev), (next), NULL) -#define deactivate_mm(tsk, mm) do { } while (0) - /* * Destroy context related info for an mm_struct that is about * to be put to rest. */ +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { invalidate_page_directory(); } -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ - /* Nothing to do. */ - -} +#include #endif /* CONFIG_MMU */ #endif /* _XTENSA_MMU_CONTEXT_H */ diff --git a/arch/xtensa/include/asm/nommu_context.h b/arch/xtensa/include/asm/nommu_context.h index 37251b2ef871..7c9d1918dc41 100644 --- a/arch/xtensa/include/asm/nommu_context.h +++ b/arch/xtensa/include/asm/nommu_context.h @@ -7,28 +7,4 @@ static inline void init_kio(void) { } -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - -static inline int init_new_context(struct task_struct *tsk,struct mm_struct *mm) -{ - return 0; -} - -static inline void destroy_context(struct mm_struct *mm) -{ -} - -static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) -{ -} - -static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, - struct task_struct *tsk) -{ -} - -static inline void deactivate_mm(struct task_struct *tsk, struct mm_struct *mm) -{ -} +#include