Skip to contentSkip to conversation

x86/entry/fred: Push __KERNEL_CS directly

PATCH Applied Xin Li (Intel) 2 participants 2 messages Aug 22, 2025

Subsystems (3)
lore
Share & tools
lore

Xin Li (Intel)

author maintainer
#0 lore raw

PATCH 1/1 x86/entry/fred: Push __KERNEL_CS directly

Push __KERNEL_CS directly, rather than moving it into RAX and then pushing RAX.

---
 arch/x86/entry/entry_64_fred.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/entry/entry_64_fred.S +1 -2
index 907bd233c6c1..3c1511feadf7 100644
@@ -97,8 +97,7 @@ SYM_FUNC_START(asm_fred_entry_from_kvm)
 	push %rdi			/* fred_ss handed in by the caller */
 	push %rbp
 	pushf
-	mov $__KERNEL_CS, %rax
-	push %rax
+	push $__KERNEL_CS
 
 	/*
 	 * Unlike the IDT event delivery, FRED _always_ pushes an error code

base-commit: 3da01ffe1aeaa0d427ab5235ba735226670a80d9

Signature · 1 line
2.50.1
merge bot Applied
#1 lore raw
The following commit has been merged into the x86/cleanups branch of tip:

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     5be502174bf0f5d0aafaab57fa4512723d6d2973
Gitweb:        https://git.kernel.org/tip/5be502174bf0f5d0aafaab57fa4512723d6d2973
Author:        Xin Li (Intel) <[email protected]>
AuthorDate:    Fri, 22 Aug 2025 00:16:44 -07:00
Committer:     Borislav Petkov (AMD) <[email protected]>
CommitterDate: Fri, 22 Aug 2025 13:12:50 +02:00

x86/entry/fred: Push __KERNEL_CS directly

Push __KERNEL_CS directly, rather than moving it into RAX and then pushing RAX.

No functional changes.

---
 arch/x86/entry/entry_64_fred.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/entry/entry_64_fred.S +1 -2
index 29c5c32..cb5ff2b 100644
@@ -97,8 +97,7 @@ SYM_FUNC_START(asm_fred_entry_from_kvm)
 	push %rdi			/* fred_ss handed in by the caller */
 	push %rbp
 	pushf
-	mov $__KERNEL_CS, %rax
-	push %rax
+	push $__KERNEL_CS
 
 	/*
 	 * Unlike the IDT event delivery, FRED _always_ pushes an error code