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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08F10CD3431 for ; Wed, 4 Sep 2024 12:05:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=b7RjP2YDjsQDAgpAI67p4oi8OpVaJqVhfPX6M63fqx8=; b=FDQEEQrpQYeHp7HqSRSnSwGzpp nn+UO4UhqeuiHk0LAjUZUQQ+oRgJy9xw8Sb2hBqcqIvWRQ/SU5Bbh7pSJutthF2fYZ0OBOpj36oyp bE6MrwdxQxQRZgcLVoAvJIXa3rDGR6YlvHExH0yFQGpPipwxjl0+lW1v1Z8Z5jc2ct2Za4MqgGPpm fdPeUlxJc8EeHYcRwiQMfITBon65/xD0wpAwVidQmNsj6tiR2DvY9cxtuIIF10NganGdX6ShuYYro FwVKXHQuFM7KFWnEwXkmG9OVl060x3Nk+c0E8A6LekGHfHFUJrCXE9fWz16VPlUbP7HjkGECvZOs/ xJAKRNqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slokl-00000004Gri-3pov; Wed, 04 Sep 2024 12:04:51 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sloL0-00000004Bd3-0RKf for linux-arm-kernel@lists.infradead.org; Wed, 04 Sep 2024 11:38:15 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id B69A5A43FAF; Wed, 4 Sep 2024 11:38:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F4212C4CEC2; Wed, 4 Sep 2024 11:38:07 +0000 (UTC) Date: Wed, 4 Sep 2024 12:38:05 +0100 From: Catalin Marinas To: Will Deacon Cc: Joey Gouly , linux-arm-kernel@lists.infradead.org, nd@arm.com, akpm@linux-foundation.org, aneesh.kumar@kernel.org, aneesh.kumar@linux.ibm.com, anshuman.khandual@arm.com, bp@alien8.de, broonie@kernel.org, christophe.leroy@csgroup.eu, dave.hansen@linux.intel.com, hpa@zytor.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, maz@kernel.org, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.ibm.com, npiggin@gmail.com, oliver.upton@linux.dev, shuah@kernel.org, skhan@linuxfoundation.org, szabolcs.nagy@arm.com, tglx@linutronix.de, x86@kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register Message-ID: References: <20240822151113.1479789-1-joey.gouly@arm.com> <20240822151113.1479789-7-joey.gouly@arm.com> <20240823144531.GH32156@willie-the-truck> <20240823170835.GA1181@willie-the-truck> <20240827113803.GB4318@willie-the-truck> <20240903145413.GB3669886@e124191.cambridge.arm.com> <20240904102254.GA13280@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240904102254.GA13280@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_043814_272896_DC055704 X-CRM114-Status: GOOD ( 14.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 04, 2024 at 11:22:54AM +0100, Will Deacon wrote: > On Tue, Sep 03, 2024 at 03:54:13PM +0100, Joey Gouly wrote: > > commit 3141fb86bee8d48ae47cab1594dad54f974a8899 > > Author: Joey Gouly > > Date: Tue Sep 3 15:47:26 2024 +0100 > > > > fixup! arm64: context switch POR_EL0 register > > > > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c > > index a3a61ecdb165..c224b0955f1a 100644 > > --- a/arch/arm64/kernel/process.c > > +++ b/arch/arm64/kernel/process.c > > @@ -515,11 +515,8 @@ static void permission_overlay_switch(struct task_struct *next) > > return; > > > > current->thread.por_el0 = read_sysreg_s(SYS_POR_EL0); > > - if (current->thread.por_el0 != next->thread.por_el0) { > > + if (current->thread.por_el0 != next->thread.por_el0) > > write_sysreg_s(next->thread.por_el0, SYS_POR_EL0); > > - /* ISB required for kernel uaccess routines when chaning POR_EL0 */ > > - isb(); > > - } > > } > > What about the one in flush_poe()? I'm inclined to drop that as well. Yes, that's a similar thing. -- Catalin