login
Header Space

 
 

Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Venki Pallipadi <venkatesh.pallipadi@...>, Rufus & Azrael <rufus-azrael@...>, Siddha, Suresh B <suresh.b.siddha@...>, Linux-kernel Mailing List <linux-kernel@...>
Date: Monday, May 5, 2008 - 10:09 pm

On Tue, May 06, 2008 at 01:49:39AM +0200, Ingo Molnar wrote:

Below is the patch to enable debug messages by a boot option "debugpat".

We are also planning to a /proc or /debug entry to dump the memtype
list at runtime rather than depending on full dmesg. Will send the patch soon.

Thanks,
Venki



Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

---
 arch/x86/mm/pat.c |   27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

Index: linux-2.6/arch/x86/mm/pat.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/pat.c	2008-05-05 18:27:30.000000000 -0700
+++ linux-2.6/arch/x86/mm/pat.c	2008-05-05 18:28:38.000000000 -0700
@@ -38,6 +38,19 @@ static int nopat(char *str)
 }
 early_param("nopat", nopat);
 
+
+static int debug_enable;
+static int __init pat_debug_setup(char *str)
+{
+	debug_enable = 1;
+	return 0;
+}
+__setup("debugpat", pat_debug_setup);
+
+#define PAT_PRINTK(fmt, arg...) \
+	do { if (debug_enable) printk(KERN_INFO fmt, ##arg); } while (0)
+
+
 static int pat_known_cpu(void)
 {
 	if (!pat_wc_enabled)
@@ -285,7 +298,7 @@ int reserve_memtype(u64 start, u64 end, 
 		struct memtype *saved_ptr;
 
 		if (parse->start >= end) {
-			pr_debug("New Entry\n");
+			PAT_PRINTK("New Entry\n");
 			list_add(&new_entry->nd, parse->nd.prev);
 			new_entry = NULL;
 			break;
@@ -335,7 +348,7 @@ int reserve_memtype(u64 start, u64 end, 
 				break;
 			}
 
-			pr_debug("Overlap at 0x%Lx-0x%Lx\n",
+			PAT_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);
@@ -387,7 +400,7 @@ int reserve_memtype(u64 start, u64 end, 
 				break;
 			}
 
-			pr_debug(KERN_INFO "Overlap at 0x%Lx-0x%Lx\n",
+			PAT_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);
@@ -409,16 +422,16 @@ int reserve_memtype(u64 start, u64 end, 
 	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");
+		PAT_PRINTK("New Entry\n");
 	}
 
 	if (ret_type) {
-		pr_debug(
+		PAT_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 {
-		pr_debug(
+		PAT_PRINTK(
 	"reserve_memtype added 0x%Lx-0x%Lx, track %s, req %s\n",
 			start, end, cattr_name(actual_type),
 			cattr_name(req_type));
@@ -459,7 +472,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);
+	PAT_PRINTK("free_memtype request 0x%Lx-0x%Lx\n", start, end);
 	return err;
 }
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf8..., Venki Pallipadi, (Mon May 5, 10:09 pm)
speck-geostationary