From patchwork Tue Sep 1 14:15:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748299 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 39CB6138A for ; Tue, 1 Sep 2020 14:17:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EEE55206EB for ; Tue, 1 Sep 2020 14:17:51 +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="vMb3r5vp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEE55206EB 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 4F139900019; Tue, 1 Sep 2020 10:17:49 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4A43090000D; Tue, 1 Sep 2020 10:17:49 -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 3914D900019; Tue, 1 Sep 2020 10:17:49 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 1663E90000D for ; Tue, 1 Sep 2020 10:17:49 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B85C5181AEF1F for ; Tue, 1 Sep 2020 14:17:48 +0000 (UTC) X-FDA: 77214696216.29.jam52_0313d4327098 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 2720A18086584 for ; Tue, 1 Sep 2020 14:17:35 +0000 (UTC) X-Spam-Summary: 1,0,0,5a7794c0bf2da33f,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:3873:3874:4321:5007:6261:6653:7514:9413:9592:10004:11026:11232: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.216.67:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yfde73itag8ptf6y9e9iuphzptjyctg85cdymadcw3ugkmm3kmnsdj8qpk8ox.f7ndu37766fnez91mxdchxukbi79n5gjp6o9drs79xm1uc6g7kstcrdfdijfsns.w-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:27,LUA_SUMMARY:none X-HE-Tag: jam52_0313d4327098 X-Filterd-Recvd-Size: 5646 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 14:17:21 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id mw10so676935pjb.2 for ; Tue, 01 Sep 2020 07:17:21 -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=1TuljzwT/taYwLAxWlXZZmSA1JGxC1yPToMpQKgO55w=; b=vMb3r5vpL+QhkRrXIl+ox645IRbVqx89mbaXMOnBZAhR9E+FXTLl6roBhM+GQbCeOx 1U8UUNEuDTum31qKlbKJeOcqoux35a4Jd4S0H06CPUlUiMVVwMcW3b7yMgb2KlDOJZsl Ash4DBb57qEptLWAJWXS44zYA7UeKg+1awpvzhYWEtWPcH2EN4Nl0oIYIVYRXLHK+Rkb 9Xy2yHHiGXDNl8tx9ZDunXL3KrdLKvQkAhjE0y8R0V6eOKLngbm880pThlRZU4DcPi6u sa7ZRpJ8mKy0hxGDnnoAe3NH9X9sO3PYCzJ7V8Ngevo1W7i+/cm1hBwCWCx7Xro1SlEO 6/4Q== 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=1TuljzwT/taYwLAxWlXZZmSA1JGxC1yPToMpQKgO55w=; b=HARKk0xaEtfRbnj3g/o60pdv7TpxT1/sDjQXZLy1Gsnjlm8RO6SLIrvf16Vm9giKRg qkVfy7CLzX7DRNj7k6BuVeA20O1Sz789RaLyqj6jRKwkcTZdpk1r7ehjSNZiAw4qvf5G ddfteg0wQqGU12zHYT9N8mhcLBclho47EmttvxUqzzZrC7qmVfbCF2a1dn6PS+bxpM0K gSHaBczGvacDaRQ5erbEWiDZtgwxChLVtHio9lBMkYUErDO9C9A8vpWkxFSCkTMjb2BA //EAeZuLvJxRClC/xn3Aw1E/+6CPgz3ZGcaxw03yMxgBNpSLb8wdlgjp1IPTzkKYE4cZ 5AEw== X-Gm-Message-State: AOAM531NN1leOVOQ7LbiIKvB6PR7nNpnjeRmgbk34/e6YH+XYTKrU8bU gYUe1iAYYwo8DTkuBTQyEtM= X-Google-Smtp-Source: ABdhPJxz4M3UuJfyQ/Z0oMUaKnqoDspo9LWuPGYuUcmj9p+2WrlmX/NWbSHEPJ95PYvgYV4snR8jiQ== X-Received: by 2002:a17:902:7e86:: with SMTP id z6mr1579503pla.316.1598969840395; Tue, 01 Sep 2020 07:17:20 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:17:20 -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 v3 23/23] xtensa: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:39 +1000 Message-Id: <20200901141539.1757549-24-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: 2720A18086584 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 Acked-by: Max Filippov --- Please ack or nack if you object to this being mered via Arnd's tree. 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