public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] only call the c function set_bios_mode if the value CONFIG_X86_64 is set.
@ 2022-02-19 20:39 Hans Weber
  2022-02-19 20:44 ` David Laight
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Weber @ 2022-02-19 20:39 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Hans Weber

Signed-off-by: Hans Weber <hwe.kernel@gmail.com>
---
 arch/x86/boot/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c
index e3add857c2c9..e4df8ff1e228 100644
--- a/arch/x86/boot/main.c
+++ b/arch/x86/boot/main.c
@@ -102,14 +102,12 @@ static void query_ist(void)
  */
 static void set_bios_mode(void)
 {
-#ifdef CONFIG_X86_64
 	struct biosregs ireg;
 
 	initregs(&ireg);
 	ireg.ax = 0xec00;
 	ireg.bx = 2;
 	intcall(0x15, &ireg, NULL);
-#endif
 }
 
 static void init_heap(void)
@@ -152,7 +150,9 @@ void main(void)
 	}
 
 	/* Tell the BIOS what CPU mode we intend to run in. */
+#ifdef CONFIG_X86_64
 	set_bios_mode();
+#endif
 
 	/* Detect memory layout */
 	detect_memory();
-- 
2.30.2


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

* [PATCH] only call the c function set_bios_mode if the value CONFIG_X86_64 is set.
@ 2022-02-19 20:42 Hans Weber
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Weber @ 2022-02-19 20:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: Hans Weber

Signed-off-by: Hans Weber <hwe.kernel@gmail.com>
---
 arch/x86/boot/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c
index e3add857c2c9..e4df8ff1e228 100644
--- a/arch/x86/boot/main.c
+++ b/arch/x86/boot/main.c
@@ -102,14 +102,12 @@ static void query_ist(void)
  */
 static void set_bios_mode(void)
 {
-#ifdef CONFIG_X86_64
 	struct biosregs ireg;
 
 	initregs(&ireg);
 	ireg.ax = 0xec00;
 	ireg.bx = 2;
 	intcall(0x15, &ireg, NULL);
-#endif
 }
 
 static void init_heap(void)
@@ -152,7 +150,9 @@ void main(void)
 	}
 
 	/* Tell the BIOS what CPU mode we intend to run in. */
+#ifdef CONFIG_X86_64
 	set_bios_mode();
+#endif
 
 	/* Detect memory layout */
 	detect_memory();
-- 
2.30.2


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

* RE: [PATCH] only call the c function set_bios_mode if the value CONFIG_X86_64 is set.
  2022-02-19 20:39 Hans Weber
@ 2022-02-19 20:44 ` David Laight
  0 siblings, 0 replies; 3+ messages in thread
From: David Laight @ 2022-02-19 20:44 UTC (permalink / raw)
  To: 'Hans Weber', torvalds@evo.osdl.org; +Cc: linux-kernel@vger.kernel.org

From: Hans Weber
> Sent: 19 February 2022 20:40
> 
> Signed-off-by: Hans Weber <hwe.kernel@gmail.com>
> ---
>  arch/x86/boot/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c
> index e3add857c2c9..e4df8ff1e228 100644
> --- a/arch/x86/boot/main.c
> +++ b/arch/x86/boot/main.c
> @@ -102,14 +102,12 @@ static void query_ist(void)
>   */
>  static void set_bios_mode(void)
>  {
> -#ifdef CONFIG_X86_64
>  	struct biosregs ireg;
> 
>  	initregs(&ireg);
>  	ireg.ax = 0xec00;
>  	ireg.bx = 2;
>  	intcall(0x15, &ireg, NULL);
> -#endif
>  }
> 
>  static void init_heap(void)
> @@ -152,7 +150,9 @@ void main(void)
>  	}
> 
>  	/* Tell the BIOS what CPU mode we intend to run in. */
> +#ifdef CONFIG_X86_64
>  	set_bios_mode();
> +#endif

That should make absolutely no difference.
The empty static function will be inlined and thus discarded.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


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

end of thread, other threads:[~2022-02-19 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-19 20:42 [PATCH] only call the c function set_bios_mode if the value CONFIG_X86_64 is set Hans Weber
  -- strict thread matches above, loose matches on Subject: below --
2022-02-19 20:39 Hans Weber
2022-02-19 20:44 ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox