From patchwork Wed Aug 26 14:52:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11738727 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 620E7722 for ; Wed, 26 Aug 2020 14:54:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 25B7E22B40 for ; Wed, 26 Aug 2020 14:54:33 +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="npDO1sJ/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25B7E22B40 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 D7A876B0036; Wed, 26 Aug 2020 10:54:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D299E6B0037; Wed, 26 Aug 2020 10:54:28 -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 BA4FE8D0001; Wed, 26 Aug 2020 10:54:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id A18356B0036 for ; Wed, 26 Aug 2020 10:54:28 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6C863181AC1F5 for ; Wed, 26 Aug 2020 14:54:28 +0000 (UTC) X-FDA: 77193015816.03.balls14_500a24427065 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 2EE1328A4E9 for ; Wed, 26 Aug 2020 14:54:28 +0000 (UTC) X-Spam-Summary: 1,0,0,695a093c2809c01f,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1535:1542:1711:1730:1747:1777:1792:1978:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3353:3865:3867:3871:3874:4321:5007:6261:6653:7514:9413:9592:10004:11026:11473:11657:11658:11914:12043:12109:12296:12297:12438:12517:12519:12555:12895:13255:13846:13894:14096:14181:14394:14687:14721:21080:21433:21444:21451:21627:21666:21990:30054:30075,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y8t7a4aq888aycqcgwu5zrn3zs8ycm58sofehaucw3ugkmm39xjsqm1o5oing.oqert7k18cbs9fc4uaawuyxbdxsc1a9xu3h9drs79xm1uc6g7kstcrptxn6nhdi.c-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:none,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: balls14_500a24427065 X-Filterd-Recvd-Size: 5614 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 14:54:27 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id k13so1007024plk.13 for ; Wed, 26 Aug 2020 07:54:27 -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=npDO1sJ/9Lj/B2a9PZJG70emc1czb76ScCXnQ2oCD1xY+i1qLbbqM6g9M7zppI5izy +H+esxZ+abKKnJ5VdUfsAi6AFEbYwDt7k3pcmYxC4WK8g76ILaH3yedmYAh5ddC/tzBI wJOfm8z4D9+QM/OwCTdUl16NQhm40qGVfU73NJ1ZzU96KMhh5X0HVZYcD7kp5ktLLWGe HJnEUyoyS4FjoLwWmSjBl+63WW4Ck6wfJ+zkn/SkZVzUXtq9Djbcm6p/76OxocPdqgt+ 5XjZgVR8vtdU6hRrFcu6mF9I5Y4mMocjBbQoV9CYyb92jNN3BfJSYyOBqQvhF1iydVy2 hRXA== 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=AQgUVNK5/4crIMURyN/01eDPkHCV2UNI86y7/z3SwVA+Ipk/DNZQMUm2uQEdG7vZCP JXnFlEkONKZv3AwRkNru6m4hA1krKjcEiEX9M4i0NLS1iIRvwvWqoWkaEAwNnU3cBmwe KgQ5v9V8lMP8IAOKpAdm6SkQ00oXJAW4ceSHstj/KEtmU5P9vivUUSitgYAzb3+aDWCD oBS/3GCFYgyQ7gHYc8avDIjLVOZX1wlebgq02+gssPvX9JsMTFv9JigjB8L0KoDEjqL8 jPYk0H0dvCu1Z00+rpaGHxXzpAbwyZEiH17Mwq6zyyiEoRc/CNxkC+FSVHezjdjWA7a1 n0IA== X-Gm-Message-State: AOAM533xrHuTeKhq6d6x9S82vrkAbKGNGJ7m83v3MxwK95PF1+zF2ecT hxaQKehyAED1zHaoGO9chDCtavjHAcw= X-Google-Smtp-Source: ABdhPJxvlK/X1ouPjuda7L40DWOtJsOi9bxydEWaZH+cGgSmUaZIqEtdMn3J1zKle1a/UidEnCdOFg== X-Received: by 2002:a17:902:7b82:: with SMTP id w2mr12358648pll.258.1598453666968; Wed, 26 Aug 2020 07:54:26 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id r7sm3327140pfl.186.2020.08.26.07.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 07:54:26 -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 v2 23/23] xtensa: use asm-generic/mmu_context.h for no-op implementations Date: Thu, 27 Aug 2020 00:52:49 +1000 Message-Id: <20200826145249.745432-24-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200826145249.745432-1-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 2EE1328A4E9 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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. */ +#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); } -#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(); } -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ - /* Nothing to do. */ - -} +#include #endif /* CONFIG_MMU */ #endif /* _XTENSA_MMU_CONTEXT_H */ diff --git a/arch/xtensa/include/asm/nommu_context.h b/arch/xtensa/include/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) { } -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - -static inline int init_new_context(struct task_struct *tsk,struct mm_struct *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 *next, - struct task_struct *tsk) -{ -} - -static inline void deactivate_mm(struct task_struct *tsk, struct mm_struct *mm) -{ -} +#include