aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/Makefile3
-rw-r--r--arch/x86/kernel/check.c12
2 files changed, 6 insertions, 9 deletions
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 31fbcaf3df70..f63a8034fb82 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -35,7 +35,6 @@ obj-y += bootflag.o e820.o
35obj-y += pci-dma.o quirks.o i8237.o topology.o kdebugfs.o 35obj-y += pci-dma.o quirks.o i8237.o topology.o kdebugfs.o
36obj-y += alternative.o i8253.o pci-nommu.o 36obj-y += alternative.o i8253.o pci-nommu.o
37obj-y += tsc.o io_delay.o rtc.o 37obj-y += tsc.o io_delay.o rtc.o
38obj-y += check.o
39 38
40obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o 39obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o
41obj-y += process.o 40obj-y += process.o
@@ -105,6 +104,8 @@ microcode-$(CONFIG_MICROCODE_INTEL) += microcode_intel.o
105microcode-$(CONFIG_MICROCODE_AMD) += microcode_amd.o 104microcode-$(CONFIG_MICROCODE_AMD) += microcode_amd.o
106obj-$(CONFIG_MICROCODE) += microcode.o 105obj-$(CONFIG_MICROCODE) += microcode.o
107 106
107obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o
108
108### 109###
109# 64 bit specific files 110# 64 bit specific files
110ifeq ($(CONFIG_X86_64),y) 111ifeq ($(CONFIG_X86_64),y)
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
index 55eed1752b43..2ac0ab71412a 100644
--- a/arch/x86/kernel/check.c
+++ b/arch/x86/kernel/check.c
@@ -11,7 +11,6 @@
11 * remaining free memory in that area and fill it with a distinct 11 * remaining free memory in that area and fill it with a distinct
12 * pattern. 12 * pattern.
13 */ 13 */
14#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
15#define MAX_SCAN_AREAS 8 14#define MAX_SCAN_AREAS 8
16 15
17static int __read_mostly memory_corruption_check = -1; 16static int __read_mostly memory_corruption_check = -1;
@@ -23,7 +22,7 @@ static struct e820entry scan_areas[MAX_SCAN_AREAS];
23static int num_scan_areas; 22static int num_scan_areas;
24 23
25 24
26static int set_corruption_check(char *arg) 25static __init int set_corruption_check(char *arg)
27{ 26{
28 char *end; 27 char *end;
29 28
@@ -33,7 +32,7 @@ static int set_corruption_check(char *arg)
33} 32}
34early_param("memory_corruption_check", set_corruption_check); 33early_param("memory_corruption_check", set_corruption_check);
35 34
36static int set_corruption_check_period(char *arg) 35static __init int set_corruption_check_period(char *arg)
37{ 36{
38 char *end; 37 char *end;
39 38
@@ -43,7 +42,7 @@ static int set_corruption_check_period(char *arg)
43} 42}
44early_param("memory_corruption_check_period", set_corruption_check_period); 43early_param("memory_corruption_check_period", set_corruption_check_period);
45 44
46static int set_corruption_check_size(char *arg) 45static __init int set_corruption_check_size(char *arg)
47{ 46{
48 char *end; 47 char *end;
49 unsigned size; 48 unsigned size;
@@ -115,8 +114,6 @@ void check_for_bios_corruption(void)
115 int i; 114 int i;
116 int corruption = 0; 115 int corruption = 0;
117 116
118 printk("dot\n");
119
120 if (!memory_corruption_check) 117 if (!memory_corruption_check)
121 return; 118 return;
122 119
@@ -134,7 +131,7 @@ void check_for_bios_corruption(void)
134 } 131 }
135 } 132 }
136 133
137 WARN(corruption, KERN_ERR "Memory corruption detected in low memory\n"); 134 WARN_ONCE(corruption, KERN_ERR "Memory corruption detected in low memory\n");
138} 135}
139 136
140static void check_corruption(struct work_struct *dummy); 137static void check_corruption(struct work_struct *dummy);
@@ -161,5 +158,4 @@ static int start_periodic_check_for_corruption(void)
161} 158}
162 159
163module_init(start_periodic_check_for_corruption); 160module_init(start_periodic_check_for_corruption);
164#endif
165 161