Commit aba5b397 authored by Borislav Petkov (AMD)'s avatar Borislav Petkov (AMD) Committed by David S. Miller
Browse files

hamradio: baycom_epp: Do not use x86-specific rdtsc()



Use get_cycles() which is provided by pretty much every arch.

The UML build works too because get_cycles() is a simple "return 0;"
because the rdtsc() is optimized away there.

Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1d330d4f
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -623,16 +623,10 @@ static int receive(struct net_device *dev, int cnt)

/* --------------------------------------------------------------------- */

#if defined(__i386__) && !defined(CONFIG_UML)
#include <asm/msr.h>
#define GETTICK(x)						\
({								\
	if (boot_cpu_has(X86_FEATURE_TSC))			\
		x = (unsigned int)rdtsc();			\
	x = (unsigned int)get_cycles();				\
})
#else /* __i386__  && !CONFIG_UML */
#define GETTICK(x)
#endif /* __i386__  && !CONFIG_UML */

static void epp_bh(struct work_struct *work)
{