login
Header Space

 
 

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

Previous thread: Re: [BUG] NULL pointer dereference in uart_write_room(). by Tetsuo Handa on Sunday, May 4, 2008 - 4:16 am. (6 messages)

Next thread: build issue #479 for v2.6.26-rc1-6-gafa26be :redefinition of 'sysfs_update_group' by Toralf on Sunday, May 4, 2008 - 4:53 am. (7 messages)
To: Linux-kernel Mailing List <linux-kernel@...>
Date: Sunday, May 4, 2008 - 4:24 am

[Empty message]
To: Rufus & Azrael <rufus-azrael@...>
Cc: Linux-kernel Mailing List <linux-kernel@...>
Date: Wednesday, May 7, 2008 - 5:42 pm

On Sun, May 4, 2008 at 1:24 AM, Rufus &amp; Azrael

what is your /proc/mtrr?

YH
--
To: Rufus & Azrael <rufus-azrael@...>
Cc: Linux-kernel Mailing List <linux-kernel@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, Arjan van de Ven <arjan@...>, Venkatesh Pallipadi <venkatesh.pallipadi@...>, Suresh Siddha <suresh.b.siddha@...>
Date: Sunday, May 4, 2008 - 4:52 am

does this X-does-not-start-up problem go away if you disable this 

?

	Ingo
--
To: Ingo Molnar <mingo@...>, Linux-kernel Mailing List <linux-kernel@...>
Date: Sunday, May 4, 2008 - 5:03 am

Thanks for your help Ingo, all work fine when CONFIG_PAT=n :-)

--
To: Rufus & Azrael <rufus-azrael@...>
Cc: Ingo Molnar <mingo@...>, Linux-kernel Mailing List <linux-kernel@...>, <venkatesh.pallipadi@...>
Date: Monday, May 5, 2008 - 1:26 pm

hi, Can you please send us the "dmesg" output in the failing scenario
with PAT enabled, after the X crash?

thanks,
suresh
--
To: Suresh Siddha <suresh.b.siddha@...>
Cc: Ingo Molnar <mingo@...>, Linux-kernel Mailing List <linux-kernel@...>, <venkatesh.pallipadi@...>
Date: Monday, May 5, 2008 - 6:19 pm

Hi,

Here is my dmesg with 2.6.26-rc1-git3 and CONFIG_X86_PAT=3Dy

Hope it can help you to fixe the crash.

Regards.
To: Rufus & Azrael <rufus-azrael@...>
Cc: Siddha, Suresh B <suresh.b.siddha@...>, Ingo Molnar <mingo@...>, Linux-kernel Mailing List <linux-kernel@...>, Pallipadi, Venkatesh <venkatesh.pallipadi@...>
Date: Monday, May 5, 2008 - 7:25 pm

Which seems to be mapping framebuffer successfully. 

Can you please try the patch below and capture the dmesg after you get the
above xf86MapVidMem error and send it. That should give us more information
on the failure.

Thanks,
Venki

Index: linux-2.6/arch/x86/mm/pat.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/pat.c	2008-05-05 14:13:16.000000000 -0700
+++ linux-2.6/arch/x86/mm/pat.c	2008-05-05 15:54:21.000000000 -0700
@@ -7,6 +7,8 @@
  * Loosely based on earlier PAT patchset from Eric Biederman and Andi Kleen.
  */
 
+#define	DEBUG
+
 #include &lt;linux/mm.h&gt;
 #include &lt;linux/kernel.h&gt;
 #include &lt;linux/gfp.h&gt;
--
To: Venki Pallipadi <venkatesh.pallipadi@...>
Cc: Rufus & Azrael <rufus-azrael@...>, Siddha, Suresh B <suresh.b.siddha@...>, Linux-kernel Mailing List <linux-kernel@...>
Date: Monday, May 5, 2008 - 7:49 pm

btw., could we turn this into a /debug or sysctl flag thing, to make it 
easier for people to get these debug messages?

	Ingo
--
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

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 &lt;venkatesh.pallipadi@intel.com&gt;

