From patchwork Tue Jul 28 03:33:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688035 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53488913 for ; Tue, 28 Jul 2020 03:35:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1EA7E20775 for ; Tue, 28 Jul 2020 03:35:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kt3a7DcC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EA7E20775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EEFB96B0026; Mon, 27 Jul 2020 23:35:08 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E79F16B0027; Mon, 27 Jul 2020 23:35:08 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D41926B0028; Mon, 27 Jul 2020 23:35:08 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id B84636B0026 for ; Mon, 27 Jul 2020 23:35:08 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 886A33623 for ; Tue, 28 Jul 2020 03:35:08 +0000 (UTC) X-FDA: 77086068696.24.tent11_5f00c9326f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 60C0E1A4A7 for ; Tue, 28 Jul 2020 03:35:08 +0000 (UTC) X-Spam-Summary: 1,0,0,e1ba393c632844fc,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1542:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:2693:3138:3139:3140:3141:3142:3353:3865:3867:3870:3871:3874:4321:4605:5007:6261:6653:7514:7903:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30064:30075,0,RBL:209.85.216.67:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yrjntm1s6qz5948c151kfzyhbo5opbxhpap8tzfqdgudnmfje94w5rk4suxfi.7q1u6meobbcibwixpn6ugyukqtxrcra71q7axd1m6ndcyaftfyp63igyu13gw3x.r-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: tent11_5f00c9326f66 X-Filterd-Recvd-Size: 5422 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:07 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id i92so2386167pje.0 for ; Mon, 27 Jul 2020 20:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LJ/aO+zurNWmpqKHI4M9C4MJyyXJq3JocP1DjUq4gbg=; b=kt3a7DcCE2OYOZGqgxog9VS3yxsHpUCtaORYop80F/jti3DEhy2oQQTgTbv82uTF7N xbMy5O15+dE0gYE5VRK61ptgd0R7KhE9ZKgBWnb5c6pmv4ahqQPVLKJzDpGGakypQdLX 89jCphB7fzgC28R1M7cfG5m2IvMZJwbXT49a0TiDARpVwt0ym4Ad0Rm2ntSFKmPQ8Eel GnOijbc0LAx8HVuZoORV9Kq8hQ96CkumFJdcnuxAicDHMtPjppLB8sordXVwoSz3YKND hkqC1QPNsA0tM1j+79ttQsnMzw2g5+SJPTnPI3LVZJAvnTAwR01pNZ+GbQ4TJUHr+OIy d9Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LJ/aO+zurNWmpqKHI4M9C4MJyyXJq3JocP1DjUq4gbg=; b=lg1o8M1qfxUMWHt76BzT8X/gdvZRjZut0pBfCH4knGZ9s7LfLWRuPpsaq+NPboim4/ T1BkPzxlV24f7plI68RavTJJxb7W5r/JeEElsDeBWnsDuexd4equxElrjWT3NootrQhh d8c3WyxoCOtFfERtfaTeuVmU8+My4GL1Zz+d7k3a1wLMSaLxNWN1y4bPTfFbpW9Q2ga4 q0CSur52dCodlmtZCHhvwh3BeP0kHEcvmIY4Kf0UPKT5vdVn59TthRNbTacrKj2zD9ot rdEZzPHOOxR6r/ZReTpiGjl+wVsApKCVrqbnT7rzIRQuuL+rDWTTiNGyKfxpqS5uajUr F39Q== X-Gm-Message-State: AOAM5315JmxeM2rk1c2i16e56ew3UWVV+zPekXVpXBr2KsthJY/0l72c j2iK5/So0uupFODoNEG86Tk= X-Google-Smtp-Source: ABdhPJy6usEQ2VKD5ybwcbdeNYJvLxnt1A9ODzbNYWx50o5LQWfVKGaEFhJrpjeIx+Pr443bgEgg4g== X-Received: by 2002:a17:90a:d249:: with SMTP id o9mr2214096pjw.233.1595907307262; Mon, 27 Jul 2020 20:35:07 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:06 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Ley Foon Tan Subject: [PATCH 13/24] nios2: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:54 +1000 Message-Id: <20200728033405.78469-14-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 60C0E1A4A7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Cc: Ley Foon Tan Signed-off-by: Nicholas Piggin --- arch/nios2/include/asm/mmu_context.h | 21 ++++----------------- arch/nios2/mm/mmu_context.c | 1 + 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/arch/nios2/include/asm/mmu_context.h b/arch/nios2/include/asm/mmu_context.h index 78ab3dacf579..4f99ed09b5a7 100644 --- a/arch/nios2/include/asm/mmu_context.h +++ b/arch/nios2/include/asm/mmu_context.h @@ -26,16 +26,13 @@ extern unsigned long get_pid_from_context(mm_context_t *ctx); */ extern pgd_t *pgd_current; -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* * Initialize the context related info for a new mm_struct instance. * * Set all new contexts to 0, that way the generation will never match * the currently running generation when this context is switched in. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -43,26 +40,16 @@ static inline int init_new_context(struct task_struct *tsk, return 0; } -/* - * Destroy context related info for an mm_struct that is about - * to be put to rest. - */ -static inline void destroy_context(struct mm_struct *mm) -{ -} - void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk); -static inline void deactivate_mm(struct task_struct *tsk, - struct mm_struct *mm) -{ -} - /* * After we have set current->mm to a new value, this activates * the context for the new mm so we see the new mappings. */ +#define activate_mm activate_mm void activate_mm(struct mm_struct *prev, struct mm_struct *next); +#include + #endif /* _ASM_NIOS2_MMU_CONTEXT_H */ diff --git a/arch/nios2/mm/mmu_context.c b/arch/nios2/mm/mmu_context.c index 45d6b9c58d67..d77aa542deb2 100644 --- a/arch/nios2/mm/mmu_context.c +++ b/arch/nios2/mm/mmu_context.c @@ -103,6 +103,7 @@ void switch_mm(struct mm_struct *prev, struct mm_struct *next, * After we have set current->mm to a new value, this activates * the context for the new mm so we see the new mappings. */ +#define activate_mm activate_mm void activate_mm(struct mm_struct *prev, struct mm_struct *next) { next->context = get_new_context();