diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-19 23:09:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-19 23:09:48 -0500 |
commit | 026f149ca38adf96118d3b5fdba6977797861ce6 (patch) | |
tree | 01b35102bd44c31117d359b02e9c3d042f87322c /arch/x86/mm/memtest.c | |
parent | 11743a1db9956a024b9b75292614e9869abb9ec2 (diff) | |
parent | 20bf062c6575e162ede00308ca3a5714ca112009 (diff) |
Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86/debug changes from Ingo Molnar:
"Two init annotations and a built-in memtest speedup"
* 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/memtest: Shorten time for tests
x86: Convert a few mistaken __cpuinit annotations to __init
x86/EFI: Properly init-annotate BGRT code
Diffstat (limited to 'arch/x86/mm/memtest.c')
-rw-r--r-- | arch/x86/mm/memtest.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c index c80b9fb95734..8dabbed409ee 100644 --- a/arch/x86/mm/memtest.c +++ b/arch/x86/mm/memtest.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/memblock.h> | 9 | #include <linux/memblock.h> |
10 | 10 | ||
11 | static u64 patterns[] __initdata = { | 11 | static u64 patterns[] __initdata = { |
12 | /* The first entry has to be 0 to leave memtest with zeroed memory */ | ||
12 | 0, | 13 | 0, |
13 | 0xffffffffffffffffULL, | 14 | 0xffffffffffffffffULL, |
14 | 0x5555555555555555ULL, | 15 | 0x5555555555555555ULL, |
@@ -110,15 +111,8 @@ void __init early_memtest(unsigned long start, unsigned long end) | |||
110 | return; | 111 | return; |
111 | 112 | ||
112 | printk(KERN_INFO "early_memtest: # of tests: %d\n", memtest_pattern); | 113 | printk(KERN_INFO "early_memtest: # of tests: %d\n", memtest_pattern); |
113 | for (i = 0; i < memtest_pattern; i++) { | 114 | for (i = memtest_pattern-1; i < UINT_MAX; --i) { |
114 | idx = i % ARRAY_SIZE(patterns); | 115 | idx = i % ARRAY_SIZE(patterns); |
115 | do_one_pass(patterns[idx], start, end); | 116 | do_one_pass(patterns[idx], start, end); |
116 | } | 117 | } |
117 | |||
118 | if (idx > 0) { | ||
119 | printk(KERN_INFO "early_memtest: wipe out " | ||
120 | "test pattern from memory\n"); | ||
121 | /* additional test with pattern 0 will do this */ | ||
122 | do_one_pass(0, start, end); | ||
123 | } | ||
124 | } | 118 | } |