Skip to content

Commit

Permalink
tests: common: skip arch_nop testing on some physical x86 board
Browse files Browse the repository at this point in the history
Using the NOP instructions to do timing control on some physical board
such as ehl_crb, up_squared and intel adsp board, that doesn't work.
It seems like it can only be used for instruction alignment purposes.
We skip this test on this board because it's not meaningful.

Fixes zephyrproject-rtos#35971

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
  • Loading branch information
Enjia Mai committed Aug 6, 2021
1 parent 57fc354 commit cc07b6c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/kernel/common/src/irq_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ __no_optimization void test_nop(void)
arch_nop();
arch_nop();
arch_nop();
#elif defined(CONFIG_ARMV8_A)

#elif defined(CONFIG_ARMV8_A) || defined(CONFIG_BOARD_EHL_CRB) \
|| (CONFIG_BOARD_UP_SQUARED) || (CONFIG_SOC_FAMILY_INTEL_ADSP)
/* the ARMv8-A ARM states the following:
* No Operation does nothing, other than advance the value of
* the program counter by 4. This instruction can be used for
Expand All @@ -159,6 +161,9 @@ __no_optimization void test_nop(void)
* instructions are not suitable for timing loops.
*
* So we skip the this test, it will get a negative cycles.
*
* And on physical EHL_CRB, up squared and INTEL ADSP boards,
* we also got a similar situation, we skip the check as well.
*/
ztest_test_skip();
#endif
Expand Down

0 comments on commit cc07b6c

Please sign in to comment.