[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1453531828-19291-1-git-send-email-kuleshovmail@gmail.com>
Date: Sat, 23 Jan 2016 12:50:28 +0600
From: Alexander Kuleshov <kuleshovmail@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>, "H . Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...e.de>,
Denys Vlasenko <dvlasenk@...hat.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>, x86@...nel.org,
linux-kernel@...r.kernel.org,
Alexander Kuleshov <kuleshovmail@...il.com>
Subject: [PATCH] x86/head_64.S: do not use temporary register to check alignment
We are using temporary %rax register during checking of kernel address
alignment. We can ged rid of it since testl instruction is safe and does
not change value of the rbp register.
Signed-off-by: Alexander Kuleshov <kuleshovmail@...il.com>
Suggested-by: Brian Gerst <brgerst@...il.com>
---
arch/x86/kernel/head_64.S | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index ffdc0e8..7c21029 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -76,9 +76,7 @@ startup_64:
subq $_text - __START_KERNEL_map, %rbp
/* Is the address not 2M aligned? */
- movq %rbp, %rax
- andl $~PMD_PAGE_MASK, %eax
- testl %eax, %eax
+ testl $~PMD_PAGE_MASK, %ebp
jnz bad_address
/*
--
2.7.0.25.gfc10eb5
Powered by blists - more mailing lists