Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 0/4] MIPS: Introduce isa-rev.h to define MIPS_ISA_REV
@ 2018-02-26 17:02 Matt Redfearn
  2018-02-26 17:02 ` Matt Redfearn
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Matt Redfearn @ 2018-02-26 17:02 UTC (permalink / raw)
  To: James Hogan, Ralf Baechle
  Cc: linux-mips, Paul Burton, Matt Redfearn, linux-kernel,
	Maciej W. Rozycki, David Daney

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, this series introduces 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). All uses of __mips_isa_rev are then replaced with the new
define, removing the check that it is defined.

Applies on v4.16-rc1


Matt Redfearn (4):
  MIPS: Introduce isa-rev.h to define MIPS_ISA_REV
  MIPS: cpu-features.h: Replace __mips_isa_rev with MIPS_ISA_REV
  MIPS: BPF: Replace __mips_isa_rev with MIPS_ISA_REV
  MIPS: VDSO: Replace __mips_isa_rev with MIPS_ISA_REV

 arch/mips/include/asm/cpu-features.h |  5 +++--
 arch/mips/include/asm/isa-rev.h      | 24 ++++++++++++++++++++++++
 arch/mips/net/bpf_jit_asm.S          |  9 +++++----
 arch/mips/vdso/elf.S                 | 10 ++++------
 4 files changed, 36 insertions(+), 12 deletions(-)
 create mode 100644 arch/mips/include/asm/isa-rev.h

-- 
2.7.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-03-09 11:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 17:02 [PATCH 0/4] MIPS: Introduce isa-rev.h to define MIPS_ISA_REV Matt Redfearn
2018-02-26 17:02 ` Matt Redfearn
2018-02-26 17:02 ` [PATCH 1/4] " Matt Redfearn
2018-02-26 17:02   ` Matt Redfearn
2018-02-26 20:05   ` Maciej W. Rozycki
2018-02-26 20:05     ` Maciej W. Rozycki
2018-02-26 17:02 ` [PATCH 2/4] MIPS: cpu-features.h: Replace __mips_isa_rev with MIPS_ISA_REV Matt Redfearn
2018-02-26 17:02   ` Matt Redfearn
2018-02-26 17:02 ` [PATCH 3/4] MIPS: BPF: " Matt Redfearn
2018-02-26 17:02   ` Matt Redfearn
2018-02-26 17:02 ` [PATCH 4/4] MIPS: VDSO: " Matt Redfearn
2018-02-26 17:02   ` Matt Redfearn
2018-03-09 11:25 ` [PATCH 0/4] MIPS: Introduce isa-rev.h to define MIPS_ISA_REV James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox