Split out screen_info from tty.h
PATCH 1/1 Split out screen_info from tty.h
This makes it possible for boot code to use screen_info without dragging in all of tty.h.
---
commit 24f834330f9b3b9d07e3d632a55a98fc33e54dad
tree 6a75aad4b5e927cb455badaf7b676e552d9570fc
parent e60e288822de60b794544c76c20f9dd2c9c5c22c
author Brian Gerst <[email protected]> Wed, 28 Dec 2005 15:45:44 -0500 committer Brian Gerst <[email protected]> Wed, 28 Dec 2005 15:45:44 -0500
arch/i386/boot/compressed/misc.c | 2 - arch/x86_64/boot/compressed/misc.c | 2 - arch/x86_64/boot/compressed/miscsetup.h | 39 ---------------- include/linux/screen_info.h | 77 +++++++++++++++++++++++++++++++ include/linux/tty.h | 72 ----------------------------- 5 files changed, 80 insertions(+), 112 deletions(-)
arch/i386/boot/compressed/misc.c +1 -1
@@ -11,7 +11,7 @@#include <linux/linkage.h> #include <linux/vmalloc.h> -#include <linux/tty.h> +#include <linux/screen_info.h> #include <asm/io.h> #include <asm/page.h>
arch/x86_64/boot/compressed/misc.c +1 -1
@@ -9,7 +9,7 @@* High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 */ -#include "miscsetup.h" +#include <linux/screen_info.h> #include <asm/io.h> #include <asm/page.h>
arch/x86_64/boot/compressed/miscsetup.h deleted +0 -39
@@ -1,39 +0,0 @@ -#define NULL 0 -//typedef unsigned int size_t; - - -struct screen_info { -unsigned char orig_x;/* 0x00 */ -unsigned char orig_y;/* 0x01 */ -unsigned short dontuse1;/* 0x02 -- EXT_MEM_K sits here */ -unsigned short orig_video_page;/* 0x04 */ -unsigned char orig_video_mode;/* 0x06 */ -unsigned char orig_video_cols;/* 0x07 */ -unsigned short unused2;/* 0x08 */ -unsigned short orig_video_ega_bx;/* 0x0a */ -unsigned short unused3;/* 0x0c */ -unsigned char orig_video_lines;/* 0x0e */ -unsigned char orig_video_isVGA;/* 0x0f */ -unsigned short orig_video_points;/* 0x10 */ - -/* VESA graphic mode -- linear frame buffer */ -unsigned short lfb_width;/* 0x12 */ -unsigned short lfb_height;/* 0x14 */ -unsigned short lfb_depth;/* 0x16 */ -unsigned long lfb_base;/* 0x18 */ -unsigned long lfb_size;/* 0x1c */ -unsigned short dontuse2, dontuse3;/* 0x20 -- CL_MAGIC and CL_OFFSET here */ -unsigned short lfb_linelength;/* 0x24 */ -unsigned char red_size;/* 0x26 */ -unsigned char red_pos;/* 0x27 */ -unsigned char green_size;/* 0x28 */ -unsigned char green_pos;/* 0x29 */ -unsigned char blue_size;/* 0x2a */ -unsigned char blue_pos;/* 0x2b */ -unsigned char rsvd_size;/* 0x2c */ -unsigned char rsvd_pos;/* 0x2d */ -unsigned short vesapm_seg;/* 0x2e */ -unsigned short vesapm_off;/* 0x30 */ -unsigned short pages;/* 0x32 */ -/* 0x34 -- 0x3f reserved for future expansion */ -};
include/linux/screen_info.h new file +77 -0
77 lines not on this page · raw message
include/linux/tty.h +1 -71
84 lines not on this page · raw message
Quoted 2 lines · Brian Gerst
This makes it possible for boot code to use
screen_infowithout dragging in all oftty.h.
Why is that a problem? Introducing yet another .h that developers have to remember and use appropiately has a cost, so... and I see no changes except for different #include lines in your patch.
Signature · 4 lines
Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
Quoted 7 lines · Horst von Brand
Quoted 2 lines · Brian Gerst
This makes it possible for boot code to use
screen_infowithout dragging in all oftty.h.Why is that a problem? Introducing yet another .h that developers have to remember and use appropiately has a cost, so... and I see no changes except for different #include lines in your patch.
x86_64 carried a copy of screen_info in miscsetup.h which was out of date with the master copy in tty.h. It couldn't include the full tty.h because it is compiling in 32-bit mode (causes warnings from unrelated junk in tty.h). Splitting it out means that x86_64 can get the bare minimum it needs to compile the boot loader while having the definition in one place.
--
Brian Gerst