Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145803
b: refs/heads/master
c: c969099
h: refs/heads/master
i:
  145801: 11bab0b
  145799: 1271230
v: v3
  • Loading branch information
Andreas Herrmann authored and Ingo Molnar committed Jun 8, 2009
1 parent 5ce1f27 commit ca8a6eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4ed3f04ba9defe22aa729d1646f970f791c03d7
refs/heads/master: c9690998ef48ffefeccb91c70a7739eebdea57f9
14 changes: 7 additions & 7 deletions trunk/arch/x86/mm/memtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad)

static void __init memtest(u64 pattern, u64 start_phys, u64 size)
{
u64 i, count;
u64 *start;
u64 *p;
void *start, *end;
u64 start_bad, last_bad;
u64 start_phys_aligned;
size_t incr;

incr = sizeof(pattern);
start_phys_aligned = ALIGN(start_phys, incr);
count = (size - (start_phys_aligned - start_phys))/incr;
start = __va(start_phys_aligned);
end = start + size - (start_phys_aligned - start_phys);
start_bad = 0;
last_bad = 0;

for (i = 0; i < count; i++)
start[i] = pattern;
for (i = 0; i < count; i++, start++, start_phys_aligned += incr) {
if (*start == pattern)
for (p = start; p < end; p++)
*p = pattern;
for (p = start; p < end; p++, start_phys_aligned += incr) {
if (*p == pattern)
continue;
if (start_phys_aligned == last_bad + incr) {
last_bad += incr;
Expand Down

0 comments on commit ca8a6eb

Please sign in to comment.