From patchwork Tue Jul 28 03:33:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1337476 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=ccy5Dnur; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=nOYCqA5k; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BG2Nd2LW8z9sTv for ; Tue, 28 Jul 2020 13:34:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lJDc7zZlPYuKX2PY3kez63mkGA+eBBw+8UGMbSNyG1w=; b=ccy5DnurmOsdmcntVS/KSGUJn 8bn7qN4UKOzG2acZZhUtV7DubYa4X80MX+E3ZfdxckP/5mHKQtxP0Py2yWyNV1+NdolmY/5SqUnBC ZAloyMLDe2Md9m1rxcgdCmaT1Y5yyXcbxnZnzei9ZBoG94uoi3jUOZCB6r51Ha/VDfAOuqdqKJwD4 MZdVZkqL99iaNtgwOHvwPaZ5BOza6vEhkmD7mbWutiVrewtGbgpulp9+EynsoZ0URCeEe7boITF1H T8J+vDK/O6Kx4nbnZWZYXaNiVdx8n3koEmCGbFp57k4gPPCoYIlw3YWbYQp/bkW82s3+AMFPT+RF3 nha1ul6Mw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0GNx-0003ao-KW; Tue, 28 Jul 2020 03:34:37 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0GNu-0003Z9-F1 for linux-snps-arc@lists.infradead.org; Tue, 28 Jul 2020 03:34:35 +0000 Received: by mail-pf1-x444.google.com with SMTP id u185so10190082pfu.1 for ; Mon, 27 Jul 2020 20:34: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=hmVZOCfUq47mihn2FQ6TLRI6bQd0ipE9wiB6y1RWkXs=; b=nOYCqA5kKlucmXolFRvkYUAhgIDIrlfwX7JkbLcqxa9mVyIBAgOps2dlFBEaS06Ehm Opq1E8SxSa5DZcmM5gdCSJnKF1LAk8Jz3ZLnXxEu9BFgiFvabAxaIyECgBWf2/DQ5JT/ LpohiYViviwQe/wLTxwbILwXU2Jf9kxSoBSZe2i3OUTu4DF0sNEiVjIfM8BmDPcd/PH3 kZDZzc5VLqKq5YdTkJHXHJ60hIaPRW3wsbtjKhUIwMRUt4XxctfwIiARiMIHCc/kIlkU pkWWfrbTNjTqRIt4FJqv68SUeti0vau36dq4yohE7No18xzIzCLPW1klMqb3fyCHduOA kzDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hmVZOCfUq47mihn2FQ6TLRI6bQd0ipE9wiB6y1RWkXs=; b=q2RO2MWAqu9+5BajdDSt5X7Dk1PiaBqjgigJ1W4DfRhhBYVC54o3/MtjtEkUEs3GRU 4ArLktmuIdllCB6eq2lT20xD17E7xmfBCyMMFDxOL/o+8jcrngVtwXVN+j9e7gooSbCq FfXraACQgHKbHoviyAf5MSRRhlcd8VmWaU//Zy12GqmY5ZCebu58IJ61iWDY6UQPukPz /zKJXVTBMKQZ0qkKrw0LUim3ikF67gvggtYqDAYFdgM+K1NrLjAu27fuohxxgulgndSR EYOmVqIGri+CB4mMoxUTOO//vqzgB5rdBZGJolIiNwaHC7qAmFjBkjfEJl0wih7bVo9o 0mtg== X-Gm-Message-State: AOAM533KPnLlfUakTPHx+AdYiRHEgnbLVL3SkTwQlsnWa2E+JzsMq041 lfITRdeCP5LtKDrXDo1Fseo= X-Google-Smtp-Source: ABdhPJxrlYk3wuSoz6yW5gTVzZjaFK+AH99QTvOTfXhxxhM+IRG7XYNJ7uug5lni8egvpEIIbDr08w== X-Received: by 2002:a65:4bc8:: with SMTP id p8mr16084763pgr.418.1595907270841; Mon, 27 Jul 2020 20:34:30 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34:30 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Subject: [PATCH 03/24] arc: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:44 +1000 Message-Id: <20200728033405.78469-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200727_233434_546252_04C1647A X-CRM114-Status: GOOD ( 13.84 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [npiggin[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Vineet Gupta , linux-kernel@vger.kernel.org, Nicholas Piggin , linux-mm@kvack.org, linux-snps-arc@lists.infradead.org Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Nicholas Piggin --- arch/arc/include/asm/mmu_context.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arc/include/asm/mmu_context.h b/arch/arc/include/asm/mmu_context.h index 3a5e6a5b9ed6..586d31902a99 100644 --- a/arch/arc/include/asm/mmu_context.h +++ b/arch/arc/include/asm/mmu_context.h @@ -102,6 +102,7 @@ static inline void get_new_mmu_context(struct mm_struct *mm) * Initialize the context related info for a new mm_struct * instance. */ +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -113,6 +114,7 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) return 0; } +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { unsigned long flags; @@ -153,13 +155,12 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, } /* - * Called at the time of execve() to get a new ASID - * Note the subtlety here: get_new_mmu_context() behaves differently here - * vs. in switch_mm(). Here it always returns a new ASID, because mm has - * an unallocated "initial" value, while in latter, it moves to a new ASID, - * only if it was unallocated + * activate_mm defaults to switch_mm and is called at the time of execve() to + * get a new ASID Note the subtlety here: get_new_mmu_context() behaves + * differently here vs. in switch_mm(). Here it always returns a new ASID, + * because mm has an unallocated "initial" value, while in latter, it moves to + * a new ASID, only if it was unallocated */ -#define activate_mm(prev, next) switch_mm(prev, next, NULL) /* it seemed that deactivate_mm( ) is a reasonable place to do book-keeping * for retiring-mm. However destroy_context( ) still needs to do that because @@ -168,8 +169,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, * there is a good chance that task gets sched-out/in, making it's ASID valid * again (this teased me for a whole day). */ -#define deactivate_mm(tsk, mm) do { } while (0) -#define enter_lazy_tlb(mm, tsk) +#include #endif /* __ASM_ARC_MMU_CONTEXT_H */