sh: Stub in silicon cut in CPU info.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:07 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3611ee...
Commit:     3611ee7acc113e5e482b7d20d5133935226f3129
Parent:     ef9247ef89be79ffbd9faaf722e05b7bed14fc1e
Author:     Stuart Menefy <stuart.menefy@st.com>
AuthorDate: Wed Jul 2 15:15:09 2008 +0900
Committer:  Paul Mundt <lethal@linux-sh.org>
CommitDate: Mon Jul 28 18:10:32 2008 +0900

    sh: Stub in silicon cut in CPU info.
    
    Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
    Signed-off-by: Paul Mundt <lethal@linux-sh.org>
---
 arch/sh/kernel/cpu/sh4/probe.c |    3 +++
 arch/sh/kernel/setup.c         |    6 ++++++
 include/asm-sh/processor_32.h  |    1 +
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index be49269..db442f3 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -64,6 +64,9 @@ int __init detect_cpu_and_cache_system(void)
 	if ((cvr & 0x20000000) == 1)
 		boot_cpu_data.flags |= CPU_HAS_FPU;
 
+	/* We don't know the chip cut */
+	boot_cpu_data.cut_major = boot_cpu_data.cut_minor = -1;
+
 	/* Mask off the upper chip ID */
 	pvr &= 0xffff;
 
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 9324cb9..6339d0c 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -453,6 +453,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 	seq_printf(m, "processor\t: %d\n", cpu);
 	seq_printf(m, "cpu family\t: %s\n", init_utsname()->machine);
 	seq_printf(m, "cpu type\t: %s\n", get_cpu_subtype(c));
+	if (c->cut_major == -1)
+		seq_printf(m, "cut\t\t: unknown\n");
+	else if (c->cut_minor == -1)
+		seq_printf(m, "cut\t\t: %d.x\n", c->cut_major);
+	else
+		seq_printf(m, "cut\t\t: %d.%d\n", c->cut_major, c->cut_minor);
 
 	show_cpuflags(m, c);
 
diff --git a/include/asm-sh/processor_32.h b/include/asm-sh/processor_32.h
index 81628f1..c6583f2 100644
--- a/include/asm-sh/processor_32.h
+++ b/include/asm-sh/processor_32.h
@@ -28,6 +28,7 @@
 
 struct sh_cpuinfo {
 	unsigned int type;
+	int cut_major, cut_minor;
 	unsigned long loops_per_jiffy;
 	unsigned long asid_cache;
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sh: Stub in silicon cut in CPU info., Linux Kernel Mailing ..., (Mon Jul 28, 10:07 am)