From 48c7ae674f03e56c78ff42c6796a36e90db67874 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 11 Jul 2007 12:18:35 -0700 Subject: Make struct boot_params a real structure, and remove obsolete fields Make struct boot_params a real structure, and remove the handling of some obsolete fields, in particular hd*_info, which was only used by the ST-506 driver, and likely to be wrong for that driver on any modern BIOS. Signed-off-by: H. Peter Anvin Signed-off-by: Linus Torvalds --- arch/i386/kernel/setup.c | 12 +----- include/asm-i386/bootparam.h | 85 ++++++++++++++++++++++++++++++++++++++++++ include/asm-i386/setup.h | 10 +++-- include/asm-x86_64/boot.h | 16 +------- include/asm-x86_64/bootparam.h | 1 + 5 files changed, 94 insertions(+), 30 deletions(-) create mode 100644 include/asm-i386/bootparam.h create mode 100644 include/asm-x86_64/bootparam.h diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 698c24fe482e..2d61e65eeb50 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -102,19 +102,10 @@ static unsigned int highmem_pages = -1; /* * Setup options */ -struct drive_info_struct { char dummy[32]; } drive_info; -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || \ - defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE) -EXPORT_SYMBOL(drive_info); -#endif struct screen_info screen_info; EXPORT_SYMBOL(screen_info); struct apm_info apm_info; EXPORT_SYMBOL(apm_info); -struct sys_desc_table_struct { - unsigned short length; - unsigned char table[0]; -}; struct edid_info edid_info; EXPORT_SYMBOL_GPL(edid_info); struct ist_info ist_info; @@ -134,7 +125,7 @@ unsigned long saved_videomode; static char __initdata command_line[COMMAND_LINE_SIZE]; -unsigned char __initdata boot_params[PARAM_SIZE]; +struct boot_params __initdata boot_params; #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) struct edd edd; @@ -528,7 +519,6 @@ void __init setup_arch(char **cmdline_p) #endif ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); - drive_info = DRIVE_INFO; screen_info = SCREEN_INFO; edid_info = EDID_INFO; apm_info.bios = APM_BIOS_INFO; diff --git a/include/asm-i386/bootparam.h b/include/asm-i386/bootparam.h new file mode 100644 index 000000000000..427d8652bfde --- /dev/null +++ b/include/asm-i386/bootparam.h @@ -0,0 +1,85 @@ +#ifndef _ASM_BOOTPARAM_H +#define _ASM_BOOTPARAM_H + +#include +#include +#include +#include +#include +#include