From patchwork Wed Aug 26 14:52:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738663 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 6D760722 for ; Wed, 26 Aug 2020 14:53:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3A7DC22BEA for ; Wed, 26 Aug 2020 14:53:05 +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="JFLQL9pF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A7DC22BEA 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 081D96B000A; Wed, 26 Aug 2020 10:53:04 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F283C6B000C; Wed, 26 Aug 2020 10:53:03 -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 D9E596B000D; Wed, 26 Aug 2020 10:53:03 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id C2F806B000A for ; Wed, 26 Aug 2020 10:53:03 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7DD878248047 for ; Wed, 26 Aug 2020 14:53:03 +0000 (UTC) X-FDA: 77193012246.17.pigs19_571494d27065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 23825180D0181 for ; Wed, 26 Aug 2020 14:53:03 +0000 (UTC) X-Spam-Summary: 1,0,0,b7209d1160a73570,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.216.66:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y8sqy5kjm5zr1bdi71ys8zn86mhypzm4hnabtkgwjicic6wrz3gwm7bg4oh9i.a1jaj9496mq4u1mg5jmmsqhuc4phatgn3ppknmzqy5khspwrn18jiykxgjycokx.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:29,LUA_SUMMARY:none X-HE-Tag: pigs19_571494d27065 X-Filterd-Recvd-Size: 7506 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:02 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id n3so1192990pjq.1 for ; Wed, 26 Aug 2020 07:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dCbHJAKt6s3Rg7aETluYBz2dgq5UZfILUQ6bXeRl1rk=; b=JFLQL9pF17QewiL9TU4uewxOTLOFRNMQOli4TMrEuETfwo/6esVbfyU6Ahe1MfaHkH cTd+2///YrMYsvPAmRjXJ1duj4WyJw0/PWFbevsAci3/nVXGUIHmbh4FChbxTwo7doiQ d5n4jvE9I/mcTol6e2hEfq6S9Uze1e2gMjvlMdFxpfDHlHmwo89kKUeQTw3UYIakmkOk YYs6+LfR725QpB4O9TTDVK96Zdctt/B0/6f9XemqLXdUPGPwf1G7lma7psuLf2IbTjqE siGafEgsR9TJ8VpG6eXtUXONVzZQ2x6/1GkrxSEz45dLKEhKlYhfUSTPRbw3jJZ5OvNs rXVQ== 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=dCbHJAKt6s3Rg7aETluYBz2dgq5UZfILUQ6bXeRl1rk=; b=CgHWMATrqo2q0ZX0L/IYEorh5wMeRImjp/1dFdaQ72q6lvk91s85ebTs2GS1mlb7vp wmJN/dWN3/h289XtKY6zKYhdhVqJZN6nOKCIOI0kXe0L0atPwtsGdVsun+opv9LcW5zF vMQ54ofc+At3kqfSy1HVcnEh/kylqbKviNklKGUW2/1FhPq9VaGAjt/hP2u4iHjVA9bI gUAUM9FF1tQZKi2B3ytn0l7Y8tqFwqT+G2Chbt5tH4oic363D0cwaxNt1t2Lc1pcVRcf u+mgvJeiGiNiVncSPPPFzpM5N3qIVvF3eKfAIKSQEQ6Q0JQpy/whcFb74WNQ0NBFIzZr J+Cw== X-Gm-Message-State: AOAM531iTrIDx4ZV+GuYpyT2q8jCJR5EOi0LbsPZgxZUP5nX/fnjBgR9 BdlC2+zliJ6cnTChRIFq4lc= X-Google-Smtp-Source: ABdhPJz1B2LT8vTgec8GC+tIrYzicFVFqQk7kgNC8WGWbvfQf4pVrR0CYZjevi8n5mGkopGMi9zsug== X-Received: by 2002:a17:90a:5298:: with SMTP id w24mr6072843pjh.221.1598453581516; Wed, 26 Aug 2020 07:53:01 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:01 -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 v2 01/23] asm-generic: add generic MMU versions of mmu context functions Date: Thu, 27 Aug 2020 00:52:27 +1000 Message-Id: <20200826145249.745432-2-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 23825180D0181 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 --- 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 f664e51e8a15..461b1304580b 100644 --- a/arch/sh/include/asm/mmu_context.h +++ b/arch/sh/include/asm/mmu_context.h @@ -133,7 +133,7 @@ static inline void switch_mm(struct mm_struct *prev, #define set_TTB(pgd) do { } while (0) #define get_TTB() (0) -#include +#include #endif /* CONFIG_MMU */ diff --git a/include/asm-generic/mmu_context.h b/include/asm-generic/mmu_context.h index 6be9106fb6fb..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..4f916f9e16cd --- /dev/null +++ b/include/asm-generic/nommu_context.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_GENERIC_NOMMU_H +#define __ASM_GENERIC_NOMMU_H + +/* + * Generic hooks for NOMMU architectures, which do not need to do + * anything special here. + */ +#include + +static inline void switch_mm(struct mm_struct *prev, + struct mm_struct *next, + struct task_struct *tsk) +{ +} + +#include + +#endif /* __ASM_GENERIC_NOMMU_H */ From patchwork Wed Aug 26 14:52:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738665 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 E2902722 for ; Wed, 26 Aug 2020 14:53:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AD8722078D for ; Wed, 26 Aug 2020 14:53:08 +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="Fn3sDeur" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD8722078D 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 8BE256B000C; Wed, 26 Aug 2020 10:53:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 846C96B000D; Wed, 26 Aug 2020 10:53:07 -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 70ED96B000E; Wed, 26 Aug 2020 10:53:07 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id 5954E6B000C for ; Wed, 26 Aug 2020 10:53:07 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 10983181AEF15 for ; Wed, 26 Aug 2020 14:53:07 +0000 (UTC) X-FDA: 77193012414.09.play60_0a0d75427065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id C93FA180AD802 for ; Wed, 26 Aug 2020 14:53:06 +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.214.193:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04ygks4sybq5shtx7rtynifnon7dzypoxxpfpf7uqagosm8nuct1nx8c1t4dwfh.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:23,LUA_SUMMARY:none X-HE-Tag: play60_0a0d75427065 X-Filterd-Recvd-Size: 4854 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:06 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id bh1so1006433plb.12 for ; Wed, 26 Aug 2020 07:53:06 -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=Fn3sDeuriJkzPq8xhjmF8hfliMyPLrzu+HeDi8nNSywnpEb6tEK82GyFjtvfg7Jn2G K3C+AVMEI43lXyXUzi5+1h/MnpOEAu5PD9nGyD55rToVneTmm9nWQwqYEVrpcDp6Cx4o I3M9bZbNehxI42EaM06LKpI4gdGG8tH3GyY/WJx32aiPMX3NuKpH8voX25DtXVmK/ZO3 ULmKzAk4sf8kpnuZp+GFAkwbHP4xNDKUFp5kAFZZqBWzHrox1+JB24MC0T0hx61dxF1p /0dD8SEFkVJZMWFtACiTaclunC1o1Uv1uubiqa/fu1a5S2C2QV7Prjdr03x512uSNhqi Jf4A== 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=WK9KmXftl5ylx+GADp4AWl5WKsiocDCqS5EAHm2malucHWlDAUkE/viJBeWKC/OsBV 1yZ/yfij0easZ49O4RO4Dez7MTwT0jD3xGJv/b1TViXVY3jW4ITohuWdfutW57ToboX/ WEQ3vT3JTVPEm7tKupiE99PO1EvUjyFawXT4HTk5eNKU/uk8fEYcRO2X7YKsDdtnMqVu SiXwy7AYQUVDH9zvMkq1nY9eVfg0XenveYlKc+0oFEBPB7gNO8q9ox2IrJjbi1gNmPWO UTS0zdZFSakjXJz5okCFbAIGLE9F6b4zGg++jltyWtKYpqWObUf8tsCdAubp074Slw00 IPYA== X-Gm-Message-State: AOAM530Ftw7P/Pj0oS9fyiPjtBkkWggk+UFM5SK9Iv14m9jpowup5ckw N0nttSK7QaormerxB1TqD/c= X-Google-Smtp-Source: ABdhPJzpYIR2LPns0GuFjTMbiHoFylGaEIOxfIsAUBjTAzVS5DVSDZOjUh4q5HoqzX5d/FcrlPnZYg== X-Received: by 2002:a17:90b:4a46:: with SMTP id lb6mr6525335pjb.107.1598453585598; Wed, 26 Aug 2020 07:53:05 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:05 -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 v2 02/23] alpha: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:28 +1000 Message-Id: <20200826145249.745432-3-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: C93FA180AD802 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: 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 Wed Aug 26 14:52:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738669 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 65848722 for ; Wed, 26 Aug 2020 14:53:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 28F862078D for ; Wed, 26 Aug 2020 14:53:13 +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="YOUyopMJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28F862078D 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 0CE8F6B000D; Wed, 26 Aug 2020 10:53:12 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0591B6B000E; Wed, 26 Aug 2020 10:53:12 -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 E3B928D0001; Wed, 26 Aug 2020 10:53:11 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0047.hostedemail.com [216.40.44.47]) by kanga.kvack.org (Postfix) with ESMTP id CB2856B000D for ; Wed, 26 Aug 2020 10:53:11 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7F7238248047 for ; Wed, 26 Aug 2020 14:53:11 +0000 (UTC) X-FDA: 77193012582.01.tub95_041277227065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 0B6BB10049A7D for ; Wed, 26 Aug 2020 14:53:11 +0000 (UTC) X-Spam-Summary: 1,0,0,caf6fa5b35a34d95,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:12986:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21611:21627:21666:21990:30054:30075,0,RBL:209.85.216.66:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yr4fh5xdg9mt9698b589fjqh61mypmrejkfmhauygdppn66twngmkj9g9rac3.rjp37564j3xkwmg7dzzmzefixpwfta8wuaz86rfqhd97p3dh5sgtnx8y4ffn9aj.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:26,LUA_SUMMARY:none X-HE-Tag: tub95_041277227065 X-Filterd-Recvd-Size: 5480 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:10 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id q1so978907pjd.1 for ; Wed, 26 Aug 2020 07:53:10 -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=ti5aFrmBPkKLjysSSabr7+oEKMDvyOOxBJHtaQyN6bs=; b=YOUyopMJi6fxTdRmP6+MMmHjqBrzqBdGsJhib6WpIKk/k44xKZCS738qRolqHsFXmK NrALc+p220xDhHQPzHhlT6Ov/G08qamDHOPs77c0f5Je9WZ798lnbsmyollAIKBpDDsV wWwncVzhMt2FWa36IUwtoK/BaRtjeH5LUueOpqkjqFqjYSsjexDCCQdC6qDm92nX0QLg 6PyU9tmVP48l9eq3tmumUSuCjKbCKJauA7s0RqUG/lym/jmR+FG9/iUHM7U4kJUebuor GGJ5VtumN6UR7E0Td2DRSOO5v5K47hFfVC4pWBzq7eERdpNb7tQlVinH27SPg4d9DTj3 Ov1A== 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=ti5aFrmBPkKLjysSSabr7+oEKMDvyOOxBJHtaQyN6bs=; b=UDkIJwHJgWNZSsvByFwndere3FCZ198cBejS7R4AaQs4SrJJm3UkljtCqKWJIocqVJ CjyxYnPHz4XAATxKWo8fr7h9TBxqI6v6m7227fLxAhM9zNMPTfpv3OVogBEeq65ipo8C HbrmN7IVv65qojZsucHcLpzI5d7TAE9uIWAwLR/sHKxXZ6mQMOnOhDw2BpdR2GRb9ii6 uadN9N/mOwBQGlmtep1qWtXqysnZYNk06BrVQvR7PkSbXuHWtkjsTqgsux/u+PBA+1oG XUdZq6FpKnLIoRZpoS+X+I6ZmrJIZr+Cd2WuStL437mv4a/wBpHCEO5l5i+4c/N97pUy kZeA== X-Gm-Message-State: AOAM5316l0WqKzQdugbfhyKWVeYyCNdAPM8fs3WcOkisbmlqXWduBdsz IPp9u6Aa+0mSZ9OqtDNDfJ4= X-Google-Smtp-Source: ABdhPJy2SGDVDGvyx3hWFj5EHkiUSzPX9nxHi3Ncwo7mVkZoph8qmVI6xz3/z152bMoeWCsi54CPxg== X-Received: by 2002:a17:90b:fd0:: with SMTP id gd16mr6417371pjb.122.1598453589734; Wed, 26 Aug 2020 07:53:09 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:08 -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 v2 03/23] arc: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:29 +1000 Message-Id: <20200826145249.745432-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 0B6BB10049A7D X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000010, 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 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arc/include/asm/mmu_context.h b/arch/arc/include/asm/mmu_context.h index 3a5e6a5b9ed6..df164066e172 100644 --- a/arch/arc/include/asm/mmu_context.h +++ b/arch/arc/include/asm/mmu_context.h @@ -102,6 +102,7 @@ static inline void get_new_mmu_context(struct mm_struct *mm) * Initialize the context related info for a new mm_struct * instance. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -113,6 +114,7 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) return 0; } +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { unsigned long flags; @@ -153,13 +155,13 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, } /* - * Called at the time of execve() to get a new ASID - * Note the subtlety here: get_new_mmu_context() behaves differently here - * vs. in switch_mm(). Here it always returns a new ASID, because mm has - * an unallocated "initial" value, while in latter, it moves to a new ASID, - * only if it was unallocated + * activate_mm defaults (in asm-generic) to switch_mm and is called at the + * time of execve() to get a new ASID Note the subtlety here: + * get_new_mmu_context() behaves differently here vs. in switch_mm(). Here + * it always returns a new ASID, because mm has an unallocated "initial" + * value, while in latter, it moves to a new ASID, only if it was + * unallocated */ -#define activate_mm(prev, next) switch_mm(prev, next, NULL) /* it seemed that deactivate_mm( ) is a reasonable place to do book-keeping * for retiring-mm. However destroy_context( ) still needs to do that because @@ -168,8 +170,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, * there is a good chance that task gets sched-out/in, making it's ASID valid * again (this teased me for a whole day). */ -#define deactivate_mm(tsk, mm) do { } while (0) -#define enter_lazy_tlb(mm, tsk) +#include #endif /* __ASM_ARC_MMU_CONTEXT_H */ From patchwork Wed Aug 26 14:52:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738671 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 16D9F109B for ; Wed, 26 Aug 2020 14:53:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CD79B2078D for ; Wed, 26 Aug 2020 14:53:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jmGYaI3y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD79B2078D 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 898336B000E; Wed, 26 Aug 2020 10:53:15 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 821698D0001; Wed, 26 Aug 2020 10:53:15 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E7736B0022; Wed, 26 Aug 2020 10:53:15 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id 5769B6B000E for ; Wed, 26 Aug 2020 10:53:15 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id EFD8C3626 for ; Wed, 26 Aug 2020 14:53:14 +0000 (UTC) X-FDA: 77193012750.20.cast86_470746827065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 98A42180C0609 for ; Wed, 26 Aug 2020 14:53:14 +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;04yrfm5jo7yhyro79zyinujn5wxj8yc4frdze4wjpnfu3pmigtmu9mix59nkn34.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:24,LUA_SUMMARY:none X-HE-Tag: cast86_470746827065 X-Filterd-Recvd-Size: 4884 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:14 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id i13so1006013pjv.0 for ; Wed, 26 Aug 2020 07:53:13 -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=jmGYaI3y7+bK+s5Vq9pxlP9AKQX1/f2kkCSAPyU9Hi/mpiMeJEdVOU/SlTvNdwQGsE W2SIrItUXPPqUOIXKf/izMh44nFlQ2RurR55qfloUW+TfZiQl2VuBZNvaB49yw6EoD4a WxeSZrkQmX/QFaDD02lYY1c3hZD/Mb97GrTdTrkW4nhVIts6RXNT93bIwp8VxBnDweHM g845Oid0hY/B7UgntbvniBX8J6laGUpy2/U4xJWfWAToa3tq1C9lqyWqPQUihHF3u6pk Et/YbsLLCXqIJwlosSd6raD7od40ipLLbl2bAjKmM86DA4Fd+m/rvkN3KdTJEvDaHCh5 2VgQ== 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=fTVMRh012SLwgdnMBtsKXWsRCTdZsyKQEnOl4oIPaxIOvvsFKCdQha4KgnVs2PzBUs Pu66g2kKsdpqXEahnbz0NfTBmKSmkF2WHY0OkW6ci1LuIBb6BLyiNovC9/A1P59ikIgV PDJ1q7msQUkN4V4ToNiQPZhE50QkhSQI7OVU/zHib3QezZc3/8AT/hELmXY3Mve+YMZ0 vEIn3iFGwfj10nNNlFYS3eA+3NIVVCevzYQHp5Lqvm36Samv41ZS4l4Tt+3gs5BU93XZ s2ujPKX3bjxkrgONCJUP1SO8u01/H9BhkJ1H3kNy5/GLqwj30d6sxBNu4RfVmbZ5L5Qb +pWw== X-Gm-Message-State: AOAM532t8AvMYe6RlBydBh9W1557hXHiHKanjCXt5yTAsjtrpjTLz8du 3xs16CuUmDAm3VD23axLzM0= X-Google-Smtp-Source: ABdhPJyDERUfmwLIZqqYQ35h4vwNp6nxCDqre3x7r/Ny6pXllt93M9hcqByBq70CqedHa2ThMMOxZA== X-Received: by 2002:a17:90b:4d0f:: with SMTP id mw15mr6341778pjb.174.1598453593254; Wed, 26 Aug 2020 07:53:13 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:12 -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 v2 04/23] arm: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:30 +1000 Message-Id: <20200826145249.745432-5-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 98A42180C0609 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: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Nicholas Piggin --- 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 Wed Aug 26 14:52:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738675 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 DF8CF722 for ; Wed, 26 Aug 2020 14:53:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AA0942078D for ; Wed, 26 Aug 2020 14:53:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fSSBLXXX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA0942078D 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 402516B0010; Wed, 26 Aug 2020 10:53:19 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 38BB46B0022; Wed, 26 Aug 2020 10:53:19 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2079A6B0023; Wed, 26 Aug 2020 10:53:19 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0212.hostedemail.com [216.40.44.212]) by kanga.kvack.org (Postfix) with ESMTP id 0B5896B0010 for ; Wed, 26 Aug 2020 10:53:19 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BA7382464 for ; Wed, 26 Aug 2020 14:53:18 +0000 (UTC) X-FDA: 77193012876.02.fact03_3516d8427065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id 7F04A10097AA4 for ; Wed, 26 Aug 2020 14:53:18 +0000 (UTC) X-Spam-Summary: 1,0,0,d5dbdc1d6d5d0f94,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: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:21450:21451:21611:21627:21666:21740:30001:30054,0,RBL:209.85.210.196:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yr97omkx17dwn8hia6e6zxgzngyops3oqjjzayptewzi4ap6hqomt5eabr5nm.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:24,LUA_SUMMARY:none X-HE-Tag: fact03_3516d8427065 X-Filterd-Recvd-Size: 4720 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:17 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id x143so1114027pfc.4 for ; Wed, 26 Aug 2020 07:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GRVo5HKDem8WxmcB1xWWA3LpL1WS5jJLaPxEr9bIN0g=; b=fSSBLXXXk2qS/LnVPa23lP13CmKBs1rky8hMENw53CWEEBphdlvfZ9/MTpLCvRZMD/ ycGkdaD75uWOC76qpFqWC3i9Ck7qpJ1p/XO6hB+56qb22OcfnRShNTxizaIF7L6eyBpv EPtVWcKJsLuSDYbDXBkHS2U4vr9s3hz0CGyh/m/Fc6S1YOceeG5gNQGlgHP+1AMWGpRf 4W0AzdqgZnJ7zAoD95zfCANL1wt2adlM/wOzy9AFxQfPK7mZSNL1zy3SQcTWBhNl8YFG PYeR0RXcuAUoSrj/mEEok3rT9xm4gbcbyoXfIztDu8O8dKjSa4uraQFeo6jI/gNkFIUN eIlQ== 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=GRVo5HKDem8WxmcB1xWWA3LpL1WS5jJLaPxEr9bIN0g=; b=NeINCjC81nQrFIojyJL1w547I0N3MsSo4hWgcXUicPb/YiDvcsdVep726tf/4gtiSe tymemXoYsLv87/qCTHr+8nPtpjZHJymwiuCjcjC7qAGHjfoYQAgvsntxnkbPLBzMz/bH l6XE46366v21V/1+0vn0d6TYCY2FbV4YqXPAbo6YwgGDSwIGBKFbyJyue2I/Y+CDouyi xvODc3ei8Nsbe46ozjM9pO/tkMbm/zdsuNwdq9Ca18rM2zobrEAAXHRzCRKRSlnJezm5 UdigIj6kWCrTaVoYXFcjLQA8Hmu+3/AxODGOiROBKhTv7EYlQetErAlHO64zRZok7yew dyqQ== X-Gm-Message-State: AOAM5327qyyCQV9uD56BrRbbleG52V1ajLS5Sd54XIO0ZyfVo9o9Xg06 ACgDnjUzjgzXKDIDaZT32nM= X-Google-Smtp-Source: ABdhPJx2I5iBb/AgkxmwaVWL1JQh+QbMlvvoQtZudmmMNCZaNPUm28VeclvSIUMYYia3AJbYczBWMw== X-Received: by 2002:a62:86ca:: with SMTP id x193mr7890073pfd.114.1598453597165; Wed, 26 Aug 2020 07:53:17 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:16 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 05/23] arm64: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:31 +1000 Message-Id: <20200826145249.745432-6-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 7F04A10097AA4 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 Acked-by: Catalin Marinas Reported-by: kernel test robot Reported-by: kernel test robot Reported-by: kernel test robot Reported-by: Naresh Kamboju --- arch/arm64/include/asm/mmu_context.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index f2d7537d6f83..765e8a0f88c9 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h @@ -174,8 +174,7 @@ 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); +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) { @@ -242,12 +242,11 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, update_saved_ttbr0(tsk, next); } -#define deactivate_mm(tsk,mm) do { } while (0) -#define activate_mm(prev,next) switch_mm(prev, next, current) - void verify_cpu_asid_bits(void); void post_ttbr_update_workaround(void); +#include + #endif /* !__ASSEMBLY__ */ #endif /* !__ASM_MMU_CONTEXT_H */ From patchwork Wed Aug 26 14:52:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738679 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 016E3722 for ; Wed, 26 Aug 2020 14:53:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C1EF52177B for ; Wed, 26 Aug 2020 14:53: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="BspJF27Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1EF52177B 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 CDE7A6B0023; Wed, 26 Aug 2020 10:53:27 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C3F656B0024; Wed, 26 Aug 2020 10:53:27 -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 A6B306B0025; Wed, 26 Aug 2020 10:53:27 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id 925606B0023 for ; Wed, 26 Aug 2020 10:53:27 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3C2CF2485 for ; Wed, 26 Aug 2020 14:53:27 +0000 (UTC) X-FDA: 77193013254.29.pig64_41073f227065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 078FF18086E29 for ; Wed, 26 Aug 2020 14:53:22 +0000 (UTC) X-Spam-Summary: 1,0,0,6eed6046bce4bde6,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3876:3877:4321:5007:6114:6261:6642:6653:7514:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:30054,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04ygdeznx575n7a8wnx7z4xj8up3pocjk5dxm5wtzms7xejtorybp74i9cyeg3d.uf3siiy3z1dhym7n63a7k8rbducbtp373o6qmfcfj343cpe3ygkru7nb74n8rue.a-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:45,LUA_SUMMARY:none X-HE-Tag: pig64_41073f227065 X-Filterd-Recvd-Size: 4171 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:21 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id c15so1005878plq.4 for ; Wed, 26 Aug 2020 07:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+cGML8t0IrnDZlw59Ro+Eu895qkrrnKIgTl4NIzGBZ4=; b=BspJF27QzbuQjjnvh+8w6iecMZp5YbD25ThpZed/PjkuGD6GJvNJ4CklxEb1ZrezDD yk7s2seci6BRkj6H0vXEDr6p6ouZWNefLvEUcER0Z4lbgqk4M/tISZl+Kg6lcDH1zm+J dODpaFi3JOrWQzVtm3giyP3xjFO0Q9RPJw6tbXqRFwPu8Rha7iWP7EMpxCXvA9A2Pudh LFalYZ8dqFGjPwLvve/KBiUZ279dPkB5bmL73P29fzrf4shaLvAf/hqdJdEXWajkCXAh G9VNfPz9scpQmioUtHRYPoxw2WqTtHJsSoUKxg7E5fzt5qBmZ91++UgqsvHT0OXrZyzO nCyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+cGML8t0IrnDZlw59Ro+Eu895qkrrnKIgTl4NIzGBZ4=; b=VVNN/rZASrCxiQQDL/xIk7aUt5/y9f8R+S//aA5KNdsUnocjZEc14+3uQsaXVaMMV1 eyLyPh7H4O24nQCXQbWlUt5DYqcIsNvWEYYVByuUH8MryFHql5ihjFvgFENr+2r22JnV Eldw7DswpPOw3zTD648i4HjOpMeFRqAAsEMmQ51UkenauX7hMxyCNAfSN+GKweAti4GB 4qSj1myhrpsjF8GhoZlg2vcXmmUyT+jcgB3Qg1K5mjTX66w7YWFgu+WwnnoTLAD4TO81 +Nvu+R5ZnUxslPdTdItvPTnC0VvQGSKZsh1oZOmojLPbtpmsfafltLCbmfjhSlQVKEZU bfxw== X-Gm-Message-State: AOAM532uxhGSK79vOZvBTJVesO1NLLGKIQe+SZPOiypOE8s/5Sxt2EmZ 0RGV5KAcYBMV8009DrfCXjb7UQZ6IHc= X-Google-Smtp-Source: ABdhPJzsbZy6isz4fHT5ReTyRXlVh220hAC0FejIMuKzxdA9ukIYV2V/k8A2gJ++hFMUoDTndc1d1w== X-Received: by 2002:a17:90a:7b82:: with SMTP id z2mr6216692pjc.106.1598453600691; Wed, 26 Aug 2020 07:53:20 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:20 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , linux-csky@vger.kernel.org, Guo Ren Subject: [PATCH v2 06/23] csky: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:32 +1000 Message-Id: <20200826145249.745432-7-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 078FF18086E29 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: linux-csky@vger.kernel.org Acked-by: Guo Ren Signed-off-by: Nicholas Piggin --- arch/csky/include/asm/mmu_context.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/csky/include/asm/mmu_context.h b/arch/csky/include/asm/mmu_context.h index abdf1f1cb6ec..b227d29393a8 100644 --- a/arch/csky/include/asm/mmu_context.h +++ b/arch/csky/include/asm/mmu_context.h @@ -24,11 +24,6 @@ #define cpu_asid(mm) (atomic64_read(&mm->context.asid) & ASID_MASK) #define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.asid, 0); 0; }) -#define activate_mm(prev,next) switch_mm(prev, next, current) - -#define destroy_context(mm) do {} while (0) -#define enter_lazy_tlb(mm, tsk) do {} while (0) -#define deactivate_mm(tsk, mm) do {} while (0) void check_and_switch_context(struct mm_struct *mm, unsigned int cpu); @@ -46,4 +41,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, flush_icache_deferred(next); } + +#include + #endif /* __ASM_CSKY_MMU_CONTEXT_H */ From patchwork Wed Aug 26 14:52:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738677 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 9830B722 for ; Wed, 26 Aug 2020 14:53:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 64AAC2177B for ; Wed, 26 Aug 2020 14:53:27 +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="RRiXPLTM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64AAC2177B 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 6005F6B0022; Wed, 26 Aug 2020 10:53:26 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5893B6B0023; Wed, 26 Aug 2020 10:53:26 -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 4282E6B0024; Wed, 26 Aug 2020 10:53:26 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0066.hostedemail.com [216.40.44.66]) by kanga.kvack.org (Postfix) with ESMTP id 2833E6B0022 for ; Wed, 26 Aug 2020 10:53:26 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D94282C0C for ; Wed, 26 Aug 2020 14:53:25 +0000 (UTC) X-FDA: 77193013170.05.roll65_590a3ad27065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id A84211801493A for ; Wed, 26 Aug 2020 14:53:25 +0000 (UTC) X-Spam-Summary: 40,2.5,0,2fd285fca382781c,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1542:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3353:3867:3868:3871:4250:4321:5007:6119:6261:6653:7514:7875:7903:9413:9592:10011:10241:11026:11657:11658:11914:12043:12109:12296:12297:12517:12519:12555:12895:12986:13141:13230:13255:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30075,0,RBL:209.85.210.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yf3awxqza1nj8rxhqanj8jtd8jrypoitpz3q1gor3rhpc1d4e88nuik7d1cph.7kp4ygk6riinq7r6djaee6h36hcxanjyoutp57y3gwa45u3p5af3r666oiwyjwo.r-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:1:0,LFtime:28,LUA_SUMMARY:none X-HE-Tag: roll65_590a3ad27065 X-Filterd-Recvd-Size: 5146 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:25 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id k15so1097477pfc.12 for ; Wed, 26 Aug 2020 07:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eCO6eQrXV/q62wlJ5dCHYkGXNXvcNXkjUmp1GwIXZy0=; b=RRiXPLTMXyNxkd/Q7cSppCEX4ypohtTUouPii1Ko6lFloN8J5gkEMLinRU6wt4LQS6 DESO9NUZRxUwuB//GtGcpHfxW+jUTGTO+b9WiHCTCM8XE7h69ydPbdwyRu0lgf/+ThZM MhP2CJ1kDWYtrGOrgaTF7J899dRXB31I05zBRy6Xd2VkwBUGM2m1zNGgWueXOBWSDlOv /Dn9Vhk1Wddl8VNkvumE7XqIoCaS9zLYW5TvXZLkV7PiqQ4zedbHYaIJdfKdSfz/Dj6n 903g+aLWs0KDriJmB34o2kFI8OwDEwuliPN/BaEMCUVrlfjBI0hj+YIWs+XeT4GhJ3uk sIaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eCO6eQrXV/q62wlJ5dCHYkGXNXvcNXkjUmp1GwIXZy0=; b=aQc7++B6TmFhop5YYkibjer2p/LKXSncnr3B75ceZgtUNMcGE2Vw0ZBSHJzDhmRRXw /4iIbPSQ+iiZe8aq5MwCV6UmAquJVqKr+Q96DvXUZHXSv2zZJEdOm2P9QCZcM8ZM19Sk kOmDEg6wm9iZEr504xrVfIxwoAAsw9HGnv3FBqp6IZ0Zjm2VjSAoE47Cbdbonp7UDHPT qPTbRQeqXCCDbYDFt3n2RFsQaJHSkugQas0gxA3Yl5F2fahdAdxKr7TABkPPl5/702+l JJCPUDlsiLW3mFGAu/NNAG5PshU+KypId7036PlgyoSWM2dgQLrOBO80sInWbXDFPbK5 GqDw== X-Gm-Message-State: AOAM530r0k7G/EJvjqQITx+8Q2yYFAhtOq0gnqxi1QJ4HWtzF8IT2hS4 WZ7ueL2ZsmKcg7gVs5v+xRk= X-Google-Smtp-Source: ABdhPJwSsJSzHc5MrbWpVkgrWNfzinki2wen6Dkyz8lDpl+VZJPEoGoFwALbjOyC7T503VBERSVgoQ== X-Received: by 2002:a63:36c6:: with SMTP id d189mr10171323pga.392.1598453604300; Wed, 26 Aug 2020 07:53:24 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53: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 , linux-hexagon@vger.kernel.org, Brian Cain Subject: [PATCH v2 07/23] hexagon: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:33 +1000 Message-Id: <20200826145249.745432-8-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: A84211801493A X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000030, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Cc: linux-hexagon@vger.kernel.org Acked-by: Brian Cain Signed-off-by: Nicholas Piggin --- arch/hexagon/include/asm/mmu_context.h | 33 ++++---------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/arch/hexagon/include/asm/mmu_context.h b/arch/hexagon/include/asm/mmu_context.h index cdc4adc0300a..81947764c47d 100644 --- a/arch/hexagon/include/asm/mmu_context.h +++ b/arch/hexagon/include/asm/mmu_context.h @@ -15,39 +15,13 @@ #include #include -static inline void destroy_context(struct mm_struct *mm) -{ -} - /* * VM port hides all TLB management, so "lazy TLB" isn't very * meaningful. Even for ports to architectures with visble TLBs, * this is almost invariably a null function. + * + * mm->context is set up by pgd_alloc, so no init_new_context required. */ -static inline void enter_lazy_tlb(struct mm_struct *mm, - struct task_struct *tsk) -{ -} - -/* - * Architecture-specific actions, if any, for memory map deactivation. - */ -static inline void deactivate_mm(struct task_struct *tsk, - struct mm_struct *mm) -{ -} - -/** - * init_new_context - initialize context related info for new mm_struct instance - * @tsk: pointer to a task struct - * @mm: pointer to a new mm struct - */ -static inline int init_new_context(struct task_struct *tsk, - struct mm_struct *mm) -{ - /* mm->context is set up by pgd_alloc */ - return 0; -} /* * Switch active mm context @@ -74,6 +48,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, /* * Activate new memory map for task */ +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { unsigned long flags; @@ -86,4 +61,6 @@ static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) /* Generic hooks for arch_dup_mmap and arch_exit_mmap */ #include +#include + #endif From patchwork Wed Aug 26 14:52:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738683 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 100F4722 for ; Wed, 26 Aug 2020 14:53:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D1CC5221E2 for ; Wed, 26 Aug 2020 14:53:32 +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="tsB9NPIE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1CC5221E2 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 478866B0024; Wed, 26 Aug 2020 10:53:31 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4080E6B0025; Wed, 26 Aug 2020 10:53:31 -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 2676D8D0001; Wed, 26 Aug 2020 10:53:31 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0074.hostedemail.com [216.40.44.74]) by kanga.kvack.org (Postfix) with ESMTP id 07E396B0024 for ; Wed, 26 Aug 2020 10:53:31 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 96D48181AEF1E for ; Wed, 26 Aug 2020 14:53:30 +0000 (UTC) X-FDA: 77193013380.29.trick66_1e11ea927065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 98E1618086CC0 for ; Wed, 26 Aug 2020 14:53:29 +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.214.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yrzficc1err8gkrdo4p1i3dbxr8ycqqbywfsbki3tjbisu3kdcczimw6qacg9.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:23,LUA_SUMMARY:none X-HE-Tag: trick66_1e11ea927065 X-Filterd-Recvd-Size: 5248 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:29 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id j11so1006335plk.9 for ; Wed, 26 Aug 2020 07:53:29 -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=tsB9NPIEI2EV4l5chpZ1VShXia7MBk6qDAmAUpkG9ydb8tuPVcG7JMZoeW+T3Dm2iS e40Z2DodY0kzrfIXcRQurr+mSfPL1M/qXx7wA4be0OVqeI3IQaidHUMGOwP10prR0EPY qoFo6VNRBvU7kRfqumOH9/pppYWEM9JTk+Ll0/MwYzIZHhzT9FhJSBa/tCKl0ZA4Robn BgZQ9bVnjbQVXNaQMmO2ezalhPNHWabMU0XVtcgr+WD4L48+QRPBjc5TlsNohUZd/9nd BfpNS60rOmiEIrOzyFvqQaD6ph5N6Zptier4k2fdQwL2IxdVsSaIKQiLZw9tz4lOnRxj Nd3Q== 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=t/D6iIUhH7SSH+Paz9HezwxunXKLVvw8D3bHTY5YPkEFmUeMlvIfcWCcTXv1bCj8GF Dzxl+3CyHsBaCKUIMxDklbJbkW+6P7BX2KSy5okBEKBBqB9bcvXxj+4Omn3/lCOTELcH gNmkcASQ5kfhoNQyAzBwlATw9oq0Prni7ZEAJUJEDQT8iR7ZKhqONFraXioX+Gl6b7wK CWoNwYu2XtN1JbfsPrz7XlaXhPUyBym488jso0u02KHjrWHw37NXYxVZy+k7tKxxPXIN GDstfrmpzIhsyd7wCfMwbquAVUy/c2dHCygcN52kFiQzNNFT2uUCDW+UtHrvusM7+h0R IH7A== X-Gm-Message-State: AOAM532FMNsp1sjoJDNFkxGwsQL60IGN4+OmJnvzBczP51U3DFqoYDn8 rIxXunREe/qMsSF186vMs5U= X-Google-Smtp-Source: ABdhPJzXkvb6xSDZr6SiieiLkOWMoxXqqyGTyYFG5Tva+Dhu45xbd/y2npDHNcyNJHrmj3G3xfZp9Q== X-Received: by 2002:a17:902:7b82:: with SMTP id w2mr12355577pll.258.1598453608407; Wed, 26 Aug 2020 07:53:28 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53: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 , Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org Subject: [PATCH v2 08/23] ia64: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:34 +1000 Message-Id: <20200826145249.745432-9-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 98E1618086CC0 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: 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 Wed Aug 26 14:52:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738685 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 099A4109B for ; Wed, 26 Aug 2020 14:53:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CAD2B22B40 for ; Wed, 26 Aug 2020 14:53: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="ivH/yedo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAD2B22B40 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 05A916B0025; Wed, 26 Aug 2020 10:53:34 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EFFB76B0026; Wed, 26 Aug 2020 10:53:33 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D77B18D0001; Wed, 26 Aug 2020 10:53:33 -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 BE61D6B0025 for ; Wed, 26 Aug 2020 10:53:33 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 71185180AD807 for ; Wed, 26 Aug 2020 14:53:33 +0000 (UTC) X-FDA: 77193013506.10.fall05_4002ba627065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 2C3A416A047 for ; Wed, 26 Aug 2020 14:53:33 +0000 (UTC) X-Spam-Summary: 1,0,0,eaf8ca0372a18a8b,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:4385:4605:5007:6119:6261:6653:7514:7903:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30003:30054,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04ygew7a39rgnqcz8jczq6anqx1w9ypbwzg33saw74p8hotrw5eykidijqgd65k.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:25,LUA_SUMMARY:none X-HE-Tag: fall05_4002ba627065 X-Filterd-Recvd-Size: 6880 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:32 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id v16so1006888plo.1 for ; Wed, 26 Aug 2020 07:53:32 -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=iI/2kk53gpQ9Rn/t0izdpZaGmK63P9KDTKwfGTyE5K8=; b=ivH/yedoVnRQZaiOBDE/q7i/+LlZQz4//Ac22EjXgDSh5z78UsF2b3rYcAwUTE0VWw O3akOdfpfDZPuTGaKWobUg/CtUCnIsUjZftQct3FOb1jPRlUQiNj8Fv+ayC2WGX+PO8a /9s+V/UtihMnFt2SYw1P9GmmaSFbh6cIMV4SiwgDzxT77fX3hxPs3DulQ2yS3Lax/rmT UUjOnKVv80yVYX48yH/r8Tek/OFxlP6Uka0D+brPaZFXo+5qiKdS6/iqg/yaUG6Lirw7 +rj1zbW6R6r+NiEzsswvBgZahXYbQKL5Bcp2cARCgQbVcP55dthWgJ0T/81aUNEM+sK1 +MlA== 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=iI/2kk53gpQ9Rn/t0izdpZaGmK63P9KDTKwfGTyE5K8=; b=Mo43K1aUjpCwaxRGMkG+ilYedEbeHz/R5ETYZPFkIoqE4vLS21Lb+/CgLLHmb3hYEC LwyfyAmPiGpwbCX37fUWJM+EuoH2JKkWOZsWRcYlIwn1p4DgZdqF22lUSjaw4LS7ima3 HSPpG0awfgsXMLHdiEfA73Y9+eMM6qNPZuLNRaATOZzVxYmFVWj2B0zyMFQU9oBb7T0K TGD5uc3dNYCRM4bzL4PpLQcNuqHK91dwfQkmfjNn5rlW0xme9bJTfnjgiQRMk1wiFLMI W8vQCroE5plbjq+cPPWXrARMCINFsEPYoHnX0+bCtIousFR5D7pRMpQQZ0JRIjzm/P1O fSHQ== X-Gm-Message-State: AOAM533Rhw38KZE06hUE8QvTq3HjwjeMdgRgFrIjkKe9G+jWusTmqGSK TJBAgoUAyEBiKHKRubt/ZEY= X-Google-Smtp-Source: ABdhPJwc2cHai12HbnvF2E57CKh2UaXXeM4qGHmYIx+dAfw9+5a/wogaP6zNkYnmdj+Nj5MlwPj4Xg== X-Received: by 2002:a17:902:a617:: with SMTP id u23mr11640565plq.188.1598453611955; Wed, 26 Aug 2020 07:53:31 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:31 -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 v2 09/23] m68k: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:35 +1000 Message-Id: <20200826145249.745432-10-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 2C3A416A047 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: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Nicholas Piggin Acked-by: Geert Uytterhoeven --- 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 993fd7e37069..012e92204c1b 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 Wed Aug 26 14:52:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738695 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 5FE04722 for ; Wed, 26 Aug 2020 14:53:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2A55E2078D for ; Wed, 26 Aug 2020 14:53:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sJxfh2jJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A55E2078D 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 CDC7E6B0026; Wed, 26 Aug 2020 10:53:40 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C686F8D0001; Wed, 26 Aug 2020 10:53: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 B060D6B0028; Wed, 26 Aug 2020 10:53:40 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id 99BCA6B0026 for ; Wed, 26 Aug 2020 10:53:40 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 535E53626 for ; Wed, 26 Aug 2020 14:53:40 +0000 (UTC) X-FDA: 77193013800.23.soda08_561724b27065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id D49BA37609 for ; Wed, 26 Aug 2020 14:53:38 +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.210.194:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y8gggi9mwuekhkb9i589st8don1ypbauhefykhy7orrg1qob1f64zha56p3zd.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:43,LUA_SUMMARY:none X-HE-Tag: soda08_561724b27065 X-Filterd-Recvd-Size: 5219 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:35 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id d22so1108632pfn.5 for ; Wed, 26 Aug 2020 07:53: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=wuGEwlNHfczwsScET5//DK/IY7Qs+PjjbY2XOsrR6EY=; b=sJxfh2jJmRyJwyZjRYiK59/JqRgrFpTkVZ5xgJoltk4TDoYL+GlD9+tgJIxFMS58zE bVZWwfb+obCUVs74Vy+38s/0c3jNR31aeAqt65bmhYQYtabBgIbEydsGfCwHbw22HIaZ xBjgLEgMOymilWxmlOBg6wnsNLYEaQkNJYoynGXLUEPLUNM/pUihKqkfYim77mykoZHw r/99g3M/GcaRxVtbvKEmtUHqBLQQegIIytdG4HCL8pOfpNjtwUfY4x9elFPCV0UbZrmn nLcQ8bYgj5PDwHpwAmqejHERBakNqFdh+/LDrmy2R3t0JejiqkpszFSlXK0puSMx2qq5 EfeA== 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=pfK1zmbNzEJfGuCsp3pN6NlpMlUBqnVqmB940R2f4UqU1oG/mqS/SucCjut1xLuVc1 +jnXr1X9Dibt3DznhYdkvckt+4zmZ9UKp/aW+pkMEWqeAgGeSYsn2KkY1iC01At8FRxJ vfkLGDToc/F16aPmUAchx3Xlb++5WUFQpZyoBtdrTO13R8QcIk7hITcqociwR3IucAOa ZVhkjjJ2oeCnPFVMfRa/1hf/aHbbWsvEzs91edLo2+WeFDrvDHR1+Q56nuTf//B23oAW dc2HCPBnRZ1k3RYO64IPwR91wqyk+DMEEiGZ6Yd5IiKSF5TCOlPKSVddifRU0M+ooHBF JTIw== X-Gm-Message-State: AOAM533d7xSY0KQltWBGBN/RCDEzdciG1Byk7kBTPCnzxW6Ifb2u5Vr4 mrh0RlOWrvep+ULrmpAm91Y= X-Google-Smtp-Source: ABdhPJwnwRk8+dVeXoz0Grl/YQQOhYKHOnjDr66zdyR/sD12wD+22g0P7kpG1iTmQ2c7J7Xd74ABaw== X-Received: by 2002:a65:6287:: with SMTP id f7mr1593741pgv.264.1598453615205; Wed, 26 Aug 2020 07:53:35 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53: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 , Michal Simek Subject: [PATCH v2 10/23] microblaze: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:36 +1000 Message-Id: <20200826145249.745432-11-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: D49BA37609 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: Michal Simek Signed-off-by: Nicholas Piggin Acked-by: Michal Simek --- 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 Wed Aug 26 14:52:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738699 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 56E5B722 for ; Wed, 26 Aug 2020 14:53:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 17DAC21741 for ; Wed, 26 Aug 2020 14:53:45 +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="rAKnJSzo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17DAC21741 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 3E1346B0027; Wed, 26 Aug 2020 10:53:42 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2F0BC6B0028; Wed, 26 Aug 2020 10:53: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 16BB26B0029; Wed, 26 Aug 2020 10:53:42 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0219.hostedemail.com [216.40.44.219]) by kanga.kvack.org (Postfix) with ESMTP id 003696B0027 for ; Wed, 26 Aug 2020 10:53:41 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 996D5246E for ; Wed, 26 Aug 2020 14:53:41 +0000 (UTC) X-FDA: 77193013842.24.cast67_570a0e627065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 4CB261A4A5 for ; Wed, 26 Aug 2020 14:53:41 +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.210.193:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y8hnumy7xifcbfxosungs7mhy59opnoa6a14318c98o3ooq8ziah3y9faxzp6.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:25,LUA_SUMMARY:none X-HE-Tag: cast67_570a0e627065 X-Filterd-Recvd-Size: 4947 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:39 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id k1so1117401pfu.2 for ; Wed, 26 Aug 2020 07:53:39 -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=rAKnJSzoYGEt2qz9xpeOoAPU5HEBAIcGp2QMXDNOmDMGvtSi8nEbdgdGX4IFZOiDiJ YSulPWs0g0rFoIPZzuactbR2BzWo5KyJRQQUHVUOb6e/mDu+rYLgN/LRkGmT8cCqU89s 1gnriktuGcmVtyq5bcKKFpiJ1VRGhSGNgnd8mZJxfHm05adz9W8WQTN7fjs4ghDMr4Hi lgafmjkMsR+S4+gktKITf8DascRPy8EvmLArXwgjenS1P8c+O3dBReOxcnW7/4hyOfEw KWapPWgWXqrwefoxSsG9l0cwhzt8lPpewxhDXihJURChqO74oQEOhPh571wclGPTwXKJ 75RQ== 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=Kld3ZjgNh2Cj3sZCiA/BD5fV3KBoCK08txfY7dXzOoXEqdTbJzvd/MO6K8jirreKCG 6VGONb4Xq0xqux8Kgo82H8D9vxNNttSkBj6YCuLexQjB2m3l0otrhQIO6ptR8vX1fnj2 BAvn6evQM1zGXjP37/9tlMvuKslwCbxs71KP7iSkwivbK4gnPZKgrQCL4iarj9fkYfLT 4OH1vayDTbOlMxKNqpaW/M0Hu+ziC9biCC19+yfgJbDh0It98tRSTI6ggmYpPPzmsmNN TNDKpPDUj21dTfRE3hAekvQnpXUcIqFeRsPTVTz3Bdt2az4ucFHd0RSWE2hZkVLqIa9l C7Eg== X-Gm-Message-State: AOAM5318aNj/fByfp9/SSu6lEkuoBunTjzuOxaiq3Ry0mLRS/0P9kl0b +4jBA7EMy9fZ4pAbCsss0AU= X-Google-Smtp-Source: ABdhPJzrJJGcj7n7yPW1Wiv/Z390c4CVmxzbpAV27ojgXu7b+a5x8oR0g/bY1t7uSrfq0YKzDrAWsg== X-Received: by 2002:a63:747:: with SMTP id 68mr3027260pgh.90.1598453618734; Wed, 26 Aug 2020 07:53:38 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:38 -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 v2 11/23] mips: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:37 +1000 Message-Id: <20200826145249.745432-12-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4CB261A4A5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000007, 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 Wed Aug 26 14:52:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738701 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 68D0C109B for ; Wed, 26 Aug 2020 14:53:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 31B1C22B40 for ; Wed, 26 Aug 2020 14:53: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="n1rRwMLj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31B1C22B40 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 53FCA6B0028; Wed, 26 Aug 2020 10:53:46 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4A2716B0029; Wed, 26 Aug 2020 10:53: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 340F86B002A; Wed, 26 Aug 2020 10:53:46 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0108.hostedemail.com [216.40.44.108]) by kanga.kvack.org (Postfix) with ESMTP id 1EB046B0028 for ; Wed, 26 Aug 2020 10:53:46 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id BA0BD180AD81F for ; Wed, 26 Aug 2020 14:53:45 +0000 (UTC) X-FDA: 77193014010.17.bird32_0617f8727065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id C83FE180D01BB for ; Wed, 26 Aug 2020 14:53:44 +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.216.66:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y835ciofuhe78dtr1e9s5zjkpubop9zhzjzebewnyra4hr8wxthoj1cwkgcc5.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:24,LUA_SUMMARY:none X-HE-Tag: bird32_0617f8727065 X-Filterd-Recvd-Size: 4632 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:43 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id mw10so977540pjb.2 for ; Wed, 26 Aug 2020 07:53:43 -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=n1rRwMLjwoSs4LMnp2N+dPHCvP8ljePkQj/xCp/WwnZs+JpamY1B7d4lso6oW9I8ro 0Y5ebFndVJ17LONT++8e8+yVXxoOHhaB3D4tbz+8ceizvL9vz6E0p1/uCf+1wh3tmUY4 8yNpnr+Qlq1FF5vbKD0jVX/+YkoYybKlfjRQO6ajtH55LyHwMMGuPmiHDuJbRXm+GtA8 hWAjFkP91086rmNtJy9BIhrgYEYZytiJO0un0JZJ0pc+Krt6HuEmGtCo4EWK9tx6fLAv NU+FndmpzJ1sX4NnoyS/K5rZK5agwKhZTDYqHBPsFBsigc7z5nGlab7HrdCVMdudok54 wK2Q== 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=IM7PAafNjigrda+GXtVrUmcvEKBDRnA8AI4QYceLqBvRHs13DhVgPuT82s6Eam/nfj bC8QoJAon94PTFhxqWivGeYjE4F1XAU58rXQ/v4BB2p3uKueAy0WCSYUcMvD/uoPnDau rEwnZ4UKYLznUnv/VRY3pyckPe4nHsTSffvFRrpniabQrARpUEpB47Im86o3wD9uocnl TqbCOw57KwipmrqAJhp6r60SikMKTwRS15qRU6UIqjVy10cVJR++XKQGN+1XnSpx56Qg MBqHHi2OQK+7VO9TK6UDGm6JXLnnEVSOy4UmaxQpoAjtDIHDsfjQ9IdsW2KCcjlZDDZa OoKw== X-Gm-Message-State: AOAM531+v63h6SCaJzflVMscLx2GFXmz1frNZe/+MXt5g73Ao+QdUPk9 jRcN3oAswagirMF8x5KgbJc= X-Google-Smtp-Source: ABdhPJx36zSrgQ5+rUw7Uw0wSE2Zq6lUqBfvC6vMJYlTn5AKbamM0eiHzpvcIALtfEZJLDqM2W1XEg== X-Received: by 2002:a17:90a:24f:: with SMTP id t15mr6516825pje.227.1598453622555; Wed, 26 Aug 2020 07:53:42 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:42 -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 v2 12/23] nds32: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:38 +1000 Message-Id: <20200826145249.745432-13-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: C83FE180D01BB 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: Nick Hu Cc: Greentime Hu Cc: Vincent Chen Signed-off-by: Nicholas Piggin Acked-by: Greentime Hu --- 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 Wed Aug 26 14:52:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738703 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 72A9A109B for ; Wed, 26 Aug 2020 14:53:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3A0422177B for ; Wed, 26 Aug 2020 14:53: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="ZlgkMnJG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A0422177B 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 CB7536B0029; Wed, 26 Aug 2020 10:53:47 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C3E026B002A; Wed, 26 Aug 2020 10:53: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 B2DA36B002B; Wed, 26 Aug 2020 10:53:47 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0079.hostedemail.com [216.40.44.79]) by kanga.kvack.org (Postfix) with ESMTP id 9B62D6B0029 for ; Wed, 26 Aug 2020 10:53:47 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 63D1E3659 for ; Wed, 26 Aug 2020 14:53:47 +0000 (UTC) X-FDA: 77193014094.30.bone34_180cfdc27065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 0880E180B3C85 for ; Wed, 26 Aug 2020 14:53:47 +0000 (UTC) X-Spam-Summary: 1,0,0,16748ce6d4d96642,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:2693:3138:3139:3140:3141:3142:3353:3865:3867:3870:3871:3874:4321:5007: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:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30064:30075,0,RBL:209.85.214.193:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y8uqm3hrgtz1hwx3pg4ffnzmdd6oc61e6z6dw9mf9fmre8nyz8d777cepke4w.jfq7un734nkou4gq9q1qqq1wb4nyckt8twsaxd1m6ndcnbk1qiynitqtnbr36n7.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:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: bone34_180cfdc27065 X-Filterd-Recvd-Size: 4844 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:46 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id 10so1006552plg.8 for ; Wed, 26 Aug 2020 07:53: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=Crho1GeckyYBxh3qCyLD5ViQ5IZWY4Rxj/DBwYad/GM=; b=ZlgkMnJGdVfC98/jQl+I8jkQKmP360nq86MHnsiomaeZP5OuNBJccP6fMuIQkBa5FE X2I2ILOSi97V2mT87OutGPOoX5hS+gfyEWO4qMgDJSSwdtq9iNdVGMIlRL29g6Rz0044 OFqI/wZsfUTM0XOfft71HPNEshXfkd184b6VY7CNH4c75J/gB61iyNuKvpiYyYn1uAI9 KqRn3z+88CJ6NIfrnn3FnL0Cyx40NkS0MLsnf4mC4CM8Wzatkc/jDXeVIqwyMFNPrEY0 Uk4xeelsIqLGWSTlEWIjJZVXFsmr0hyGiGvX7KSes7UiegTLJji+CshexSQc/wkJ7kWB SXKg== 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=Crho1GeckyYBxh3qCyLD5ViQ5IZWY4Rxj/DBwYad/GM=; b=CYJdXeCrT7YaRotJoh3NBSYY3vxi+ZfcN8wAs1QoD0uSMN7P/jBGizmVVRtxVP1xDl YxHsPezeixG3hs3F9KXMYj9tnc8tgdPOstStMHtOGCihRwRqwp3SH73hiawWi2plbak+ xbj1C8mFzrmkHOp7J0s1zaT2oJiNfB0pyzgJ6/hdqvkfzExZJHJE8H3lfK+CFldGQ2hX FgPhmdPztqFaYj3z3LhZiFumiaYYz0MlV26euVI3eEFqHt/x5I7fbJmo1QqVMomNbFjo TsBMvJSQkB1BDzk4ruv3dGjRX2ZuEryxUyAXfuPmY1Hj3RIAw9b4iQMh0kV7irBYl6mT zxjQ== X-Gm-Message-State: AOAM531qVzzo5YU9IL6ScKRj9B3NYEXuA5ucIZKSRjLVI4NUpy3bxfpP /odffuUX4tEHjI6rvprTmx4= X-Google-Smtp-Source: ABdhPJzQoD1QarIs2qs7wxJ/lG+RA59AJBajALNQu9EE/q9NsmY0IQzXt6oyZkDE7VUDB8fSaMqk4Q== X-Received: by 2002:a17:90a:f2d3:: with SMTP id gt19mr6264154pjb.229.1598453625741; Wed, 26 Aug 2020 07:53:45 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53: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 , Ley Foon Tan Subject: [PATCH v2 13/23] nios2: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:39 +1000 Message-Id: <20200826145249.745432-14-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 0880E180B3C85 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: Ley Foon Tan Signed-off-by: Nicholas Piggin --- arch/nios2/include/asm/mmu_context.h | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/arch/nios2/include/asm/mmu_context.h b/arch/nios2/include/asm/mmu_context.h index 78ab3dacf579..4f99ed09b5a7 100644 --- a/arch/nios2/include/asm/mmu_context.h +++ b/arch/nios2/include/asm/mmu_context.h @@ -26,16 +26,13 @@ extern unsigned long get_pid_from_context(mm_context_t *ctx); */ extern pgd_t *pgd_current; -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* * Initialize the context related info for a new mm_struct instance. * * Set all new contexts to 0, that way the generation will never match * the currently running generation when this context is switched in. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -43,26 +40,16 @@ static inline int init_new_context(struct task_struct *tsk, return 0; } -/* - * Destroy context related info for an mm_struct that is about - * to be put to rest. - */ -static inline void destroy_context(struct mm_struct *mm) -{ -} - void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk); -static inline void deactivate_mm(struct task_struct *tsk, - struct mm_struct *mm) -{ -} - /* * After we have set current->mm to a new value, this activates * the context for the new mm so we see the new mappings. */ +#define activate_mm activate_mm void activate_mm(struct mm_struct *prev, struct mm_struct *next); +#include + #endif /* _ASM_NIOS2_MMU_CONTEXT_H */ From patchwork Wed Aug 26 14:52:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738707 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 C6141109B for ; Wed, 26 Aug 2020 14:53:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8F0F821741 for ; Wed, 26 Aug 2020 14:53:54 +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="q6an9A4x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F0F821741 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 DA0846B002A; Wed, 26 Aug 2020 10:53:51 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D29606B002B; Wed, 26 Aug 2020 10:53: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 B7BF38D0001; Wed, 26 Aug 2020 10:53:51 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0231.hostedemail.com [216.40.44.231]) by kanga.kvack.org (Postfix) with ESMTP id A151C6B002A for ; Wed, 26 Aug 2020 10:53:51 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 5E03E181AEF0B for ; Wed, 26 Aug 2020 14:53:51 +0000 (UTC) X-FDA: 77193014262.10.badge45_431381627065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 0F5AE16A07E for ; Wed, 26 Aug 2020 14:53:51 +0000 (UTC) X-Spam-Summary: 1,0,0,8814e8879bc45c8d,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3867:3870:3871:4321:4605:5007:6119:6261:6653:7514:7875:7903:9413:9592:10004:11026:11657:11658:11914:12043:12109:12296:12297:12517:12519:12555:12895:13069:13255:13311:13357:13894:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:30054,0,RBL:209.85.214.196:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yf9556z184nchjnz6munz3miu7uochsyymjyx45b5shbktxx75kpfqzcucamq.fgwg1essfsm7xhc8awew8zhm6h9zrhnfwshxawf9mfpbnpi3nhtxhy35o8d4yfs.w-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: badge45_431381627065 X-Filterd-Recvd-Size: 4619 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:50 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id v16so1007290plo.1 for ; Wed, 26 Aug 2020 07:53: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=TcbxX+lW5qgeFyGHy3Sgew1O8jaIFOQUWGSD9fmh4Ds=; b=q6an9A4xnvWqk3kD2Ahthf2EBYHipvLOJq8gjmXpTdU04Nb3S0hQP/tdZJTVPB7Joq XC8ygVnKRZGdRLkl49eU+TNhLdVAdDiyLUgS6CwO0WwOWKgFRtDvkpYeg4/QTuxVVxMR VONWRTlBOJd+PhC/tDxD26+EDSkLdSTR4HxFZzt8wfkhxZ7wdbW2ZmbBlq4BlH8CT5ud v/9wvVpl7dYLBm6CK6vdLN6Ino1ljMHl3uUsqcdG/mukXHoW9fcHwjQn1+m4sm8eiesc xBr/J/RV0sgRv/bTpbQXVo3EXoECA/odOegWY8UDepBWkdlD1HoKruo+lyujzOPtRV/j 4hsA== 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=TcbxX+lW5qgeFyGHy3Sgew1O8jaIFOQUWGSD9fmh4Ds=; b=XDNApA3awvYnWTOiF5Zxg7IZRmSsPMskot1A2MC8J4xCvEkkst69jw88s6SMKAzVW5 oAAwsIGnu1Ek60b8pXvrKPc9R700XBA63dYClhYqGZUUTNkA/w7h6Y4cWvrac41Yt1zg ZLCE5muTLTqsJ8l+0fi8dyDF2DjJy+yAc5KXHg6nsjLSr40HxHVR20sVLexjHjbsWnqV 9ybimV4zwIrqy7l+dWL8wiEk8W6mg6yvZ6WfGR6ZTQ9ST0DOgBvKaYC0Ke8B1CSwmyz8 x0CwKlyy/sOUN92ej6GLFt2bQlrhIgRXDH3xA2x6mB6w+2kmJZktrUMqj2Mzk/fOjzTY di2Q== X-Gm-Message-State: AOAM532B6NhKWZDDHzPv3sEI/nBffPqmfPElqaBkWwn55+aVxp/vjKe6 P1eF6jF9JbAex1JXVRcawsc= X-Google-Smtp-Source: ABdhPJzN+aMSyEY8aUnGBKztdrqgQqKNljAox7LWDC4FKdqEOI7IHNbzRh50th/9lmPgjJlxGrT0sA== X-Received: by 2002:a17:90a:5298:: with SMTP id w24mr6075538pjh.221.1598453629825; Wed, 26 Aug 2020 07:53:49 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53: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 , Jonas Bonn , Stefan Kristiansson , Stafford Horne , openrisc@lists.librecores.org Subject: [PATCH v2 14/23] openrisc: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:40 +1000 Message-Id: <20200826145249.745432-15-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 0F5AE16A07E X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, 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 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/openrisc/include/asm/mmu_context.h b/arch/openrisc/include/asm/mmu_context.h index ced577542e29..a6702384c77d 100644 --- a/arch/openrisc/include/asm/mmu_context.h +++ b/arch/openrisc/include/asm/mmu_context.h @@ -17,13 +17,13 @@ #include +#define init_new_context init_new_context extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); +#define destroy_context destroy_context extern void destroy_context(struct mm_struct *mm); extern void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk); -#define deactivate_mm(tsk, mm) do { } while (0) - #define activate_mm(prev, next) switch_mm((prev), (next), NULL) /* current active pgd - this is similar to other processors pgd @@ -32,8 +32,6 @@ extern void switch_mm(struct mm_struct *prev, struct mm_struct *next, extern volatile pgd_t *current_pgd[]; /* defined in arch/openrisc/mm/fault.c */ -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} +#include #endif From patchwork Wed Aug 26 14:52:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738709 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 0A518109B for ; Wed, 26 Aug 2020 14:53:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BF4942078D for ; Wed, 26 Aug 2020 14:53:57 +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="FGy4UDYo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF4942078D 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 8990E6B002B; Wed, 26 Aug 2020 10:53:55 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 848758D0001; Wed, 26 Aug 2020 10:53:55 -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 69A136B002D; Wed, 26 Aug 2020 10:53:55 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 5353C6B002B for ; Wed, 26 Aug 2020 10:53:55 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1908E2C81 for ; Wed, 26 Aug 2020 14:53:55 +0000 (UTC) X-FDA: 77193014430.14.shoe66_4c02e6227065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id E07F218229835 for ; Wed, 26 Aug 2020 14:53:54 +0000 (UTC) X-Spam-Summary: 1,0,0,031f6bc8874e81c1,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2196:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3352:3867:4321:4385:5007:6261:6642:6653:7514:8957:9413:9592:10004:11026:11657:11658:11914:12043:12109:12296:12297:12517:12519:12555:12895:12986:13069:13255:13311:13357:13894:14093:14096:14181:14384:14394:14687:14721:21080:21433:21444:21450:21451:21627:21666:21990:30054,0,RBL:209.85.214.193:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04ygujqru1e5dd1gxk3tiuxk3hyxmypdu3rxz45j137q849tiu5m4676idg5hua.is1du46jrqh6fm4nudmyjmn69tjbssnw4jytco88byhfjct1i1d7iwwtg3j3mht.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: shoe66_4c02e6227065 X-Filterd-Recvd-Size: 4849 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:54 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id v16so1007362plo.1 for ; Wed, 26 Aug 2020 07:53:54 -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=e8+XEx65ih5RYTqzxYTgKflRaIZKD/7jhLd8hvjKhoA=; b=FGy4UDYo6m6GBc2xXeUMxJap23UMwNdjY7eL7lGlWn9KfQkpaS6sESmgITWra6DZWm /Mi97hnvE4hUwic1kShBHCbSYLi9ZFJsPz03Xeu0qGaYv5HxF2dJqkk3yhQTkdWSFlPp th/meyADJ+ihbqDWHsVSOV0gf872gpLJoyNzaA7xYGYJnlkyct+Dmp9VmScC4LHjsit7 tF0/fMFPxL9KmUBHWldmPbDCLnpMNAHrPrSidGnVKtes9JoAwZfB4HDN7IQCNYoBOgYm 0EHrvoANNw8g1VgaYJW/DA+RY0dAEcb0xX4JPILHib0sQ4UO26ugArAdKVANsYAp5Q65 gZzQ== 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=e8+XEx65ih5RYTqzxYTgKflRaIZKD/7jhLd8hvjKhoA=; b=Hs3IPnIZv/UCXEG10Mpky3e1u3zrvArDeXCIRqVIXLvhKxzU/U6wBV0efNpueY11hv /2lINgcZrVLXwdEyMr6x891W5hUY/4LOwqiVnUePzM8asDEwIlHhGsrRLFarxg9BQ6VU gy5AmM/OUi5zLXbTgEl0UV9kAXU+fpkGxyXwKljgacvfv/m6S6MLv1V2X4Eaqb/d6GSD 6druLoDTRMxGTa8RCWKlmM0kQUsjFn2D5cTRnCYiVITkI7K1VIAuVbtjJmyL5f5yoyTw tK3nacD2ct46VBD4rReXBSZnHEnMJ32wzRr4ogpyILOvb/LR+HEL0LcMQvK+xl2IAzOm TsCg== X-Gm-Message-State: AOAM5307yPd3j1D+ClMnSkQYCf1QdfzkMQ1qaErjan5ETryw9H2q/XyE 2P+lFYPzGkGaMcMlilJlbIg= X-Google-Smtp-Source: ABdhPJyqVaB3WiBe6Kt/rHoBpwVXo+qfNE5apFM8ZRbLHw2soLnSS1xm7aEAeYy53WlJjsaefeOdgQ== X-Received: by 2002:a17:90a:d594:: with SMTP id v20mr6749324pju.227.1598453633587; Wed, 26 Aug 2020 07:53:53 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:53 -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 v2 15/23] parisc: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:41 +1000 Message-Id: <20200826145249.745432-16-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: E07F218229835 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: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Signed-off-by: Nicholas Piggin Acked-by: Helge Deller --- arch/parisc/include/asm/mmu_context.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/parisc/include/asm/mmu_context.h b/arch/parisc/include/asm/mmu_context.h index cb5f2f730421..46f8c22c5977 100644 --- a/arch/parisc/include/asm/mmu_context.h +++ b/arch/parisc/include/asm/mmu_context.h @@ -7,16 +7,13 @@ #include #include -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* on PA-RISC, we actually have enough contexts to justify an allocator * for them. prumpf */ extern unsigned long alloc_sid(void); extern void free_sid(unsigned long); +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -26,6 +23,7 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) return 0; } +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { @@ -71,8 +69,7 @@ static inline void switch_mm(struct mm_struct *prev, } #define switch_mm_irqs_off switch_mm_irqs_off -#define deactivate_mm(tsk,mm) do { } while (0) - +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { /* @@ -90,4 +87,7 @@ static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) switch_mm(prev,next,current); } + +#include + #endif From patchwork Wed Aug 26 14:52: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: 11738711 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 5E388722 for ; Wed, 26 Aug 2020 14:54:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 209DF2078D for ; Wed, 26 Aug 2020 14:54:02 +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="tV4+5Nx+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 209DF2078D 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 CB53A6B002E; Wed, 26 Aug 2020 10:54:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C3E1F8D0001; Wed, 26 Aug 2020 10:54:00 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE21A6B0030; Wed, 26 Aug 2020 10:54:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 9376C6B002E for ; Wed, 26 Aug 2020 10:54:00 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 611038248047 for ; Wed, 26 Aug 2020 14:54:00 +0000 (UTC) X-FDA: 77193014640.04.card18_0e094de27065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 17853800EEA5 for ; Wed, 26 Aug 2020 14:54:00 +0000 (UTC) X-Spam-Summary: 1,0,0,719612a2000d35de,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:4321:5007:6119:6261:6653:7514:7903:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13255:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30070,0,RBL:209.85.216.68:@gmail.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100;04y85sps7m6bw9j1oenii68c51wphycp4wmggw7f6zqxukenwdy93wiysy7qesn.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:25,LUA_SUMMARY:none X-HE-Tag: card18_0e094de27065 X-Filterd-Recvd-Size: 5202 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:53:59 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id 2so995240pjx.5 for ; Wed, 26 Aug 2020 07:53:58 -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=lZpeavpM6FR0EH3kfJJE/Au2m2iIw9NIl2DBgHhhejM=; b=tV4+5Nx+mWlMy1oPzbYssmbGFGn5MHDir+9Ml+ngC5YXRaOzyAwOFaifKm1R8UaWLX WQkXZvfbvY3oB5ULl79mFnabYoRV5BVHIVLrPO7hSistjiLvksufno1oOheZpuNe7odh cPO43oxRGgxo+TNxe1CNAUffQQJbpZlOvD1bN7nsgaLANe3l/5uKXIeq538FdXpyrHPR OgSaag90wBeVfRqyZUYj6CDGbu1+vItm3CEXZ02Jo8biOWyVnUPQhdZ1V6goCeTzxSSL TdSWKrdJAB4gR9cj8GvLOhpfeXcZelfyOXPY1BKqy3ngWA/gWgmLXh5kB6C1C5rA8jzc qavQ== 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=lZpeavpM6FR0EH3kfJJE/Au2m2iIw9NIl2DBgHhhejM=; b=jFuFT4Sdr0wLHYzCvzsDf4xv5flmMaV2gfh/ygasIqRjNuo4ZGsqhvoRBWCX4D0u+l CezWpFTxXph+GssPnG4B41y6PzR0gzTMxttphfAyUbhrsidyvc75LNhcFM21jzbCoU33 yGZM9kQXp82+HeR2kYuE3hkY/fTm8GDn6XKXJduR8WzKbVNmBG94w2FRd4FSBK5k6PRC 6UG6evCUzRA8LhzeG812x338nugdL+DaEyGQ2rxQ2o7nQzCjqirUjjEgCjmS9QvKYUn9 CJ/DJVV2u5j2kFAd9HMZWz+9piIV/DVgMtykRmP8BC7ZF5RQE9s7OiQOXTbRgeICK/li 3xXA== X-Gm-Message-State: AOAM530nzPllPSUdy2DoVyPrFOBZ1E6AYmSF7oyP9rXP86zfOTZWDuno FwLdefQ6uO7nX4nlU2tRauE= X-Google-Smtp-Source: ABdhPJx2B9QoNopM3vjtHv2uBEnKqWYo0WOtGbIQ2+KMIlZyPXpfHeAM0oiNKIprYdNp4bvVxSnUYw== X-Received: by 2002:a17:902:704b:: with SMTP id h11mr12417938plt.307.1598453637947; Wed, 26 Aug 2020 07:53:57 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:53:57 -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 v2 16/23] powerpc: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:42 +1000 Message-Id: <20200826145249.745432-17-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 17853800EEA5 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: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nicholas Piggin Acked-by: Michael Ellerman (powerpc) --- 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 7f3658a97384..bc22e247ab55 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h @@ -14,7 +14,9 @@ /* * Most if the context management is out of line */ +#define init_new_context init_new_context extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); +#define destroy_context destroy_context extern void destroy_context(struct mm_struct *mm); #ifdef CONFIG_SPAPR_TCE_IOMMU struct mm_iommu_table_group_mem_t; @@ -235,27 +237,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); @@ -298,5 +288,7 @@ static inline int arch_dup_mmap(struct mm_struct *oldmm, return 0; } +#include + #endif /* __KERNEL__ */ #endif /* __ASM_POWERPC_MMU_CONTEXT_H */ From patchwork Wed Aug 26 14:52: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: 11738713 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 20BDA109B for ; Wed, 26 Aug 2020 14:54:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E037C2078D for ; Wed, 26 Aug 2020 14:54:05 +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="u9wJQQt5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E037C2078D 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 AE0DE6B0030; Wed, 26 Aug 2020 10:54:04 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A69356B0031; Wed, 26 Aug 2020 10:54:04 -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 9598C6B0032; Wed, 26 Aug 2020 10:54:04 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 7C6226B0030 for ; Wed, 26 Aug 2020 10:54:04 -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 38A9B3626 for ; Wed, 26 Aug 2020 14:54:04 +0000 (UTC) X-FDA: 77193014808.24.eggs97_2112e8c27065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 066D31A4A0 for ; Wed, 26 Aug 2020 14:54:04 +0000 (UTC) X-Spam-Summary: 1,0,0,b7e9b20fdee18271,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.214.194:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y8ekouy78s71pue3d7nxb9xu8ukockg7f66x7rxwwqz31in3uoofrtwcwn1j7.q9ju75pr1k6y4ro1wuurd4mr3hi8hgdsdwucdawpjktsumo67eqcgg515aatjez.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:25,LUA_SUMMARY:none X-HE-Tag: eggs97_2112e8c27065 X-Filterd-Recvd-Size: 4658 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:54:03 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id h2so1007385plr.0 for ; Wed, 26 Aug 2020 07:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CT6s1M0q19YFhy+cBpQPX3nn1CscA8mpaTfBdcn8vdo=; b=u9wJQQt5hW3qa3ya9qPXmEQyMDTWMQZHbSO3RwJdp2sKyqS30CDXWxqirn98P9bvjq 5k9b4obnh5IAZeF3n7nfI5cHz7FVY+P1pluo2c6rNimHuQV8OYtaeX/V4Cced3rL7xFH NCmQH0Rh0EknPo8Tvnt6+BRX7xfXxLWINB6359wCNE+lf1Khs+fny6WA4kqbxPx7sPP2 4Wu6b2bDlHb8ThVwsTbMsR4G4gOOz15ZBN+OjgIx4lyrvVzbF9xPrFpaYgkafvJyfa3m 0kzpltobbXHAvhfSdg/A1z2zfQnA54cJJtn0xYgsVjEazuZMO04Q6WmKCtnX2fM2uoeQ xN4w== 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=CT6s1M0q19YFhy+cBpQPX3nn1CscA8mpaTfBdcn8vdo=; b=aVcrrARxLgn3kEsSyEpaHrP1WRo/NeTEjZCOqdGyYREgazS8wV0/mUyiaZNpGQGKlB WfPHvW0/p9WGpd4WjB/S9QgGpw909rHGf2uxTvqUoEmyQ+gKVc/Kw0YWrjDd1yysPizG iKOh1FYDGEKJpdGracPMHnQQORwkHajKC+UF4kS1pg7PlNn7iVn+BH6nEgCUW1qzaBvs YssowzFVhEYI/z36XtNiUQMeXeYI4ToF2A+ho/orwYuBnX7Mm4WJweEd/fEjIRZg+dts M3m9u/VI/vTIpeAiiWgepmC5YjXUPWJ9VWfFCS6X9TWQTTC1j7xyQYw27Vt1NYGp4Du6 aQ9g== X-Gm-Message-State: AOAM530hu+06vrvsLrG2RmjrCZNKZ97LqTrP06bK4ObCAnWdT+7/izW9 ehknO8WExP9reQXruHNROoo= X-Google-Smtp-Source: ABdhPJxvkuoGl75ZVpNr1RgzK005jvzedZlnd2QDmA+7r0p3ng9I2IdwjyZLrFMe98sls8FJaqrpYA== X-Received: by 2002:a17:902:c395:: with SMTP id g21mr12112718plg.264.1598453642763; Wed, 26 Aug 2020 07:54:02 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:54:02 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Palmer Dabbelt Subject: [PATCH v2 17/23] riscv: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:43 +1000 Message-Id: <20200826145249.745432-18-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 066D31A4A0 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: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Acked-by: Palmer Dabbelt Signed-off-by: Nicholas Piggin Reviewed-by: Pekka Enberg --- 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 Wed Aug 26 14:52: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: 11738717 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 312AB722 for ; Wed, 26 Aug 2020 14:54:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E939F2078D for ; Wed, 26 Aug 2020 14:54:09 +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="uSNxJCCl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E939F2078D 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 DA0196B000A; Wed, 26 Aug 2020 10:54:08 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D27F76B0031; Wed, 26 Aug 2020 10:54: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 BCA936B0033; Wed, 26 Aug 2020 10:54:08 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0207.hostedemail.com [216.40.44.207]) by kanga.kvack.org (Postfix) with ESMTP id A0ABD6B000A for ; Wed, 26 Aug 2020 10:54:08 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 559A43626 for ; Wed, 26 Aug 2020 14:54:08 +0000 (UTC) X-FDA: 77193014976.22.son95_220652227065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 1F1D518038E60 for ; Wed, 26 Aug 2020 14:54:08 +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.195:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y8p543e3ypo3y1prgtcjxgtr13foc4ygk7gyu6td91o7osuddcxmb8iheijpa.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:26,LUA_SUMMARY:none X-HE-Tag: son95_220652227065 X-Filterd-Recvd-Size: 4738 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:54:07 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id u20so1122033pfn.0 for ; Wed, 26 Aug 2020 07:54: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=zBLkp4ACPTazmjPNrlv/57ssiAbYaRhM1wboTYBBHDY=; b=uSNxJCClbqUuUEiL7mllj0REZCxj02jP+VSTCg3tcnylJDmNQH4a5oyn88Bt+3eHUt bP6O5AD3MwNhFSH8Q0PFYDNR2VCysyCxqesgLG4NhSisN4fNx6swSxxr5Rn4iHq8S0fR m8O5J5JhMom+ifRYFniXvRy6s3w5+Nct8qgQR1IHBC8WIjz1HmP73703CEUIx9Hr5CkA q4E8oFBATyEdLyBKzG0ktNJA7Hpu1B2BrpUU2qNkZI2cRBpf1nDFb8H3uBFyGUBmqzWM Okp80aCvl7+nj+4TXB2CG6EZhUETKljPPNG7PbsdJILAJIxpt4bc5ekzMY00SjK2awhR u17w== 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=LxsXS5vdp5pJUoOCf/rMt2u8iGknQZDVklKdpyqltxxbgmNcm/PQxJUPTRM4vXuefa Qe1tClfspD//GwffQVVJ02jbDiKmXgkEBztrFaKfJcXaa5YzssRGv2OUbaEnaRBynbgQ n+twHRxMq80oXKr2ojwn1W8tQ1QUFNeHQm69Z6h5v05F3v/ovg7HZT2tlknCOZsPkLEu HjfS+eEFS4AskD+YFsXY7G+uji84xIfHJUJ5dGUv/2bThVDbgM2KyaYooBQ/JhEfBByO 2MJLUAHV5cpscvqJOqsbHCf0ZKxzXXY/l9LLxDWzYhl6zxWwEPAcka2ty/hlQYPaD5jf d9eQ== X-Gm-Message-State: AOAM530c3rck8HdMsf9SRUgOPJbByo0i+yUtDBneDNYYFHgfz7OdcKUu hMXYoNAW3NUEKEjJhUvj21AXQ9GUVKc= X-Google-Smtp-Source: ABdhPJxDJLTwl2v7C8g+nyXKqYtHmkN28jUfxjmjM3NvMv1M+2qk9vPQk9UmGDyP90WNq4KKmAi2Dg== X-Received: by 2002:aa7:8182:: with SMTP id g2mr12519947pfi.261.1598453646914; Wed, 26 Aug 2020 07:54:06 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:54: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 , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org Subject: [PATCH v2 18/23] s390: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:44 +1000 Message-Id: <20200826145249.745432-19-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 1F1D518038E60 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.007647, 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 Wed Aug 26 14:52: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: 11738723 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 7967C109B for ; Wed, 26 Aug 2020 14:54:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3D63221741 for ; Wed, 26 Aug 2020 14:54:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ABCc0wxz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D63221741 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 53BCE6B000E; Wed, 26 Aug 2020 10:54:21 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4CB666B0031; Wed, 26 Aug 2020 10:54: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 3418E6B0033; Wed, 26 Aug 2020 10:54:21 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0020.hostedemail.com [216.40.44.20]) by kanga.kvack.org (Postfix) with ESMTP id 1AD7F6B000E for ; Wed, 26 Aug 2020 10:54:21 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D3FA9180AD811 for ; Wed, 26 Aug 2020 14:54:20 +0000 (UTC) X-FDA: 77193015480.17.gun58_1d1502e27065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id C387D180D078B for ; Wed, 26 Aug 2020 14:54:12 +0000 (UTC) X-Spam-Summary: 1,0,0,bec0140f45bd6b54,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.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yge3iq8mju4737qux5tm5nxjsrhopoxrex4kwhrtj1kiryop8huaycjahchin.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:25,LUA_SUMMARY:none X-HE-Tag: gun58_1d1502e27065 X-Filterd-Recvd-Size: 4871 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:54:11 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id t11so1006713plr.5 for ; Wed, 26 Aug 2020 07:54:11 -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=F+CDYnf/xWMGywxFUASijaNggUa5Y5mjXoyq0c/F/hQ=; b=ABCc0wxzXmQFbpavgTux2cZChkynQe0eihohjnlQa09LtXmp5CCC3kOM/xH/BNwhYC eNBsB7z1RZ734xLZ/R0Y4RRlTYsyinkZm6BDq3RLmBgiZgHqOs6gjpGJ4bbHvkcBQ2Bo v5zsVxE9zwpFB3wK9fAJsA94LdFboAA9yUYy+ur5lk1Xe/IAFY2JUdzSEK/1feUyU9JE 7WrjdhHvKqmllN/ic6WM+JKwtfNFBrYgPgTDCT6+sB2JHbP4/qTkQCQsddD9Mx6NJmT1 U6PN52eFRFQe2QL5uIKxDJAycpivr+nXLFshi4snzJqhap52t7bmvf+w0biB2bB015xc AF9g== 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=F+CDYnf/xWMGywxFUASijaNggUa5Y5mjXoyq0c/F/hQ=; b=S7hmfiBdTjQ5aKNXp7UE1nClBPz0e0w8rJdfES4ATceN8zpDqFKiY8gR3D/XdFdTfG Sk5YeR43DMtUDXdDewG6Em89tkFU0mFx29jg4RSPXAxTRhkkw3G42RZNrHWuHt9KGllz x7NTgi2XcnGUFZC/04fjt3mgNoMnn56edeFx65lnpEOBpqMVX0VC1dUfTBjI5JNNs6Yi ZPHsexGn6hmYwDp5lNO42SIilrYQ2hwlg/QGdZzXCZmMzoFHXwOE2VciuxIDdiaLwCYR 5EFTmBgjdOAhGUWhv9SB42D1btINqw86QmLOnKMZNiDIBJ8frgIMOwhWC4uLpvUgbghL 3uWg== X-Gm-Message-State: AOAM532z98QXCrEdRc/M2tLISgaD8d2RKD1RKGTfLK/3OG7139fYfQDy ISIS0tsBJsELQhiHGuQb6EobW+4az24= X-Google-Smtp-Source: ABdhPJxGES4oTiL4srNoZVKcYTuqSIOU/NOB2lV5KOk23i9GiHBmxVxj3/D912wRJ0jpOMkhamtulQ== X-Received: by 2002:a17:902:7044:: with SMTP id h4mr12344048plt.78.1598453650781; Wed, 26 Aug 2020 07:54:10 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.54.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:54:10 -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 v2 19/23] sh: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:45 +1000 Message-Id: <20200826145249.745432-20-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: C387D180D078B 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: 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 461b1304580b..78eef4e7d5df 100644 --- a/arch/sh/include/asm/mmu_context.h +++ b/arch/sh/include/asm/mmu_context.h @@ -84,6 +84,7 @@ static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu) * Initialize the context related info for a new mm_struct * instance. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -120,9 +121,7 @@ static inline void switch_mm(struct mm_struct *prev, activate_context(next, cpu); } -#define activate_mm(prev, next) switch_mm((prev),(next),NULL) -#define deactivate_mm(tsk,mm) do { } while (0) -#define enter_lazy_tlb(mm,tsk) do { } while (0) +#include #else diff --git a/arch/sh/include/asm/mmu_context_32.h b/arch/sh/include/asm/mmu_context_32.h index 71bf12ef1f65..bc5034fa6249 100644 --- a/arch/sh/include/asm/mmu_context_32.h +++ b/arch/sh/include/asm/mmu_context_32.h @@ -2,15 +2,6 @@ #ifndef __ASM_SH_MMU_CONTEXT_32_H #define __ASM_SH_MMU_CONTEXT_32_H -/* - * Destroy context related info for an mm_struct that is about - * to be put to rest. - */ -static inline void destroy_context(struct mm_struct *mm) -{ - /* Do nothing */ -} - #ifdef CONFIG_CPU_HAS_PTEAEX static inline void set_asid(unsigned long asid) { From patchwork Wed Aug 26 14:52: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: 11738719 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 9BE34722 for ; Wed, 26 Aug 2020 14:54:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5C3AA21741 for ; Wed, 26 Aug 2020 14:54:17 +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="XctVkfwP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C3AA21741 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 64C446B000C; Wed, 26 Aug 2020 10:54:16 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5D7586B000D; Wed, 26 Aug 2020 10:54:16 -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 4757C6B0031; Wed, 26 Aug 2020 10:54:16 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 28C896B000C for ; Wed, 26 Aug 2020 10:54:16 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E3C4D3659 for ; Wed, 26 Aug 2020 14:54:15 +0000 (UTC) X-FDA: 77193015270.25.moon68_011571827065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id B45EB1804E3A1 for ; Wed, 26 Aug 2020 14:54:15 +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-66.100.201.100 62.50.0.100;04yfz8yjrbhgjsfpthrq5xudr8r6qypa3dcnahnqfxqwpg4z3p9a7km1cp1r9te.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:25,LUA_SUMMARY:none X-HE-Tag: moon68_011571827065 X-Filterd-Recvd-Size: 6241 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:54:15 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id j11so1007345plk.9 for ; Wed, 26 Aug 2020 07:54:15 -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=XctVkfwPbzGaK7VRZL/4atAP0TrD6yIr3b8N2BYQysAvG8Evv8vLIeE6wz4aaKAC/+ dCAhy3KAzDaKCwAlQEs74i6Dued0wLVAeqaZbvf7zr1QqFZ9jE4mqivQXj9GbmE0qacI D6fc03sz5hTua9fLgGFAQ0nZq88zel22ju6hK3pBOpS454ABHuqePzYSjrOciQqHjIR+ Omv9QRuZDuIoOxu0Q7HhhjGUUsIMKy06oD3vJ9xXW8L9Zr6bDkttwxxROFdMXxmX5e+O dCThA7KfzOzcdeY+hZq1XOdjCHTPxdOcg41xGTaYfNu7hToOV7/G1pKX153nuQzpfbC1 DY8A== 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=NekwNe5rPG/cxu3kG0/yf3+cm9U9+Y+8K3KQwTe7PIgj7fGYp9t5Q9NgT4vG729hkh 4ZDRFZdom5zXBbHkqgoKVgGJhZuG4KguP8WZrJ5AXA8DylCzM0zk022QSUdX54NxKslO UcFNUcQ6cackkXvGi8aLBPaMGvRc6LMKjfxvwtVzj5ZTcOsjPwkmNcNlIqpld0fhV8ws wqMDU7M9FSa4r5Fe1CFMhnHxrUAclvtDIkyxPppyYqsvf5hCbA/+FjckmztVip/HRU6b LZjyEsqFEQbRBlhu7IPRW8WbzNUr05xJqNQsySy2b47IIeDVVkhmSB80cwU7swQtw45b A9AQ== X-Gm-Message-State: AOAM531raPQ3go3nUY01OpfTOTUE7C9f4Kg1zCAdpNeghCatogaM9b7P MfkP8aw/XXCOSVlOOldU9As= X-Google-Smtp-Source: ABdhPJyBgv/WEt2SrS3kDrcVAYUSyhmTQdBkkzA+ev3h62om/fVzWgc43FoGxDMbX9eroQbEAoI4fQ== X-Received: by 2002:a17:90a:6881:: with SMTP id a1mr6346313pjd.208.1598453654312; Wed, 26 Aug 2020 07:54:14 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.54.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:54:13 -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 v2 20/23] sparc: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:46 +1000 Message-Id: <20200826145249.745432-21-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: B45EB1804E3A1 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: "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 Wed Aug 26 14:52: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: 11738721 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 EC792109B for ; Wed, 26 Aug 2020 14:54:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B916E2078D for ; Wed, 26 Aug 2020 14:54:21 +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="h+8as9tl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B916E2078D 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 8BCF06B000D; Wed, 26 Aug 2020 10:54:20 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8479C6B000E; Wed, 26 Aug 2020 10:54:20 -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 734986B0031; Wed, 26 Aug 2020 10:54:20 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0075.hostedemail.com [216.40.44.75]) by kanga.kvack.org (Postfix) with ESMTP id 59B5B6B000D for ; Wed, 26 Aug 2020 10:54:20 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id F20BF180AD802 for ; Wed, 26 Aug 2020 14:54:19 +0000 (UTC) X-FDA: 77193015480.15.need36_2607cca27065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id BD3FD1814B0C7 for ; Wed, 26 Aug 2020 14:54:19 +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.193:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04y8skt6iku6hb46q7moeu63wpwncyccuezsmjci4cuhcgpuumjxef59mh1adaa.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:25,LUA_SUMMARY:none X-HE-Tag: need36_2607cca27065 X-Filterd-Recvd-Size: 4517 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:54:19 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id k13so1006813plk.13 for ; Wed, 26 Aug 2020 07:54:19 -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=h+8as9tlv5ux5IQCqr3hscD6N/pmC+Wc6VPju2QFl5v6kzwYhPJO8RsIQeyHOC1fVz QUYdiNwWE4QXeckcOsqZG69lZPhwPQDudhfDHA1FP9NTmIO0H+IX1WhmIdK+AGVzIIGg Or4/4wk1ovFXTUAZ3toDQIJaDHtFE3g3ML9dw/autaPYxIqbhomd8G7KuJ71s2d+72E5 o/du8hS0FBQ8RrHQ2AdwV7bpyG2xmiGu+yWLrmMiirIZMzRI80FeKjrxehK9LBFqMaUT cTUB3tFOIqrTt9ve2dUNm8QuGY3LfiVxWte5OaYHMIjBIpU53SOb+1NaYg/N3Q1DMB55 T0gw== 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=rhxcSvouqWQTFcwE0b0C4vdMb5DCSCyoPxrKsA5LcOqO9hTrvrMv+oy3v0BjMvP1wV ZIKScbMis6Iegd/BnyhAnGmC7AoYCIBuzGYoU5SUP4/iSXetknjOEEZ5qs61sOFXEgSc ZJJWvKNP9pHY9JFcUfauJRjwE5nhPYLJ3iy0fcA4QqeTDjKJWvX7Z2er3t9PgAKpRUJv TnF2gQ/DOwoHg5oX1JZAxqGUhTHWQsK6JrGwwH7LL6mgGUkPDg1t7ruGz7RTmAKTHY8T VgpoOcDFdjvs20FmlPBMXXHj06wgArSloybsklRSaD6aTkx1Ki1eMkO9bevMpMkNhlwm wbSg== X-Gm-Message-State: AOAM533yxTMuVUoEpDwNC5qZ/6f/drhzGUDRFO24FNg8hv8MWJlfOcyu ZLiRk1GCofwlHscFSVH/gfE= X-Google-Smtp-Source: ABdhPJxeCSFNxaEs0Oh6/0xBgDvajE9o11K0FGBreVXQ5pkS9c155AGVPSg8XPWxEkMerUrM1eKtEA== X-Received: by 2002:a17:90a:4586:: with SMTP id v6mr5935973pjg.152.1598453658525; Wed, 26 Aug 2020 07:54:18 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:54:18 -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 v2 21/23] um: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:47 +1000 Message-Id: <20200826145249.745432-22-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: BD3FD1814B0C7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Signed-off-by: Nicholas Piggin --- 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 Wed Aug 26 14:52:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738725 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 876A5109B for ; Wed, 26 Aug 2020 14:54:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4ADDB2078D for ; Wed, 26 Aug 2020 14:54:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gAZmM9ij" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4ADDB2078D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 36B1D6B0033; Wed, 26 Aug 2020 10:54:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2F1D06B0036; Wed, 26 Aug 2020 10:54:25 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 191F26B0037; Wed, 26 Aug 2020 10:54:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id EF0AB6B0033 for ; Wed, 26 Aug 2020 10:54:24 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B5EE7249F for ; Wed, 26 Aug 2020 14:54:24 +0000 (UTC) X-FDA: 77193015648.18.brick72_120a23627065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 6943A100ED0D0 for ; Wed, 26 Aug 2020 14:54:24 +0000 (UTC) X-Spam-Summary: 1,0,0,2475b42e4b2c322c,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1515:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3167:3352:3868:3874:5007:6261:6653:7514:7903:9413:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13846:13894:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30055,0,RBL:209.85.216.68:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04yg78tkxak7dhh64t9rt5tru45wsyct73hwsga8ou8cgzyeje675145i9wwfym.wfyzkkurfbatpe6qdrt8jfagwkhs6srndbjr4s381zbu4xy1fyszjqzsngu8tb7.4-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: brick72_120a23627065 X-Filterd-Recvd-Size: 4759 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:54:23 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id mw10so978327pjb.2 for ; Wed, 26 Aug 2020 07:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LFi90LdQN/Zk1sYT6T5v1lAFBWcv/lCT8hsQFua3q/w=; b=gAZmM9ijM6uRIbJgMuK6cdpxSCGL3X0aN2OJWq4mKPGIHQoe4uUXiMmjTeFHWBxeev gZnQaTfWdEDCpUVkS6o8neOVCDd16NmRnSGLN0nwvc9ysWGgKOFIDrdeqvM9kYXcoweJ +OYgRha6cGCWmqXx4soJtzKRuCBJQy6Prrr8yrhGaggR1EHGnKKLJ4JVDLgiOM/E6M5+ x+X24U/Zr4fK2SyfswMohxENGL6EsmlmuPVtJkbahGTAYGvljX/dYmB6kE4Ptg4xENcX lo8YYPolqekviooUc9V2DHClegUUoRX91emu17f5N5iuL4gsz4NkN5RFpyHzIgBZgTGl pz3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LFi90LdQN/Zk1sYT6T5v1lAFBWcv/lCT8hsQFua3q/w=; b=WaBcV1v22/x1vXzFiioD2Ii1QgemX2iQTC0r353Sl95feFcKJO1qGVTT+1HOd+LqFp pfGcpdOHOh5FApk/Dk/fbxuE2JE6FVRwAB6zek4Eo4arVjxV1gAUvk6asaCFjyd3IH3k JgqUbo2FtlzPicGylYt/pUkfFreRwq0odPRHfgaUHqZ+7ZiIYl7Fo8xZjamlc9wfCFgG PVoFjXTFDDdhFv8BZk7w1IfdtA1m16AA2pRlVeOMC7Q4gg1Xha0UAyF/hVX2eNs8x/80 RwSh38bQMhthYebJvRQ8zxt5O87dkDGHGWBBc9PhZ4zuGIku4FzDA8XFbA8T8VbVZ15a YWvg== X-Gm-Message-State: AOAM530bmjBDwuCo38nzMPuMquednphfFA6YZX1Qlntuq6yv9LnQxlo9 TKUh2nkWD8qPopaLbknKLtxlAGvZkFU= X-Google-Smtp-Source: ABdhPJz+w25ojokfqUyML0jgxpkh96G1H3gOrbijHk0y9SorqFJkCxJL7p4DPgIoUQtQ/C9hxH0hig== X-Received: by 2002:a17:902:bcc6:: with SMTP id o6mr12318919pls.109.1598453663185; Wed, 26 Aug 2020 07:54:23 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:54:22 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra Subject: [PATCH v2 22/23] x86: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:48 +1000 Message-Id: <20200826145249.745432-23-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 6943A100ED0D0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Acked-by: Peter Zijlstra (Intel) Signed-off-by: Nicholas Piggin --- arch/x86/include/asm/mmu_context.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index d98016b83755..36afcbea6a9f 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h @@ -91,12 +91,14 @@ static inline void switch_ldt(struct mm_struct *prev, struct mm_struct *next) } #endif +#define enter_lazy_tlb enter_lazy_tlb extern void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk); /* * Init a new mm. Used on mm copies, like at fork() * and on mm's that are brand-new, like at execve(). */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -116,6 +118,8 @@ static inline int init_new_context(struct task_struct *tsk, init_new_context_ldt(mm); return 0; } + +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { destroy_context_ldt(mm); @@ -214,4 +218,6 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma, unsigned long __get_current_cr3_fast(void); +#include + #endif /* _ASM_X86_MMU_CONTEXT_H */ From patchwork Wed Aug 26 14:52: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: 11738727 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 620E7722 for ; Wed, 26 Aug 2020 14:54:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 25B7E22B40 for ; Wed, 26 Aug 2020 14:54: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="npDO1sJ/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25B7E22B40 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 D7A876B0036; Wed, 26 Aug 2020 10:54:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D299E6B0037; Wed, 26 Aug 2020 10:54: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 BA4FE8D0001; Wed, 26 Aug 2020 10:54:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id A18356B0036 for ; Wed, 26 Aug 2020 10:54:28 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6C863181AC1F5 for ; Wed, 26 Aug 2020 14:54:28 +0000 (UTC) X-FDA: 77193015816.03.balls14_500a24427065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 2EE1328A4E9 for ; Wed, 26 Aug 2020 14:54:28 +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:13255:13846:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30075,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y8t7a4aq888aycqcgwu5zrn3zs8ycm58sofehaucw3ugkmm39xjsqm1o5oing.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:24,LUA_SUMMARY:none X-HE-Tag: balls14_500a24427065 X-Filterd-Recvd-Size: 5614 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:54:27 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id k13so1007024plk.13 for ; Wed, 26 Aug 2020 07:54: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=g4c//fvG4fjXYLBPyQJ141PEsJK2A9XDWhulJsN1c2g=; b=npDO1sJ/9Lj/B2a9PZJG70emc1czb76ScCXnQ2oCD1xY+i1qLbbqM6g9M7zppI5izy +H+esxZ+abKKnJ5VdUfsAi6AFEbYwDt7k3pcmYxC4WK8g76ILaH3yedmYAh5ddC/tzBI wJOfm8z4D9+QM/OwCTdUl16NQhm40qGVfU73NJ1ZzU96KMhh5X0HVZYcD7kp5ktLLWGe HJnEUyoyS4FjoLwWmSjBl+63WW4Ck6wfJ+zkn/SkZVzUXtq9Djbcm6p/76OxocPdqgt+ 5XjZgVR8vtdU6hRrFcu6mF9I5Y4mMocjBbQoV9CYyb92jNN3BfJSYyOBqQvhF1iydVy2 hRXA== 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=AQgUVNK5/4crIMURyN/01eDPkHCV2UNI86y7/z3SwVA+Ipk/DNZQMUm2uQEdG7vZCP JXnFlEkONKZv3AwRkNru6m4hA1krKjcEiEX9M4i0NLS1iIRvwvWqoWkaEAwNnU3cBmwe KgQ5v9V8lMP8IAOKpAdm6SkQ00oXJAW4ceSHstj/KEtmU5P9vivUUSitgYAzb3+aDWCD oBS/3GCFYgyQ7gHYc8avDIjLVOZX1wlebgq02+gssPvX9JsMTFv9JigjB8L0KoDEjqL8 jPYk0H0dvCu1Z00+rpaGHxXzpAbwyZEiH17Mwq6zyyiEoRc/CNxkC+FSVHezjdjWA7a1 n0IA== X-Gm-Message-State: AOAM533xrHuTeKhq6d6x9S82vrkAbKGNGJ7m83v3MxwK95PF1+zF2ecT hxaQKehyAED1zHaoGO9chDCtavjHAcw= X-Google-Smtp-Source: ABdhPJxvlK/X1ouPjuda7L40DWOtJsOi9bxydEWaZH+cGgSmUaZIqEtdMn3J1zKle1a/UidEnCdOFg== X-Received: by 2002:a17:902:7b82:: with SMTP id w2mr12358648pll.258.1598453666968; Wed, 26 Aug 2020 07:54:26 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:54: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 , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org Subject: [PATCH v2 23/23] xtensa: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:49 +1000 Message-Id: <20200826145249.745432-24-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 2EE1328A4E9 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: 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