linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: remove superfluous initialisation in boot code.
@ 2008-04-06 12:47 Alexander van Heukelum
  2008-04-07  7:46 ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander van Heukelum @ 2008-04-06 12:47 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar; +Cc: LKML, heukelum

x86: remove superfluous initialisation in boot code.

In arch/x86/boot/compressed/misc.c, the variable vidmem is
the only variable that ends up in de data segment. It's also
superfluous, because the first thing the code does is:

	if (RM_SCREEN_INFO.orig_video_mode == 7) {
		vidmem = (char *) 0xb0000;
		vidport = 0x3b4;
	} else {
		vidmem = (char *) 0xb8000;
		vidport = 0x3d4;
	}

This patch removes the initialisation.

---

Tested on qemu (i386 and x86_64). The boot messages still
appear as usual:

Decompressing Linux... Parsing ELF... done.
Booting the kernel.

Greetings,
	Alexander

 arch/x86/boot/compressed/misc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 9470a05..dad4e69 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -223,7 +223,7 @@ static memptr free_mem_end_ptr;
 #define HEAP_SIZE             0x4000
 #endif
 
-static char *vidmem = (char *)0xb8000;
+static char *vidmem;
 static int vidport;
 static int lines, cols;
 

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

* Re: [PATCH] x86: remove superfluous initialisation in boot code.
  2008-04-06 12:47 [PATCH] x86: remove superfluous initialisation in boot code Alexander van Heukelum
@ 2008-04-07  7:46 ` Ingo Molnar
  2008-04-07  9:13   ` Alexander van Heukelum
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2008-04-07  7:46 UTC (permalink / raw)
  To: Alexander van Heukelum; +Cc: H. Peter Anvin, LKML, heukelum


* Alexander van Heukelum <heukelum@mailshack.com> wrote:

> --- a/arch/x86/boot/compressed/misc.c
> +++ b/arch/x86/boot/compressed/misc.c
> @@ -223,7 +223,7 @@ static memptr free_mem_end_ptr;
>  #define HEAP_SIZE             0x4000
>  #endif
>  
> -static char *vidmem = (char *)0xb8000;
> +static char *vidmem;
>  static int vidport;

thanks, applied. (Btw., you forgot your signoff line - not a big deal 
for a small fix like this but it's best to always include it for patches 
you'd like to see go upstream.)

	Ingo

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

* Re: [PATCH] x86: remove superfluous initialisation in boot code.
  2008-04-07  7:46 ` Ingo Molnar
@ 2008-04-07  9:13   ` Alexander van Heukelum
  2008-04-07 10:00     ` (no subject) zhenwenxu
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander van Heukelum @ 2008-04-07  9:13 UTC (permalink / raw)
  To: Ingo Molnar, Alexander van Heukelum; +Cc: H. Peter Anvin, LKML


On Mon, 7 Apr 2008 09:46:14 +0200, "Ingo Molnar" <mingo@elte.hu> said:
> 
> * Alexander van Heukelum <heukelum@mailshack.com> wrote:
> 
> > --- a/arch/x86/boot/compressed/misc.c
> > +++ b/arch/x86/boot/compressed/misc.c
> > @@ -223,7 +223,7 @@ static memptr free_mem_end_ptr;
> >  #define HEAP_SIZE             0x4000
> >  #endif
> >  
> > -static char *vidmem = (char *)0xb8000;
> > +static char *vidmem;
> >  static int vidport;
> 
> thanks, applied. (Btw., you forgot your signoff line - not a big deal 
> for a small fix like this but it's best to always include it for patches 
> you'd like to see go upstream.)

Hmm... I knew I had forgotten something. So I did another round of tests
to see if it was working correctly :-/.

If you like, you can add:
Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>

Greetings,
    Alexander

> 	Ingo
-- 
  Alexander van Heukelum
  heukelum@fastmail.fm

-- 
http://www.fastmail.fm - And now for something completely different…


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

* (no subject)
  2008-04-07  9:13   ` Alexander van Heukelum
@ 2008-04-07 10:00     ` zhenwenxu
  0 siblings, 0 replies; 4+ messages in thread
From: zhenwenxu @ 2008-04-07 10:00 UTC (permalink / raw)
  To: linux-kernel

unsubscribe linux-kernel

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

end of thread, other threads:[~2008-04-07 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-06 12:47 [PATCH] x86: remove superfluous initialisation in boot code Alexander van Heukelum
2008-04-07  7:46 ` Ingo Molnar
2008-04-07  9:13   ` Alexander van Heukelum
2008-04-07 10:00     ` (no subject) zhenwenxu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).