Hi Linus,
Please pull:
git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup.git
master
This patch removes all uses of magic macros to access the former
zeropage, now the boot_params structure, as well as the screen_info
structure. The equivalent (pre-x86-merge) of the boot_params patch
has been in -mm since shortly after 2.6.22.
A minor note: the video mode number 0x6A was officially assigned by
VESA; the only VESA standard 7-bit video mode number ever assigned.
H. Peter Anvin (2):
[x86] remove uses of magic macros for boot_params access
Remove magic macros for screen_info structure members
arch/arm/mach-footbridge/cats-hw.c |6 ++--
arch/x86/boot/Makefile |1 +
arch/x86/kernel/e820_64.c | 19 ++
arch/x86/kernel/early_printk.c | 15 +++-
arch/x86/kernel/efi_32.c | 15 +---
arch/x86/kernel/head64.c | 20 ++
arch/x86/kernel/setup64.c |4 +-
arch/x86/kernel/setup_32.c | 67 +++
arch/x86/kernel/setup_64.c | 51 ++-
arch/x86/mach-default/setup.c | 12 ---
arch/x86/mach-visws/setup.c|2 +-
arch/x86/mach-voyager/setup.c | 14 ---
arch/x86/mm/discontig_32.c |5 ++-
arch/x86/xen/enlighten.c |7 ++--
drivers/lguest/lguest.c|4 ++-
drivers/video/console/dummycon.c |4 +-
drivers/video/console/vgacon.c | 51 ++-
drivers/video/intelfb/intelfbdrv.c |5 ++-
drivers/video/vga16fb.c|2 +-
include/asm-x86/Kbuild |1 -
include/asm-x86/bootparam.h|3 ++
include/asm-x86/bootsetup.h| 40 -
include/asm-x86/setup_32.h | 29 ---
include/asm-x86/setup_64.h | 13 +++
include/linux/screen_info.h|9 -
25 files changed, 173 insertions(+), 226 deletions(-)
delete mode 100644 include/asm-x86/bootsetup.h
[Log messages and full diffs follow]
commit 3ea335100014785fd2518461705654b200e58d00
Author: H. Peter Anvin <[EMAIL PROTECTED]>
Date: Tue Oct 16 22:36:04 2007 -0700
Remove magic macros for screen_info structure members
Stop using magic macros for screen_info structure members.
Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
diff --git a/arch/arm/mach-footbridge/cats-hw.c
b/arch/arm/mach-footbridge/cats-hw.c
index ef6ccc8..c261472 100644
--- a/arch/arm/mach-footbridge/cats-hw.c
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -78,9 +78,9 @@ static void __init
fixup_cats(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
- ORIG_VIDEO_LINES = 25;
- ORIG_VIDEO_POINTS = 16;
- ORIG_Y = 24;
+ screen_info.orig_video_lines = 25;
+ screen_info.orig_video_points = 16;
+ screen_info.orig_y = 24;
}
MACHINE_START(CATS, "Chalice-CATS")
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
index d9315d9..b63860f 100644
--- a/drivers/video/console/dummycon.c
+++ b/drivers/video/console/dummycon.c
@@ -18,8 +18,8 @@
*/
#if defined(__arm__)
-#define DUMMY_COLUMNS ORIG_VIDEO_COLS
-#define DUMMY_ROWS ORIG_VIDEO_LINES
+#define DUMMY_COLUMNS screen_info.orig_video_cols
+#define DUMMY_ROWS screen_info.orig_video_lines
#elif defined(__hppa__)
/* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */
#define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index a569871..f65bcd3 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -362,7 +362,7 @@ static const char *vgacon_startup(void)
u16 saved1, saved2;
volatile u16 *p;
- if (ORIG_VIDEO_ISVGA == VIDEO_TYPE_VLFB) {
+ if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB) {
no_vga:
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
@@ -373,28 +373,29 @@ static const char *vgacon_startup(void)
}
/* boot_params.screen_info initialized? */
- if ((ORIG_VIDEO_MODE == 0) &&
- (ORIG_VIDEO_LINES == 0) &&
- (ORIG_VIDEO_COLS == 0))
+ if ((screen_info.orig_video_mode == 0) &&
+ (screen_info.orig_video_lines == 0) &&
+ (screen_info.orig_video_cols == 0))
goto no_vga;
/* VGA16 modes are not handled by VGACON */
- if ((ORIG_VIDEO_MODE == 0x0D) ||/* 320x200/4 */
- (ORIG_VIDEO_MODE == 0x0E) ||/* 640x200/4 */
- (ORIG_VIDEO_MODE == 0x10) ||/* 640x350/4 */
- (ORIG_VIDEO_MODE == 0x12) ||/* 640x480/4 */
- (ORIG_VIDEO_MODE == 0x6A)) /* 800x600/4, 0x6A is very common */
+ if ((screen_info.orig_video_mode == 0x0D) ||/* 320x200/4 */
+ (screen_info.orig_video_mode == 0x0