All of lore.kernel.org
 help / color / mirror / Atom feed
* [X86] Minimise printk spew from per-vendor init code.
@ 2009-11-13 20:30 Dave Jones
  2009-11-14  0:33 ` [tip:x86/debug] x86: " tip-bot for Dave Jones
  2009-11-14 10:19 ` [tip:x86/debug] x86: Fix cpu_devs[] initialization in early_cpu_init() tip-bot for Ingo Molnar
  0 siblings, 2 replies; 7+ messages in thread
From: Dave Jones @ 2009-11-13 20:30 UTC (permalink / raw)
  To: x86; +Cc: Linux Kernel

In the default case where the kernel supports all CPU vendors,
we currently print out a bunch of not useful messages on every system.

32bit:
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  NSC Geode by NSC
  Cyrix CyrixInstead
  Centaur CentaurHauls
  Transmeta GenuineTMx86
  Transmeta TransmetaCPU
  UMC UMC UMC UMC

64bit:
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  Centaur CentaurHauls


Given that "what CPUs does the kernel support" isn't useful for
the "support everything" case, we can suppress these printk's.

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

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index cc25c2b..617a29f 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -656,6 +656,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 
 void __init early_cpu_init(void)
 {
+#ifdef PROCESSOR_SELECT
 	const struct cpu_dev *const *cdev;
 	int count = 0;
 
@@ -676,7 +677,7 @@ void __init early_cpu_init(void)
 				cpudev->c_ident[j]);
 		}
 	}
-
+#endif
 	early_identify_cpu(&boot_cpu_data);
 }
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [tip:x86/debug] x86: Minimise printk spew from per-vendor init code
  2009-11-13 20:30 [X86] Minimise printk spew from per-vendor init code Dave Jones
@ 2009-11-14  0:33 ` tip-bot for Dave Jones
  2009-11-14  1:03   ` Yinghai Lu
  2009-11-14 10:19 ` [tip:x86/debug] x86: Fix cpu_devs[] initialization in early_cpu_init() tip-bot for Ingo Molnar
  1 sibling, 1 reply; 7+ messages in thread
From: tip-bot for Dave Jones @ 2009-11-14  0:33 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, davej, tglx, mingo

Commit-ID:  0388423dba2217b4e5b6c61690b0506d13b25a49
Gitweb:     http://git.kernel.org/tip/0388423dba2217b4e5b6c61690b0506d13b25a49
Author:     Dave Jones <davej@redhat.com>
AuthorDate: Fri, 13 Nov 2009 15:30:00 -0500
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 14 Nov 2009 01:18:05 +0100

x86: Minimise printk spew from per-vendor init code

In the default case where the kernel supports all CPU vendors,
we currently print out a bunch of not useful messages on every
system.

32-bit:
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  NSC Geode by NSC
  Cyrix CyrixInstead
  Centaur CentaurHauls
  Transmeta GenuineTMx86
  Transmeta TransmetaCPU
  UMC UMC UMC UMC

64-bit:
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  Centaur CentaurHauls

Given that "what CPUs does the kernel support" isn't useful for
the "support everything" case, we can suppress these printk's.

Signed-off-by: Dave Jones <davej@redhat.com>
LKML-Reference: <20091113203000.GA19160@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/cpu/common.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index cc25c2b..617a29f 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -656,6 +656,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 
 void __init early_cpu_init(void)
 {
+#ifdef PROCESSOR_SELECT
 	const struct cpu_dev *const *cdev;
 	int count = 0;
 
@@ -676,7 +677,7 @@ void __init early_cpu_init(void)
 				cpudev->c_ident[j]);
 		}
 	}
-
+#endif
 	early_identify_cpu(&boot_cpu_data);
 }
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [tip:x86/debug] x86: Minimise printk spew from per-vendor init  code
  2009-11-14  0:33 ` [tip:x86/debug] x86: " tip-bot for Dave Jones
