x86: remove superfluous initialisation in boot code.
PATCH 1/1 x86: remove superfluous initialisation in boot code.
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(-)
arch/x86/boot/compressed/misc.c +1 -1
@@ -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;
Ingo Molnar
Appliedarch/x86/boot/compressed/misc.c static memptr free_mem_end_ptr; · line 227
Quoted 9 lines · Alexander van Heukelum
arch/x86/boot/compressed/misc.c +1
-1@@ -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
Quoted 9 lines · Ingo Molnar
Quoted 6 lines · Alexander van Heukelum
arch/x86/boot/compressed/misc.c +0
-0@@ -223,7 +223,7 @@ static memptr free_mem_end_ptr;#define HEAP_SIZE 0x4000#endif
Quoted 7 lines
arch/x86/boot/compressed/misc.c static memptr free_mem_end_ptr; · line 227
Quoted 3 lines
arch/x86/boot/compressed/misc.c +1
-1-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:
Greetings,
Alexander
Quoted 1 line
Ingo
Signature · 5 lines
Alexander van Heukelum [email protected] -- http://www.fastmail.fm - And now for something completely different…
(no subject)
unsubscribe linux-kernel