All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] x86: loadflags cleanups
@ 2015-01-31  6:32 Alexander Kuleshov
  2015-01-31  6:32 ` [PATCH v2 1/2] x86: use already defined KEEP_SEGMENTS macro from bootparam.h Alexander Kuleshov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alexander Kuleshov @ 2015-01-31  6:32 UTC (permalink / raw)
  To: Thomas Gleixner, H. Peter Anvin, Martin Mares, Ingo Molnar
  Cc: x86, linux-kernel

There are a couple macros in the arch/x86/include/uapi/asm/bootparam.h
for checking loadflags bits. Let's use it instead of shifting bits

Alexander Kuleshov (2):
  x86: use already defined KEEP_SEGMENTS macro from bootparam.h
  x86/boot: use already defined KEEP_SEGMENTS macro in head_{32,64}.S

 arch/x86/boot/compressed/head_32.S | 5 +++--
 arch/x86/boot/compressed/head_64.S | 3 ++-
 arch/x86/kernel/head_32.S          | 7 ++++---
 3 files changed, 9 insertions(+), 6 deletions(-)

-- 
2.3.0-rc1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] x86: use already defined KEEP_SEGMENTS macro from bootparam.h
  2015-01-31  6:32 [PATCH v2 0/2] x86: loadflags cleanups Alexander Kuleshov
@ 2015-01-31  6:32 ` Alexander Kuleshov
  2015-01-31  6:33 ` [PATCH v2 2/2] x86/boot: use already defined KEEP_SEGMENTS macro in head_{32,64}.S Alexander Kuleshov
  2015-02-18 22:06 ` [PATCH v2 0/2] x86: loadflags cleanups Ingo Molnar
  2 siblings, 0 replies; 5+ messages in thread
From: Alexander Kuleshov @ 2015-01-31  6:32 UTC (permalink / raw)
  To: Thomas Gleixner, H. Peter Anvin, Martin Mares, Ingo Molnar
  Cc: x86, linux-kernel, Alexander Kuleshov

There is already defined macro KEEP_SEGMENTS in the
bootparam.h, let's use it instead of shifting bits

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 arch/x86/kernel/head_32.S | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index f36bd42..fba3990 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -22,7 +22,8 @@
 #include <asm/cpufeature.h>
 #include <asm/percpu.h>
 #include <asm/nops.h>
-
+#include <asm/bootmparam.h>
+	
 /* Physical address */
 #define pa(X) ((X) - __PAGE_OFFSET)
 
@@ -89,8 +90,8 @@ ENTRY(startup_32)
 	movl pa(stack_start),%ecx
 	
 	/* test KEEP_SEGMENTS flag to see if the bootloader is asking
-		us to not reload segments */
-	testb $(1<<6), BP_loadflags(%esi)
+	   us to not reload segments */
+	testb $KEEP_SEGMENTS, BP_loadflags(%esi)
 	jnz 2f
 
 /*
-- 
2.3.0-rc1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] x86/boot: use already defined KEEP_SEGMENTS macro in head_{32,64}.S
  2015-01-31  6:32 [PATCH v2 0/2] x86: loadflags cleanups Alexander Kuleshov
  2015-01-31  6:32 ` [PATCH v2 1/2] x86: use already defined KEEP_SEGMENTS macro from bootparam.h Alexander Kuleshov
@ 2015-01-31  6:33 ` Alexander Kuleshov
  2015-02-18 22:06 ` [PATCH v2 0/2] x86: loadflags cleanups Ingo Molnar
  2 siblings, 0 replies; 5+ messages in thread
From: Alexander Kuleshov @ 2015-01-31  6:33 UTC (permalink / raw)
  To: Thomas Gleixner, H. Peter Anvin, Martin Mares, Ingo Molnar
  Cc: x86, linux-kernel, Alexander Kuleshov

There is already defined macro KEEP_SEGMENTS in the
bootparam.h, let's use it instead of shifting bits

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 arch/x86/boot/compressed/head_32.S | 5 +++--
 arch/x86/boot/compressed/head_64.S | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 1d7fbbc..11e549d 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -29,7 +29,8 @@
 #include <asm/page_types.h>
 #include <asm/boot.h>
 #include <asm/asm-offsets.h>
-
+#include <asm/bootparam.h>
+	
 	__HEAD
 ENTRY(startup_32)
 #ifdef CONFIG_EFI_STUB
@@ -102,7 +103,7 @@ preferred_addr:
 	 * Test KEEP_SEGMENTS flag to see if the bootloader is asking
 	 * us to not reload segments
 	 */
