aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-05-08 02:45:33 -0400
committerPaul Mundt <lethal@hera.kernel.org>2007-05-08 21:35:01 -0400
commit074f98df0547b7d15f78db9a17e985da0c22af28 (patch)
treee40128828e295cfabc6a18206df9a0c4ea25c654
parent53f983a90d7908bcece51f86180c7c9b575a1e4d (diff)
sh: Add 32-bit opcode feature CPU flag.
Add a CPU flag for the CPUs that support 32-bit opcodes, which gets passed down to userspace. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/kernel/cpu/sh2a/probe.c1
-rw-r--r--arch/sh/kernel/setup.c2
-rw-r--r--include/asm-sh/cpu-features.h1
3 files changed, 3 insertions, 1 deletions
diff --git a/arch/sh/kernel/cpu/sh2a/probe.c b/arch/sh/kernel/cpu/sh2a/probe.c
index 426f6db01fc6..f455c3509789 100644
--- a/arch/sh/kernel/cpu/sh2a/probe.c
+++ b/arch/sh/kernel/cpu/sh2a/probe.c
@@ -18,6 +18,7 @@ int __init detect_cpu_and_cache_system(void)
18{ 18{
19 /* Just SH7206 for now .. */ 19 /* Just SH7206 for now .. */
20 current_cpu_data.type = CPU_SH7206; 20 current_cpu_data.type = CPU_SH7206;
21 current_cpu_data.flags |= CPU_HAS_OP32;
21 22
22 current_cpu_data.dcache.ways = 4; 23 current_cpu_data.dcache.ways = 4;
23 current_cpu_data.dcache.way_incr = (1 << 11); 24 current_cpu_data.dcache.way_incr = (1 << 11);
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 477d2a854fc4..c27729135935 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -431,7 +431,7 @@ const char *get_cpu_subtype(struct sh_cpuinfo *c)
431/* Symbolic CPU flags, keep in sync with asm/cpu-features.h */ 431/* Symbolic CPU flags, keep in sync with asm/cpu-features.h */
432static const char *cpu_flags[] = { 432static const char *cpu_flags[] = {
433 "none", "fpu", "p2flush", "mmuassoc", "dsp", "perfctr", 433 "none", "fpu", "p2flush", "mmuassoc", "dsp", "perfctr",
434 "ptea", "llsc", "l2", NULL 434 "ptea", "llsc", "l2", "op32", NULL
435}; 435};
436 436
437static void show_cpuflags(struct seq_file *m, struct sh_cpuinfo *c) 437static void show_cpuflags(struct seq_file *m, struct sh_cpuinfo *c)
diff --git a/include/asm-sh/cpu-features.h b/include/asm-sh/cpu-features.h
index 4bccd7c032f9..86308aa39731 100644
--- a/include/asm-sh/cpu-features.h
+++ b/include/asm-sh/cpu-features.h
@@ -20,5 +20,6 @@
20#define CPU_HAS_PTEA 0x0020 /* PTEA register */ 20#define CPU_HAS_PTEA 0x0020 /* PTEA register */
21#define CPU_HAS_LLSC 0x0040 /* movli.l/movco.l */ 21#define CPU_HAS_LLSC 0x0040 /* movli.l/movco.l */
22#define CPU_HAS_L2_CACHE 0x0080 /* Secondary cache / URAM */ 22#define CPU_HAS_L2_CACHE 0x0080 /* Secondary cache / URAM */
23#define CPU_HAS_OP32 0x0100 /* 32-bit instruction support */
23 24
24#endif /* __ASM_SH_CPU_FEATURES_H */ 25#endif /* __ASM_SH_CPU_FEATURES_H */