From patchwork Tue Jul 28 03:33:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688009 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 CD8F2912 for ; Tue, 28 Jul 2020 03:34:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8C09A206D4 for ; Tue, 28 Jul 2020 03:34:25 +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="NV3oI/fp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C09A206D4 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 663E96B0005; Mon, 27 Jul 2020 23:34:24 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5C8456B0006; Mon, 27 Jul 2020 23:34: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 4916B6B0007; Mon, 27 Jul 2020 23:34:24 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0114.hostedemail.com [216.40.44.114]) by kanga.kvack.org (Postfix) with ESMTP id 329256B0005 for ; Mon, 27 Jul 2020 23:34:24 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EC2378248047 for ; Tue, 28 Jul 2020 03:34:23 +0000 (UTC) X-FDA: 77086066806.30.war57_171754b26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id C3730180B3AA7 for ; Tue, 28 Jul 2020 03:34:23 +0000 (UTC) X-Spam-Summary: 1,0,0,7712ad299dafad2b,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1544:1605:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:2693:3138:3139:3140:3141:3142:3865:3866:3867:3868:3871:3872:4118: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:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21987:21990:30054,0,RBL:209.85.210.196:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y81buwr45ywm4s7h6bpbfbuqczdypzm4hnabtkfgyodthbqsz3gwm7bg4oh9i.a1jaj9496mq4u1m89kbzr7fjb7cdtx7g5j8n89fmfbka6jfaho6nnekxgjycokx.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:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: war57_171754b26f66 X-Filterd-Recvd-Size: 7500 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:23 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id f185so5250955pfg.10 for ; Mon, 27 Jul 2020 20:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uNMTof0l4PGDKx//U8EznfVdFXT8uQz00c6nfwI09vU=; b=NV3oI/fpcjeCk/yITe9+HjWezuyDgzgaUD0PzTurnuwFwx7ZZcjU1n5WBCt3cBz1yA /f/82czN6VwzEt1HY8TmOyDa6KuWsdcoNlKPpj72h1aCV5iteqFYQffo9xbG6U3FEtIu YFlI3SfPlb/iq54tNkxzCOBz3gSnq4ldojcvwtrN60Cl47ikp5Y0+lvEkVgWuUAsWzgd JStEqQUjt0KZOtRP+v2Zd6tE4oF1v3b1JM3ZX9o3TUerw7KZoMNL6Kx389bNtbbadz4e mQhhAUXjDnCFuA65uJrbzgjIruO3CBsLzVQmgzOfQuhVqbtwctpqJ3P0ibrYud5BtsNa xq2Q== 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=uNMTof0l4PGDKx//U8EznfVdFXT8uQz00c6nfwI09vU=; b=QBUmmyhpgR4kfjcuDQPhN3IhddH9CpEk9hj6+J/u27YbrLoYkb/gXBzViDehNvBE7Z cYEnvl2YHQ00NRjHzi2fjO/njgotcqj6gcFr1xYY3M2Wxv+At6xrOzV+g4H+ZclkQGJK vckqHhxhOQypjAQOcY7z8FEm3DXUxIfozikea3g9Zxwsr6oxkU9PiUZQXJ6ar2TaoDQn oPxj4wMAXkjB+yMP9MtPtTJ0L09EIzyjSfQbuv3W1qqx3oZgfAiheSDsQaoNe9NTvQuw c0aJ9mI9HZN69fjziV/wOTh3j477X2/8e6wqWpj0m/gaX4yAFkAAoP6K2hscaf620WuP jCfA== X-Gm-Message-State: AOAM531acahur3amrQcq+7gzotB5P/kjwqwz/Eg0DeRL3wyz2VvqBA1i Knaha6/IoxRgAtWoEnth3to= X-Google-Smtp-Source: ABdhPJzIZmb4//zhUgm7WVIq97uNgmKXR8dZct8TvjC0WASMhdoxkkDt8mfIQM/060jVkAhMYMuACA== X-Received: by 2002:aa7:9575:: with SMTP id x21mr22514854pfq.140.1595907262508; Mon, 27 Jul 2020 20:34:22 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34: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 Subject: [PATCH 01/24] asm-generic: add generic versions of mmu context functions Date: Tue, 28 Jul 2020 13:33:42 +1000 Message-Id: <20200728033405.78469-2-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: C3730180B3AA7 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: 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: Arnd Bergmann Cc: linux-arch@vger.kernel.org Signed-off-by: Nicholas Piggin Reported-by: kernel test robot Reported-by: kernel test robot --- arch/microblaze/include/asm/mmu_context.h | 2 +- arch/sh/include/asm/mmu_context.h | 2 +- include/asm-generic/mmu_context.h | 57 +++++++++++++++++------ include/asm-generic/nommu_context.h | 19 ++++++++ 4 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 include/asm-generic/nommu_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 48e67d544d53..9470d17c71c2 100644 --- a/arch/sh/include/asm/mmu_context.h +++ b/arch/sh/include/asm/mmu_context.h @@ -134,7 +134,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..86cea80a50df 100644 --- a/include/asm-generic/mmu_context.h +++ b/include/asm-generic/mmu_context.h @@ -3,44 +3,73 @@ #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 + */ +#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..72b8d8b1d81e --- /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 +#include + +static inline void switch_mm(struct mm_struct *prev, + struct mm_struct *next, + struct task_struct *tsk) +{ +} + +#endif /* __ASM_GENERIC_NOMMU_H */ From patchwork Tue Jul 28 03:33:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688011 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 A7C2A912 for ; Tue, 28 Jul 2020 03:34:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 73AC820829 for ; Tue, 28 Jul 2020 03:34:29 +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="mUj0kRjo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73AC820829 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 8AF8C6B0006; Mon, 27 Jul 2020 23:34:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 85F8E6B0007; Mon, 27 Jul 2020 23:34: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 727756B0008; Mon, 27 Jul 2020 23:34:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0104.hostedemail.com [216.40.44.104]) by kanga.kvack.org (Postfix) with ESMTP id 5BC346B0006 for ; Mon, 27 Jul 2020 23:34:28 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 22A2B8248047 for ; Tue, 28 Jul 2020 03:34:28 +0000 (UTC) X-FDA: 77086067016.10.milk99_0b0197a26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id EF15B16A07F for ; Tue, 28 Jul 2020 03:34:27 +0000 (UTC) X-Spam-Summary: 1,0,0,ebc2ec20d5b11af0,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:2538:2559:2562:3138:3139:3140:3141:3142:3352:3867:4321:5007:6119:6261:6642:6653:7514:7875:9036:9413:9592:10004:11026: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.210.196:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04ygco3x94fomqj787hzhhpm6xx61ypoxxpfpf7uqagosm8nuct1nx8c1t4dwfh.n6jxj4uz3bymfoh3r7gqswn3u37j9yu1yborp9o3dktn3ztn5fadgzxo1bm7u19.e-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: milk99_0b0197a26f66 X-Filterd-Recvd-Size: 4841 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:27 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id l2so3845127pff.0 for ; Mon, 27 Jul 2020 20:34: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=i6IDKVv/shVEq6irgZZFcLvF1FRkf6GgTDbDcMbNEAs=; b=mUj0kRjoi+GkfsEEulsR8I1ODkKxm2yMW1q4DFRYoT2WuM/K1HJF18QaoGvF51V/BY vM83LGIhB6ZjJqLPPHT9uFlSBP3KReVY8HB79V4M8Wu/vF+xgORhq7DMZEQQ++NH0ZAV mFK4Xn6j0PeyM+RyBFjURcrBjsahRZ/ZJI3c3pzHIdF5ztbBCzR8pUV3rViN1Dm9oFQ1 RZGL/vy0pzgwTBdTrrp2WpxcIcp2doMnFvbFH+fq2Yofew4xjI0Bk+jVA47kOwv5RZ2q eng4HHv3cWyaJuK54Ux9nmmi9vtCNW+EBWiEzxhDxn7JpTKe7JiIdHXfBIS4yOBwJGA7 bmTA== 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=i6IDKVv/shVEq6irgZZFcLvF1FRkf6GgTDbDcMbNEAs=; b=c+P/PXFe9StOYMcD60HPV5eNyh48bWyKXt12EsqMfwzkCi5AHPDGa+tMZyvAWVB9Y5 9Rk8KbFo+xyMOuvTq8Bor5JUbJy9ySRqvmJ4un+45czF/4YoTdjSNV/Wscb6aMLXzZP1 K38Xlr0EY8vxya3JeE44SolacfWEavWTUEN0NoJbmS2+wiUG+4wJEVEBz1aJu7dJb0Er aYLQBl0AkpGGHjVdyAw6WPrmBvHtjIJK48QiPnIvBG5GtrOniN+0AGtXK9cspicFKCtw 9YJ18uJlNiozGnE3O1/xgwuh6vcVyvVhnAJmMw5Bhg/B0P7NORXVNyl+fN5DUtjDcchD WssA== X-Gm-Message-State: AOAM530wit0yp4gAaTwj9iHJKAGYc6+tTy5lGANxeY+PCMzd81ympB04 kJeonE0+HnqNdwGk1XyeB0Q= X-Google-Smtp-Source: ABdhPJxXK0fAvVm2vGx0kybaDVzbf7EyPsM4mvSci9SPK3buL1yg9sAfhTTS/zJLffLE9MCTeN62IQ== X-Received: by 2002:a62:fb0e:: with SMTP id x14mr8626171pfm.34.1595907266776; Mon, 27 Jul 2020 20:34:26 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34: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 , Richard Henderson , Ivan Kokshaysky , Matt Turner , linux-alpha@vger.kernel.org Subject: [PATCH 02/24] alpha: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:43 +1000 Message-Id: <20200728033405.78469-3-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: EF15B16A07F 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: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Signed-off-by: Nicholas Piggin --- 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 Jul 28 03:33:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688013 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 A0B74722 for ; Tue, 28 Jul 2020 03:34:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6382C207CD for ; Tue, 28 Jul 2020 03:34:33 +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="nOYCqA5k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6382C207CD 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 8FBEA6B0007; Mon, 27 Jul 2020 23:34:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 885D66B0008; Mon, 27 Jul 2020 23:34:32 -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 74DF06B000A; Mon, 27 Jul 2020 23:34:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0092.hostedemail.com [216.40.44.92]) by kanga.kvack.org (Postfix) with ESMTP id 5F2536B0007 for ; Mon, 27 Jul 2020 23:34:32 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 27366180AD815 for ; Tue, 28 Jul 2020 03:34:32 +0000 (UTC) X-FDA: 77086067184.08.angle26_311282926f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id F2E4E1819E764 for ; Tue, 28 Jul 2020 03:34:31 +0000 (UTC) X-Spam-Summary: 1,0,0,d04a3cec0aaab77b,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:3874:4250:4321:5007:6261:6653:7514:7903:9413:10004:11026:11473:11657:11658:11914:12043:12050:12109:12296:12297:12438:12517:12519:12555:12895:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21611:21627:21666:21990:30054:30075,0,RBL:209.85.215.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04yrr9yia9payiyekcbjz8ec1phubyp4mm5kkao45ygdppn66twngmkj9g9gbmr.fesddr64j3xkwmgh7d4xe8wkp7wfta8wuaz86rfqhd97p3dh5sgtnx8y4ffn9aj.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: angle26_311282926f66 X-Filterd-Recvd-Size: 5457 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:31 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id d4so11120218pgk.4 for ; Mon, 27 Jul 2020 20:34:31 -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=hmVZOCfUq47mihn2FQ6TLRI6bQd0ipE9wiB6y1RWkXs=; b=nOYCqA5kKlucmXolFRvkYUAhgIDIrlfwX7JkbLcqxa9mVyIBAgOps2dlFBEaS06Ehm Opq1E8SxSa5DZcmM5gdCSJnKF1LAk8Jz3ZLnXxEu9BFgiFvabAxaIyECgBWf2/DQ5JT/ LpohiYViviwQe/wLTxwbILwXU2Jf9kxSoBSZe2i3OUTu4DF0sNEiVjIfM8BmDPcd/PH3 kZDZzc5VLqKq5YdTkJHXHJ60hIaPRW3wsbtjKhUIwMRUt4XxctfwIiARiMIHCc/kIlkU pkWWfrbTNjTqRIt4FJqv68SUeti0vau36dq4yohE7No18xzIzCLPW1klMqb3fyCHduOA kzDQ== 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=hmVZOCfUq47mihn2FQ6TLRI6bQd0ipE9wiB6y1RWkXs=; b=bEsajYFUMUsoLKjBYp/2H83HIaz8gIZVOqPoN/oFM7HW7hCSKnqEf8s8yVe4LTRAfJ X9aabbBftiFAYk9p/23bENAx6MXU51rywIQ5A9gKCwyIZbI1uoRKnnEKXJT3+jxtGuFp 2Gam16qpi5/dbM1Fn9OUQnbcerPZCgqyR8KJII+qPWoU5zh3sFOhqcQ03wrer6gDhV7n nPaiJMWwMqF/PWxs3eml4Iqp35QveQIDgOfKYCcK9ofMngaI23iZ7zw3qZ0rWojg0LlZ khM50WsjrIWSupprH+wCBCXG7sWLw8hftN71+/FVQBlmUiLxNBNIYSmLWHvlVYW782jR 06aA== X-Gm-Message-State: AOAM531pIFrcX2Bka+ic3cAx3gmEt/QpBvAUHh6aMlWqfaY/uFSl+Mke 3zp35himwnSIz2/AMJSjI/DqYavf X-Google-Smtp-Source: ABdhPJxrlYk3wuSoz6yW5gTVzZjaFK+AH99QTvOTfXhxxhM+IRG7XYNJ7uug5lni8egvpEIIbDr08w== X-Received: by 2002:a65:4bc8:: with SMTP id p8mr16084763pgr.418.1595907270841; Mon, 27 Jul 2020 20:34:30 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34: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 , Vineet Gupta , linux-snps-arc@lists.infradead.org Subject: [PATCH 03/24] arc: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:44 +1000 Message-Id: <20200728033405.78469-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: F2E4E1819E764 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: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Nicholas Piggin --- arch/arc/include/asm/mmu_context.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arc/include/asm/mmu_context.h b/arch/arc/include/asm/mmu_context.h index 3a5e6a5b9ed6..586d31902a99 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,12 @@ 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 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 +169,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 Jul 28 03:33:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688015 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 9C807912 for ; Tue, 28 Jul 2020 03:34:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5DF5A207CD for ; Tue, 28 Jul 2020 03:34:37 +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="QHMAvZm/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5DF5A207CD 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 750446B0008; Mon, 27 Jul 2020 23:34:36 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6D7D46B000A; Mon, 27 Jul 2020 23:34:36 -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 578EF6B000C; Mon, 27 Jul 2020 23:34:36 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 40D736B0008 for ; Mon, 27 Jul 2020 23:34:36 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0BB313622 for ; Tue, 28 Jul 2020 03:34:36 +0000 (UTC) X-FDA: 77086067352.09.honey53_61106a826f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id DA9D0180AD815 for ; Tue, 28 Jul 2020 03:34:35 +0000 (UTC) X-Spam-Summary: 1,0,0,6c3d606ef776d1f9,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:4250:5007:6119:6261:6653:7514:7903:9413:9592:10004:11026: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.66:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04ygfw9j99jryb5oh58h3h6pj6p67yc4frdze4wjpnfu3pmigtmu9mix59nkn34.w43qub5fzz1k8o1zw9ttdfje5eius48j737xh6cqu7pwrtgcm35qedroc1zuiax.y-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: honey53_61106a826f66 X-Filterd-Recvd-Size: 4878 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:35 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id k71so10767287pje.0 for ; Mon, 27 Jul 2020 20:34:35 -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=Nrd8d6fyv75dXwELwu7SjNDDoELmbfaISz3tG67A/Og=; b=QHMAvZm/I0mF7utvjLbQSyiSosPMZuOxRY46k50CA7iZnu7xOPahXjDTi/nli2iOhv Oujn0wifZJR0DIe2O8z1n0MmwDSg9mE3kxEZ/3Bms22rTyKzBjZpGjj4ZRt1TsSZAXKH cxEtM8iWj21TtUr1td7PZ1i6Xfb3xSLRfzOaallNzYOVSTkzj2Y7yKuPBodwXP0ooyRc plFBjkGe3b2VhcXajSxhIDjHOKQS9D34CfcZEhtK2JnsDK6E28/nBVwOwsb90HNxJSHp jCvNTGFACF+ZyyVeYdv5DKC96pLKi++TWTA+CqIsqWVfyWEpL1nESj9KwJxZuZyWGUdV d2ow== 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=Nrd8d6fyv75dXwELwu7SjNDDoELmbfaISz3tG67A/Og=; b=cfmLu/VfJckxu9ys2pemufYOe9HV3qXHeADNLWfhvhhNWWxofMtXtwHRuUwGr3GH+a nS1OzCVl6/wkIKwHEVSjva0ADSX+EsjRugBbtTrmP6Za+8v0vWn6rCRlRQeC+a1zKSwi PrO22/+JU9R9R1gbPLoJ4+NTulRDpHk3TK4jJBfJeHr79TSdoBxzKpqEVpYR1HJP0xc8 8QalcrXcIfd+7U+MVgMs40wswNZbSZHgsTdBRpQsCbu4d9e9SaWZjcxoojqY6peuwdVD pLVCeRkRm7poGPbNWCc4ElXofaaUzHhCBR0dBspD24zqDcfScj/XF+pmWsLKfKdn0hMA anaw== X-Gm-Message-State: AOAM531HsC7FcMCnSLdcoCFKYLMmp5svlnaSlbCK+ddgNmfSqYDg50CF dB3V64ugjXEJ0PNlFVwX9Rg= X-Google-Smtp-Source: ABdhPJz+ArXXeCto+CwCq9TBJZxoqe/CgzjVj2vgHlZDtuVaDXZVPE2JctuE3f1k9kh4PunK2ucVxw== X-Received: by 2002:a17:90b:4005:: with SMTP id ie5mr2327280pjb.147.1595907274466; Mon, 27 Jul 2020 20:34:34 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34: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 , Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/24] arm: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:45 +1000 Message-Id: <20200728033405.78469-5-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: DA9D0180AD815 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: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Nicholas Piggin Signed-off-by: Vineet Gupta --- 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 Jul 28 03:33:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688017 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 73165722 for ; Tue, 28 Jul 2020 03:34:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3E10D21744 for ; Tue, 28 Jul 2020 03:34: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="HnC3UjGv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E10D21744 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 4E0936B000A; Mon, 27 Jul 2020 23:34:40 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 467B66B000C; Mon, 27 Jul 2020 23:34: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 32FE16B000D; Mon, 27 Jul 2020 23:34:40 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 1C0A36B000A for ; Mon, 27 Jul 2020 23:34:40 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C3A171EE6 for ; Tue, 28 Jul 2020 03:34:39 +0000 (UTC) X-FDA: 77086067478.23.dirt96_2c08d1626f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 876E537613 for ; Tue, 28 Jul 2020 03:34:39 +0000 (UTC) X-Spam-Summary: 1,0,0,6f713c2a1cd0c233,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.210.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yfao45k6bprgey97xinedt3ft5byps3oqjjzayptewzi4ap6hqomt5eabr5nm.34udrf67e13637gk1gpx9zj81dqd1kwfzm6ozjc5ybyae8zcuuaxtj9o4kqkm96.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:23,LUA_SUMMARY:none X-HE-Tag: dirt96_2c08d1626f66 X-Filterd-Recvd-Size: 4653 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:39 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id w126so10002490pfw.8 for ; Mon, 27 Jul 2020 20:34: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=KLCo3Tk+lxREvcakRGac/Ng0j4T/GOteVNveKT3Mrb0=; b=HnC3UjGv+m0tU9xTbpRWvbcPR7+Lt5ZN3EL28a/0mi8A/q+hbAczLsS3nUVqiGLiuW EiniTd5jtilMJZFmO0PMPi7a+blkrENBtM9oMLNODC3zJ47JaPCeNqklG71kRDoh3yFg HbK9DYUTb1/8B4ykFsAsLsGEaFwWbbZaMVEeU4Sbgx5UK14DK3qtAZCGtxeaOhNf08r0 zXZDVWgYlqQZlIVKaXvX+ouKXW+XvptAqLX+kha+1E4F2czSCLJ7mOTKjpTzZs4YhJar g0BmGmRvqG/YhqfVf5PSUeEfeLMeOi5zfXVLkGmM+O9wSf+9XGCZHQYm6CxvjAxMo36Z NjmQ== 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=KLCo3Tk+lxREvcakRGac/Ng0j4T/GOteVNveKT3Mrb0=; b=Wd9lridysymMou7Ev3RlQUlWvTRto3anzxlxDrtHbOQNrZC3ZgW4CrPsgasnTBOZCp cX8fgT8nstIvduVoY64hxSzCRknyztDzKNLPiilEZj76pvGYWw06KvtuHQtGOXjx0qCd afdiU6WP1NILjlnM+lcjLfGpbGi9wG3mf1Amb4cNPbSHKfIvplTPaMTBSQyPPMEIGNcv djpMBd1mFYGzbindRhVvPL42vn0J5Eqco7jR3+RwzcJQLhpYRiZM0N67YRKx0eLku7Sd upw4fvqsJXky8/dZMH1YR/jUQkc5RBGbUJ4L2E+drNZmvKnLAJtEEeMcP7r1pAcp3H/s mViA== X-Gm-Message-State: AOAM530QMdxFO6xWv3ZeDAtl5IKy9HHuqUbh7RV+Kk3A5Ha9FtD2TM5l 6z/B/dLaGSHwq68V8Ee9jRE= X-Google-Smtp-Source: ABdhPJxqkjcQJjy20YQ8lm0iiv+MQTiwXbUI2uiLeEqgTNovbPmCo9H8X++qot7CTFtYr/wPKm7S+g== X-Received: by 2002:a63:395:: with SMTP id 143mr16621520pgd.57.1595907278354; Mon, 27 Jul 2020 20:34:38 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34: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 , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH 05/24] arm64: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:46 +1000 Message-Id: <20200728033405.78469-6-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 876E537613 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: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org 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 b0bd9b55594c..0f5e351f586a 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, unsigned int cpu); #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) { @@ -244,12 +244,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 Jul 28 03:33:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688019 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 E13B5722 for ; Tue, 28 Jul 2020 03:34:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9D88E207CD for ; Tue, 28 Jul 2020 03:34:44 +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="Vc3Euyrt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D88E207CD 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 AAAB76B000C; Mon, 27 Jul 2020 23:34:43 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A33DA6B000D; Mon, 27 Jul 2020 23:34:43 -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 8ADAC6B000E; Mon, 27 Jul 2020 23:34:43 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0221.hostedemail.com [216.40.44.221]) by kanga.kvack.org (Postfix) with ESMTP id 7665E6B000C for ; Mon, 27 Jul 2020 23:34:43 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3A86B1EE6 for ; Tue, 28 Jul 2020 03:34:43 +0000 (UTC) X-FDA: 77086067646.06.look57_1f03d0b26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 097E3100419F7 for ; Tue, 28 Jul 2020 03:34:43 +0000 (UTC) X-Spam-Summary: 1,0,0,1327960533f667db,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.210.193:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yrd36c3dttt7s3378jc9rtnnwxnop1ebj9kqya9ms7xejtorybp74i9cyeg3d.uf3siiy3z1dhym7dhaw3wxpbhmcbtp373o6qmfcfj343cpe3ygkru7nb74n8rue.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:24,LUA_SUMMARY:none X-HE-Tag: look57_1f03d0b26f66 X-Filterd-Recvd-Size: 4155 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:42 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id r11so2282917pfl.11 for ; Mon, 27 Jul 2020 20:34: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=0CJ5pLUNj5CNYiJwzkvMW2lqb7Q/oa/023gCjAl7Yjo=; b=Vc3EuyrtZlTxBVYXaWLv4HsOBpE/JC48K5IOkbUrzdd1iuoTif1YkuuIkaxDOly59V 141KydHb6s1o11WJolYISeqKXd2TVmTgB1OoU24xAQjETivwJWCCcP6XWhJyZMSOuuGO X0hG6b+9gV5qqgl4Wk1CE3lZiTQTT3EaSLFgG1X61P/T5J2Ea3kuYyygTDlgyQt3gGLD 7v2q4qyUeCNBQMAfSEU0mSO0W0WP+OpjeuM6szp63gXLI/iyCNVH/zNuF+xIXRv9IRN5 G20TbqJ2sxbepnQI1zVm4PTwSO/LWJd3QhIv9TEwC21BtlZ2F5UZzxHAvXW2tlx1s0On BPgA== 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=0CJ5pLUNj5CNYiJwzkvMW2lqb7Q/oa/023gCjAl7Yjo=; b=FnSUUaLhOBTlFlVvI84Fpv7R7Rn+5GhV603V/KunItD6sfvpkyyPc9px52UTmFVAWl kajjFFtA3uMG37BgyLBQKZE8mgyXajj9a9dySYSIjeDy5Ofp8J/cScrsDpHNKsomKYTF l3H4qDLAp0SxgPrVBk+5GlCBxAglxp6KXBWaqLrJRiQnuHhBErPsrr7vZAvAbHv9zYyC hAxegWfkW7aBIgRXkk/ZS4pjPZ899kPQSpPT1sYg+VmTnsEG+pxMlcz+vmxNYmoU7xhX oyikrJ3K0XD1NJETEwcK/cTVFKJSnUIsUEYOCwfzLOF4bZEpqQSJsQeMD7p0yHefvEFB WpVg== X-Gm-Message-State: AOAM53199DZg8e6l9cJQsUFIEb69HD43V+44I8IaiK1H/rtAAMvVBFmx iQ8Z9tUQ8OmlTOyj/28T/k8= X-Google-Smtp-Source: ABdhPJwlYuThuwrcQ4rOZSpcW7L1u70L9KCqBU3RF2TC1IQonzCv4DT+AGzLtfUsDAICSgXhJXLo/A== X-Received: by 2002:a05:6a00:224f:: with SMTP id i15mr23996525pfu.241.1595907281973; Mon, 27 Jul 2020 20:34:41 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34: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 , Guo Ren , linux-csky@vger.kernel.org Subject: [PATCH 06/24] csky: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:47 +1000 Message-Id: <20200728033405.78469-7-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 097E3100419F7 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: Guo Ren Cc: linux-csky@vger.kernel.org Signed-off-by: Nicholas Piggin Acked-by: Guo Ren --- 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 Jul 28 03:33:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688021 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 9A1DF722 for ; Tue, 28 Jul 2020 03:34:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5C5B6207CD for ; Tue, 28 Jul 2020 03:34:48 +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="alOL57K1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C5B6207CD 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 57B216B000D; Mon, 27 Jul 2020 23:34:47 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 504046B000E; Mon, 27 Jul 2020 23:34:47 -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 3F3446B0010; Mon, 27 Jul 2020 23:34:47 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0161.hostedemail.com [216.40.44.161]) by kanga.kvack.org (Postfix) with ESMTP id 282BE6B000D for ; Mon, 27 Jul 2020 23:34:47 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D81E1181AC9B6 for ; Tue, 28 Jul 2020 03:34:46 +0000 (UTC) X-FDA: 77086067772.12.gun88_4706b9b26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id AAAC01800BD17 for ; Tue, 28 Jul 2020 03:34:46 +0000 (UTC) X-Spam-Summary: 40,2.5,0,a5abea49ce35a5fb,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:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30075,0,RBL:209.85.210.193:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y866zf4us9ai3n8wdnsokbmkko1ypdugtu6mk7or3rhpc1d4e88nuik7d1cph.7kp4yge8af637iiadjaee6h36hcxanjyoutp57y3gwa45u3p5af3r6u7a1m7m3e.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:1:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: gun88_4706b9b26f66 X-Filterd-Recvd-Size: 5131 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:46 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id 74so1918737pfx.13 for ; Mon, 27 Jul 2020 20:34: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=HL7MtoQQEXJbD0R6d/PbjEBDKKa2Jd3NzBDoc9RLQlI=; b=alOL57K1j81ubRKJUFCi4kYNgADnqsVICZmOks4Ew6eayB10wPf7QRXEIyQLQiQz+r JULpy2JKO1zSwr3rdJIzFIdo3cOSvHCAv16IrpnjIZzLVoXBB3o3l1KfiHxOLuMYzj+7 zHhh9o/vHTqdaLRcE37Gy9CE+sCcQeNgzxn7B24EImXeaLx27nIOh8s6aUDv+Ks22Z4D LckZxLW2BY8kq1RKzJF4W1xdSzb2EgaYbZJ/iDFh/gTQ5Z05NRLi++iva8t7mgWGqgqL uRGJcB6oZT0MIKkE/ImH+lWjNq60Mx5fqvbHTKGP+uNnbhJJMOyDU6TDSNuZa6msgf4C oq1w== 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=HL7MtoQQEXJbD0R6d/PbjEBDKKa2Jd3NzBDoc9RLQlI=; b=F12qS3S+eCZ7KGtD+TnHvHYH2JcYCuEY/k5ntEmysy1NRArMv6MM5rl+VXcUKLY7S1 LG5AkID7DfECPbqyu2zQX8uxyMb+GJBeSSuTAvLMwu7e95FO76pp8TIRXBfoGDbvHOTN d8oRpsCEUemZaaN7R5wCUwjDWHEXN71drzenByRWdG+/lkQbUDChC4QrOrlN/MQH6g1t ogOMViJHAkc+5/4Yd/qTvC86rUV2jXfnJ6hMQkGpf5n/ait2+xhk2j0iOfKT4vg2GbVX TiLZuXJwOJJKWQ2zJFmyJvjUUCMLdvKFen5XJzRdK6hyYkj4MDjIrCtSGVuDVDX9CUpE Fd1w== X-Gm-Message-State: AOAM530eA44V49Z+V7rZMChqlTO/KJP1BSUOrIExU7iSPb0CrefGJLwJ ho0cpNpjUrZrYToaHxaNXx4= X-Google-Smtp-Source: ABdhPJw9Vc66wmybAqwevWxPGcHdHCsl+QByAKHybSBTqvhpqDvbi8b/flGkN692mj/WG7gwCMJaLg== X-Received: by 2002:a62:3385:: with SMTP id z127mr9025613pfz.31.1595907285632; Mon, 27 Jul 2020 20:34:45 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34: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 , Brian Cain , linux-hexagon@vger.kernel.org Subject: [PATCH 07/24] hexagon: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:48 +1000 Message-Id: <20200728033405.78469-8-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: AAAC01800BD17 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000032, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Cc: Brian Cain Cc: linux-hexagon@vger.kernel.org Signed-off-by: Nicholas Piggin Acked-by: Brian Cain --- 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 Jul 28 03:33:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688023 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 83FE9912 for ; Tue, 28 Jul 2020 03:34:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4F82C206D4 for ; Tue, 28 Jul 2020 03:34:52 +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="q8pGv5BV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F82C206D4 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 3F39A6B000E; Mon, 27 Jul 2020 23:34:51 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 380926B0010; Mon, 27 Jul 2020 23:34:51 -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 1F6AD6B0022; Mon, 27 Jul 2020 23:34:51 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 077266B000E for ; Mon, 27 Jul 2020 23:34:51 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C8341180AD815 for ; Tue, 28 Jul 2020 03:34:50 +0000 (UTC) X-FDA: 77086067940.12.joke85_450588726f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 957191800BD17 for ; Tue, 28 Jul 2020 03:34:50 +0000 (UTC) X-Spam-Summary: 1,0,0,eb62fbfbeae5d759,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:4043:4250:5007:6117: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:30034:30054:30064,0,RBL:209.85.215.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04ygdoqpo14xi9uphaupy88spfi5fycqqbywfsbki3tjbisu3kdcczimw6qacg9.i3o1eu1h3mejcwzisojufzr1xrrt1c7otgibbzed6zs1wq3wzo5xidn4bgioejs.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:neutral,Custom_rules:0:0:0,LFtime:31,LUA_SUMMARY:none X-HE-Tag: joke85_450588726f66 X-Filterd-Recvd-Size: 5244 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:50 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id w2so11096675pgg.10 for ; Mon, 27 Jul 2020 20:34: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=Qg+y9mENI5s/3Hp67w0VaPORZ5hguo4wpnU/9+nxop0=; b=q8pGv5BVNDYKDeE5Q1H62HjmQ29s5vTWRt1bs9tEywFk7P2jILZZXZj8dhK+A6bNYl 8RfDO1oURPA1Btq8/J3eK/cYo5wE58mnRy8b8DKaW2QLg6yi7EvWWbnQdfpOIMCQPi8U U/Wck2kQWzSKrHdiOAWxZpK6F3MSgeRSwxDh/MLTdiYW1YzoDlKf0pp3pOit8W1WSG7z XaxDc+A58BSmoqCWAMghjddlMJFmS86yeetQJb9oX6FwgCXm4vkKyGGa8XYX6bhWSAYL 1m7dnzjr8UpeWd+a6aZsdXxiyey8d3NLcxPP1vijokqj0BEspe4gAFC6ey5EIW+H+wtP Aalg== 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=Qg+y9mENI5s/3Hp67w0VaPORZ5hguo4wpnU/9+nxop0=; b=PCClEbxANBJhYfvRM9TExkGm0uxsvAWhbQPGYRwY2QmBHot+rPJoTLqrHlGH0OmlBU xnHKV5EJlwbkKwCE052Cvl/941DrDFa4veEl8thU6zXXhBzVBL4B0/vqoW82DvEEWrEN ddowVB4HaPisRWimfivqX6IahWW2d5MdbwTuJTBKXMMPaljI0RhXLdSil5ISnFG0aPcP Jlk/pIjOkz96KwSigea3V6vHJUCzNAtiKNuRRrCB289ku7wbzbF1Kb2AkDHnirWYzneS 6Sc4xri6+JAZndQpVa/rRZjJWjl9BBvAHe0cR13I9YV5mCi3w8y11H91Cvav7orzbdOg uJZQ== X-Gm-Message-State: AOAM533cr1iCPBKaoBX7lTCTLCrn/KjlOALHaa+qa5z+YkwA5m9anjT9 mI9Tyotsnhvk9MT18IqUbZrgqwHo X-Google-Smtp-Source: ABdhPJyegue1Y71ByKLFRmuTiOaLWPUs+XfPg2h9VkUzZQTnWzkiHGsmGDR8fjYjovJnS9bGyvA9UA== X-Received: by 2002:a63:d951:: with SMTP id e17mr22284647pgj.318.1595907289567; Mon, 27 Jul 2020 20:34:49 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34: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 , Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org Subject: [PATCH 08/24] ia64: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:49 +1000 Message-Id: <20200728033405.78469-9-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 957191800BD17 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 --- 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 Jul 28 03:33:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688025 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 58C7D912 for ; Tue, 28 Jul 2020 03:34:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1A67921775 for ; Tue, 28 Jul 2020 03:34:56 +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="ZbpL9/1A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A67921775 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 EC8A86B0010; Mon, 27 Jul 2020 23:34:54 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E533F6B0022; Mon, 27 Jul 2020 23:34:54 -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 CF3AE6B0023; Mon, 27 Jul 2020 23:34:54 -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 B9C9E6B0010 for ; Mon, 27 Jul 2020 23:34:54 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 882F63622 for ; Tue, 28 Jul 2020 03:34:54 +0000 (UTC) X-FDA: 77086068108.17.honey18_22062f326f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 5C986180D0181 for ; Tue, 28 Jul 2020 03:34:54 +0000 (UTC) X-Spam-Summary: 1,0,0,06127e68c8edb6f0,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:12986:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30003:30054,0,RBL:209.85.210.195:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yfi1y5xrwyze6t84huz4jsj7hqoypbwzg33saw74p8hotrw5eykidijqgd65k.ho1egfzqq8rbg77ctspmu19m95o1j3aye68imq3i379gp8rnw89qctsz55oahib.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:24,LUA_SUMMARY:none X-HE-Tag: honey18_22062f326f66 X-Filterd-Recvd-Size: 6867 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:53 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id z3so10158237pfn.12 for ; Mon, 27 Jul 2020 20:34: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=H36cGMxHQ8BRm6wAF0579NyVmdPCO4iD8RgcvZW00go=; b=ZbpL9/1Ay/N9a5W5SHzbKHeCmcXXyhgdUM1zeQaWohbRyeJkrKXcxd+Tgh12sMDZuI moTVnVoeT0/WcuXz1Fvqm1fRKZ+6EcG1BRkppL38LtfukqCrGWniBKUagXbrHNvgddXB 5O7KUvItxpvNqrX1BlhQS6QBB3JPYVEKPpGLHbMD41QJfY3m5dZKzO1TVAOcP7xndLSM gjCrZJbmiFAfk89S9O2q6cjg9orGY1gODQZB+bAECk//GJCoe8Upi3yPoNJ3jZELQLVV G12fEtcevoV4SOnILf2SpvUvHxG4Q7n6zc9fdsD+bRtSmamMlj02wT10XENLMTGLDmUf vwDA== 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=H36cGMxHQ8BRm6wAF0579NyVmdPCO4iD8RgcvZW00go=; b=uiP4Op3dRCiZaL+c0NRSP7KGs77G/SQ+sZZrWzONSOm5jS2QuhcyMTsIf0TRBP12Am c88174TzmdQLYNsm4J0P1QYSRodgkpDxIOBZTmKWgcQpa9xBQAGoJl48AMUIHEVgxPAJ ZM8SKJ3qQ7HJLmc2eZBmKe8WLl7yGwEPFao2/Tb2JH1MRKklLVXQxr1ynwbaAbLUb9On 2on/GP5CYsENmcKAiPvyRB3va2m3Ls6R9tEGx2h3PSpidQxQ+nA8oyQNxZ1bA1qIt+8t 4UygTINYmjs3W74t4jllm0lSu6P6kJ5Q+Ndv1xvZB0dvav9pPW+9KlOTMwLUbxxybLfY BGMQ== X-Gm-Message-State: AOAM530wrJ8geCZqB7AUt/GwZnYtUesM20hB/ct37PIhVzztcJwX0cy0 LnCPB3ySZmLSa63VLcZo6XI= X-Google-Smtp-Source: ABdhPJzJR5NRXF3FPFa4PxoySWuPRzG3iBzf77Gh7wQNEZ7DHgBwvAi63TXh9kJn8Ls/uFAlU1Z9vw== X-Received: by 2002:aa7:9ac6:: with SMTP id x6mr22895541pfp.326.1595907293192; Mon, 27 Jul 2020 20:34:53 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34:52 -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 , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org Subject: [PATCH 09/24] m68k: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:50 +1000 Message-Id: <20200728033405.78469-10-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 5C986180D0181 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: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Nicholas Piggin Reported-by: kernel test robot --- arch/m68k/include/asm/mmu_context.h | 47 +++++------------------------ 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/arch/m68k/include/asm/mmu_context.h b/arch/m68k/include/asm/mmu_context.h index cac9f289d1f6..56ae27322178 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) { @@ -79,19 +76,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, set_context(tsk->mm->context, next->pgd); } -/* - * After we have set current->mm to a new value, this activates - * the context for the new mm so we see the new mappings. - */ -static inline void activate_mm(struct mm_struct *active_mm, - struct mm_struct *mm) -{ - get_mmu_context(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 +160,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 +195,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 +208,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 +216,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 +283,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 +297,11 @@ static inline void activate_mm(struct mm_struct *prev_mm, #endif -#else /* !CONFIG_MMU */ +#include -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) -{ -} - -#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 Jul 28 03:33:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688027 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 84FDF722 for ; Tue, 28 Jul 2020 03:34:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 50FD8206D4 for ; Tue, 28 Jul 2020 03:34: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="JzX91hOG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50FD8206D4 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 26D5E6B0022; Mon, 27 Jul 2020 23:34:58 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1F5F46B0023; Mon, 27 Jul 2020 23:34: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 0E56F6B0024; Mon, 27 Jul 2020 23:34:58 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0162.hostedemail.com [216.40.44.162]) by kanga.kvack.org (Postfix) with ESMTP id ED25E6B0022 for ; Mon, 27 Jul 2020 23:34:57 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B45488248047 for ; Tue, 28 Jul 2020 03:34:57 +0000 (UTC) X-FDA: 77086068234.13.boat02_1216acd26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 86A3E18140B70 for ; Tue, 28 Jul 2020 03:34:57 +0000 (UTC) X-Spam-Summary: 1,0,0,cf9617f211877f83,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:30054,0,RBL:209.85.215.196:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04ygynfawo6nrpi89wx4q11jyy3ggopbauhefykhy7orrg1qob1f64zha56p3zd.5yei5tgjfhuspusbpcgdj5akac83ptxuz554trbx4sytxy5tqspdgadxedojnie.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:23,LUA_SUMMARY:none X-HE-Tag: boat02_1216acd26f66 X-Filterd-Recvd-Size: 5216 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:57 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id w2so11096803pgg.10 for ; Mon, 27 Jul 2020 20:34: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=wuGEwlNHfczwsScET5//DK/IY7Qs+PjjbY2XOsrR6EY=; b=JzX91hOG9NtIuBKa4imFLxOSKGBFW9r08mPmUWXNkmqjdFSwsFP74SFBgDJwSsT814 fV25eF/NSdE6URAbiyqGs7Js38ZHNsC0AhFdTUyhCmEij7QkeDy1ZEvmkS46DAH7olR9 2fS6FHJZhA/62c1/TaMzOqXffaQdQlJUJb3fU5xnIF+3ItCX8cVcEJ8QJYGBZhd0aKC8 4ey+8pgO0OBn3NdLUoWzdfUmKRltKFTcI/aLSG8rIEU/eJqRm9Fi9xaHI2j/vmxbi8AP xcuNFyJwQmDeInRiVoghZzqQpGROifpDe0LkKA/a5SOINwJrVMAtmfcnj2KC5i05addr ZFcg== 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=wuGEwlNHfczwsScET5//DK/IY7Qs+PjjbY2XOsrR6EY=; b=tUglORawJWPQJZJ5DL5q4bIHdHdKcpxI3gFONWXlraL9WTTZMIp2q/f6SUF7Z+hZcR DYNf6f5YnGJNeH21+PlL2iCJkCjUq/tAU+7+cVU2T2PeplPQ0yKVHGvqi4FChG5M0qQs 95DqaHN7z6bZ2/FsExEeqHjCDiXRLPuwoWIankTbEvFZpdd3nyNUZxm9tP5lWim1GX7L KIkuMYNdRIwkV/0njehCp/XA7h4hJsO/qEOsumJUr+44G8cmrupaO8iEmuooJK9b4lV7 D78wAnpqIWNQqc3aIa77EEMbe316Eu1PnefjIWug0jWIGTf/jxlnUMh4s0m5EJsyMR+S BUvA== X-Gm-Message-State: AOAM531WYxeiRWfGgeoCF1PHKmQBl3g9wplph3bjY6/4skyLAgv7hXZy 4VbVm3F7Bg0gBka8BlMAk70= X-Google-Smtp-Source: ABdhPJyB9tiMjx9VoS++5n8lKmCAqBX9f+Qc6ZVPl2F8mSMoNW/T59n6KR87om073TyALKnI3ikReg== X-Received: by 2002:a63:d912:: with SMTP id r18mr22859487pgg.358.1595907296483; Mon, 27 Jul 2020 20:34:56 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34:56 -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 10/24] microblaze: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:51 +1000 Message-Id: <20200728033405.78469-11-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 86A3E18140B70 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: 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 Jul 28 03:33:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688029 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 779CE913 for ; Tue, 28 Jul 2020 03:35:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 42FCC206D4 for ; Tue, 28 Jul 2020 03:35:03 +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="R59x4WUX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42FCC206D4 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 1AAD96B0023; Mon, 27 Jul 2020 23:35:02 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 133D26B0024; Mon, 27 Jul 2020 23:35:02 -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 F3CBF6B0025; Mon, 27 Jul 2020 23:35:01 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0106.hostedemail.com [216.40.44.106]) by kanga.kvack.org (Postfix) with ESMTP id DE5FB6B0023 for ; Mon, 27 Jul 2020 23:35:01 -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 A1F66181AC9B6 for ; Tue, 28 Jul 2020 03:35:01 +0000 (UTC) X-FDA: 77086068402.14.cap47_26151aa26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 672EE1822987A for ; Tue, 28 Jul 2020 03:35:01 +0000 (UTC) X-Spam-Summary: 1,0,0,e66fcd31326d776c,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:3874:4321: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:21451:21627:21666:30054:30075,0,RBL:209.85.216.67:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yr3oc8iz9mscgnk4dth9po1z49jopnoa6a14318c98o3ooq8ziah3y9faxzp6.anznit1z46ayx4e179rhwhgugpqu7hff4z89ip8rpc1sm48p38df7m4kmfj7ncj.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:26,LUA_SUMMARY:none X-HE-Tag: cap47_26151aa26f66 X-Filterd-Recvd-Size: 4945 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:00 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id lw1so2096114pjb.1 for ; Mon, 27 Jul 2020 20:35: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=TiWkNEwCCC0m6okc9WhV7jiLYdcUc3FOzWjygUNhbfY=; b=R59x4WUX1ge7CJHjp7PrxGdP+hoQajod9t8NFjvLRVLvs1peTEITeF3Gp27+jITFY6 GQoi9/EQoCPfOnxLXkP60QFfYCWSUEk3eTkXFQDG4Xguo7gH94G/37wS49eJT7z+YrCB t+RbWg7MuO/Y/4E7YJoEiKhWZZeXAH0Qe9n5b5qfzTJCR04vvxQi6Go4PeF2Jjhqg4Xh 17wdDPEF5ZtwdcKNb8nZb/v5B5Lf+XnKAQAzkxZI33zWGNV6HYMtiXt9O9x6JmS7FN92 eLf5M3eUdmffl7AUPxZUBULkdVbqsd2wMnbu7a2v9vLL3TyoTRtKsQXPZ5cfBIxmBlRR fgaw== 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=TiWkNEwCCC0m6okc9WhV7jiLYdcUc3FOzWjygUNhbfY=; b=brRHymHVJ9UoAec+51r0SZu5VezzAvhXQpKCANfsyPFGbbMg9NuQW2UMpfLKhBuyfJ p5xrXndHmnpjTM9e12mAZRWJVZ6y1ClWTV9E5w9GF1mdve8H92uaJss1ZbgADmEWnugk u2UDp7dAtdpYKao7IY1KaTqoQb1Bp+XMRghuMjK81Z88XoEN4//xX2UIYe9LCNxb1I4a p+Dg1C46OGtS3JkuIN/3c0BYvObBWl+KClyXjodgiLPcrq4fr6giKyICGXrmAIB3gCLd llwYVmtibd+rvAlPd3n+ks3bocSGJKk4JwuIA2XHG3kz3EsdrCJPvk9as58XhCHRGg93 JXuw== X-Gm-Message-State: AOAM531PFyrtYe9JVAunOky5aPEnQLIrkAR6ct/dmyaXiCIuXMaVbB7Q dTkap9aOvkgYuhoILqweEfs= X-Google-Smtp-Source: ABdhPJxRYhI8/MsagOMafo1pS6zstDzKFOU2r074Wy/70Oqrct466kgOSbiaCGCHCixCD0dMGIKZ1Q== X-Received: by 2002:a17:902:b60d:: with SMTP id b13mr10131584pls.48.1595907300090; Mon, 27 Jul 2020 20:35:00 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34: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 , Thomas Bogendoerfer , linux-mips@vger.kernel.org Subject: [PATCH 11/24] mips: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:52 +1000 Message-Id: <20200728033405.78469-12-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 672EE1822987A 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: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Nicholas Piggin --- 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 Jul 28 03:33:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688033 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 222EF913 for ; Tue, 28 Jul 2020 03:35:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E14CD206D4 for ; Tue, 28 Jul 2020 03:35:06 +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="Vwd0wIE5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E14CD206D4 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 C30E56B0024; Mon, 27 Jul 2020 23:35:05 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BBAED6B0025; Mon, 27 Jul 2020 23:35:05 -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 A828A6B0026; Mon, 27 Jul 2020 23:35:05 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id 929586B0024 for ; Mon, 27 Jul 2020 23:35:05 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 535298248047 for ; Tue, 28 Jul 2020 03:35:05 +0000 (UTC) X-FDA: 77086068570.14.dock29_3103d2f26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 2B95F18229837 for ; Tue, 28 Jul 2020 03:35:05 +0000 (UTC) X-Spam-Summary: 1,0,0,f1cb6549d0133ff2,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.214.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yfp8k6ayc3bda4p7c3shjce64nwyp9zhzjzebewnyra4hr8wxthoj1cwkgcc5.btff48kwe3ix3jxt4sao5sthea68u8dsqd5a8pmu3wij318jjouq1gyj96ry79h.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:27,LUA_SUMMARY:none X-HE-Tag: dock29_3103d2f26f66 X-Filterd-Recvd-Size: 4629 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:04 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id d1so9187157plr.8 for ; Mon, 27 Jul 2020 20:35:04 -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=xunuSn00ryI5QmLOCpDWIS49LIJoLf4dCD7QK4hOYao=; b=Vwd0wIE5pMB1KB/6Rg4KKys5GEaOzJHcN5kMr9KEpGK4buw7zn/fxH3pXYAUoXQfu3 BoZKoytUA00vllJ+vLtMuC32R07hA6+x6c178aV0xXjTiQCqaxk4noJUK0nWp1je6g5z lsxUPTuKQ5mwZOwhsSzLo60VTSsgH+YFQpEoAsvC6TErpQrEOymA4G5m1Tw0kcD5SkSq icb4VR1VpPVnM+yo1D9Ma1SdRO/xUFZp1IjC0qFkkd7pVYxIbG7qbVUUtEvXnEk/mpDF 4Amp9Nrx3CeiuYrBaTCiE9mqYWD2hulfu5u71xQ7sHnrMjEGGew/v0/TlrJj0CI+r4r8 1iHA== 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=xunuSn00ryI5QmLOCpDWIS49LIJoLf4dCD7QK4hOYao=; b=X+Giv4nI0m+XVR7VOK774GdGcImO0/SZ3j+nTHkv8yVOIcJMbmqQljMMmNFFcR7sa/ z3fNFSyNVsfeYYmFkgKuxowyoqi3dr0L4GHO3ym1O5iPyZ2Tencj7vV5QMoxX6KAkXNN m5dfQtcRV/13aRmwCG2JbsNql1iLn3YJ58Kl3pgKHAf/3hF77heL0wnHEsqUOF5fyJXz fgdwUix+WgKZcAXDFAZxrCnhz016UXfq+pybTW1+3l2FW5T/x9Onw2ZdTmanLaZzbwuZ 3LPD9DIcYhRoW50d+YCmHRR0O5MStsLjRAeGGEos0+snzeiElKuT34gyFOKTjBs6PJlp HoEw== X-Gm-Message-State: AOAM532cjsHGm77A6lzWYluHumYMNm1Z/1C4F/0wL1MvtzYk+KBQBPCZ NmAI1V4Pqd9gKfIoO+c2bPI= X-Google-Smtp-Source: ABdhPJwy9vQsOMTnhLc0CHqQwG9d4dF5tR3qtWGL2ir+KodwPx1w+ap9da2DdFTGpoTDL5POtac2GQ== X-Received: by 2002:a17:90a:6e47:: with SMTP id s7mr2329493pjm.217.1595907303967; Mon, 27 Jul 2020 20:35:03 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35: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 , Nick Hu , Greentime Hu , Vincent Chen Subject: [PATCH 12/24] nds32: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:53 +1000 Message-Id: <20200728033405.78469-13-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 2B95F18229837 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: Nick Hu Cc: Greentime Hu Cc: Vincent Chen 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 Jul 28 03:33:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688035 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 53488913 for ; Tue, 28 Jul 2020 03:35:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1EA7E20775 for ; Tue, 28 Jul 2020 03:35:10 +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="kt3a7DcC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EA7E20775 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 EEFB96B0026; Mon, 27 Jul 2020 23:35:08 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E79F16B0027; Mon, 27 Jul 2020 23:35:08 -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 D41926B0028; Mon, 27 Jul 2020 23:35:08 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id B84636B0026 for ; Mon, 27 Jul 2020 23:35:08 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 886A33623 for ; Tue, 28 Jul 2020 03:35:08 +0000 (UTC) X-FDA: 77086068696.24.tent11_5f00c9326f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 60C0E1A4A7 for ; Tue, 28 Jul 2020 03:35:08 +0000 (UTC) X-Spam-Summary: 1,0,0,e1ba393c632844fc,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:2693:3138:3139:3140:3141:3142:3353:3865:3867:3870:3871:3874:4321:4605:5007:6261:6653:7514:7903:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30064:30075,0,RBL:209.85.216.67:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yrjntm1s6qz5948c151kfzyhbo5opbxhpap8tzfqdgudnmfje94w5rk4suxfi.7q1u6meobbcibwixpn6ugyukqtxrcra71q7axd1m6ndcyaftfyp63igyu13gw3x.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:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: tent11_5f00c9326f66 X-Filterd-Recvd-Size: 5422 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:07 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id i92so2386167pje.0 for ; Mon, 27 Jul 2020 20:35: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=LJ/aO+zurNWmpqKHI4M9C4MJyyXJq3JocP1DjUq4gbg=; b=kt3a7DcCE2OYOZGqgxog9VS3yxsHpUCtaORYop80F/jti3DEhy2oQQTgTbv82uTF7N xbMy5O15+dE0gYE5VRK61ptgd0R7KhE9ZKgBWnb5c6pmv4ahqQPVLKJzDpGGakypQdLX 89jCphB7fzgC28R1M7cfG5m2IvMZJwbXT49a0TiDARpVwt0ym4Ad0Rm2ntSFKmPQ8Eel GnOijbc0LAx8HVuZoORV9Kq8hQ96CkumFJdcnuxAicDHMtPjppLB8sordXVwoSz3YKND hkqC1QPNsA0tM1j+79ttQsnMzw2g5+SJPTnPI3LVZJAvnTAwR01pNZ+GbQ4TJUHr+OIy d9Jw== 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=LJ/aO+zurNWmpqKHI4M9C4MJyyXJq3JocP1DjUq4gbg=; b=lg1o8M1qfxUMWHt76BzT8X/gdvZRjZut0pBfCH4knGZ9s7LfLWRuPpsaq+NPboim4/ T1BkPzxlV24f7plI68RavTJJxb7W5r/JeEElsDeBWnsDuexd4equxElrjWT3NootrQhh d8c3WyxoCOtFfERtfaTeuVmU8+My4GL1Zz+d7k3a1wLMSaLxNWN1y4bPTfFbpW9Q2ga4 q0CSur52dCodlmtZCHhvwh3BeP0kHEcvmIY4Kf0UPKT5vdVn59TthRNbTacrKj2zD9ot rdEZzPHOOxR6r/ZReTpiGjl+wVsApKCVrqbnT7rzIRQuuL+rDWTTiNGyKfxpqS5uajUr F39Q== X-Gm-Message-State: AOAM5315JmxeM2rk1c2i16e56ew3UWVV+zPekXVpXBr2KsthJY/0l72c j2iK5/So0uupFODoNEG86Tk= X-Google-Smtp-Source: ABdhPJy6usEQ2VKD5ybwcbdeNYJvLxnt1A9ODzbNYWx50o5LQWfVKGaEFhJrpjeIx+Pr443bgEgg4g== X-Received: by 2002:a17:90a:d249:: with SMTP id o9mr2214096pjw.233.1595907307262; Mon, 27 Jul 2020 20:35:07 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35: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 , Ley Foon Tan Subject: [PATCH 13/24] nios2: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:54 +1000 Message-Id: <20200728033405.78469-14-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 60C0E1A4A7 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: Ley Foon Tan Signed-off-by: Nicholas Piggin --- arch/nios2/include/asm/mmu_context.h | 21 ++++----------------- arch/nios2/mm/mmu_context.c | 1 + 2 files changed, 5 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 */ diff --git a/arch/nios2/mm/mmu_context.c b/arch/nios2/mm/mmu_context.c index 45d6b9c58d67..d77aa542deb2 100644 --- a/arch/nios2/mm/mmu_context.c +++ b/arch/nios2/mm/mmu_context.c @@ -103,6 +103,7 @@ 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 void activate_mm(struct mm_struct *prev, struct mm_struct *next) { next->context = get_new_context(); From patchwork Tue Jul 28 03:33:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688037 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 744C1913 for ; Tue, 28 Jul 2020 03:35:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3697C20775 for ; Tue, 28 Jul 2020 03:35:14 +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="k+SBQyBv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3697C20775 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 41AE86B0028; Mon, 27 Jul 2020 23:35:13 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3CA626B0029; Mon, 27 Jul 2020 23:35:13 -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 294936B002A; Mon, 27 Jul 2020 23:35:13 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 0D91C6B0028 for ; Mon, 27 Jul 2020 23:35:13 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BB1461EF2 for ; Tue, 28 Jul 2020 03:35:12 +0000 (UTC) X-FDA: 77086068864.26.eye60_580bbf926f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 8E9031804B668 for ; Tue, 28 Jul 2020 03:35:12 +0000 (UTC) X-Spam-Summary: 1,0,0,0c578566dd5be926,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:3867:3870:3871:3872:4321:4605:5007:6119:6261:6653:7514:7875:7903:9413:9592:10004:11026:11657:11658:11914:12043:12109:12296:12297:12517:12519:12555:12895:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:30054,0,RBL:209.85.214.193:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y8zxfzkcjumbb5qr9c4hn5efpt7yp36ms3cwjjs68piqybq6txqywrm5dw5wo.khxoymn1hk1ehbp46jbgzsa5utmf87eib45kwt68fg93qe7ntjcyq9phrfxwchp.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:none,Custom_rules:0:0:0,LFtime:26,LUA_SUMMARY:none X-HE-Tag: eye60_580bbf926f66 X-Filterd-Recvd-Size: 5305 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:12 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id x9so9196804plr.2 for ; Mon, 27 Jul 2020 20:35: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=BQ0N2+dVPSv9zBmIax9FhAdje7sgqYgmgfJjCmKnWDA=; b=k+SBQyBvHv6bYtnVcbgMDkBAdBoCa4QoKpfHqJZIUZHwOuBbYHrJ5U429c8n+pnJ63 RNWj4/66GTWXp6cIn6XLevHJlBAdacCmMoHN0cjiNbFrDinmRfAV7IrasclMmxoMVADv vZNMdDUhbTKnym+mkaCi3X3ajYZ+Z6XsoYwYYhScZKQP8EJc/vzmG1JPZpkJI/LudB5a ZCiqCthWmmcTkhOkgX4u8eqlXZFATiL+RbR8o8SkovD7Oc3Lw2He6+A5iDrRFfqyoamA OvG+LSEzWGvRce0dbaH0Q8pWidkHj4Bpe6KVsTE1Xgie4OYjgLC4AgCA7s8NQTuvoNPM Um8w== 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=BQ0N2+dVPSv9zBmIax9FhAdje7sgqYgmgfJjCmKnWDA=; b=nvJdBbpH+3OuZgO3io9h2v40HRl2ntcRx98jFBGf+9Kei+MwBBNO1rALq5mWCy6REn S9CJ/1V3WVfyrMKjm/+flrGnKSkiq3eLGtdPgAcf0TtF3KzpmwWoQuVtrS1mQmTyc7y3 6iSkU4004Bl+bckZnfOjesyL6UH2BisFbJV/S9NM6M1O+tczKhprlgXDdn8U33pfvwYK OBHDnxRTNZKvhI8qDNT2ppnP/1EK+biv2Q35/763OMjgsyTfUD1OsZs1w9SwQg1nFFTv ejeHFvkoa/INs4RTnBBwPIYenLGgZ8/S+Y3tQFXK+fSEh+Zap8//0fqR47T9eHaWWb/r q+PQ== X-Gm-Message-State: AOAM530LLs2yb1BEfeqrnJu3YUcNZmMV3vYLiusLuh2MG4k5M4mnYZUq ykUyhz1L5LKf17CVpW/x01M= X-Google-Smtp-Source: ABdhPJzv8QVNMwZpdBvbr0dCqJM80cgxLsujPUqdgNMJ/PsaZ7BgVojxi5BnmzceR6G1fj9/gDjU7g== X-Received: by 2002:a17:902:7005:: with SMTP id y5mr19970202plk.342.1595907311445; Mon, 27 Jul 2020 20:35:11 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35: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 , Jonas Bonn , Stefan Kristiansson , Stafford Horne , openrisc@lists.librecores.org Subject: [PATCH 14/24] openrisc: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:55 +1000 Message-Id: <20200728033405.78469-15-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 8E9031804B668 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000008, 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 --- arch/openrisc/include/asm/mmu_context.h | 8 +++----- arch/openrisc/mm/tlb.c | 2 ++ 2 files changed, 5 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 diff --git a/arch/openrisc/mm/tlb.c b/arch/openrisc/mm/tlb.c index 4b680aed8f5f..821aab4cf3be 100644 --- a/arch/openrisc/mm/tlb.c +++ b/arch/openrisc/mm/tlb.c @@ -159,6 +159,7 @@ void switch_mm(struct mm_struct *prev, struct mm_struct *next, * instance. */ +#define init_new_context init_new_context int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { mm->context = NO_CONTEXT; @@ -170,6 +171,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) * drops it. */ +#define destroy_context destroy_context void destroy_context(struct mm_struct *mm) { flush_tlb_mm(mm); From patchwork Tue Jul 28 03:33:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688039 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 67FCD913 for ; Tue, 28 Jul 2020 03:35:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2AA4120672 for ; Tue, 28 Jul 2020 03:35: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="NBLIEBzi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AA4120672 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 2BB306B002A; Mon, 27 Jul 2020 23:35:17 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 244EE6B002B; Mon, 27 Jul 2020 23:35: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 133CB6B002C; Mon, 27 Jul 2020 23:35:17 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id E9AF06B002A for ; Mon, 27 Jul 2020 23:35:16 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B5665180AD81F for ; Tue, 28 Jul 2020 03:35:16 +0000 (UTC) X-FDA: 77086069032.07.home46_0615e5226f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 8D3941803FFC1 for ; Tue, 28 Jul 2020 03:35:16 +0000 (UTC) X-Spam-Summary: 1,0,0,4ad6ff9b0017962e,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:13069:13311:13357:13894:14093:14096:14181:14384:14394:14687:14721:21080:21433:21444:21450:21451:21627:21666:21990:30054,0,RBL:209.85.216.65:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yrjudi44oa31jx685p8hpntt4ujopdu3rxz45j137q849tiu5m4676idg5hua.is1du4iksngsttu1udmyjmn69tjbssnw4jytco88byhfjogb5zc1r7rtg3j3mht.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:24,LUA_SUMMARY:none X-HE-Tag: home46_0615e5226f66 X-Filterd-Recvd-Size: 4837 Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:16 +0000 (UTC) Received: by mail-pj1-f65.google.com with SMTP id i92so2386330pje.0 for ; Mon, 27 Jul 2020 20:35: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=+UmEzZhiPmisvbll7oEJdJkdQLeJHaSjFNwT4kfLFeI=; b=NBLIEBziSUKeh73IjmJleu8E8SgNKOIcKBiJPr0MC2P56V7thIUc8GQY2cVLRReF1f jofwolDuDOKPAnoFoNN36vVks1/7WpIslDewwf8eHfvFeuUxedsEFHXBLYMWYFx1AEdm nYW34dxA2YhoTMMjAp6an0Q/7b6HNgGOqY0fPYycNxAE0qKpMsrefABHPNKNNOIUbjaQ QgYcyxeuTJX1/5Wfc7DzrMAt5+hgUe5cmdYuRZlAnm7IjmLa8mgIQ3sxn/APLmY9+XWn GAOF5euTRYk3JrHP+ej5JQ/0Rw2tmbXH1PvNs4J7JNiniIG5UPP8/3tOuwLk8dNURNSZ U1lw== 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=+UmEzZhiPmisvbll7oEJdJkdQLeJHaSjFNwT4kfLFeI=; b=n1XQwhiw5QY3V2W8pQSB+cDqAW3/VWH5ovScbWgbjrQF3HI+JAOiCsKT7Xu8vmLRLm ndUk1/fQcHOHjZPr+QNJRrZYWeyd6XmHHcUW5XjZ2QWWgDVWZhibcW6uHDTisGXrsuOs o6br96ogk/pDAfc1zSoLwz/5hYAIvRQ2QcX+KQF5BBiwYBGVFJfyCkKa4BEG+BLeq8lg Xa/Bs6d6Rs3uNEsGV40s69+q2byFvEx063L37Jobnsbz0vAqax98xKKEowiqJvZSpzD/ aeFJo+MniqmZHR7bNeevTLuSgV8pPxf60UE6LN3r3V1ONmyPnV8kyIbBxt8NElTFVVhU lO1w== X-Gm-Message-State: AOAM531vd/S/JP+OGc5hBB03yEGGLH4qV/jjXnuYsk1SIMQokdGpEKy1 pBCTuE68LD32QOrTspSjJCI= X-Google-Smtp-Source: ABdhPJyxmfIxm31ZlyLcRWm1fbvoFARyVjQ9SkiBxu4lx9zz6vwRMcmi+fNZuU0y04kQFc06xx4pxw== X-Received: by 2002:a17:90a:1589:: with SMTP id m9mr2444530pja.122.1595907315336; Mon, 27 Jul 2020 20:35:15 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:14 -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" , Helge Deller , linux-parisc@vger.kernel.org Subject: [PATCH 15/24] parisc: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:56 +1000 Message-Id: <20200728033405.78469-16-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 8D3941803FFC1 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: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org 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 07b89c74abeb..71f8a3679b83 100644 --- a/arch/parisc/include/asm/mmu_context.h +++ b/arch/parisc/include/asm/mmu_context.h @@ -8,16 +8,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) { @@ -27,6 +24,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) { @@ -72,8 +70,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) { /* @@ -91,4 +88,7 @@ static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) switch_mm(prev,next,current); } + +#include + #endif From patchwork Tue Jul 28 03:33:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688043 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 737B5913 for ; Tue, 28 Jul 2020 03:35:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3F6E020714 for ; Tue, 28 Jul 2020 03:35:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LR4TT1gn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F6E020714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 41A576B002B; Mon, 27 Jul 2020 23:35:21 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3A3CF6B002C; Mon, 27 Jul 2020 23:35:21 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 293626B002D; Mon, 27 Jul 2020 23:35:21 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id 0DFF16B002B for ; Mon, 27 Jul 2020 23:35:21 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id CAB26181AC9BF for ; Tue, 28 Jul 2020 03:35:20 +0000 (UTC) X-FDA: 77086069200.24.hole64_0409ef126f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id A829E1A4A7 for ; Tue, 28 Jul 2020 03:35:20 +0000 (UTC) X-Spam-Summary: 1,0,0,7e829ccd89cd01ea,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1542:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3353:3865:3866:3867:3870:3871:4250:5007:6119:6261:6653:7514:7903:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30070,0,RBL:209.85.214.193:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yggptkipq3d7s61mi3w7kdfux1mocp4wmggw7f6zqxukenwdy93wiysy7qesn.uspqzchdfrkcpfxqgzqbzcc5q1c4hkdur41i6ftor11rgwhucyahsn8z9ijaz9c.e-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: hole64_0409ef126f66 X-Filterd-Recvd-Size: 5201 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:20 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id b9so9187355plx.6 for ; Mon, 27 Jul 2020 20:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WECce0LBXYVjXbrlpo11bHUpze9GJI1lVnSDe0W+y+4=; b=LR4TT1gn/htVF8c/22u1u+36l6MbOY8omKK1QrfKFh7EpljJaFABhwWa9g2ldtcZqp HWOYXXLyiVVdT7tvogFpfVRRJ5NlpM5E/1VlbSLLohpKtL5qu+Eb+GFwFshEelFxMS+4 756Ga65My7y8NdfBf/I+FUmwNY1tMNDdcArxacDOeyD4ipsFlFdBMoHjZabadWx7Cb+G AFIG8FjoYXAjBqVBSu/3Lq30DcpDkkHu29sCZ8oj+ICdNqnoBYxgyyZJPFiR5ClFTrX9 qdlvfZMYbV93inruHyenWeSb9Ews0pMS5keHZ17XGcfc6GHkP7AcYQsXFdUkcPG4A1zC TPEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WECce0LBXYVjXbrlpo11bHUpze9GJI1lVnSDe0W+y+4=; b=PMe+GYPa7Nyv12BwDALaf2bCRQpjPYOtvPsNegvuW4tgSrUoYdrGMpMJOnNV6s3BoN 9br0KzXXgG3fZblSRM6CKkms9iIC5+L8HRZBxswiZDLH84SavxcPzfcr4VEGP1+fyUeW u5LrK4aJkbZBfNfzAoVcmEMrVvpGuEeay5Drow6AJMafK8vmaZY0OFKuKKEuv+9AaSR2 BgO2HWZZhCFd1v+v/LWLq26/02n+0DOtjDpQya1/F2N0NKY4apZBH1wCmyTigviG45wY e7WJUQcjzPrsInFMokdvK7KPn/E54hx8nD9CTwTW48LuIX+9qX9w4Y8KEgDMFxURjbhD HF2w== X-Gm-Message-State: AOAM530JRo+rZ51jSo+/LmjP017PcvbAf2oNFz+hqBJyGltPNshvN0pd Zas/9+84D7ulCXRkktyoKBY= X-Google-Smtp-Source: ABdhPJzuslCQp+8HbB3cDYhA5hqXaz9y/HEvXL86aufZSOGtcy8wjOcm865BoW4An1+Ax+pq2VZyIg== X-Received: by 2002:a17:902:bb83:: with SMTP id m3mr19664485pls.209.1595907319521; Mon, 27 Jul 2020 20:35:19 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:19 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 16/24] powerpc: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:57 +1000 Message-Id: <20200728033405.78469-17-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: A829E1A4A7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/mmu_context.h | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index 1a474f6b1992..242bd987247b 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h @@ -14,7 +14,9 @@ /* * Most if the context management is out of line */ +#define init_new_context init_new_context extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); +#define destroy_context destroy_context extern void destroy_context(struct mm_struct *mm); #ifdef CONFIG_SPAPR_TCE_IOMMU struct mm_iommu_table_group_mem_t; @@ -237,27 +239,15 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, } #define switch_mm_irqs_off switch_mm_irqs_off - -#define deactivate_mm(tsk,mm) do { } while (0) - -/* - * After we have set current->mm to a new value, this activates - * the context for the new mm so we see the new mappings. - */ -static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) -{ - switch_mm(prev, next, current); -} - -/* We don't currently use enter_lazy_tlb() for anything */ +#ifdef CONFIG_PPC_BOOK3E_64 +#define enter_lazy_tlb enter_lazy_tlb static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { /* 64-bit Book3E keeps track of current PGD in the PACA */ -#ifdef CONFIG_PPC_BOOK3E_64 get_paca()->pgd = NULL; -#endif } +#endif extern void arch_exit_mmap(struct mm_struct *mm); @@ -300,5 +290,7 @@ static inline int arch_dup_mmap(struct mm_struct *oldmm, return 0; } +#include + #endif /* __KERNEL__ */ #endif /* __ASM_POWERPC_MMU_CONTEXT_H */ From patchwork Tue Jul 28 03:33:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688045 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 ABB9D913 for ; Tue, 28 Jul 2020 03:35:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7752E20714 for ; Tue, 28 Jul 2020 03:35:26 +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="f/Nr2b2I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7752E20714 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 728106B002D; Mon, 27 Jul 2020 23:35:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6D8706B002E; Mon, 27 Jul 2020 23:35: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 5C7316B002F; Mon, 27 Jul 2020 23:35:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0205.hostedemail.com [216.40.44.205]) by kanga.kvack.org (Postfix) with ESMTP id 40B9F6B002D for ; Mon, 27 Jul 2020 23:35:25 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 09B1E3624 for ; Tue, 28 Jul 2020 03:35:25 +0000 (UTC) X-FDA: 77086069410.10.cloud12_2c1591a26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id D14E516A07F for ; Tue, 28 Jul 2020 03:35:24 +0000 (UTC) X-Spam-Summary: 1,0,0,a35a10f40a46231b,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;04yfgmihk7ixkcbm8tuad41ryjnuyocfa5itos3yxwwqz31in3uoofrtwcwnugn.p4wkdcpr1k6y4ro1wuurd4mr37uf4ensnrh4wg6rth4nzmo67eqcgg515aatjez.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:22,LUA_SUMMARY:none X-HE-Tag: cloud12_2c1591a26f66 X-Filterd-Recvd-Size: 4552 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:24 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id s26so10174376pfm.4 for ; Mon, 27 Jul 2020 20:35: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=0qyDAiHf1mT4LwA7F2omwzQoVQ8iMHIatldNjXE0mQY=; b=f/Nr2b2I4ELY5hyYHRUh6KooDJAlp3MrLw/PlVdYtLw3CE1D9kZNLsNeTow4Ki4oWD UESIefuHP+6SCTPWw58PicUJqIO3L9dsXl1jIzmj9TiQGxEILaVEG7R2kOJBICiqHTix u75FgNTYAb21zm+Uw+Hfc/xghYm25Cyz+k8pml9ggMf3IQgse97CR9xKTnOzC27ELrdY d7ZqqozQfMo2SzG++C3CTwVzxRwkHqKzIaL4KxDjPma2BftsER8+IWR6aoBEayc5H2i1 aRKLa6KhnKJMFNBHZewP7jZc9OR3yUynufcskhFJ3rNgmZ08TTj1LAuB71sT3Gm+blgD FqhQ== 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=0qyDAiHf1mT4LwA7F2omwzQoVQ8iMHIatldNjXE0mQY=; b=sKxPaDSqvACvXgCauiJt3/DiYeCFm2r2sv9xpZvWUWjFDm5AuDld0GYtBk8oKBPCd6 dqbL3jX5Qc1JrjnyPySBVyckRaQqPNiWY7v2Y2rvCPskF+SdJf/EHsMZaUlbpXDmR9JH XyWkiw2JOWOAIX2fynFcfzLVX1Dk1tEnqWvBq4ZMDQeOAxlESlg8G6tyqFHuhP2BxUY+ 52VOIDK0P8lrEM25ZIEW9uTYMvZF+HXvvEjT+nb3mSviqCqv6Sn+aKaBhLSy05+X4Jrg uA/6C1ZRr//nt+aJX89C1uC/AX8zl2SQ60D8/wjcG3AYFfjYwHpbMEE0hjV2xgydblol 1ucA== X-Gm-Message-State: AOAM530TyRueQ/nXCJgDaW/bhj0OMds19l2RAX1fgsV8m/96KYqYQSBx DWVnC9RcqXDBKXwdww6KRqU= X-Google-Smtp-Source: ABdhPJz/AALwV9gd8acRqPIn+a0eJSVgKeEpHZuxSXFC2/WisGDuvgIMt1iJw+CKzEAuR/p7tE0YlA== X-Received: by 2002:aa7:984d:: with SMTP id n13mr17303136pfq.276.1595907323703; Mon, 27 Jul 2020 20:35:23 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:23 -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 Subject: [PATCH 17/24] riscv: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:58 +1000 Message-Id: <20200728033405.78469-18-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: D14E516A07F 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 Signed-off-by: Nicholas Piggin Acked-by: Palmer Dabbelt --- 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 Jul 28 03:33:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688047 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 DC3F1913 for ; Tue, 28 Jul 2020 03:35:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A77172075A for ; Tue, 28 Jul 2020 03:35:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dVK/1Eli" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A77172075A 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 A84F56B0036; Mon, 27 Jul 2020 23:35:29 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A37646B0037; Mon, 27 Jul 2020 23:35: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 8D5B96B0055; Mon, 27 Jul 2020 23:35:29 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id 716576B0036 for ; Mon, 27 Jul 2020 23:35:29 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 3AF61181AC9BF for ; Tue, 28 Jul 2020 03:35:29 +0000 (UTC) X-FDA: 77086069578.27.grape46_1a0224b26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 1535F3D663 for ; Tue, 28 Jul 2020 03:35:29 +0000 (UTC) X-Spam-Summary: 1,0,0,ff82efda2ab74f85,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:1801:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3876:3877:4321: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,0,RBL:209.85.210.196:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yf59xz8qgpcu6rcnsrgp8ob3xqzyc4ygk7gyu6td91o7osuddcxmb8iheijpa.396cyugx1gyi399puhew5f6c84jd595o7zps5gjda69ayzzxpgsonwad6f59dn1.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:25,LUA_SUMMARY:none X-HE-Tag: grape46_1a0224b26f66 X-Filterd-Recvd-Size: 4724 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:28 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id d188so4134736pfd.2 for ; Mon, 27 Jul 2020 20:35:28 -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=zBLkp4ACPTazmjPNrlv/57ssiAbYaRhM1wboTYBBHDY=; b=dVK/1EliSimIRnUstbAmbx25mSwdR+Js0puQBQW3DsLX1VrptOUZVyUDjo7npj1Mhx L3e5K36rO3npq4glvDBg4YqqkI4XpYAFUSzxOS1MTAz6RO3a7P1MeyS9q/dW3kz/gxle /9G3Jbo4dq+aolt4j2XDZLDyfRLvX2Bu2gB0/UlCQhw8WzxyINP0JWeWmD6swLpTVbI9 MkiRqfViP/O5kKgY773WmCUMGAj6Io26pzg5z2lJr2jlGjHo5EWu36iiYvJct6hdmDjs xEXi9awKzb8oLJA64GjYb8TUmyGvAEj44+0XmvekMAPPeQqnnY3LYvisXSyA/Q5guxNk tF3w== 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=zBLkp4ACPTazmjPNrlv/57ssiAbYaRhM1wboTYBBHDY=; b=e5g9oDqz7jijCIptom9gqhpMr+mimVXT/TzeTu06MdrDxqnJAJWzAK0OMjs2JxQWnX uklC3UeNqioLREq9qwpqAmlRzpDKlmlHXaPDi3RKYye1Iwwfpkn8/AwpUysE+FhbRft8 iXcPSMIkw3GPezWwBPsmnQKHHsRXx5TSfht49As+e7efelO6wcpfrFGc22TPHiAE6ER+ oiAe5JsEoPbzvIG2uAMwIhvqom7tCnXihmvLvdGA8wvB8o/WwBbNR+E4iDV0QKtwN6MJ TmM7F60GPfSaA/GbFQGUb1GSf3E1Aau3bQcP+I5IR22iTgbMbGGhe9FkSiiO90TzCi5q wWhg== X-Gm-Message-State: AOAM531Q3EYlbITHJc2iEk+ec3iRmAelERbOhhxZinldGp/IkjKg3f1k 540AwiKl69RahHGe2KdPxyY= X-Google-Smtp-Source: ABdhPJwAK20YJK9/QxvuhDFbG5k71L1N7JplcOMAW7nPJfoIn8DDaWASYvwHqmKUD5r7MPuX4k/MPw== X-Received: by 2002:a62:3207:: with SMTP id y7mr22632527pfy.95.1595907327960; Mon, 27 Jul 2020 20:35:27 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:27 -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 18/24] s390: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:59 +1000 Message-Id: <20200728033405.78469-19-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 1535F3D663 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: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: linux-s390@vger.kernel.org Signed-off-by: Nicholas Piggin --- 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 Jul 28 03:34:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688051 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 A84C41746 for ; Tue, 28 Jul 2020 03:35:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6A53720714 for ; Tue, 28 Jul 2020 03:35:35 +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="fMcS1wbL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A53720714 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 79F176B0037; Mon, 27 Jul 2020 23:35:34 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 74EC76B005A; Mon, 27 Jul 2020 23:35: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 63E356B005C; Mon, 27 Jul 2020 23:35:34 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 4AC2A6B0037 for ; Mon, 27 Jul 2020 23:35:34 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0DA13180AD820 for ; Tue, 28 Jul 2020 03:35:34 +0000 (UTC) X-FDA: 77086069788.19.hat74_2f0bd9d26f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id E02D81AD1B4 for ; Tue, 28 Jul 2020 03:35:33 +0000 (UTC) X-Spam-Summary: 1,0,0,60a64ed7d8b48841,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:3874:4321:5007:6261:6653:7514:9413:9592:10004:11026: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.214.193:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yrkm3icehmwaduyoodw7dw47154opoxrex4kwhrtj1kiryop8huaycjahchin.ggfrffi1nreba6mpftr4irrigbxbesquctpep3gka7683nk96m8ei7kofepwkg7.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:23,LUA_SUMMARY:none X-HE-Tag: hat74_2f0bd9d26f66 X-Filterd-Recvd-Size: 4859 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:33 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id t10so3864220plz.10 for ; Mon, 27 Jul 2020 20:35:33 -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=dzevChhDu0zkNDnE+D6pyyVrpyllVR2c9oWvZ6O+SdA=; b=fMcS1wbL9TMbstUJO2nAlUpAcmqUR+PhCpjLJOWT0sR8n5XXRbC9sv/L+BRGQMTYX9 DhyhzyBgLq3WyXVMtMSoMUjauW9o0/pLmDyUYdpJe9dJ2OV9xGYeIDtwh4TL24WlxSlM gcnJBjObGA3EV2yMkwGGB87W/IrYJNrwfWDUguPd7q/EmcD6ypy3ZnwIXgc4Gn9cruvk GsH720QkcwgubHpt9SjEiqKcy5kMEfwg4T3fkpJdQkcwPoZQ9WuT2UsYYzjTs8W+HXkg FwjeC+/5ABjDVxxTpcr+qA4Bv5ZG6aBfcKpQcLRZLTph3BPI/vc8BNoIMkySPyADFq93 u6JQ== 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=dzevChhDu0zkNDnE+D6pyyVrpyllVR2c9oWvZ6O+SdA=; b=oqtMUuYrDVq5A/71EBn4Qnu+3+6lcJpJNKcd4snXPEwEj2tBPsMnotIp3/ZI5n9Qgo eRtTN5iYadbKuvlofkYmLc87bDoVpY7zsustjzgbDBeabV/V4hXTeUnQUpmdUr0GnJ1y pBc7Sp9WFDTS+VFJqyz6izTUFdpWZBL28WZu6NYKReZZOJB1ie6Rc9dwz2lWbVdOvtaM O7xXIvHCqI3GRHPaueSLpoaQCU4dN1wHw9hu0bVsEFoQYMDVp/v/l1Cr/GsSm86lKc17 H9d0rE7hu6HuI5NPAfokSvZGczEhBrotl4XtxaFlxHmNJl6D5F9JWZmqbStzyx7KedVw ttFQ== X-Gm-Message-State: AOAM5309Qe8tl96KSblNahVSZEaHKUgf6asbEVOHBnL2XYDEhnTv9EDE UJL/E7fajz+Qv93ZWzvEItY= X-Google-Smtp-Source: ABdhPJxxOxzM2SLKd9ZcqOTFJhzmIuEoRXh4oj6u2JKpZU5DaAQV9jKU21jPNjRdgMs+dAhghdR0pQ== X-Received: by 2002:a17:90a:4fa2:: with SMTP id q31mr2476162pjh.178.1595907332741; Mon, 27 Jul 2020 20:35:32 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:32 -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 19/24] sh: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:34:00 +1000 Message-Id: <20200728033405.78469-20-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: E02D81AD1B4 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: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Nicholas Piggin --- 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 9470d17c71c2..ce40147d4a7d 100644 --- a/arch/sh/include/asm/mmu_context.h +++ b/arch/sh/include/asm/mmu_context.h @@ -85,6 +85,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) { @@ -121,9 +122,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 Jul 28 03:34:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688053 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 8C1196C1 for ; Tue, 28 Jul 2020 03:35:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 576C42075A for ; Tue, 28 Jul 2020 03:35: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="Jt7EXzeP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 576C42075A 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 4DED76B005A; Mon, 27 Jul 2020 23:35:38 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 468C56B005D; Mon, 27 Jul 2020 23:35: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 309DF8D0002; Mon, 27 Jul 2020 23:35:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0233.hostedemail.com [216.40.44.233]) by kanga.kvack.org (Postfix) with ESMTP id 162036B005A for ; Mon, 27 Jul 2020 23:35:38 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D37EF1EE6 for ; Tue, 28 Jul 2020 03:35:37 +0000 (UTC) X-FDA: 77086069914.13.top92_500473826f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id A78DC18140B70 for ; Tue, 28 Jul 2020 03:35:37 +0000 (UTC) X-Spam-Summary: 1,0,0,89d16a64d9cb7900,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:4117:4250:4321:4605:5007:6119:6261:6653:7514:9413:9592:10004:11026: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.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yfs7e81mn5dfo46c65dp4niwbicypa3dcnahnqfxqwpg4z3p9a7km1cp1r9te.d6tjgzxsg1zkii7itrucqx7cdz9r1smu4muko4r9gsgpk9ku7uo58kanz8pgghm.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:26,LUA_SUMMARY:none X-HE-Tag: top92_500473826f66 X-Filterd-Recvd-Size: 6233 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:37 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id b9so9187599plx.6 for ; Mon, 27 Jul 2020 20:35:37 -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=ejVWa9IRIyyHORgldOpUlCO0QqVKUsW+6Dc4qu3Phn0=; b=Jt7EXzePYmlX76Oyhuuvk2E2TsOmB6At6s21TV4q+GvtXPNZT1DEHyypIHTynq9As+ BkCRwn3e9r+e25+V4IgqR2Uofh8gO/spVncQhb1HNmHUUN0HmusWt17LCGpw+B5T72KT q4fN8fdFdQDbGw5hhw7WzFzq/rw4eJ50OpVHwFckZU0pQtBT64prbgjVZpnlp+CT8IG3 S5W9tZ9lFzoc7O/pTxoYOnNdME9dlMzufWavyl6jHEBXisfnkTvTFcbYo/J5/nAWqdMq MGKG8JdZbx1MKdBr8/piTey0D0P/s2WUUKA7S68NDBG7LgEKCWHqAQC1ilETstx17N9k 5dJw== 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=ejVWa9IRIyyHORgldOpUlCO0QqVKUsW+6Dc4qu3Phn0=; b=sVxCBE7y5vHMO0AbAJZ4q/tuIa6pWEOGamkzSox0h5hG14FbIOp57uV1RducuY54tf z2yiGJM3Hl5rDwdhUZLrgeox+1Qvm20hn0++3J1zhuviQFc1p5ItukdMqmiiR7xDjgr/ ulVarVhlhhH1T3ktBM8N4Eb9Vg3gTDxrLzYGfmUh+cV96M91EGHAggZzSoWmIxzSsK0q ZAM7mEck9382cFX7WdfFqgCL6V+8I4Edd3WOLH8gNFoMdk3kKOq7mWLt1PAg4hqTcYIF LTCDK9Q1AgGYZAyFzdk/CX/tfhBDji12jlCsM09EHka+vM23b9ijnbkXLetB/F+q1d4S 0azg== X-Gm-Message-State: AOAM532r5YUwbDhHNDjZYHR7e8ewGymUlLKRRg7GQxLIEbflygic4LjL eNI2gbt67SeYTHLPKXupK7M= X-Google-Smtp-Source: ABdhPJw4hwasq8wvkQnu1HWMVzyIJWE/5FO/nlXv0/l00rns0GpQTf9lkr4MhczGycWKUCPmxjmRrA== X-Received: by 2002:a17:90a:eb01:: with SMTP id j1mr2323875pjz.29.1595907336390; Mon, 27 Jul 2020 20:35:36 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:35 -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 20/24] sparc: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:34:01 +1000 Message-Id: <20200728033405.78469-21-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: A78DC18140B70 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 --- 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 Jul 28 03:34:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688055 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 194D7913 for ; Tue, 28 Jul 2020 03:35:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D9B0D20714 for ; Tue, 28 Jul 2020 03:35: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="XTAT2W9x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9B0D20714 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 C0B5D6B005D; Mon, 27 Jul 2020 23:35:42 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BBB438D0002; Mon, 27 Jul 2020 23:35:42 -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 A80FC6B006C; Mon, 27 Jul 2020 23:35:42 -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 8CE1B6B005D for ; Mon, 27 Jul 2020 23:35:42 -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 543881EE6 for ; Tue, 28 Jul 2020 03:35:42 +0000 (UTC) X-FDA: 77086070124.20.month81_420910226f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 2FB5C180C060D for ; Tue, 28 Jul 2020 03:35:42 +0000 (UTC) X-Spam-Summary: 1,0,0,d85c0d1c1988ac8a,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: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.214.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y8gefe6aeq8mo48t5xitaq45x4hyccuezsmjci4cuhcgpuumjxef59mh1adaa.cpet4mugxytmttz31iz64yi9hojpoxkhy4wjkq47qhdj4mqhcrmrijiaeq9j9mb.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:23,LUA_SUMMARY:none X-HE-Tag: month81_420910226f66 X-Filterd-Recvd-Size: 4510 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:41 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id q17so9177626pls.9 for ; Mon, 27 Jul 2020 20:35:41 -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=TLftXOcS4N1axvHYvNR3psZ5Pupt2KMXRpE+cNBZQz4=; b=XTAT2W9xVAEdxPx12CzvhppNlwZ0hzt/SYaFY5rJ3dCSKLOLR8CAqSHIFuVlt7/Xb6 F9Fn2vkw4pUXDtNDLPFSMplefchB6IyCS6P8/rHX5bm05R+8tTqZD5N3RjoQ9fI8PKAV zTw3u3P6oJZ3p4H8gwlGGEQY4hjYdxGNh7S2tVeO20P6twAjpGXDyfdBDZu5YYJVr8Rs s46y6s3J25x60ZZmownnjaSZD0IBunDLLqdY4Cg1PHWbjTcTnuxI/1cXzVRNtyEISVll +8dO3wmxUxXTDI8UzjNrMZrcxH9pF7jwn7BZKN33ci/Ztgp1pQd5HdJl85YgMkk0L8w4 1o9A== 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=TLftXOcS4N1axvHYvNR3psZ5Pupt2KMXRpE+cNBZQz4=; b=kHN2tpVpHeis4OKS1AyKdRCyUSdbLii9DuceHTNPQXrypPOcypFXw8+wPqv6v4rabz nV8Zc2CGtxnO83nw6IzYz5ox0YAfmQ4sagojwSdR0sYTUg+oXNt1P6MKqJaKM4l3gcX9 kHHrEN7InEOZYuCar/LBC9mQjr1B4Qo0XxEHdVNWV8GgTu09Qseip8SgDk+QGvf/9QQS +7XdLsHIrtnUw2vWUftps9iElbO7t6VqgPog4mdaCQ/sFDaH4Hv/J6VU10zcFNzdfg1k /BkEwDmnkZ9dBmmne/q48Jv129iZVRd6nwPthQOmNBX5DfCLFhKe44iGF6b0Ah5CtBEZ eM2Q== X-Gm-Message-State: AOAM5335infaG67ri7UU9Vrsz8+lLRub1IVhK4Lb5ThDsJ/kST5pa+wa lV+x67+MNRIL9G3u63R45IM= X-Google-Smtp-Source: ABdhPJwXQjQ8pz3kBBmkwoCFV2YejbrW7QrgMg3M669wPuvfWrlPdTisJntkLY193QGFUj3UCsVvPA== X-Received: by 2002:a17:90a:d249:: with SMTP id o9mr2215860pjw.233.1595907341037; Mon, 27 Jul 2020 20:35:41 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:40 -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 21/24] um: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:34:02 +1000 Message-Id: <20200728033405.78469-22-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 2FB5C180C060D 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: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Signed-off-by: Nicholas Piggin --- 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 Jul 28 03:34:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688057 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 8FF566C1 for ; Tue, 28 Jul 2020 03:35:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5B16B206D4 for ; Tue, 28 Jul 2020 03:35:47 +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="Y4v7O+c6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B16B206D4 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 1AA2D8D0003; Mon, 27 Jul 2020 23:35:46 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 15AAA8D0002; Mon, 27 Jul 2020 23:35:46 -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 F16858D0003; Mon, 27 Jul 2020 23:35:45 -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 D68928D0002 for ; Mon, 27 Jul 2020 23:35:45 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A1C09181AC9CB for ; Tue, 28 Jul 2020 03:35:45 +0000 (UTC) X-FDA: 77086070250.15.boy12_3d0e91626f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 7A9591814B0C9 for ; Tue, 28 Jul 2020 03:35:45 +0000 (UTC) X-Spam-Summary: 1,0,0,8503f88aab7e965f,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:3868:3871:3872:4250:5007:6119:6261:6653:7514:7903:9413:9592:10004:11026:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13255:13311:13357:13894:13972:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21795:21990:30034:30054,0,RBL:209.85.214.193:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04ygz1j4gck35pda6yq5u9hhj9q8oopj8i4u8f9shn1hdfgbe4nsbj4x1czqicw.h4a3amwwsasu1szskrzpxujjnj4mwq5eqdyhx37b7zi78wyu57rpicjngu3kaya.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:23,LUA_SUMMARY:none X-HE-Tag: boy12_3d0e91626f66 X-Filterd-Recvd-Size: 4701 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:45 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id p1so9191210pls.4 for ; Mon, 27 Jul 2020 20:35:44 -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=1JLKzjyC1SBrEiODvVn8VxTDptzEZPqzW7tXvM9+ThQ=; b=Y4v7O+c6dQW18i+moFxlIujKDWDg8TDWOxk7VAOQUv7lpN3eIGmWg65qbJokQXpv40 UuT6EROOAMfswGgIFaroSWv+Mxql9qoz1IHiogbhHvaOeJP1mcnqhbDtYipKgiKhmP4G BM/hy0mcL/r4XYZNyEQ/Dq3DNN4I4sCLkCLJRfIpmVHZNZDKsRDobQidEP4GEcXETmgo e0Whauxc61AhbEoBPJup+JQsoTFN2+iNEOikR5SKtBYnAyNqDLjB7PwWnbfMG9758iOP ahvYvtqrPAIyVMePToqBg8V2Nwy0qyOncpCfHJtYy8nW/uEDwftqKXhZkuo+JYERt7QE BKdA== 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=1JLKzjyC1SBrEiODvVn8VxTDptzEZPqzW7tXvM9+ThQ=; b=lLjUvAR3soGy06G3WIyOVoNnyZa6WszU6CFdXS1NmGdTbj6+og95eVWhfRM1mOtQJ/ gCPjnJ5Fd2voBSQQ4LZgLQTHPIBoLLvMkfjgvL8JUmE6XiN+MIwZ3NVfq8nEAuGmvd2X qGP5DeKJoHMYidGNV1AR0ugtJuTxVhqIJ1Bd9mUEmQmhec5A3jPxFCqJoA+SOg+n8rzc 0adDQKyEeHS7HazTXSsPjixINJ3EUi+st313SZrQMiM6k4s/oq1ybc4Lni23ZowZOFqO 1Fl1U56W0bPKS+q/3JBVLh8PG9g3hLA1sd+DTwaA6EHVVMJgrPkfdnd+O6pp/B5YDQXG eQpQ== X-Gm-Message-State: AOAM530NFDB1hOsqFiqfY6uWCUD1BkJ+/4hPFjPrkrkpcemwWWkV7npG kxVo9wr033rnwE1CfbEylAQ= X-Google-Smtp-Source: ABdhPJwI1FVOs/aIP3aOo7bYYcO5O1FN4uPDxItlYfSi2TqGuyUZ2WAOWZxW7EZLnuLC+TqbMNcSKg== X-Received: by 2002:a17:90a:f493:: with SMTP id bx19mr2119021pjb.134.1595907344315; Mon, 27 Jul 2020 20:35:44 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:43 -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 , Guan Xuetao Subject: [PATCH 22/24] unicore32: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:34:03 +1000 Message-Id: <20200728033405.78469-23-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 7A9591814B0C9 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: Guan Xuetao Signed-off-by: Nicholas Piggin --- arch/unicore32/include/asm/mmu_context.h | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/arch/unicore32/include/asm/mmu_context.h b/arch/unicore32/include/asm/mmu_context.h index 388c0c811c68..e1751cb5439c 100644 --- a/arch/unicore32/include/asm/mmu_context.h +++ b/arch/unicore32/include/asm/mmu_context.h @@ -18,24 +18,6 @@ #include #include -#define init_new_context(tsk, mm) 0 - -#define destroy_context(mm) do { } while (0) - -/* - * 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 @@ -52,9 +34,6 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, cpu_switch_mm(next->pgd, next); } -#define deactivate_mm(tsk, mm) do { } while (0) -#define activate_mm(prev, next) switch_mm(prev, next, NULL) - /* * We are inserting a "fake" vma for the user-accessible vector page so * gdb and friends can get to it through ptrace and /proc//mem. @@ -95,4 +74,7 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma, /* by default, allow everything */ return true; } + +#include + #endif From patchwork Tue Jul 28 03:34:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688059 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 DD0C51746 for ; Tue, 28 Jul 2020 03:35:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A7B2D206D4 for ; Tue, 28 Jul 2020 03:35: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="raIuuV8u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7B2D206D4 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 838F48D0005; Mon, 27 Jul 2020 23:35:50 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7C16F8D0002; Mon, 27 Jul 2020 23:35:50 -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 5C6648D0005; Mon, 27 Jul 2020 23:35:50 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id 43C2F8D0002 for ; Mon, 27 Jul 2020 23:35:50 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0E4AB180AD815 for ; Tue, 28 Jul 2020 03:35:50 +0000 (UTC) X-FDA: 77086070460.21.geese03_3b14bc926f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id DC9B3180442C0 for ; Tue, 28 Jul 2020 03:35:49 +0000 (UTC) X-Spam-Summary: 1,0,0,bdfcded81f19842f,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:4321:5007:6261:6653:7514:7903:9413:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:12986:13069:13311:13357:13846:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054,0,RBL:209.85.216.66:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yr9pi9xw5jixi45j91pcaf6csy1op14xwq8heqmwjwc4f18f675145i9wwnei.dkuhwndrfbatpe6qdrt8jfagwkhs6srndbjr4s381zbu44cpjrr7kx8sngu8tb7.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: geese03_3b14bc926f66 X-Filterd-Recvd-Size: 4653 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:49 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id k71so10768421pje.0 for ; Mon, 27 Jul 2020 20:35:49 -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=fAvZz66+QaBdG22l2e4wGzGeeBoM/iwnQLAAqOO4w3k=; b=raIuuV8uCiFBJ/lHrBNbzsGk6I9fJmFLp7oA7Q4Zq8ne0fPffDvdDzPmwQf8MDa9H5 iq6RaDgDS0JPxC41pfFYr066sTtd/e/ecBTBQKanlt4nsYCx3YqeTiUOq7wlnd9t+5BA sISbSV3NUsfPoqd2v2x8llQ4NvPeMI3BHgiuuqyp/2eZg0Vx1vsvgJd+VVvWOyHfCmFP gjCKPkS8RMRmqcXB80sZMpzqlrJxbDN/Sgs1ZeJXVb9HN9iw2AF2NowzhdO1hYYpYA1f nZ09ejKNF/qR/kzz0RUyUv2jBoYLOuGa+5R4TEhDHgYlV10N2aAOgVqcRWMksd3p7pq7 rlEQ== 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=fAvZz66+QaBdG22l2e4wGzGeeBoM/iwnQLAAqOO4w3k=; b=hW3jQVCnIXrUKQPHdoKU9E9lhXKbUQG1ZmLk8tTsIPS4iGmsy7m9EzJqaklm7FttRR NsOENpp5Dah3S1w/OkUo51sQT02eXZjpafVqngg42Gy0hiPrqt1oof117LnHXquCrSRW /FegHsXWeGBD5p/MqmZ7m4QDGe+Z4aOVZOpi33ACppSrmy7A6q+wFtLh/bxKFXds5X9j jkJzpBKQZsBxnopeD/EawZZYmQDavH8GrS50dY9g7lNc6MXzn9LlqcwfSnrABrQPZDTe y8DVr+rSGk7MtgU19Wo61TSQBBwsTGWKEQFveKtP24zwbn0JlRzZOOJHClISKIiIaWMj X25w== X-Gm-Message-State: AOAM532D0MKLHNJwxDOv227tDkXK8PJfLJtdl4FVhLUbMThi1qbf1sDX ak6EXuDvWwrs1iqNMe78N0wmHpr3 X-Google-Smtp-Source: ABdhPJx4KFc9AQIC7ArYHaqefa7TK8k/yMc05XMGZylzBAVOeed4XSg5Bld4PxWgP8XSWWG1WcH1Qw== X-Received: by 2002:a17:902:b113:: with SMTP id q19mr21395986plr.170.1595907348803; Mon, 27 Jul 2020 20:35:48 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:48 -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" Subject: [PATCH 23/24] x86: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:34:04 +1000 Message-Id: <20200728033405.78469-24-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: DC9B3180442C0 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: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Nicholas Piggin Acked-by: Peter Zijlstra (Intel) --- 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 47562147e70b..255750548433 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h @@ -92,12 +92,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) { @@ -117,6 +119,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); @@ -215,4 +219,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 Jul 28 03:34:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688061 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 27E7E913 for ; Tue, 28 Jul 2020 03:35:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E7290206D4 for ; Tue, 28 Jul 2020 03:35:55 +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="txe/TGzL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7290206D4 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 9A4588D0006; Mon, 27 Jul 2020 23:35:54 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 921418D0002; Mon, 27 Jul 2020 23:35:54 -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 79DC88D0006; Mon, 27 Jul 2020 23:35:54 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 5FAE88D0002 for ; Mon, 27 Jul 2020 23:35:54 -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 2AF3C1EE6 for ; Tue, 28 Jul 2020 03:35:54 +0000 (UTC) X-FDA: 77086070628.12.owl53_2409a4826f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id F336A18002262 for ; Tue, 28 Jul 2020 03:35:53 +0000 (UTC) X-Spam-Summary: 1,0,0,695a093c2809c01f,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:3874:4321:5007:6261:6653:7514:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13846:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30075,0,RBL:209.85.215.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04ygmr68doewnsyx1bzccc8qczthpycm58sofehaucw3ugkmm39xjsqm1o5oing.oqert7k18cbs9fc4uaawuyxbdxsc1a9xu3h9drs79xm1uc6g7kstcrptxn6nhdi.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:23,LUA_SUMMARY:none X-HE-Tag: owl53_2409a4826f66 X-Filterd-Recvd-Size: 5601 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:53 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id j19so11109012pgm.11 for ; Mon, 27 Jul 2020 20:35: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=g4c//fvG4fjXYLBPyQJ141PEsJK2A9XDWhulJsN1c2g=; b=txe/TGzL2m1an+nZ6gO/mOSaoDI67xtlU7/eV990yjKoxcG0UfjMij72knv2aBpCp2 Cmtnr2BvxdLRtTcDUSFaEAb7Z6tcoihpK17xxJYDDSVRrl8Ng35DB0GUKAPDDH/N/Il4 OGJQEP3s0QLkEwIycouiFmf0Iggxw7P9Xect2VxLD+duf8ES3viEDp29UWiSlYwxHKau /JVQR3zrFqLOQbAuVpRdfYoIugdCdZH6AmURIiDdvn7JFxX1o92/dnHolj4XC0RqBHi/ y73+XgdiLyAmNUH/W4N5EpDTFftABn3UeUI0v4wf6HTZXGQNAk8Fd5MLKDU3siIoSFGe Gb6g== 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=g4c//fvG4fjXYLBPyQJ141PEsJK2A9XDWhulJsN1c2g=; b=Pr5/r2b7HyZlWZhn7tf6msVBK1bq3X6toIBS8ShD7N3EuqXdVrseIlm1E4Wl0HmeMg qE2NgblQoxm4I8whFMgwg5fMJOU5byjURilfcShOuWnkQk5ZFIX0pzlNzB9mLkb2auYJ oV2P+sUtqAkb09n6h1tfABkPNqH4uaCt1ksU23g+U8+TnVWk335snuzUmOUPaKPal4m7 ClJKdME2Ugs3DpqW/qMJYDq/cU+zZK+5g2NsGi9WH7JlubMPhqOdSyPOokEwYqdg7xLg YAeEnl7yj51+eCz06Zsm8PnEtrs/cuNW0Hgnv/vbEAftwkvw4s7xp2tZiuvxJdfl1/7Y gldg== X-Gm-Message-State: AOAM532Xorg95k0aZyXJzRTZoUEfskMsCofsOkfinLUg++A8Ia24e0Xl FdWUSep6inENQqj558GeMlGB/f4j X-Google-Smtp-Source: ABdhPJxLSrOIo2pJZ6JxdbY8sqTL+sLacJBQP0Z57JrGGqLjqaHZnmGavtkNBCHUG79mxlKKrr0QRQ== X-Received: by 2002:a63:1406:: with SMTP id u6mr22223509pgl.108.1595907352696; Mon, 27 Jul 2020 20:35:52 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:52 -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 24/24] xtensa: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:34:05 +1000 Message-Id: <20200728033405.78469-25-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: F336A18002262 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: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Nicholas Piggin --- 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