Re: [PATCH 1/3] Base support for AMD Geode GX/LX processors.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Jordan Crouse" <[email protected]> wrote:
>
> +static void __init init_nsc(struct cpuinfo_x86 *c)
> +{
> +	int r;
> +
> +	/* There may be GX1 processors in the wild that are branded
> +	 * NSC and not Cyrix.
> +	 *
> +	 * This function only handles the GX processor, and kicks every
> +	 * thing else to the Cyrix init function above - that should
> +	 * cover any processors that might have been branded differently
> +	 * after NSC aquired Cyrix.
> +	 *
> +	 * If this breaks your GX1 horribly, please e-mail
> +	 * [email protected] to tell us.
> +	 */
> +
> +	/* Handle the GX (Formally known as the GX2) */
> +
> +	if ((c->x86 == 5) && (c->x86_model == 5)) {
> +		r = get_model_name(c);
> +		display_cacheinfo(c);
> +	}
> +	else
> +		init_cyrix(c);
> +}

What's `r' doing there?

How's this look?


From: Andrew Morton <[email protected]>

- coding style fixes

- remove unused variable.

- init_nsc() must be __devinit else it'll crash during x86 fake hotplugging.
  Which swsusp uses.

Cc: Jordan Crouse <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 arch/i386/kernel/cpu/amd.c   |    4 +---
 arch/i386/kernel/cpu/cyrix.c |   15 +++++----------
 2 files changed, 6 insertions(+), 13 deletions(-)

diff -puN arch/i386/kernel/cpu/amd.c~base-support-for-amd-geode-gx-lx-processors-tidy arch/i386/kernel/cpu/amd.c
--- 25/arch/i386/kernel/cpu/amd.c~base-support-for-amd-geode-gx-lx-processors-tidy	Thu Dec 15 13:33:50 2005
+++ 25-akpm/arch/i386/kernel/cpu/amd.c	Thu Dec 15 13:33:50 2005
@@ -162,14 +162,12 @@ static void __init init_amd(struct cpuin
 				break;
 			}
 
-			if ( c->x86_model == 10 ) {
+			if (c->x86_model == 10) {
 				/* AMD Geode LX is model 10 */
 				/* placeholder for any needed mods */
 				break;
 			}
-
 			break;
-
 		case 6: /* An Athlon/Duron */
  
 			/* Bit 15 of Athlon specific MSR 15, needs to be 0
diff -puN arch/i386/kernel/cpu/cyrix.c~base-support-for-amd-geode-gx-lx-processors-tidy arch/i386/kernel/cpu/cyrix.c
--- 25/arch/i386/kernel/cpu/cyrix.c~base-support-for-amd-geode-gx-lx-processors-tidy	Thu Dec 15 13:33:50 2005
+++ 25-akpm/arch/i386/kernel/cpu/cyrix.c	Thu Dec 15 13:35:25 2005
@@ -342,13 +342,11 @@ static void __init init_cyrix(struct cpu
 	return;
 }
 
-
-/* This function handles National Semiconductor branded processors */
-
-static void __init init_nsc(struct cpuinfo_x86 *c)
+/*
+ * Handle National Semiconductor branded processors
+ */
+static void __devinit init_nsc(struct cpuinfo_x86 *c)
 {
-	int r;
-
 	/* There may be GX1 processors in the wild that are branded
 	 * NSC and not Cyrix.
 	 *
@@ -363,15 +361,12 @@ static void __init init_nsc(struct cpuin
 
 	/* Handle the GX (Formally known as the GX2) */
 
-	if ((c->x86 == 5) && (c->x86_model == 5)) {
-		r = get_model_name(c);
+	if (c->x86 == 5 && c->x86_model == 5)
 		display_cacheinfo(c);
-	}
 	else
 		init_cyrix(c);
 }
 
-
 /*
  * Cyrix CPUs without cpuid or with cpuid not yet enabled can be detected
  * by the fact that they preserve the flags across the division of 5/2.
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux