summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@libc.org>2016-03-17 23:14:14 +0000
committerRich Felker <dalias@libc.org>2016-04-11 22:55:46 +0000
commiteaae7d96624a42d29e680d56dbf49a1659d376f5 (patch)
tree4b06b7057cda10d752a5c457d7471a18e270331b
parent93dbb57c05d6dd32e9f4e7cf87b1075b33f7a029 (diff)
downloadlinux-sh-eaae7d96624a42d29e680d56dbf49a1659d376f5.tar.gz
sh: add AT_HWCAP flag for J-Core cas.l instruction
Signed-off-by: Rich Felker <dalias@libc.org>
-rw-r--r--arch/sh/include/uapi/asm/cpu-features.h1
-rw-r--r--arch/sh/kernel/cpu/sh2/probe.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/sh/include/uapi/asm/cpu-features.h b/arch/sh/include/uapi/asm/cpu-features.h
index 694abe490edb..2f1bc851042a 100644
--- a/arch/sh/include/uapi/asm/cpu-features.h
+++ b/arch/sh/include/uapi/asm/cpu-features.h
@@ -22,5 +22,6 @@
#define CPU_HAS_L2_CACHE 0x0080 /* Secondary cache / URAM */
#define CPU_HAS_OP32 0x0100 /* 32-bit instruction support */
#define CPU_HAS_PTEAEX 0x0200 /* PTE ASID Extension support */
+#define CPU_HAS_CAS_L 0x0400 /* cas.l atomic compare-and-swap */
#endif /* __ASM_SH_CPU_FEATURES_H */
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c
index b0fab7ddbd7a..e23505344158 100644
--- a/arch/sh/kernel/cpu/sh2/probe.c
+++ b/arch/sh/kernel/cpu/sh2/probe.c
@@ -28,6 +28,7 @@ void cpu_probe(void)
#if defined(CONFIG_CPU_J2)
boot_cpu_data.type = CPU_J2;
boot_cpu_data.dcache.sets = 1; /* FIXME */
+ boot_cpu_data.flags |= CPU_HAS_CAS_L;
#endif
/*
* SH-2 doesn't have separate caches