summaryrefslogtreecommitdiff
path: root/drivers/net/hamradio
diff options
context:
space:
mode:
authorBorislav Petkov (AMD) <bp@alien8.de>2022-12-18 15:04:05 +0300
committerDavid S. Miller <davem@davemloft.net>2022-12-19 12:27:10 +0300
commitaba5b397cad7d398b385aaf5029f99f41b690466 (patch)
treef5bd04de5e89086fb6e0eb12cb1a88efdf67bd1e /drivers/net/hamradio
parent1d330d4fa8ba5833ff1d9be6e96b72ebc1fa236f (diff)
downloadlinux-aba5b397cad7d398b385aaf5029f99f41b690466.tar.xz
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: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r--drivers/net/hamradio/baycom_epp.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index bd3b0c2655a2..83ff882f5d97 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -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)
{