mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jesper Juhl <juhl-lkml@dif.dk>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH][trivial] line up 'ESR value before/after enabling vector' messages
Date: Wed, 11 Aug 2004 11:47:35 +0100	[thread overview]
Message-ID: <20040811104735.GA24149@redhat.com> (raw)
In-Reply-To: <20040811062314.GA32700@elte.hu>

On Wed, Aug 11, 2004 at 08:23:14AM +0200, Ingo Molnar wrote:
 > 
 > * Jesper Juhl <juhl-lkml@dif.dk> wrote:
 > 
 > > -				" %08lx\n", value);
 > > +				"  %08lx\n", value);
 > 
 > > -		Dprintk("ESR value after enabling vector: %08x\n", value);
 > > +		Dprintk("ESR value after enabling vector:  %08x\n", value);
 > 
 > Signed-off-by: Ingo Molnar <mingo@elte.hu>

Has this printk actually been useful ? ever ?
I notice a majority of the time, it never changes too.
If it is useful, how about changing it so it prints something
if the value changed ?  (Something like patch below maybe?)
Or is possible for the APIC to lock up between the two printk's ?

		Dave


Only print out the ESR value if it changes after enabling vector.

Signed-off-by: Dave Jones <davej@redhat.com>

--- 1/arch/i386/kernel/apic.c~	2004-08-11 11:43:32.022485536 +0100
+++ 2/arch/i386/kernel/apic.c	2004-08-11 11:45:10.824465352 +0100
@@ -335,7 +335,7 @@
 
 void __init setup_local_APIC (void)
 {
-	unsigned long value, ver, maxlvt;
+	unsigned long oldvalue, value, ver, maxlvt;
 
 	/* Pound the ESR really hard over the head with a big hammer - mbligh */
 	if (esr_disable) {
@@ -449,9 +449,7 @@
 		maxlvt = get_maxlvt();
 		if (maxlvt > 3)		/* Due to the Pentium erratum 3AP. */
 			apic_write(APIC_ESR, 0);
-		value = apic_read(APIC_ESR);
-		printk("ESR value before enabling vector: %08lx\n", value);
-
+		oldvalue = apic_read(APIC_ESR);
 		value = ERROR_APIC_VECTOR;      // enables sending errors
 		apic_write_around(APIC_LVTERR, value);
 		/*
@@ -460,7 +458,9 @@
 		if (maxlvt > 3)
 			apic_write(APIC_ESR, 0);
 		value = apic_read(APIC_ESR);
-		printk("ESR value after enabling vector: %08lx\n", value);
+		if (value != oldvalue)
+			printk("ESR value before enabling vector: %08lx  after: %08lx\n",
+							oldvalue, value);
 	} else {
 		if (esr_disable)	
 			/* 

  reply	other threads:[~2004-08-11 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-10 23:56 Jesper Juhl
2004-08-11  6:23 ` Ingo Molnar
2004-08-11 10:47   ` Dave Jones [this message]
2004-08-11 10:54     ` Ingo Molnar

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=20040811104735.GA24149@redhat.com \
    --to=davej@redhat.com \
    --cc=akpm@osdl.org \
    --cc=juhl-lkml@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®