From: "tip-bot2 for Khalid Ali" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Khalid Ali <khaliidcaliy@gmail.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
Nikolay Borisov <nik.borisov@suse.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cleanups] x86/boot: Avoid redundant %cr4 write in startup_64()
Date: Tue, 15 Jul 2025 19:05:20 -0000 [thread overview]
Message-ID: <175260632075.406.7445047355425559021.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250715181709.1040-1-khaliidcaliy@gmail.com>
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 0149fff886a62465b21d80fa53615ee7de3d72f1
Gitweb: https://git.kernel.org/tip/0149fff886a62465b21d80fa53615ee7de3d72f1
Author: Khalid Ali <khaliidcaliy@gmail.com>
AuthorDate: Tue, 15 Jul 2025 18:16:10
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Tue, 15 Jul 2025 20:52:56 +02:00
x86/boot: Avoid redundant %cr4 write in startup_64()
When initializing %cr4 bits PSE and PGE, %cr4 is written after each bit is
set. Remove the redundant write.
No functional changes.
[ bp: Massage. ]
Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/20250715181709.1040-1-khaliidcaliy@gmail.com
---
arch/x86/kernel/head_64.S | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 3e9b3a3..5c4be47 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -224,11 +224,7 @@ SYM_INNER_LABEL(common_startup_64, SYM_L_LOCAL)
/* Even if ignored in long mode, set PSE uniformly on all logical CPUs. */
btsl $X86_CR4_PSE_BIT, %ecx
- movq %rcx, %cr4
-
- /*
- * Set CR4.PGE to re-enable global translations.
- */
+ /* Set CR4.PGE to re-enable global translations. */
btsl $X86_CR4_PGE_BIT, %ecx
movq %rcx, %cr4
next prev parent reply other threads:[~2025-07-15 19:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 18:16 [PATCH v3] x86/boot: Avoid writing to cr4 twice " Khalid Ali
2025-07-15 18:45 ` Nikolay Borisov
2025-07-15 19:05 ` tip-bot2 for Khalid Ali [this message]
2025-07-15 20:30 ` H. Peter Anvin
2025-07-15 20:31 ` H. Peter Anvin
2025-07-15 21:21 ` Andrew Cooper
2025-07-16 1:45 ` Borislav Petkov
2025-07-16 9:07 ` Khalid Ali
2025-07-16 13:27 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=175260632075.406.7445047355425559021.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=khaliidcaliy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=nik.borisov@suse.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®