mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
Add macro to test for minimum architecture version
The macro concisely expresses and requires architecture version to be at least as required by its arguments. This would be useful when extending Trusted Firmware functionality for future architecture revisions. Replace similar usage in the current code base with the new macro. Change-Id: I9dcd0aa71a663eabd02ed9632b8ce87611fa5a57 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
This commit is contained in:
parent
096b7af7c9
commit
f45e232ab9
2 changed files with 9 additions and 1 deletions
|
@ -73,4 +73,12 @@
|
|||
# define ULL(_x) (_x##ull)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Test for the current architecture version to be at least the version
|
||||
* expected.
|
||||
*/
|
||||
#define ARM_ARCH_AT_LEAST(_maj, _min) \
|
||||
((ARM_ARCH_MAJOR > _maj) || \
|
||||
((ARM_ARCH_MAJOR == _maj) && (ARM_ARCH_MINOR >= _min)))
|
||||
|
||||
#endif /* __UTILS_DEF_H__ */
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
.globl spin_lock
|
||||
.globl spin_unlock
|
||||
|
||||
#if (ARM_ARCH_MAJOR > 8) || ((ARM_ARCH_MAJOR == 8) && (ARM_ARCH_MINOR >= 1))
|
||||
#if ARM_ARCH_AT_LEAST(8, 1)
|
||||
|
||||
/*
|
||||
* When compiled for ARMv8.1 or later, choose spin locks based on Compare and
|
||||
|
|
Loading…
Add table
Reference in a new issue