---
 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-&gt;start &gt;= end) {
-			pr_debug("New Entry\n");
+			PAT_PRINTK("New Entry\n");
 			list_add(&amp;new_entry-&gt;nd, parse-&gt;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-&gt;start, saved_ptr-&gt;end);
 			/* No conflict. Go ahead and add this new entry */
 			list_add(&amp;new_entry-&gt;nd, saved_ptr-&gt;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-&gt;start, saved_ptr-&gt;end);
 			/* No conflict. Go ahead and add this new entry */
 			list_add(&amp;new_entry-...
To: Venki Pallipadi <venkatesh.pallipadi@...>
Cc: Rufus & Azrael <rufus-azrael@...>, Siddha, Suresh B <suresh.b.siddha@...>, Linux-kernel Mailing List <linux-kernel@...>
Date: Tuesday, May 6, 2008 - 7:55 am

ok, i have applied the patch with some modifications - see below.

Since we build in this code unconditionally also make the flag 
switchable from a sysctl, so that users do not have to reboot to see PAT 
debug messages ...

i have renamed PAT_PRINTK to dprintk.

	Ingo

------------&gt;
Subject: x86: add "debugpat" boot option
From: Venki Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Date: Mon, 5 May 2008 19:09:10 -0700

enable debug messages by a boot option "debugpat".

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
---
 arch/x86/mm/pat.c |   27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

Index: linux-x86.q/arch/x86/mm/pat.c
===================================================================
--- linux-x86.q.orig/arch/x86/mm/pat.c
+++ linux-x86.q/arch/x86/mm/pat.c
@@ -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 dprintk(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-&gt;start &gt;= end) {
-			pr_debug("New Entry\n");
+			dprintk("New Entry\n");
 			list_add(&amp;new_entry-&gt;nd, parse-&gt;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",
+			dprintk("Overlap at 0x%Lx-0x%Lx\n",
 			       saved_ptr-&gt;start, saved_ptr-&gt;end);
 			/* No conflict. Go ahead and add this new entry */
 			list_add(&amp;new_entry-&gt;nd, saved_ptr-&gt;nd.prev);
@@ -387,7 +400,7 @@ int reserve_memtype(u64 start, u64 end, 
 				break;
 			}
 
-			pr...
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: Tuesday, May 6, 2008 - 6:51 pm

Below patch adds the sysctl interface.

Thanks,
Venki


Add sysctl interface to runtime change debugpat setting.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;

---
 arch/x86/mm/pat.c      |    6 +++---
 include/linux/kernel.h |    1 +
 kernel/sysctl.c        |    8 ++++++++
 3 files changed, 12 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/x86/mm/pat.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/pat.c	2008-05-06 10:52:51.000000000 -0700
+++ linux-2.6/arch/x86/mm/pat.c	2008-05-06 15:27:59.000000000 -0700
@@ -39,16 +39,16 @@ static int nopat(char *str)
 early_param("nopat", nopat);
 
 
-static int debug_enable;
+int pat_debug_enable = 0;
 static int __init pat_debug_setup(char *str)
 {
-	debug_enable = 1;
+	pat_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)
+	do { if (pat_debug_enable) printk(KERN_INFO fmt, ##arg); } while (0)
 
 
 static int pat_known_cpu(void)
Index: linux-2.6/include/linux/kernel.h
===================================================================
--- linux-2.6.orig/include/linux/kernel.h	2008-05-02 09:45:26.000000000 -0700
+++ linux-2.6/include/linux/kernel.h	2008-05-06 10:54:06.000000000 -0700
@@ -239,6 +239,7 @@ extern int tainted;
 extern const char *print_tainted(void);
 extern void add_taint(unsigned);
 extern int root_mountflags;
+extern int pat_debug_enable;
 
 /* Values used for system_state */
 extern enum system_states {
Index: linux-2.6/kernel/sysctl.c
===================================================================
--- linux-2.6.orig/kernel/sysctl.c	2008-05-02 09:45:26.000000000 -0700
+++ linux-2.6/kernel/sysctl.c	2008-05-06 10:55:08.000000000 -0700
@@ -685,6 +685,14 @@ static struct ctl_table kern_table[] = {
 		.mode		= 0644,
 		.proc_handler	= &amp;proc_dointvec,
 	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,...
To: Venki Pallipadi <venkatesh.pallipadi@...>
Cc: Rufus & Azrael <rufus-azrael@...>, Siddha, Suresh B <suresh.b.siddha@...>, Linux-kernel Mailing List <linux-kernel@...>
Date: Wednesday, May 7, 2008 - 3:06 am

applied, thanks. Please also send the Documentation/kernel-parameters.txt
bits.

	Ingo
--
Previous thread: Re: [BUG] NULL pointer dereference in uart_write_room(). by Tetsuo Handa on Sunday, May 4, 2008 - 4:16 am. (6 messages)

Next thread: build issue #479 for v2.6.26-rc1-6-gafa26be :redefinition of 'sysfs_update_group' by Toralf on Sunday, May 4, 2008 - 4:53 am. (7 messages)
speck-geostationary