All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: "J.A. Magallon" <jamagallon@able.es>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Lista Linux-Kernel <linux-kernel@vger.kernel.org>,
	Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [PATCH][RFC] PentiumPro/II split in x86 config
Date: Mon, 27 May 2002 22:29:25 -0300	[thread overview]
Message-ID: <20020528012925.GB20729@conectiva.com.br> (raw)
In-Reply-To: <20020527145420.GA6738@werewolf.able.es> <1022520676.11859.294.camel@irongate.swansea.linux.org.uk> <20020527215911.GC1848@werewolf.able.es>

Em Mon, May 27, 2002 at 11:59:11PM +0200, J.A. Magallon escreveu:
> Opps... typo.
> Yes:
> 
>     { X86_VENDOR_INTEL, 6,
>       { "Pentium Pro A-step", "Pentium Pro", NULL, "Pentium II (Klamath)",
>         NULL, "Pentium II (Deschutes)", "Mobile Pentium II",
>         "Pentium III (Katmai)", "Pentium III (Coppermine)", NULL,
>         "Pentium III (Cascades)", NULL, NULL, NULL, NULL }},
> 
> Corrected patch on the way...

Hi,

	Since you're working on this could I suggest that you use labeled
elements, this gccism make the initialization above way more cleaner, safer and
easy to read :-) This is being used in the kernel in places like the FSes, the
TCP/IP stack and lots of other places.

	We don't need all the NULLs, as uninitialized entries will be zeroed
out by the compiler.

	Here is how it would look like:

--- 1.50/arch/i386/kernel/setup.c	Sat Apr 27 14:47:46 2002
+++ edited/arch/i386/kernel/setup.c	Mon May 27 22:03:35 2002
@@ -2245,15 +2245,34 @@
 /* This table only is used unless init_<vendor>() below doesn't set it; */
 /* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
 static struct cpu_model_info cpu_models[] __initdata = {
-	{ X86_VENDOR_INTEL,	4,
-	  { "486 DX-25/33", "486 DX-50", "486 SX", "486 DX/2", "486 SL", 
-	    "486 SX/2", NULL, "486 DX/2-WB", "486 DX/4", "486 DX/4-WB", NULL, 
-	    NULL, NULL, NULL, NULL, NULL }},
-	{ X86_VENDOR_INTEL,	5,
-	  { "Pentium 60/66 A-step", "Pentium 60/66", "Pentium 75 - 200",
-	    "OverDrive PODP5V83", "Pentium MMX", NULL, NULL,
-	    "Mobile Pentium 75 - 200", "Mobile Pentium MMX", NULL, NULL, NULL,
-	    NULL, NULL, NULL, NULL }},
+	{
+		vendor:	     X86_VENDOR_INTEL,
+		family:	     4,
+		model_names: {
+				[0] = "486 DX-25/33",
+				[1] = "486 DX-50",
+				[2] = "486 SX",
+				[3] = "486 DX/2",
+				[4] = "486 SL", 
+				[5] = "486 SX/2",
+				[7] = "486 DX/2-WB",
+				[8] = "486 DX/4",
+				[9] = "486 DX/4-WB",
+		},
+	},
+	{
+		vendor:	     X86_VENDOR_INTEL,
+		family:	     5,
+		model_names: {
+				[0] = "Pentium 60/66 A-step",
+				[1] = "Pentium 60/66",
+				[2] = "Pentium 75 - 200",
+				[3] = "OverDrive PODP5V83",
+				[4] = "Pentium MMX",
+				[7] = "Mobile Pentium 75 - 200",
+				[8] = "Mobile Pentium MMX",
+		}
+	},
 	{ X86_VENDOR_INTEL,	6,
 	  { "Pentium Pro A-step", "Pentium Pro", NULL, "Pentium II (Klamath)", 
 	    NULL, "Pentium II (Deschutes)", "Mobile Pentium II",

Best Regards,

- Arnaldo, with the janitor hat on for the time being 8)

  reply	other threads:[~2002-05-28  1:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-27 14:54 [PATCH][RFC] PentiumPro/II split in x86 config J.A. Magallon
2002-05-27 17:31 ` Alan Cox
2002-05-27 21:59   ` J.A. Magallon
2002-05-28  1:29     ` Arnaldo Carvalho de Melo [this message]
2002-05-28  2:05       ` Keith Owens
2002-05-28  2:16         ` Arnaldo Carvalho de Melo
2002-05-28  2:24           ` Keith Owens
2002-05-28  2:35             ` Arnaldo Carvalho de Melo
2002-05-28  2:55             ` Miles Bader
2002-05-28  3:02               ` Arnaldo Carvalho de Melo
2002-05-28 14:03                 ` J.A. Magallon
2002-05-28 14:30                   ` Mikael Pettersson
2002-05-28 15:00                     ` David Woodhouse
2002-05-28 18:39                       ` Albert D. Cahalan
2002-05-28 16:16                     ` Miles Bader
2002-05-28 14:45                   ` Roland Dreier
2002-05-29  4:23                 ` Rusty Russell
2002-05-29  4:27                   ` Arnaldo Carvalho de Melo
2002-05-29 14:06       ` Dave Jones
2002-05-28  0:15 ` Keith Owens

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=20020528012925.GB20729@conectiva.com.br \
    --to=acme@conectiva.com.br \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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 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.