diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-22 06:06:51 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-22 06:06:51 +0200 |
commit | 8b53b57576292b92b27769f9e213df19b6e57786 (patch) | |
tree | cd851ce4fa71b2653f120d7f11a9c6cbcf311b19 /arch/x86/boot | |
parent | ab7e79243746e2a9c5f00243e60108189c44c9eb (diff) | |
parent | 38cc1c3df77c1bb739a4766788eb9fa49f16ffdf (diff) |
Merge branch 'x86/urgent' into x86/pat
Conflicts:
arch/x86/mm/pageattr.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/boot.h | 10 | ||||
-rw-r--r-- | arch/x86/boot/cpu.c | 3 | ||||
-rw-r--r-- | arch/x86/boot/cpucheck.c | 10 | ||||
-rw-r--r-- | arch/x86/boot/main.c | 5 | ||||
-rw-r--r-- | arch/x86/boot/memory.c | 1 |
5 files changed, 16 insertions, 13 deletions
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index a34b9982c7c..cc0ef13fba7 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -24,10 +24,14 @@ #include <linux/edd.h> #include <asm/boot.h> #include <asm/setup.h> +#include "bitops.h" +#include <asm/cpufeature.h> /* Useful macros */ #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) +#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) + extern struct setup_header hdr; extern struct boot_params boot_params; @@ -242,6 +246,12 @@ int cmdline_find_option(const char *option, char *buffer, int bufsize); int cmdline_find_option_bool(const char *option); /* cpu.c, cpucheck.c */ +struct cpu_features { + int level; /* Family, or 64 for x86-64 */ + int model; + u32 flags[NCAPINTS]; +}; +extern struct cpu_features cpu; int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr); int validate_cpu(void); diff --git a/arch/x86/boot/cpu.c b/arch/x86/boot/cpu.c index 92d6fd73dc7..75298fe2edc 100644 --- a/arch/x86/boot/cpu.c +++ b/arch/x86/boot/cpu.c @@ -16,9 +16,6 @@ */ #include "boot.h" -#include "bitops.h" -#include <asm/cpufeature.h> - #include "cpustr.h" static char *cpu_name(int level) diff --git a/arch/x86/boot/cpucheck.c b/arch/x86/boot/cpucheck.c index 7804389ee00..4b9ae7c5674 100644 --- a/arch/x86/boot/cpucheck.c +++ b/arch/x86/boot/cpucheck.c @@ -22,21 +22,13 @@ #ifdef _SETUP # include "boot.h" -# include "bitops.h" #endif #include <linux/types.h> -#include <asm/cpufeature.h> #include <asm/processor-flags.h> #include <asm/required-features.h> #include <asm/msr-index.h> -struct cpu_features { - int level; /* Family, or 64 for x86-64 */ - int model; - u32 flags[NCAPINTS]; -}; - -static struct cpu_features cpu; +struct cpu_features cpu; static u32 cpu_vendor[3]; static u32 err_flags[NCAPINTS]; diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c index 2296164b54d..197421db1af 100644 --- a/arch/x86/boot/main.c +++ b/arch/x86/boot/main.c @@ -73,6 +73,11 @@ static void keyboard_set_repeat(void) */ static void query_ist(void) { + /* Some older BIOSes apparently crash on this call, so filter + it from machines too old to have SpeedStep at all. */ + if (cpu.level < 6) + return; + asm("int $0x15" : "=a" (boot_params.ist_info.signature), "=b" (boot_params.ist_info.command), diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c index 53165c97336..8c3c25f3557 100644 --- a/arch/x86/boot/memory.c +++ b/arch/x86/boot/memory.c @@ -13,7 +13,6 @@ */ #include "boot.h" -#include <linux/kernel.h> #define SMAP 0x534d4150 /* ASCII "SMAP" */ |