From patchwork Tue Sep 1 14:15:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748257 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 89EA1138A for ; Tue, 1 Sep 2020 14:16:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60565206EF for ; Tue, 1 Sep 2020 14:16:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ADYQCyAW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Rb4ZX3as" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60565206EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LJ20Lc+02GoR1Gm7vMac+e8qnGigZvH7KLXs5k7D7Rg=; b=ADYQCyAWVZYh5VA63864Sbut0 tbvaGNigYwU2J7U89/cpJAUDk0r1K9SPUju2W/mnG2ATN2rKyTu8UlioRdke8LF7/7aW0g1YYirYw +gCmAlmbIB6Crl6mFiIMtFX0fRCunZy+IXsg1/9OLw7G/Dn1EvPK/+9TJa4hYyHFiME/h9WF9CsYk aQ3zNvr8AYKAdbV33gqccxvGH1VkCOoo+CVcW89UL0+WgyCPouvI7toglXpBuxpkPrb5EkaRD0Iqw CsSEGAFJ62EVL1udLhpDTjRplOcFCayKx5Fag9ORcTLskgR/cVuF7qa3PO/Yfinr66PpdebZ7wyJx YFHo34oZA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD750-0001zS-Gl; Tue, 01 Sep 2020 14:16:10 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD74w-0001xi-EH for linux-arm-kernel@lists.infradead.org; Tue, 01 Sep 2020 14:16:07 +0000 Received: by mail-pl1-x644.google.com with SMTP id j11so592736plk.9 for ; Tue, 01 Sep 2020 07:16:05 -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=cqrgjgkwQOLPKBKvSr9gJrTOHEBDRQ8iqEq+YmYLPME=; b=Rb4ZX3asfwOJg4osK9f8BVD5bqX4bXtB9PhlYShZ/rsHMNJrSi7aW2zu7V3aeOSrJm L2LbvTedaoP87o2rocKNCt0/zGqCSl8eyW69u7bu2hDSiC9BpP5v7sW099OXDjyBdWWo 3Dg8HtuVdHhv4tO9TNdQ9p7FPLbxF6eKt5KtLUEe04377yijdLe6uEt3jFztB5iQJPK4 PJPMg87eK/AzEN4h8pHk8gZr/ac06hwgAeEbRZnmntpetDHiMSbEIcMeq5Hkn+vjZ4Lw qOoGZEdbd+2uUXFX4RlrE4zjEFdoITSaRAxqiXKYn3VD6kqvA2fIF/XqYX5/ac3wnZzd 7oQA== 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=cqrgjgkwQOLPKBKvSr9gJrTOHEBDRQ8iqEq+YmYLPME=; b=Lht+2CsuXTytzmykmXR6Y4aDK4ZthF8rw1y9yH6r0QhuOGVuEPokC2AcaQ6td5eWFK KMCvUSeLLUykAYHxxchdSKWIQT+5axKQmQppK6WqtOMZBzNqUyRHj4EAd0mqB79iPqMK l/opVGTRp+8jCD8S5ps+U8E5nFJBbM/I2/jQI/WGPsYbrr2o2whMtz4uoYryYWGQlNi6 dmdniFcjcF1aG0W9cVNpn02k/B3G+crxiGdbwthlUYvaWIkoOCF2h717Vgq81c3T5Ngn 9eDLZ0a8rE16oxma7mDIFGSfNXvMlaEVyayLOU6F2ccU5Xpcg0yo7f61cfq6Xpcrdwz1 T6Sw== X-Gm-Message-State: AOAM530pUBbEWEZSAF9INtp6REMNirnZrCQ56aW01QRTrkuQsGvfjGiK J50SGleGGaETPkqx5tHGVxE= X-Google-Smtp-Source: ABdhPJzlSzEv9CsAxwBinDg5rdhmsaopGLA6RpgIsGSWM/G1oTk+NhLtBCJS2/eCVKKOb3FB1mzI9A== X-Received: by 2002:a17:90a:4e42:: with SMTP id t2mr1758800pjl.121.1598969763778; Tue, 01 Sep 2020 07:16:03 -0700 (PDT) Received: from bobo.ibm.com ([203.185.249.227]) by smtp.gmail.com with ESMTPSA id w9sm2212816pgg.76.2020.09.01.07.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:03 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Subject: [PATCH v3 04/23] arm: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:20 +1000 Message-Id: <20200901141539.1757549-5-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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200901_101606_502798_2237F895 X-CRM114-Status: GOOD ( 15.30 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:644 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [npiggin[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Nicholas Piggin , Russell King , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Nicholas Piggin --- Please ack or nack if you object to this being mered via Arnd's tree. arch/arm/include/asm/mmu_context.h | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index f99ed524fe41..84e58956fcab 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h @@ -26,6 +26,8 @@ void __check_vmalloc_seq(struct mm_struct *mm); #ifdef CONFIG_CPU_HAS_ASID void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk); + +#define init_new_context init_new_context static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { @@ -92,32 +94,10 @@ static inline void finish_arch_post_lock_switch(void) #endif /* CONFIG_MMU */ -static inline int -init_new_context(struct task_struct *tsk, struct mm_struct *mm) -{ - return 0; -} - - #endif /* CONFIG_CPU_HAS_ASID */ -#define destroy_context(mm) do { } while(0) #define activate_mm(prev,next) switch_mm(prev, next, NULL) -/* - * This is called when "tsk" is about to enter lazy TLB mode. - * - * mm: describes the currently active mm context - * tsk: task which is entering lazy tlb - * cpu: cpu number which is entering lazy tlb - * - * tsk->mm will be NULL - */ -static inline void -enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - /* * This is the actual mm switch as far as the scheduler * is concerned. No registers are touched. We avoid @@ -149,6 +129,6 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, #endif } -#define deactivate_mm(tsk,mm) do { } while (0) +#include #endif From patchwork Tue Sep 1 14:15:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11748255 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 771ED14E5 for ; Tue, 1 Sep 2020 14:16:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4CD8F206CD for ; Tue, 1 Sep 2020 14:16:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Q0qRBBEf"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VtIsRogd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CD8F206CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=G+KBr7ijSLr7QfuHHv/GR+7KaDdmReXbYGhbBw7mLLE=; b=Q0qRBBEfpNYLJI0aptOJfm6QR ODEQGbxsZ+Niq8A6eW0LxPn7uCRR5/95YOTlytMx0Bosf3yY62B+2jqEVQrUchgVc90SETc7iTjDA 52wHh2QfRPYV3p5RRBtQsveth5bxx/YVivnE4YQRdfMxhII9+ZcQb06Y/t2doWdocPjMd4YAWPem0 9b4M+/fG2N3Zo6EZFOIgest3YXPXQBvafLpS8E+9pJTLUv2kTP6XJQgW12W46cZfRS5hzI5DO2UIu mNOHifGHYIyUvabqTucRvBkzYkg7VGKgIVbR2H70OpmVQpKiwRFZ6GVChdfLAxWaRtz6Kp4fmZg5V y2q0dbaJw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD754-00020U-Vp; Tue, 01 Sep 2020 14:16:15 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD752-0001yz-0B for linux-arm-kernel@lists.infradead.org; Tue, 01 Sep 2020 14:16:12 +0000 Received: by mail-pl1-x642.google.com with SMTP id y6so593338plk.10 for ; Tue, 01 Sep 2020 07:16:09 -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=u6Dup+ArfJ1cGNtaPdNiGwIK5zxtRVAfzzcCu/uBGUo=; b=VtIsRogdzz/B4ItJXOYG0iCNVWxRGKUQreNEa3CcflLUskSxARaPoPP2PSbjw18Tkb 9uMw5aOoeqEMnAN3muUKRO6Ufe6NtCgF9KWdYlfKVTAaJYX3WG0tVcL8VEXZBJP7e8Wx Ijz5TwF8bXrHhFkR5Qm2WLFbiR7Z85F7SZhZsztZ+UQlr0YgXcPMxAvDolgs8Q/kUiqq V9Z4zuaJ/2rRZ5wE1tRYEHRvc2Xb+4vU2izP65TQEQK56/rBGIFIIM1YVFkCiKR88pGM T2ZAp2ajUmITAdEl2d+dZGes0KnwDskLcy5mLbYLM6tuSjEg52KFVvelL7TzEFUOvkrM 5ryg== 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=u6Dup+ArfJ1cGNtaPdNiGwIK5zxtRVAfzzcCu/uBGUo=; b=Rs+r/hwn1Oc58ELZ9+iwmejANZ/EM+MiMFB5z86um+9VzQqCwnzb2VrL4ZvZ95Ia3y G+8OsC7pyAUxAzYPlwfVmHrUtEI6WOkils4RGaICpFVTlr6ekEfYeABQYQNGh3lpkJ7Q tREBr4PpbmkG/2kAUg83JJxIIz0O7CZL82riwhilNK4KJfLH/OisTFxdQgTXZVlq0wUK dr7XjvzOUw/OKtBtCU5QBP5GJxvEiUmxW9uZbnHDU/uAhBItwCAh2mRmqsQgVyfvQmAl bSzQy8a/tnppOfmb7Kl/hRl6zJgobVFlZxrQQ24doB0d7cZMgNYqBJLDB8pJSN72vxqB +k2Q== X-Gm-Message-State: AOAM530kGMEUDklCmVkm8kBDKvhejG9GfhGpTzmhT9tiv1Sfz+J3zhHE urLPJQ4romzCf5ZemnKcpqc= X-Google-Smtp-Source: ABdhPJyAinElz1sorI3kdkH6fqTFkR16OPVqZrPUyKnI8QoHoDqnjFXfTtMHJRA7puFOHsWIzJotcg== X-Received: by 2002:a17:90a:c255:: with SMTP id d21mr1859599pjx.212.1598969768315; Tue, 01 Sep 2020 07:16:08 -0700 (PDT) Received: from bobo.ibm.com ([203.185.249.227]) by smtp.gmail.com with ESMTPSA id w9sm2212816pgg.76.2020.09.01.07.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 07:16:07 -0700 (PDT) From: Nicholas Piggin To: linux-arch@vger.kernel.org Subject: [PATCH v3 05/23] arm64: use asm-generic/mmu_context.h for no-op implementations Date: Wed, 2 Sep 2020 00:15:21 +1000 Message-Id: <20200901141539.1757549-6-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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200901_101612_056890_E2F63090 X-CRM114-Status: GOOD ( 12.94 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [npiggin[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Catalin Marinas , linux-kernel@vger.kernel.org, Nicholas Piggin , linux-mm@kvack.org, Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Acked-by: Catalin Marinas Signed-off-by: Nicholas Piggin --- arch/arm64/include/asm/mmu_context.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index f2d7537d6f83..fe2862aa1dad 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h @@ -174,7 +174,6 @@ static inline void cpu_replace_ttbr1(pgd_t *pgdp) * Setting a reserved TTBR0 or EPD0 would work, but it all gets ugly when you * take CPU migration into account. */ -#define destroy_context(mm) do { } while(0) void check_and_switch_context(struct mm_struct *mm); #define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; }) @@ -202,6 +201,7 @@ static inline void update_saved_ttbr0(struct task_struct *tsk, } #endif +#define enter_lazy_tlb enter_lazy_tlb static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { @@ -242,12 +242,11 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, update_saved_ttbr0(tsk, next); } -#define deactivate_mm(tsk,mm) do { } while (0) -#define activate_mm(prev,next) switch_mm(prev, next, current) - void verify_cpu_asid_bits(void); void post_ttbr_update_workaround(void); +#include + #endif /* !__ASSEMBLY__ */ #endif /* !__ASM_MMU_CONTEXT_H */