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=-10.0 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,UNWANTED_LANGUAGE_BODY,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 436A9C43457 for ; Tue, 28 Jul 2020 03:35:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 07BBA20775 for ; Tue, 28 Jul 2020 03:35:55 +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="txe/TGzL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07BBA20775 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 9A4588D0006; Mon, 27 Jul 2020 23:35:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 921418D0002; Mon, 27 Jul 2020 23:35:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 79DC88D0006; Mon, 27 Jul 2020 23:35:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 5FAE88D0002 for ; Mon, 27 Jul 2020 23:35:54 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2AF3C1EE6 for ; Tue, 28 Jul 2020 03:35:54 +0000 (UTC) X-FDA: 77086070628.12.owl53_2409a4826f66 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id F336A18002262 for ; Tue, 28 Jul 2020 03:35:53 +0000 (UTC) X-HE-Tag: owl53_2409a4826f66 X-Filterd-Recvd-Size: 5601 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 03:35:53 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id j19so11109012pgm.11 for ; Mon, 27 Jul 2020 20:35:53 -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=g4c//fvG4fjXYLBPyQJ141PEsJK2A9XDWhulJsN1c2g=; b=txe/TGzL2m1an+nZ6gO/mOSaoDI67xtlU7/eV990yjKoxcG0UfjMij72knv2aBpCp2 Cmtnr2BvxdLRtTcDUSFaEAb7Z6tcoihpK17xxJYDDSVRrl8Ng35DB0GUKAPDDH/N/Il4 OGJQEP3s0QLkEwIycouiFmf0Iggxw7P9Xect2VxLD+duf8ES3viEDp29UWiSlYwxHKau /JVQR3zrFqLOQbAuVpRdfYoIugdCdZH6AmURIiDdvn7JFxX1o92/dnHolj4XC0RqBHi/ y73+XgdiLyAmNUH/W4N5EpDTFftABn3UeUI0v4wf6HTZXGQNAk8Fd5MLKDU3siIoSFGe Gb6g== 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=g4c//fvG4fjXYLBPyQJ141PEsJK2A9XDWhulJsN1c2g=; b=Pr5/r2b7HyZlWZhn7tf6msVBK1bq3X6toIBS8ShD7N3EuqXdVrseIlm1E4Wl0HmeMg qE2NgblQoxm4I8whFMgwg5fMJOU5byjURilfcShOuWnkQk5ZFIX0pzlNzB9mLkb2auYJ oV2P+sUtqAkb09n6h1tfABkPNqH4uaCt1ksU23g+U8+TnVWk335snuzUmOUPaKPal4m7 ClJKdME2Ugs3DpqW/qMJYDq/cU+zZK+5g2NsGi9WH7JlubMPhqOdSyPOokEwYqdg7xLg YAeEnl7yj51+eCz06Zsm8PnEtrs/cuNW0Hgnv/vbEAftwkvw4s7xp2tZiuvxJdfl1/7Y gldg== X-Gm-Message-State: AOAM532Xorg95k0aZyXJzRTZoUEfskMsCofsOkfinLUg++A8Ia24e0Xl FdWUSep6inENQqj558GeMlGB/f4j X-Google-Smtp-Source: ABdhPJxLSrOIo2pJZ6JxdbY8sqTL+sLacJBQP0Z57JrGGqLjqaHZnmGavtkNBCHUG79mxlKKrr0QRQ== X-Received: by 2002:a63:1406:: with SMTP id u6mr22223509pgl.108.1595907352696; Mon, 27 Jul 2020 20:35:52 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 20:35:52 -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 , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org Subject: [PATCH 24/24] xtensa: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:34:05 +1000 Message-Id: <20200728033405.78469-25-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: F336A18002262 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: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Nicholas Piggin --- arch/xtensa/include/asm/mmu_context.h | 11 +++-------- arch/xtensa/include/asm/nommu_context.h | 26 +------------------------ 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/arch/xtensa/include/asm/mmu_context.h b/arch/xtensa/include/= asm/mmu_context.h index 74923ef3b228..e337ba9686e9 100644 --- a/arch/xtensa/include/asm/mmu_context.h +++ b/arch/xtensa/include/asm/mmu_context.h @@ -111,6 +111,7 @@ static inline void activate_context(struct mm_struct = *mm, unsigned int cpu) * to -1 says the process has never run on any core. */ =20 +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -136,24 +137,18 @@ static inline void switch_mm(struct mm_struct *prev= , struct mm_struct *next, activate_context(next, cpu); } =20 -#define activate_mm(prev, next) switch_mm((prev), (next), NULL) -#define deactivate_mm(tsk, mm) do { } while (0) - /* * Destroy context related info for an mm_struct that is about * to be put to rest. */ +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { invalidate_page_directory(); } =20 =20 -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_stru= ct *tsk) -{ - /* Nothing to do. */ - -} +#include =20 #endif /* CONFIG_MMU */ #endif /* _XTENSA_MMU_CONTEXT_H */ diff --git a/arch/xtensa/include/asm/nommu_context.h b/arch/xtensa/includ= e/asm/nommu_context.h index 37251b2ef871..7c9d1918dc41 100644 --- a/arch/xtensa/include/asm/nommu_context.h +++ b/arch/xtensa/include/asm/nommu_context.h @@ -7,28 +7,4 @@ static inline void init_kio(void) { } =20 -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_stru= ct *tsk) -{ -} - -static inline int init_new_context(struct task_struct *tsk,struct mm_str= uct *mm) -{ - return 0; -} - -static inline void destroy_context(struct mm_struct *mm) -{ -} - -static inline void activate_mm(struct mm_struct *prev, struct mm_struct = *next) -{ -} - -static inline void switch_mm(struct mm_struct *prev, struct mm_struct *n= ext, - struct task_struct *tsk) -{ -} - -static inline void deactivate_mm(struct task_struct *tsk, struct mm_stru= ct *mm) -{ -} +#include --=20 2.23.0