diff options
| author | Borislav Petkov <bp@suse.de> | 2013-04-08 11:57:44 -0400 |
|---|---|---|
| committer | Borislav Petkov <bp@suse.de> | 2013-04-16 05:50:50 -0400 |
| commit | 55a36b65ee7107d6bb557c96fd202c4e90164542 (patch) | |
| tree | daaef5b7252960ee3d2babb7e7ae233060c17f31 | |
| parent | 7d7dc116e56c8a1ba4beb36d06a77a48fe5f750b (diff) | |
x86: Fold-in trivial check_config function
Fold it into its single call site. No functionality change.
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1365436666-9837-3-git-send-email-bp@alien8.de
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| -rw-r--r-- | arch/x86/kernel/cpu/bugs.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index c59635ecbbb8..4112be9a4659 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c | |||
| @@ -81,21 +81,6 @@ static void __init check_fpu(void) | |||
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | /* | ||
| 85 | * Check whether we are able to run this kernel safely on SMP. | ||
| 86 | * | ||
| 87 | * - i386 is no longer supported. | ||
| 88 | * - In order to run on anything without a TSC, we need to be | ||
| 89 | * compiled for a i486. | ||
| 90 | */ | ||
| 91 | |||
| 92 | static void __init check_config(void) | ||
| 93 | { | ||
| 94 | if (boot_cpu_data.x86 < 4) | ||
| 95 | panic("Kernel requires i486+ for 'invlpg' and other features"); | ||
| 96 | } | ||
| 97 | |||
| 98 | |||
| 99 | void __init check_bugs(void) | 84 | void __init check_bugs(void) |
| 100 | { | 85 | { |
| 101 | identify_boot_cpu(); | 86 | identify_boot_cpu(); |
| @@ -103,7 +88,17 @@ void __init check_bugs(void) | |||
| 103 | pr_info("CPU: "); | 88 | pr_info("CPU: "); |
| 104 | print_cpu_info(&boot_cpu_data); | 89 | print_cpu_info(&boot_cpu_data); |
| 105 | #endif | 90 | #endif |
| 106 | check_config(); | 91 | |
| 92 | /* | ||
| 93 | * Check whether we are able to run this kernel safely on SMP. | ||
| 94 | * | ||
| 95 | * - i386 is no longer supported. | ||
| 96 | * - In order to run on anything without a TSC, we need to be | ||
| 97 | * compiled for a i486. | ||
| 98 | */ | ||
| 99 | if (boot_cpu_data.x86 < 4) | ||
| 100 | panic("Kernel requires i486+ for 'invlpg' and other features"); | ||
| 101 | |||
| 107 | init_utsname()->machine[1] = | 102 | init_utsname()->machine[1] = |
| 108 | '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86); | 103 | '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86); |
| 109 | alternative_instructions(); | 104 | alternative_instructions(); |
