From: venkatesh.pallipadi@intel.com
To: ak@muc.de, ebiederm@xmission.com, rdreier@cisco.com,
torvalds@linux-foundation.org, gregkh@suse.de, airlied@skynet.ie,
davej@redhat.com, mingo@elte.hu, tglx@linutronix.de,
hpa@zytor.com, akpm@linux-foundation.org, arjan@infradead.org,
jesse.barnes@intel.com
Cc: linux-kernel@vger.kernel.org,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
Suresh Siddha <suresh.b.siddha@intel.com>
Subject: [patch 13/13] x86: PAT Patch to add PAT related debug prints
Date: Tue, 18 Mar 2008 17:00:25 -0700 [thread overview]
Message-ID: <20080319000101.007019000@intel.com> (raw)
In-Reply-To: 20080319000012.439150000@intel.com
[-- Attachment #1: debug_reserve_free_memtype.patch --]
[-- Type: text/plain, Size: 2920 bytes --]
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>
Index: linux-2.6-x86.git/arch/x86/mm/pat.c
===================================================================
--- linux-2.6-x86.git.orig/arch/x86/mm/pat.c 2008-03-18 03:40:47.000000000 -0700
+++ linux-2.6-x86.git/arch/x86/mm/pat.c 2008-03-18 03:56:52.000000000 -0700
@@ -289,6 +289,7 @@
struct memtype *saved_ptr;
if (parse->start >= end) {
+ printk("New Entry\n");
list_add(&new_entry->nd, parse->nd.prev);
new_entry = NULL;
break;
@@ -338,6 +339,8 @@
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;
@@ -388,6 +391,8 @@
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;
@@ -396,6 +401,10 @@
}
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;
@@ -404,6 +413,19 @@
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);
@@ -440,6 +462,8 @@
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;
}
Index: linux-2.6-x86.git/arch/x86/mm/ioremap.c
===================================================================
--- linux-2.6-x86.git.orig/arch/x86/mm/ioremap.c 2008-03-18 03:54:39.000000000 -0700
+++ linux-2.6-x86.git/arch/x86/mm/ioremap.c 2008-03-18 03:56:52.000000000 -0700
@@ -179,6 +179,10 @@
new_prot_val == _PAGE_CACHE_WC)) ||
(prot_val == _PAGE_CACHE_WC &&
new_prot_val == _PAGE_CACHE_WB)) {
+ printk(
+ "ioremap error for 0x%lx-0x%lx, requested 0x%lx, got 0x%lx\n",
+ phys_addr, phys_addr + size,
+ prot_val, new_prot_val);
free_memtype(phys_addr, phys_addr + size);
return NULL;
}
--
next prev parent reply other threads:[~2008-03-19 20:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-19 0:00 [patch 00/13] x86: PAT support updated - v3 venkatesh.pallipadi
2008-03-19 0:00 ` [patch 01/13] x86: PAT documentation venkatesh.pallipadi
2008-03-19 0:00 ` [patch 02/13] x86: PAT infrastructure patch venkatesh.pallipadi
2008-03-19 20:06 ` Randy Dunlap
2008-03-24 21:22 ` Venki Pallipadi
2008-03-19 0:00 ` [patch 03/13] x86: PAT Avoid aliasing in /dev/mem read/write venkatesh.pallipadi
2008-03-19 0:00 ` [patch 04/13] x86: PAT make ioremap_change_attr non-static venkatesh.pallipadi
2008-03-19 0:00 ` [patch 05/13] x86: PAT use reserve free memtype in ioremap and iounmap venkatesh.pallipadi
2008-03-19 0:00 ` [patch 06/13] x86: PAT use reserve free memtype in set_memory_uc venkatesh.pallipadi
2008-03-19 0:00 ` [patch 07/13] x86: PAT use reserve free memtype in pci_mmap_page_range venkatesh.pallipadi
2008-03-19 0:00 ` [patch 08/13] x86: PAT phys_mem_access_prot_allowed for dev/mem mmap venkatesh.pallipadi
2008-03-19 0:00 ` [patch 09/13] x86: PAT use reserve free memtype in mmap of /dev/mem venkatesh.pallipadi
2008-03-19 0:00 ` [patch 10/13] x86: PAT export resource_wc in pci sysfs venkatesh.pallipadi
2008-03-19 0:00 ` [patch 11/13] x86: PAT Add set_memory_wc() interface venkatesh.pallipadi
2008-03-19 0:00 ` [patch 12/13] x86: PAT Add ioremap_wc() interface venkatesh.pallipadi
2008-03-19 0:00 ` venkatesh.pallipadi [this message]
2008-03-21 13:24 ` [patch 00/13] x86: PAT support updated - v3 Ingo Molnar
2008-03-21 14:55 ` Ingo Molnar
2008-03-21 19:26 ` Venki Pallipadi
2008-03-21 13:29 ` H. Peter Anvin
2008-03-21 19:19 ` Venki Pallipadi
2008-03-21 19:59 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080319000101.007019000@intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=airlied@skynet.ie \
--cc=ak@muc.de \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=davej@redhat.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=jesse.barnes@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rdreier@cisco.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox