aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm/pat.c
diff options
context:
space:
mode:
authorvenkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>2008-03-18 17:00:25 -0700
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:41:20 +0200
commit6997ab4982a29925e79f72c3a59823cf944c3529 (patch)
treec46234aee452e7b47f315c8b87487e22f2ad4d3d /arch/x86/mm/pat.c
parentb310f381d220b2c6e3fab16e8c6e4ca13eea75b2 (diff)
x86: add PAT related debug prints
Adds debug prints at critical code. Adds enough info in dmesg to allow us to do effective first round of analysis of any issues that may result due to PAT patch series. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pat.c')
-rw-r--r--arch/x86/mm/pat.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 7cc71d86848..57a2af36d6e 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -246,6 +246,7 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
struct memtype *saved_ptr;
if (parse->start >= end) {
+ printk("New Entry\n");
list_add(&new_entry->nd, parse->nd.prev);
new_entry = NULL;
break;
@@ -295,6 +296,8 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
break;
}
+ printk("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);
new_entry = NULL;
@@ -345,6 +348,8 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
break;
}
+ printk("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);
new_entry = NULL;
@@ -353,6 +358,10 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
}
if (err) {
+ printk(
+ "reserve_memtype failed 0x%Lx-0x%Lx, track %s, req %s\n",
+ start, end, cattr_name(new_entry->type),
+ cattr_name(req_type));
kfree(new_entry);
spin_unlock(&memtype_lock);
return err;
@@ -361,6 +370,19 @@ 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);
+ printk("New Entry\n");
+ }
+
+ if (ret_type) {
+ printk(
+ "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 {
+ printk(
+ "reserve_memtype added 0x%Lx-0x%Lx, track %s, req %s\n",
+ start, end, cattr_name(actual_type),
+ cattr_name(req_type));
}
spin_unlock(&memtype_lock);
@@ -397,6 +419,8 @@ int free_memtype(u64 start, u64 end)
printk(KERN_DEBUG "%s:%d freeing invalid memtype %Lx-%Lx\n",
current->comm, current->pid, start, end);
}
+
+ printk( "free_memtype request 0x%Lx-0x%Lx\n", start, end);
return err;
}