From patchwork Mon Apr 22 11:35:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 13638413 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 BCB01C4345F for ; Mon, 22 Apr 2024 11:35:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ecKI0M3w0zwH/vyOmDy9AcfhpXWEAdU9jLzQTv4Nzd0=; b=h3MjjuyyQgX4RP f7y6P+rLxiU+onR31Ep1LnjDMbuc7S/+E/NiR3Pt2HFtKS/7VF8FjoTUnh+NLV15ga4dVVdgfKwou +xd4e7dbPRQ2lpvbDeLpnbJ8JcBAf6wuDDFJZSaliPIFqNGCQOPLBJtH+poTxkia5o1QzB7ehDC4h C83Pln9fTRvEQbXqiU3DEyn/LPX5tT6wDSKul1dwgEwYVVF6SYdOGGWVN/g9mRnrBY/bL2Eaj8q0u Mysixqx1rGR+6C2PZq65vlcMNPEivloyu/Jd6dJpYUFiMxw/XpCL1F8jDWXeStNQ753Y7qgGd/q1l A7Ls0Ik4ijlK0C2nQuRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ryrxP-0000000DNWO-31vD; Mon, 22 Apr 2024 11:35:35 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ryrxM-0000000DNTI-1iQL for linux-arm-kernel@lists.infradead.org; Mon, 22 Apr 2024 11:35:34 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 08E9B339; Mon, 22 Apr 2024 04:35:56 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E418C3F7BD; Mon, 22 Apr 2024 04:35:26 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: broonie@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, will@kernel.org Subject: [PATCH 0/2] arm64: cleanup DAIF.D manipulation Date: Mon, 22 Apr 2024 12:35:21 +0100 Message-Id: <20240422113523.4070414-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240422_043532_520538_3D45BDBE X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. 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 Hi, These patches cleanup some historical manipulation of DAIF.D which is no longer necessary. The main goal here is to remove the unnecessary manipulation so that it's easier to rework DAIF manipulation in future to handle other exception mask bits (e.g. PSTATE.{ALLINT,PM}). That's necessary for supporting the architectural NMI, etc. The first patch updates a stale comment, removing an already-stale reference to a macro that'll be removed entirely in the second patch. The second patch removes the unnecessary manipulation of DAIF.D. The additional lines are all comments added to setup_arch() and secondary_start_kernel() to explain the initial unmasking of DAIF bits. The commit message explains the history of the manipulation, and why the change is desirable and safe. I've build-tested and boot-tested this locally atop v6.9-rc3. Mark. Mark Rutland (2): arm64: assembler: update stale comment for disable_step_tsk arm64: defer clearing DAIF.D arch/arm64/include/asm/assembler.h | 6 +----- arch/arm64/kernel/setup.c | 11 +++++++++-- arch/arm64/kernel/smp.c | 7 +++++++ arch/arm64/mm/proc.S | 10 ---------- 4 files changed, 17 insertions(+), 17 deletions(-)