mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Rufus & Azrael <rufus-azrael@numericable.fr>,
	"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	Linux-kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error
Date: Tue, 6 May 2008 13:55:24 +0200	[thread overview]
Message-ID: <20080506115524.GE32591@elte.hu> (raw)
In-Reply-To: <20080506020910.GA24041@linux-os.sc.intel.com>


* Venki Pallipadi <venkatesh.pallipadi@intel.com> wrote:

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

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 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);
@@ -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");
+		dprintk("New Entry\n");
 	}
 
 	if (ret_type) {
-		pr_debug(
+		dprintk(
 	"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(
+		dprintk(
 	"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);
+	dprintk("free_memtype request 0x%Lx-0x%Lx\n", start, end);
 	return err;
 }
 

  reply	other threads:[~2008-05-06 11:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-04  8:24 Rufus & Azrael
2008-05-04  8:52 ` Ingo Molnar
2008-05-04  9:03   ` Rufus & Azrael
2008-05-05 17:26     ` Suresh Siddha
2008-05-05 22:19       ` Rufus & Azrael
2008-05-05 23:25         ` Venki Pallipadi
2008-05-05 23:49           ` Ingo Molnar
2008-05-06  2:09             ` Venki Pallipadi
2008-05-06 11:55               ` Ingo Molnar [this message]
     [not found]                 ` <4820962B.6050702@numericable.fr>
2008-05-06 20:34                   ` Pallipadi, Venkatesh
2008-05-06 21:56                     ` Rufus & Azrael
2008-05-06 22:05                       ` Pallipadi, Venkatesh
2008-05-07 20:58                         ` Rufus & Azrael
2008-05-07 22:12                           ` Pallipadi, Venkatesh
2008-05-08  7:08                             ` Rufus & Azrael
2008-05-08 13:18                               ` Pallipadi, Venkatesh
     [not found]                               ` <B5B0CFF685D7DF46A05CF1678CFB42ED20E04609@orsmsx423.amr.corp.intel.com>
2008-05-08 19:25                                 ` Venki Pallipadi
2008-05-08 20:08                                   ` Rufus & Azrael
2008-05-08 21:37                                     ` Venki Pallipadi
2008-05-08 21:42                                       ` H. Peter Anvin
     [not found]                                         ` <20080508215931.GA5035@jamoon.sc.intel.com>
2008-05-08 23:40                                           ` Venki Pallipadi
2008-05-08 23:54                                             ` H. Peter Anvin
2008-05-09  0:34                                               ` Venki Pallipadi
2008-05-09  0:49                                                 ` H. Peter Anvin
2008-05-09  0:52                                                 ` H. Peter Anvin
2008-05-09 13:46                                                   ` Pallipadi, Venkatesh
2008-05-29 19:01                                                 ` Venki Pallipadi
2008-05-29 21:51                                                   ` Rufus & Azrael
2008-05-31  8:10                                                     ` Ingo Molnar
2008-05-06 22:51                 ` Venki Pallipadi
2008-05-07  7:06                   ` Ingo Molnar
2008-05-07 21:42 ` Yinghai Lu

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=20080506115524.GE32591@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rufus-azrael@numericable.fr \
    --cc=suresh.b.siddha@intel.com \
    --cc=venkatesh.pallipadi@intel.com \
    /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

all inboxes | Powered by JetHome®