-	testb	$(1<<6), BP_loadflags(%esi)
+	testb	$KEEP_SEGMENTS, BP_loadflags(%esi)
 	jnz	1f
 
 	cli
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 6b1766c..90c1521 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -31,6 +31,7 @@
 #include <asm/msr.h>
 #include <asm/processor-flags.h>
 #include <asm/asm-offsets.h>
+#include <asm/bootparam.h>
 
 	__HEAD
 	.code32
@@ -46,7 +47,7 @@ ENTRY(startup_32)
 	 * Test KEEP_SEGMENTS flag to see if the bootloader is asking
 	 * us to not reload segments
 	 */
-	testb $(1<<6), BP_loadflags(%esi)
+	testb $KEEP_SEGMENTS, BP_loadflags(%esi)
 	jnz 1f
 
 	cli
-- 
2.3.0-rc1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/2] x86: loadflags cleanups
  2015-01-31  6:32 [PATCH v2 0/2] x86: loadflags cleanups Alexander Kuleshov
  2015-01-31  6:32 ` [PATCH v2 1/2] x86: use already defined KEEP_SEGMENTS macro from bootparam.h Alexander Kuleshov
  2015-01-31  6:33 ` [PATCH v2 2/2] x86/boot: use already defined KEEP_SEGMENTS macro in head_{32,64}.S Alexander Kuleshov
@ 2015-02-18 22:06 ` Ingo Molnar
  2 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2015-02-18 22:06 UTC (permalink / raw)
  To: Alexander Kuleshov
  Cc: Thomas Gleixner, H. Peter Anvin, Martin Mares, Ingo Molnar, x86,
	linux-kernel


* Alexander Kuleshov <kuleshovmail@gmail.com> wrote:

> There are a couple macros in the arch/x86/include/uapi/asm/bootparam.h
> for checking loadflags bits. Let's use it instead of shifting bits
> 
> Alexander Kuleshov (2):
>   x86: use already defined KEEP_SEGMENTS macro from bootparam.h
>   x86/boot: use already defined KEEP_SEGMENTS macro in head_{32,64}.S
> 
>  arch/x86/boot/compressed/head_32.S | 5 +++--
>  arch/x86/boot/compressed/head_64.S | 3 ++-
>  arch/x86/kernel/head_32.S          | 7 ++++---
>  3 files changed, 9 insertions(+), 6 deletions(-)

I think a single patch would be perfectly fine for a 
cleanup that does the same thing in three files.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 0/2] x86: loadflags cleanups
@ 2015-01-31  6:29 Alexander Kuleshov
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Kuleshov @ 2015-01-31  6:29 UTC (permalink / raw)
  To: Chris Mason; +Cc: Josef Bacik, David Sterba, linux-kernel

There are a couple macros in the arch/x86/include/uapi/asm/bootparam.h
for checking loadflags bits. Let's use it instead of shifting bits

Alexander Kuleshov (2):
  x86: use already defined KEEP_SEGMENTS macro from bootparam.h
  x86/boot: use already defined KEEP_SEGMENTS macro in head_{32,64}.S

 arch/x86/boot/compressed/head_32.S | 5 +++--
 arch/x86/boot/compressed/head_64.S | 3 ++-
 arch/x86/kernel/head_32.S          | 7 ++++---
 3 files changed, 9 insertions(+), 6 deletions(-)

-- 
2.3.0-rc1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-18 22:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-31  6:32 [PATCH v2 0/2] x86: loadflags cleanups Alexander Kuleshov
2015-01-31  6:32 ` [PATCH v2 1/2] x86: use already defined KEEP_SEGMENTS macro from bootparam.h Alexander Kuleshov
2015-01-31  6:33 ` [PATCH v2 2/2] x86/boot: use already defined KEEP_SEGMENTS macro in head_{32,64}.S Alexander Kuleshov
2015-02-18 22:06 ` [PATCH v2 0/2] x86: loadflags cleanups Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2015-01-31  6:29 Alexander Kuleshov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.