diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 19:15:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 19:15:14 -0400 |
commit | 9b29e8228a5c2a169436a1a90a60b1f88cb35cd1 (patch) | |
tree | c82a836f94c0e9f3d57df1558d29a37129cd8547 /arch/x86/mm | |
parent | bec706838ec2f9c8c2b99e88a1270d7cba159b06 (diff) | |
parent | 0b8c3d5ab000c22889af7f9409799a6cdc31a2b2 (diff) |
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Clear TS in irq_ts_save() when in an atomic section
x86: Detect use of extended APIC ID for AMD CPUs
x86: memtest: remove 64-bit division
x86, UV: Fix macros for multiple coherency domains
x86: Fix non-lazy GS handling in sys_vm86()
x86: Add quirk for reboot stalls on a Dell Optiplex 360
x86: Fix UV BAU activation descriptor init
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/memtest.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c index 605c8be06217..c0bedcd10f97 100644 --- a/arch/x86/mm/memtest.c +++ b/arch/x86/mm/memtest.c | |||
@@ -40,23 +40,23 @@ static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad) | |||
40 | 40 | ||
41 | static void __init memtest(u64 pattern, u64 start_phys, u64 size) | 41 | static void __init memtest(u64 pattern, u64 start_phys, u64 size) |
42 | { | 42 | { |
43 | u64 i, count; | 43 | u64 *p; |
44 | u64 *start; | 44 | void *start, *end; |
45 | u64 start_bad, last_bad; | 45 | u64 start_bad, last_bad; |
46 | u64 start_phys_aligned; | 46 | u64 start_phys_aligned; |
47 | size_t incr; | 47 | size_t incr; |
48 | 48 | ||
49 | incr = sizeof(pattern); | 49 | incr = sizeof(pattern); |
50 | start_phys_aligned = ALIGN(start_phys, incr); | 50 | start_phys_aligned = ALIGN(start_phys, incr); |
51 | count = (size - (start_phys_aligned - start_phys))/incr; | ||
52 | start = __va(start_phys_aligned); | 51 | start = __va(start_phys_aligned); |
52 | end = start + size - (start_phys_aligned - start_phys); | ||
53 | start_bad = 0; | 53 | start_bad = 0; |
54 | last_bad = 0; | 54 | last_bad = 0; |
55 | 55 | ||
56 | for (i = 0; i < count; i++) | 56 | for (p = start; p < end; p++) |
57 | start[i] = pattern; | 57 | *p = pattern; |
58 | for (i = 0; i < count; i++, start++, start_phys_aligned += incr) { | 58 | for (p = start; p < end; p++, start_phys_aligned += incr) { |
59 | if (*start == pattern) | 59 | if (*p == pattern) |
60 | continue; | 60 | continue; |
61 | if (start_phys_aligned == last_bad + incr) { | 61 | if (start_phys_aligned == last_bad + incr) { |
62 | last_bad += incr; | 62 | last_bad += incr; |