Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99504
b: refs/heads/master
c: 33af903
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Herrmann authored and Ingo Molnar committed Jun 24, 2008
1 parent 8888e1e commit da7bb37
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 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: 64fe44c38bbdfab4fe052029058ce5fe9804de68
refs/heads/master: 33af9039cbf629041da2bfa0cf451208391a1ec3
30 changes: 11 additions & 19 deletions trunk/arch/x86/mm/pat.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,32 +281,24 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
/* Search for existing mapping that overlaps the current range */
where = NULL;
list_for_each_entry(entry, &memtype_list, nd) {
if (entry->start >= end) {
if (end <= entry->start) {
where = entry->nd.prev;
break;
}

if (start <= entry->start && end >= entry->start) {
} else if (start <= entry->start) { /* end > entry->start */
err = chk_conflict(new, entry, new_type);
if (err) {
break;
if (!err) {
dprintk("Overlap at 0x%Lx-0x%Lx\n",
entry->start, entry->end);
where = entry->nd.prev;
}

dprintk("Overlap at 0x%Lx-0x%Lx\n",
entry->start, entry->end);
where = entry->nd.prev;
break;
}

if (start < entry->end) {
} else if (start < entry->end) { /* start > entry->start */
err = chk_conflict(new, entry, new_type);
if (err) {
break;
if (!err) {
dprintk("Overlap at 0x%Lx-0x%Lx\n",
entry->start, entry->end);
where = &entry->nd;
}

dprintk("Overlap at 0x%Lx-0x%Lx\n",
entry->start, entry->end);
where = &entry->nd;
break;
}
}
Expand Down

0 comments on commit da7bb37

Please sign in to comment.