does this X-does-not-start-up problem go away if you disable this ? Ingo --
Thanks for your help Ingo, all work fine when CONFIG_PAT=n :-) --
hi, Can you please send us the "dmesg" output in the failing scenario with PAT enabled, after the X crash? thanks, suresh --
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.
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 <linux/mm.h> #include <linux/kernel.h> #include <linux/gfp.h> --
btw., could we turn this into a /debug or sysctl flag thing, to make it easier for people to get these debug messages? Ingo --
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 @@ ...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
------------>
Subject: x86: add "debugpat" boot option
From: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Date: Mon, 5 May 2008 19:09:10 -0700
enable debug messages by a boot option "debugpat".
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
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->start >= end) {
- pr_debug("New Entry\n");
+ dprintk("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",
+ dprintk("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 ...Below patch adds the sysctl interface.
Thanks,
Venki
Add sysctl interface to runtime change debugpat setting.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
---
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 = &proc_dointvec,
},
+ {
+ .ctl_name = ...applied, thanks. Please also send the Documentation/kernel-parameters.txt bits. Ingo --
On Sun, May 4, 2008 at 1:24 AM, Rufus & Azrael what is your /proc/mtrr? YH --
