Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99485
b: refs/heads/master
c: 77b52b4
h: refs/heads/master
i:
  99483: 7182fec
v: v3
  • Loading branch information
Venki Pallipadi authored and Ingo Molnar committed May 12, 2008
1 parent da2e938 commit 1168139
Show file tree
Hide file tree
Showing 2 changed files with 21 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: 988f7b5789ccf5cfed14c72e28573a49f0cb4809
refs/heads/master: 77b52b4c5c66175553ee59eb43f74366f1e54bde
27 changes: 20 additions & 7 deletions trunk/arch/x86/mm/pat.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ static int nopat(char *str)
early_param("nopat", nopat);
#endif


static int debug_enable;
static int __init pat_debug_setup(char *str)
{
debug_enable = 1;
return 0;
}
__setup("debugpat", pat_debug_setup);

#define dprintk(fmt, arg...) \
do { if (debug_enable) printk(KERN_INFO fmt, ##arg); } while (0)


static u64 __read_mostly boot_pat_state;

enum {
Expand Down Expand Up @@ -279,7 +292,7 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
struct memtype *saved_ptr;

if (parse->start >= end) {
pr_debug("New Entry\n");
dprintk("New Entry\n");
list_add(&new_entry->nd, parse->nd.prev);
new_entry = NULL;
break;
Expand Down Expand Up @@ -329,7 +342,7 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
break;
}

pr_debug("Overlap at 0x%Lx-0x%Lx\n",
dprintk("Overlap at 0x%Lx-0x%Lx\n",
saved_ptr->start, saved_ptr->end);
/* No conflict. Go ahead and add this new entry */
list_add(&new_entry->nd, saved_ptr->nd.prev);
Expand Down Expand Up @@ -381,7 +394,7 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
break;
}

pr_debug(KERN_INFO "Overlap at 0x%Lx-0x%Lx\n",
dprintk("Overlap at 0x%Lx-0x%Lx\n",
saved_ptr->start, saved_ptr->end);
/* No conflict. Go ahead and add this new entry */
list_add(&new_entry->nd, &saved_ptr->nd);
Expand All @@ -403,16 +416,16 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
if (new_entry) {
/* No conflict. Not yet added to the list. Add to the tail */
list_add_tail(&new_entry->nd, &memtype_list);
pr_debug("New Entry\n");
dprintk("New Entry\n");
}

if (ret_type) {
pr_debug(
dprintk(
"reserve_memtype added 0x%Lx-0x%Lx, track %s, req %s, ret %s\n",
start, end, cattr_name(actual_type),
cattr_name(req_type), cattr_name(*ret_type));
} else {
pr_debug(
dprintk(
"reserve_memtype added 0x%Lx-0x%Lx, track %s, req %s\n",
start, end, cattr_name(actual_type),
cattr_name(req_type));
Expand Down Expand Up @@ -453,7 +466,7 @@ int free_memtype(u64 start, u64 end)
current->comm, current->pid, start, end);
}

pr_debug("free_memtype request 0x%Lx-0x%Lx\n", start, end);
dprintk("free_memtype request 0x%Lx-0x%Lx\n", start, end);
return err;
}

Expand Down

0 comments on commit 1168139

Please sign in to comment.