Re: [PATCH 1/3] Base support for AMD Geode GX/LX processors.
From: Andrew Morton
Date: Thu Dec 15 2005 - 16:35:41 EST
"Jordan Crouse" <jordan.crouse@xxxxxxx> 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
> + * info-linux@xxxxxxxxxxxxxxx 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 <akpm@xxxxxxxx>
- 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 <jordan.crouse@xxxxxxx>
Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/