Skip to content

Commit

Permalink
core-asm-sparc.h, stress-tsc: check for HAVE_ASM_SPARC_TICK when usin…
Browse files Browse the repository at this point in the history
…g tick opcode

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
  • Loading branch information
ColinIanKing committed Feb 3, 2023
1 parent 0de1f73 commit 1cbe8de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions core-asm-sparc.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#if defined(STRESS_ARCH_SPARC)

#if defined(HAVE_ASM_SPARC_TICK)
static inline uint64_t stress_asm_sparc_tick(void)
{
register uint64_t ticks;
Expand All @@ -32,6 +33,7 @@ static inline uint64_t stress_asm_sparc_tick(void)
: "=r" (ticks));
return (uint64_t)ticks;
}
#endif

#if defined(HAVE_ASM_SPARC_MEMBAR)
static inline void stress_asm_sparc_membar(void)
Expand Down
3 changes: 2 additions & 1 deletion stress-tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ static inline uint64_t rdtsc(void)
return stress_asm_s390_stck();
}

#elif defined(STRESS_ARCH_SPARC)
#elif defined(STRESS_ARCH_SPARC) && \
defined(HAVE_ASM_SPARC_TICK)

#define HAVE_STRESS_TSC_CAPABILITY

Expand Down

0 comments on commit 1cbe8de

Please sign in to comment.