aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorvenkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>2008-03-18 20:00:25 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:20 -0400
commit6997ab4982a29925e79f72c3a59823cf944c3529 (patch)
treec46234aee452e7b47f315c8b87487e22f2ad4d3d /arch/x86
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')
-rw-r--r--arch/x86/mm/ioremap.c6
-rw-r--r--arch/x86/mm/pat.c24
2 files changed, 29 insertions, 1 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 51cd3956c564..6cd3418afe71 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -131,7 +131,7 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
131 return NULL; 131 return NULL;
132 132
133 if (!phys_addr_valid(phys_addr)) { 133 if (!phys_addr_valid(phys_addr)) {
134 printk(KERN_WARNING "ioremap: invalid physical address %lx\n", 134 printk(KERN_WARNING "ioremap: invalid physical address %llx\n",
135 phys_addr); 135 phys_addr);
136 WARN_ON_ONCE(1); 136 WARN_ON_ONCE(1);
137 return NULL; 137 return NULL;
@@ -177,6 +177,10 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
177 new_prot_val == _PAGE_CACHE_WC)) || 177 new_prot_val == _PAGE_CACHE_WC)) ||
178 (prot_val == _PAGE_CACHE_WC && 178 (prot_val == _PAGE_CACHE_WC &&
179 new_prot_val == _PAGE_CACHE_WB)) { 179 new_prot_val == _PAGE_CACHE_WB)) {
180 printk(
181 "ioremap error for 0x%llx-0x%llx, requested 0x%lx, got 0x%lx\n",
182 phys_addr, phys_addr + size,
183 prot_val, new_prot_val);
180 free_memtype(phys_addr, phys_addr + size); 184 free_memtype(phys_addr, phys_addr + size);
181 return NULL; 185 return NULL;
182 } 186 }
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 7cc71d868483..57a2af36d6ee 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,
246 struct memtype *saved_ptr; 246 struct memtype *saved_ptr;
247 247
248 if (parse->start >= end) { 248 if (parse->start >= end) {
249 printk("New Entry\n");
249 list_add(&new_entry->nd, parse->nd.prev); 250 list_add(&new_entry->nd, parse->nd.prev);
250 new_entry = NULL; 251 new_entry = NULL;
251 break; 252 break;
@@ -295,6 +296,8 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
295 break; 296 break;
296 } 297 }
297 298
299 printk("Overlap at 0x%Lx-0x%Lx\n",
300 saved_ptr->start, saved_ptr->end);
298 /* No conflict. Go ahead and add this new entry */ 301 /* No conflict. Go ahead and add this new entry */
299 list_add(&new_entry->nd, saved_ptr->nd.prev); 302 list_add(&new_entry->nd, saved_ptr->nd.prev);
300 new_entry = NULL; 303 new_entry = NULL;
@@ -345,6 +348,8 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
345 break; 348 break;
346 } 349 }
347 350
351 printk("Overlap at 0x%Lx-0x%Lx\n",
352 saved_ptr->start, saved_ptr->end);
348 /* No conflict. Go ahead and add this new entry */ 353 /* No conflict. Go ahead and add this new entry */
349 list_add(&new_entry->nd, &saved_ptr->nd); 354 list_add(&new_entry->nd, &saved_ptr->nd);
350 new_entry = NULL; 355 new_entry = NULL;
@@ -353,6 +358,10 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
353 } 358 }
354 359
355 if (err) { 360 if (err) {
361 printk(
362 "reserve_memtype failed 0x%Lx-0x%Lx, track %s, req %s\n",
363 start, end, cattr_name(new_entry->type),
364 cattr_name(req_type));
356 kfree(new_entry); 365 kfree(new_entry);
357 spin_unlock(&memtype_lock); 366 spin_unlock(&memtype_lock);
358 return err; 367 return err;
@@ -361,6 +370,19 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
361 if (new_entry) { 370 if (new_entry) {
362 /* No conflict. Not yet added to the list. Add to the tail */ 371 /* No conflict. Not yet added to the list. Add to the tail */
363 list_add_tail(&new_entry->nd, &memtype_list); 372 list_add_tail(&new_entry->nd, &memtype_list);
373 printk("New Entry\n");
374 }
375
376 if (ret_type) {
377 printk(
378 "reserve_memtype added 0x%Lx-0x%Lx, track %s, req %s, ret %s\n",
379 start, end, cattr_name(actual_type),
380 cattr_name(req_type), cattr_name(*ret_type));
381 } else {
382 printk(
383 "reserve_memtype added 0x%Lx-0x%Lx, track %s, req %s\n",
384 start, end, cattr_name(actual_type),
385 cattr_name(req_type));
364 } 386 }
365 387
366 spin_unlock(&memtype_lock); 388 spin_unlock(&memtype_lock);
@@ -397,6 +419,8 @@ int free_memtype(u64 start, u64 end)
397 printk(KERN_DEBUG "%s:%d freeing invalid memtype %Lx-%Lx\n", 419 printk(KERN_DEBUG "%s:%d freeing invalid memtype %Lx-%Lx\n",
398 current->comm, current->pid, start, end); 420 current->comm, current->pid, start, end);
399 } 421 }
422
423 printk( "free_memtype request 0x%Lx-0x%Lx\n", start, end);
400 return err; 424 return err;
401} 425}
402 426