diff mbox series

[1/2] arm64: assembler: update stale comment for disable_step_tsk

Message ID 20240422113523.4070414-2-mark.rutland@arm.com (mailing list archive)
State New, archived
Headers show
Series arm64: cleanup DAIF.D manipulation | expand

Commit Message

Mark Rutland April 22, 2024, 11:35 a.m. UTC
A comment in the disable_step_tsk macro refers to synchronising with
enable_dbg, as historically the entry used enable_dbg to unmask debug
exceptions after disabling single-stepping.

These days the unmasking happens in entry-common.c via
local_daif_restore() or local_daif_inherit(), so the comment is stale.
This logic is likely to chang in future, so it would be best to avoid
referring to those macros specifically.

Update the comment to take this into account, and describe it in terms
of clearing DAIF.D so that it doesn't macro where this logic lives nor
what it is called.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
---
 arch/arm64/include/asm/assembler.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown April 23, 2024, 5:03 a.m. UTC | #1
On Mon, Apr 22, 2024 at 12:35:22PM +0100, Mark Rutland wrote:
> A comment in the disable_step_tsk macro refers to synchronising with
> enable_dbg, as historically the entry used enable_dbg to unmask debug
> exceptions after disabling single-stepping.

Reviewed-by: Mark Brown <broonie@kernel.org>
diff mbox series

Patch

diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h
index ab8b396428da8..b27dac4a9c0f4 100644
--- a/arch/arm64/include/asm/assembler.h
+++ b/arch/arm64/include/asm/assembler.h
@@ -59,7 +59,7 @@ 
 	mrs	\tmp, mdscr_el1
 	bic	\tmp, \tmp, #DBG_MDSCR_SS
 	msr	mdscr_el1, \tmp
-	isb	// Synchronise with enable_dbg
+	isb	// Take effect before a subsequent clear of DAIF.D
 9990:
 	.endm