Skip to content
Unverified Commit 16909052 authored by Matt Redfearn's avatar Matt Redfearn Committed by James Hogan
Browse files

MIPS: Introduce isa-rev.h to define MIPS_ISA_REV



There are multiple instances in the kernel where we need to include or
exclude particular instructions based on the ISA revision of the target
processor. For MIPS32 / MIPS64, the compiler exports a __mips_isa_rev
define. However, when targeting MIPS I - V, this define is absent. This
leads to each use of __mips_isa_rev having to check that it is defined
first. To simplify this, introduce the isa-rev.h header which always
exports MIPS_ISA_REV. The name is changed so as to avoid confusion with
the compiler builtin and to avoid accidentally using the builtin.
MIPS_ISA_REV is defined to the compilers builtin if provided, or 0,
which satisfies all current usages.

Suggested-by: default avatarPaul Burton <paul.burton@mips.com>
Signed-off-by: default avatarMatt Redfearn <matt.redfearn@mips.com>
Reviewed-by: default avatarMaciej W. Rozycki <macro@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/18676/


Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
parent 997e93d4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment