From 7d350204f0f9c212df5a413c886bfbb05da47355 Mon Sep 17 00:00:00 2001 From: zhuyanlin Date: Wed, 16 Feb 2022 18:24:52 +0800 Subject: [PATCH] xtensa: fix `XTHAL_REL_LE` not find fix `XTHAL_REL_LE` not find build break Signed-off-by: zhuyanlin --- arch/xtensa/include/xtensa/core.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/xtensa/include/xtensa/core.h b/arch/xtensa/include/xtensa/core.h index 01112b9b57..6efab57b3f 100644 --- a/arch/xtensa/include/xtensa/core.h +++ b/arch/xtensa/include/xtensa/core.h @@ -1393,6 +1393,18 @@ #define XTHAL_INST_ILL 0x000000 /* 3-byte illegal instruction */ +/* Version comparison operators (among major/minor pairs): */ + +#define XTHAL_REL_GE(maja,mina, majb,minb) ((maja) > (majb) || \ + ((maja) == (majb) && (mina) >= (minb))) +#define XTHAL_REL_GT(maja,mina, majb,minb) ((maja) > (majb) || \ + ((maja) == (majb) && (mina) > (minb))) +#define XTHAL_REL_LE(maja,mina, majb,minb) ((maja) < (majb) || \ + ((maja) == (majb) && (mina) <= (minb))) +#define XTHAL_REL_LT(maja,mina, majb,minb) ((maja) < (majb) || \ + ((maja) == (majb) && (mina) < (minb))) +#define XTHAL_REL_EQ(maja,mina, majb,minb) ((maja) == (majb) && (mina) == (minb)) + /* Because information as to exactly which hardware version is targeted * by a given software build is not always available, compile-time HAL * Hardware-Release "_AT" macros are fuzzy (return 0, 1, or XCHAL_MAYBE):