@ 2009-11-14  1:03   ` Yinghai Lu
  2009-11-14  1:38     ` Dave Jones
  2009-11-14  9:38     ` Ingo Molnar
  0 siblings, 2 replies; 7+ messages in thread
From: Yinghai Lu @ 2009-11-14  1:03 UTC (permalink / raw)
  To: mingo, hpa, linux-kernel, tglx, davej, mingo; +Cc: linux-tip-commits

On Fri, Nov 13, 2009 at 4:33 PM, tip-bot for Dave Jones
<davej@redhat.com> wrote:
> Commit-ID:  0388423dba2217b4e5b6c61690b0506d13b25a49
> Gitweb:     http://git.kernel.org/tip/0388423dba2217b4e5b6c61690b0506d13b25a49
> Author:     Dave Jones <davej@redhat.com>
> AuthorDate: Fri, 13 Nov 2009 15:30:00 -0500
> Committer:  Ingo Molnar <mingo@elte.hu>
> CommitDate: Sat, 14 Nov 2009 01:18:05 +0100
>
> x86: Minimise printk spew from per-vendor init code
>
> In the default case where the kernel supports all CPU vendors,
> we currently print out a bunch of not useful messages on every
> system.
>
> 32-bit:
> KERNEL supported cpus:
>  Intel GenuineIntel
>  AMD AuthenticAMD
>  NSC Geode by NSC
>  Cyrix CyrixInstead
>  Centaur CentaurHauls
>  Transmeta GenuineTMx86
>  Transmeta TransmetaCPU
>  UMC UMC UMC UMC
>
> 64-bit:
> KERNEL supported cpus:
>  Intel GenuineIntel
>  AMD AuthenticAMD
>  Centaur CentaurHauls
>
> Given that "what CPUs does the kernel support" isn't useful for
> the "support everything" case, we can suppress these printk's.
>
> Signed-off-by: Dave Jones <davej@redhat.com>
> LKML-Reference: <20091113203000.GA19160@redhat.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  arch/x86/kernel/cpu/common.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index cc25c2b..617a29f 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -656,6 +656,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
>
>  void __init early_cpu_init(void)
>  {
> +#ifdef PROCESSOR_SELECT
>        const struct cpu_dev *const *cdev;
>        int count = 0;
>
> @@ -676,7 +677,7 @@ void __init early_cpu_init(void)
>                                cpudev->c_ident[j]);
>                }
>        }
> -
> +#endif
>        early_identify_cpu(&boot_cpu_data);
>  }

NACK.

the function is initializing cpu_devs array.

YH

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [tip:x86/debug] x86: Minimise printk spew from per-vendor init code
  2009-11-14  1:03   ` Yinghai Lu
@ 2009-11-14  1:38     ` Dave Jones
  2009-11-14  2:48       ` Yinghai Lu
  2009-11-14  9:38     ` Ingo Molnar
  1 sibling, 1 reply; 7+ messages in thread
From: Dave Jones @ 2009-11-14  1:38 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: mingo, hpa, linux-kernel, tglx, mingo, linux-tip-commits

On Fri, Nov 13, 2009 at 05:03:44PM -0800, Yinghai Lu wrote:

 > > --- a/arch/x86/kernel/cpu/common.c
 > > +++ b/arch/x86/kernel/cpu/common.c
 > > @@ -656,6 +656,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 > >
 > >  void __init early_cpu_init(void)
 > >  {
 > > +#ifdef PROCESSOR_SELECT
 > >        const struct cpu_dev *const *cdev;
 > >        int count = 0;
 > >
 > > @@ -676,7 +677,7 @@ void __init early_cpu_init(void)
 > >                                cpudev->c_ident[j]);
 > >                }
 > >        }
 > > -
 > > +#endif
 > >        early_identify_cpu(&boot_cpu_data);
 > >  }
 > 
 > NACK.
 > 
 > the function is initializing cpu_devs array.
 
Ugh, I don't know how I missed that.  I also seem to have boot tested the wrong kernel.
Back to the drawing board.

	Dave




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [tip:x86/debug] x86: Minimise printk spew from per-vendor init  code
  2009-11-14  1:38     ` Dave Jones
