Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Paul Mundt and committed by
Paul Mundt
074f98df 53f983a9

+3 -1
+1
arch/sh/kernel/cpu/sh2a/probe.c
··· 18 18 { 19 19 /* Just SH7206 for now .. */ 20 20 current_cpu_data.type = CPU_SH7206; 21 + current_cpu_data.flags |= CPU_HAS_OP32; 21 22 22 23 current_cpu_data.dcache.ways = 4; 23 24 current_cpu_data.dcache.way_incr = (1 << 11);
+1 -1
arch/sh/kernel/setup.c
··· 431 431 /* Symbolic CPU flags, keep in sync with asm/cpu-features.h */ 432 432 static const char *cpu_flags[] = { 433 433 "none", "fpu", "p2flush", "mmuassoc", "dsp", "perfctr", 434 - "ptea", "llsc", "l2", NULL 434 + "ptea", "llsc", "l2", "op32", NULL 435 435 }; 436 436 437 437 static void show_cpuflags(struct seq_file *m, struct sh_cpuinfo *c)
+1
include/asm-sh/cpu-features.h
··· 20 20 #define CPU_HAS_PTEA 0x0020 /* PTEA register */ 21 21 #define CPU_HAS_LLSC 0x0040 /* movli.l/movco.l */ 22 22 #define CPU_HAS_L2_CACHE 0x0080 /* Secondary cache / URAM */ 23 + #define CPU_HAS_OP32 0x0100 /* 32-bit instruction support */ 23 24 24 25 #endif /* __ASM_SH_CPU_FEATURES_H */