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.5 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=ham 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 4CA64C433E6 for ; Tue, 1 Sep 2020 14:17:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 04755206EB for ; Tue, 1 Sep 2020 14:17: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="HQu5Fv4C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04755206EB 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 E954D900011; Tue, 1 Sep 2020 10:17:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF2B390000D; Tue, 1 Sep 2020 10:17:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE29F900011; Tue, 1 Sep 2020 10:17:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id AB84E90000D for ; Tue, 1 Sep 2020 10:17:25 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 731748248076 for ; Tue, 1 Sep 2020 14:17:25 +0000 (UTC) X-FDA: 77214695250.08.sleet85_191392327098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id EC0341819E64B for ; Tue, 1 Sep 2020 14:17:20 +0000 (UTC) X-HE-Tag: sleet85_191392327098 X-Filterd-Recvd-Size: 6287 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:17:07 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id bh1so589139plb.12 for ; Tue, 01 Sep 2020 07:17: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=logZjoG5Aka5uBmK80AuCdh5o6UuSDKs79nfaNTTOaw=; b=HQu5Fv4C4UoSmrbjuziOapFF10KA+RQNesnat24CDhKtp+EaxHPoL0yaABBLA4VseX WaGqI8GcgcXCoIDq3vY4fY1Tr/76AO3buT3pnHIj/lLEG73T2kwzVJtocvLsVUK2H91d Y7162dEqcfij+2mP32Ljy4N36bqL372dR/9rzzVuK5U2E0QOUIpOe+CyTkM4SD6u+X6/ 2OUaHe9MCdh/nvcKwlIoSCxuZHpgspfPTirZPdD1RjiFJLh7aHhWtwxnes3A8PcdSsbf uyWUmDMHGoiYM0j5QcJn7PIaMHP0BdPA+wGfOkFex1Gb/6I6VKURNeCtSJNonR0uqvbo j8IA== 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=logZjoG5Aka5uBmK80AuCdh5o6UuSDKs79nfaNTTOaw=; b=GGOuFwCpj2BehrWPBExuQDdHjhYT0ncweft5babj23yhMQg/oj8b86FVemB92FFdz4 p/ceGQkRu/SnJD5jKgpdpDunt9vwZMbGvMieocMDxbVVnUxukuvUmh0vRFxW2lwnV907 EUiYTJwmQ5eF5UVypvwuXcAIYbJUbUx8Xb6vwx/GGBFrqscp1TityxiLFSw8Ok++xPVf KU2kFHprBIb4FL+Kin+0EMCxTtKlVZfsf2M/biue7cOhbN1kx4l5o9SwsrDUN2DGiSdY SVhG3h2nv7vr9CCii7HYIavfhrhX54ihS9WkdIT8eZ4uErK9Q/Z+wtkqnb9lfK2Suqoh Ecug== X-Gm-Message-State: AOAM533Uc15LmFKYNL3XcYTlrueIe5gS26TtF+pZw+8W9aG1IOrIMZN3 239bEaivE+D9yTNstAz5OqA= X-Google-Smtp-Source: ABdhPJzQTGwzDyOFh9C1LgX+8EX+CeYkOkzlMY/Z9U1HiGXP7P3RibIekHepWjyHD++l0OigZGr5aQ== X-Received: by 2002:a17:902:b20e:: with SMTP id t14mr1622424plr.58.1598969827058; Tue, 01 Sep 2020 07:17:07 -0700 (PDT) Received: from bobo.ibm.com ([203.185.249.227]) by smtp.gmail.com with ESMTPSA id w9sm2212816pgg.76.2020.09.01.07.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:17: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 , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH v3 20/23] sparc: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:36 +1000 Message-Id: <20200901141539.1757549-21-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200901141539.1757549-1-npiggin@gmail.com> References: <20200901141539.1757549-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: EC0341819E64B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Nicholas Piggin --- Please ack or nack if you object to this being mered via Arnd's tree. 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 @@ =20 #include =20 -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_stru= ct *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); =20 /* 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); =20 /* Switch the current MM context. */ void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk); =20 -#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) =20 +#include + #endif /* !(__ASSEMBLY__) */ =20 #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 =20 -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_stru= ct *tsk) -{ -} - extern spinlock_t ctx_alloc_lock; extern unsigned long tlb_context_cache; extern unsigned long mmu_context_bmap[]; =20 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); =20 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); } =20 -#define deactivate_mm(tsk,mm) do { } while (0) #define activate_mm(active_mm, mm) switch_mm(active_mm, mm, NULL) =20 #define __HAVE_ARCH_START_CONTEXT_SWITCH @@ -187,6 +185,8 @@ static inline void finish_arch_post_lock_switch(void) } } =20 +#include + #endif /* !(__ASSEMBLY__) */ =20 #endif /* !(__SPARC64_MMU_CONTEXT_H) */ --=20 2.23.0