@ 2009-11-14  2:48       ` Yinghai Lu
  0 siblings, 0 replies; 7+ messages in thread
From: Yinghai Lu @ 2009-11-14  2:48 UTC (permalink / raw)
  To: Dave Jones, Yinghai Lu, mingo, hpa, linux-kernel, tglx, mingo,
	linux-tip-commits

On Fri, Nov 13, 2009 at 5:38 PM, Dave Jones <davej@redhat.com> wrote:
> On Fri, Nov 13, 2009 at 05:03:44PM -0800, Yinghai Lu wrote:
>
>  > > --- a/arch/x86/kernel/cpu/common.c
>  > > +++ b/arch/x86/kernel/cpu/common.c
>  > > @@ -656,6 +656,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
>  > >
>  > >  void __init early_cpu_init(void)
>  > >  {
>  > > +#ifdef PROCESSOR_SELECT
>  > >        const struct cpu_dev *const *cdev;
>  > >        int count = 0;
>  > >
>  > > @@ -676,7 +677,7 @@ void __init early_cpu_init(void)
>  > >                                cpudev->c_ident[j]);
>  > >                }
>  > >        }
>  > > -
>  > > +#endif
>  > >        early_identify_cpu(&boot_cpu_data);
>  > >  }
>  >
>  > NACK.
>  >
>  > the function is initializing cpu_devs array.
>
> Ugh, I don't know how I missed that.  I also seem to have boot tested the wrong kernel.
> Back to the drawing board.
>
use two loop instead?

YH

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [tip:x86/debug] x86: Minimise printk spew from per-vendor init code
  2009-11-14  1:03   ` Yinghai Lu
  2009-11-14  1:38     ` Dave Jones
@ 2009-11-14  9:38     ` Ingo Molnar
  1 sibling, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2009-11-14  9:38 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: mingo, hpa, linux-kernel, tglx, davej, linux-tip-commits


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> On Fri, Nov 13, 2009 at 4:33 PM, tip-bot for Dave Jones
> <davej@redhat.com> wrote:
> > Commit-ID: ?0388423dba2217b4e5b6c61690b0506d13b25a49
> > Gitweb: ? ? http://git.kernel.org/tip/0388423dba2217b4e5b6c61690b0506d13b25a49
> > Author: ? ? Dave Jones <davej@redhat.com>
> > AuthorDate: Fri, 13 Nov 2009 15:30:00 -0500
> > Committer: ?Ingo Molnar <mingo@elte.hu>
> > CommitDate: Sat, 14 Nov 2009 01:18:05 +0100
> >
> > x86: Minimise printk spew from per-vendor init code
> >
> > In the default case where the kernel supports all CPU vendors,
> > we currently print out a bunch of not useful messages on every
> > system.
> >
> > 32-bit:
> > KERNEL supported cpus:
> > ?Intel GenuineIntel
> > ?AMD AuthenticAMD
> > ?NSC Geode by NSC
> > ?Cyrix CyrixInstead
> > ?Centaur CentaurHauls
> > ?Transmeta GenuineTMx86
> > ?Transmeta TransmetaCPU
> > ?UMC UMC UMC UMC
> >
> > 64-bit:
> > KERNEL supported cpus:
> > ?Intel GenuineIntel
> > ?AMD AuthenticAMD
> > ?Centaur CentaurHauls
> >
> > Given that "what CPUs does the kernel support" isn't useful for
> > the "support everything" case, we can suppress these printk's.
> >
> > Signed-off-by: Dave Jones <davej@redhat.com>
> > LKML-Reference: <20091113203000.GA19160@redhat.com>
> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> > ---
> > ?arch/x86/kernel/cpu/common.c | ? ?3 ++-
> > ?1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> > index cc25c2b..617a29f 100644
> > --- a/arch/x86/kernel/cpu/common.c
> > +++ b/arch/x86/kernel/cpu/common.c
> > @@ -656,6 +656,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
> >
> > ?void __init early_cpu_init(void)
> > ?{
> > +#ifdef PROCESSOR_SELECT
> > ? ? ? ?const struct cpu_dev *const *cdev;
> > ? ? ? ?int count = 0;
> >
> > @@ -676,7 +677,7 @@ void __init early_cpu_init(void)
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cpudev->c_ident[j]);
> > ? ? ? ? ? ? ? ?}
> > ? ? ? ?}
> > -
> > +#endif
> > ? ? ? ?early_identify_cpu(&boot_cpu_data);
> > ?}
> 
> NACK.
> 
> the function is initializing cpu_devs array.

