From patchwork Tue Jul 28 03:34:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11688053 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C1196C1 for ; Tue, 28 Jul 2020 03:35:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 576C42075A for ; Tue, 28 Jul 2020 03:35:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jt7EXzeP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 576C42075A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4DED76B005A; Mon, 27 Jul 2020 23:35:38 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 468C56B005D; Mon, 27 Jul 2020 23:35:38 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 309DF8D0002; Mon, 27 Jul 2020 23:35:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0233.hostedemail.com [216.40.44.233]) by kanga.kvack.org (Postfix) with ESMTP id 162036B005A for ; Mon, 27 Jul 2020 23:35:38 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D37EF1EE6 for ; Tue, 28 Jul 2020 03:35:37 +0000 (UTC) X-FDA: 77086069914.13.top92_500473826f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id A78DC18140B70 for ; Tue, 28 Jul 2020 03:35:37 +0000 (UTC) X-Spam-Summary: 1,0,0,89d16a64d9cb7900,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1543:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3354:3865:3867:3871:4117:4250:4321:4605:5007:6119:6261:6653:7514:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:12986:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21740:30003:30045:30054,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yfs7e81mn5dfo46c65dp4niwbicypa3dcnahnqfxqwpg4z3p9a7km1cp1r9te.d6tjgzxsg1zkii7itrucqx7cdz9r1smu4muko4r9gsgpk9ku7uo58kanz8pgghm.6-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:26,LUA_SUMMARY:none X-HE-Tag: top92_500473826f66 X-Filterd-Recvd-Size: 6233 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:37 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id b9so9187599plx.6 for ; Mon, 27 Jul 2020 20:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ejVWa9IRIyyHORgldOpUlCO0QqVKUsW+6Dc4qu3Phn0=; b=Jt7EXzePYmlX76Oyhuuvk2E2TsOmB6At6s21TV4q+GvtXPNZT1DEHyypIHTynq9As+ BkCRwn3e9r+e25+V4IgqR2Uofh8gO/spVncQhb1HNmHUUN0HmusWt17LCGpw+B5T72KT q4fN8fdFdQDbGw5hhw7WzFzq/rw4eJ50OpVHwFckZU0pQtBT64prbgjVZpnlp+CT8IG3 S5W9tZ9lFzoc7O/pTxoYOnNdME9dlMzufWavyl6jHEBXisfnkTvTFcbYo/J5/nAWqdMq MGKG8JdZbx1MKdBr8/piTey0D0P/s2WUUKA7S68NDBG7LgEKCWHqAQC1ilETstx17N9k 5dJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ejVWa9IRIyyHORgldOpUlCO0QqVKUsW+6Dc4qu3Phn0=; b=sVxCBE7y5vHMO0AbAJZ4q/tuIa6pWEOGamkzSox0h5hG14FbIOp57uV1RducuY54tf z2yiGJM3Hl5rDwdhUZLrgeox+1Qvm20hn0++3J1zhuviQFc1p5ItukdMqmiiR7xDjgr/ ulVarVhlhhH1T3ktBM8N4Eb9Vg3gTDxrLzYGfmUh+cV96M91EGHAggZzSoWmIxzSsK0q ZAM7mEck9382cFX7WdfFqgCL6V+8I4Edd3WOLH8gNFoMdk3kKOq7mWLt1PAg4hqTcYIF LTCDK9Q1AgGYZAyFzdk/CX/tfhBDji12jlCsM09EHka+vM23b9ijnbkXLetB/F+q1d4S 0azg== X-Gm-Message-State: AOAM532r5YUwbDhHNDjZYHR7e8ewGymUlLKRRg7GQxLIEbflygic4LjL eNI2gbt67SeYTHLPKXupK7M= X-Google-Smtp-Source: ABdhPJw4hwasq8wvkQnu1HWMVzyIJWE/5FO/nlXv0/l00rns0GpQTf9lkr4MhczGycWKUCPmxjmRrA== X-Received: by 2002:a17:90a:eb01:: with SMTP id j1mr2323875pjz.29.1595907336390; Mon, 27 Jul 2020 20:35:36 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:35 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH 20/24] sparc: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:34:01 +1000 Message-Id: <20200728033405.78469-21-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: A78DC18140B70 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Nicholas Piggin --- arch/sparc/include/asm/mmu_context_32.h | 10 ++++------ arch/sparc/include/asm/mmu_context_64.h | 10 +++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/sparc/include/asm/mmu_context_32.h b/arch/sparc/include/asm/mmu_context_32.h index 7ddcb8badf70..509043f81560 100644 --- a/arch/sparc/include/asm/mmu_context_32.h +++ b/arch/sparc/include/asm/mmu_context_32.h @@ -6,13 +6,10 @@ #include -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* Initialize a new mmu context. This is invoked when a new * address space instance (unique or shared) is instantiated. */ +#define init_new_context init_new_context int init_new_context(struct task_struct *tsk, struct mm_struct *mm); /* Destroy a dead context. This occurs when mmput drops the @@ -20,17 +17,18 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm); * all the page tables have been flushed. Our job is to destroy * any remaining processor-specific state. */ +#define destroy_context destroy_context void destroy_context(struct mm_struct *mm); /* Switch the current MM context. */ void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk); -#define deactivate_mm(tsk,mm) do { } while (0) - /* Activate a new MM instance for the current task. */ #define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL) +#include + #endif /* !(__ASSEMBLY__) */ #endif /* !(__SPARC_MMU_CONTEXT_H) */ diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h index 312fcee8df2b..7a8380c63aab 100644 --- a/arch/sparc/include/asm/mmu_context_64.h +++ b/arch/sparc/include/asm/mmu_context_64.h @@ -16,17 +16,16 @@ #include #include -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - extern spinlock_t ctx_alloc_lock; extern unsigned long tlb_context_cache; extern unsigned long mmu_context_bmap[]; DECLARE_PER_CPU(struct mm_struct *, per_cpu_secondary_mm); void get_new_mmu_context(struct mm_struct *mm); + +#define init_new_context init_new_context int init_new_context(struct task_struct *tsk, struct mm_struct *mm); +#define destroy_context destroy_context void destroy_context(struct mm_struct *mm); void __tsb_context_switch(unsigned long pgd_pa, @@ -136,7 +135,6 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str spin_unlock_irqrestore(&mm->context.lock, flags); } -#define deactivate_mm(tsk,mm) do { } while (0) #define activate_mm(active_mm, mm) switch_mm(active_mm, mm, NULL) #define __HAVE_ARCH_START_CONTEXT_SWITCH @@ -187,6 +185,8 @@ static inline void finish_arch_post_lock_switch(void) } } +#include + #endif /* !(__ASSEMBLY__) */ #endif /* !(__SPARC64_MMU_CONTEXT_H) */