From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 291A1C433EB for ; Tue, 28 Jul 2020 03:34:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DDE65206D4 for ; Tue, 28 Jul 2020 03:34: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="nOYCqA5k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DDE65206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8FBEA6B0007; Mon, 27 Jul 2020 23:34:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 885D66B0008; Mon, 27 Jul 2020 23:34:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74DF06B000A; Mon, 27 Jul 2020 23:34:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0092.hostedemail.com [216.40.44.92]) by kanga.kvack.org (Postfix) with ESMTP id 5F2536B0007 for ; Mon, 27 Jul 2020 23:34:32 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 27366180AD815 for ; Tue, 28 Jul 2020 03:34:32 +0000 (UTC) X-FDA: 77086067184.08.angle26_311282926f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id F2E4E1819E764 for ; Tue, 28 Jul 2020 03:34:31 +0000 (UTC) X-HE-Tag: angle26_311282926f66 X-Filterd-Recvd-Size: 5457 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:34:31 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id d4so11120218pgk.4 for ; Mon, 27 Jul 2020 20:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hmVZOCfUq47mihn2FQ6TLRI6bQd0ipE9wiB6y1RWkXs=; b=nOYCqA5kKlucmXolFRvkYUAhgIDIrlfwX7JkbLcqxa9mVyIBAgOps2dlFBEaS06Ehm Opq1E8SxSa5DZcmM5gdCSJnKF1LAk8Jz3ZLnXxEu9BFgiFvabAxaIyECgBWf2/DQ5JT/ LpohiYViviwQe/wLTxwbILwXU2Jf9kxSoBSZe2i3OUTu4DF0sNEiVjIfM8BmDPcd/PH3 kZDZzc5VLqKq5YdTkJHXHJ60hIaPRW3wsbtjKhUIwMRUt4XxctfwIiARiMIHCc/kIlkU pkWWfrbTNjTqRIt4FJqv68SUeti0vau36dq4yohE7No18xzIzCLPW1klMqb3fyCHduOA kzDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hmVZOCfUq47mihn2FQ6TLRI6bQd0ipE9wiB6y1RWkXs=; b=bEsajYFUMUsoLKjBYp/2H83HIaz8gIZVOqPoN/oFM7HW7hCSKnqEf8s8yVe4LTRAfJ X9aabbBftiFAYk9p/23bENAx6MXU51rywIQ5A9gKCwyIZbI1uoRKnnEKXJT3+jxtGuFp 2Gam16qpi5/dbM1Fn9OUQnbcerPZCgqyR8KJII+qPWoU5zh3sFOhqcQ03wrer6gDhV7n nPaiJMWwMqF/PWxs3eml4Iqp35QveQIDgOfKYCcK9ofMngaI23iZ7zw3qZ0rWojg0LlZ khM50WsjrIWSupprH+wCBCXG7sWLw8hftN71+/FVQBlmUiLxNBNIYSmLWHvlVYW782jR 06aA== X-Gm-Message-State: AOAM531pIFrcX2Bka+ic3cAx3gmEt/QpBvAUHh6aMlWqfaY/uFSl+Mke 3zp35himwnSIz2/AMJSjI/DqYavf X-Google-Smtp-Source: ABdhPJxrlYk3wuSoz6yW5gTVzZjaFK+AH99QTvOTfXhxxhM+IRG7XYNJ7uug5lni8egvpEIIbDr08w== X-Received: by 2002:a65:4bc8:: with SMTP id p8mr16084763pgr.418.1595907270841; Mon, 27 Jul 2020 20:34:30 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id r4sm998707pji.37.2020.07.27.20.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:34:30 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Vineet Gupta , linux-snps-arc@lists.infradead.org Subject: [PATCH 03/24] arc: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:44 +1000 Message-Id: <20200728033405.78469-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: F2E4E1819E764 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Nicholas Piggin --- arch/arc/include/asm/mmu_context.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arc/include/asm/mmu_context.h b/arch/arc/include/asm/mm= u_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_stru= ct *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_s= truct *mm) return 0; } =20 +#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, } =20 /* - * Called at the time of execve() to get a new ASID - * Note the subtlety here: get_new_mmu_context() behaves differently her= e - * 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 AS= ID, - * 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 ASI= D, + * because mm has an unallocated "initial" value, while in latter, it mo= ves to + * a new ASID, only if it was unallocated */ -#define activate_mm(prev, next) switch_mm(prev, next, NULL) =20 /* it seemed that deactivate_mm( ) is a reasonable place to do book-keep= ing * for retiring-mm. However destroy_context( ) still needs to do that be= cause @@ -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) =20 -#define enter_lazy_tlb(mm, tsk) +#include =20 #endif /* __ASM_ARC_MMU_CONTEXT_H */ --=20 2.23.0