Good point. I fixed this.

	Ingo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [tip:x86/debug] x86: Fix cpu_devs[] initialization in early_cpu_init()
  2009-11-13 20:30 [X86] Minimise printk spew from per-vendor init code Dave Jones
  2009-11-14  0:33 ` [tip:x86/debug] x86: " tip-bot for Dave Jones
@ 2009-11-14 10:19 ` tip-bot for Ingo Molnar
  1 sibling, 0 replies; 7+ messages in thread
From: tip-bot for Ingo Molnar @ 2009-11-14 10:19 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, yinghai, davej, tglx, mingo

Commit-ID:  31c997cac76e62918858a432fff6e43fd48425f9
Gitweb:     http://git.kernel.org/tip/31c997cac76e62918858a432fff6e43fd48425f9
Author:     Ingo Molnar <mingo@elte.hu>
AuthorDate: Sat, 14 Nov 2009 10:34:41 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 14 Nov 2009 10:36:50 +0100

x86: Fix cpu_devs[] initialization in early_cpu_init()

Yinghai Lu noticed that this commit:

  0388423: x86: Minimise printk spew from per-vendor init code

mistakenly left out the initialization of cpu_devs[] in the
!PROCESSOR_SELECT case. Fix it.

Reported-by: Yinghai Lu <yinghai@kernel.org>
Cc: Dave Jones <davej@redhat.com>
LKML-Reference: <20091113203000.GA19160@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/cpu/common.c |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 9db1e24..61242a5 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -651,28 +651,34 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 
 void __init early_cpu_init(void)
 {
-#ifdef PROCESSOR_SELECT
 	const struct cpu_dev *const *cdev;
 	int count = 0;
 
+#ifdef PROCESSOR_SELECT
 	printk(KERN_INFO "KERNEL supported cpus:\n");
+#endif
+
 	for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
 		const struct cpu_dev *cpudev = *cdev;
-		unsigned int j;
 
 		if (count >= X86_VENDOR_NUM)
 			break;
 		cpu_devs[count] = cpudev;
 		count++;
 
-		for (j = 0; j < 2; j++) {
-			if (!cpudev->c_ident[j])
-				continue;
-			printk(KERN_INFO "  %s %s\n", cpudev->c_vendor,
-				cpudev->c_ident[j]);
+#ifdef PROCESSOR_SELECT
+		{
+			unsigned int j;
+
+			for (j = 0; j < 2; j++) {
+				if (!cpudev->c_ident[j])
+					continue;
+				printk(KERN_INFO "  %s %s\n", cpudev->c_vendor,
+					cpudev->c_ident[j]);
+			}
 		}
-	}
 #endif
+	}
 	early_identify_cpu(&boot_cpu_data);
 }
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-14 10:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13 20:30 [X86] Minimise printk spew from per-vendor init code Dave Jones
2009-11-14  0:33 ` [tip:x86/debug] x86: " tip-bot for Dave Jones
2009-11-14  1:03   ` Yinghai Lu
2009-11-14  1:38     ` Dave Jones
2009-11-14  2:48       ` Yinghai Lu
2009-11-14  9:38     ` Ingo Molnar
2009-11-14 10:19 ` [tip:x86/debug] x86: Fix cpu_devs[] initialization in early_cpu_init() tip-bot for Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.