diff options
author | Marcin Nowakowski <marcin.nowakowski@mips.com> | 2018-02-09 23:11:05 +0100 |
---|---|---|
committer | James Hogan <jhogan@kernel.org> | 2018-02-19 21:50:35 +0100 |
commit | 256211f2b0b251e532d1899b115e374feb16fa7a (patch) | |
tree | 6f47ee172a9a91d405677cf2dff8af919930b799 /arch/mips/kernel | |
parent | MIPS: Remove a warning when PHYS_OFFSET is 0x0 (diff) | |
download | linux-256211f2b0b251e532d1899b115e374feb16fa7a.tar.xz linux-256211f2b0b251e532d1899b115e374feb16fa7a.zip |
MIPS: Add crc instruction support flag to elf_hwcap
Indicate that CRC32 and CRC32C instuctions are supported by the CPU
through elf_hwcap flags.
This will be used by a follow-up commit that introduces crc32(c) crypto
acceleration modules and is required by GENERIC_CPU_AUTOPROBE feature.
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@mips.com>
Signed-off-by: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/18600/
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index cf3fd549e16d..6b07b739f914 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -848,6 +848,9 @@ static inline unsigned int decode_config5(struct cpuinfo_mips *c) if (config5 & MIPS_CONF5_CA2) c->ases |= MIPS_ASE_MIPS16E2; + if (config5 & MIPS_CONF5_CRCP) + elf_hwcap |= HWCAP_MIPS_CRC32; + return config5 & MIPS_CONF_M; } |