From 58a822cfc24e994df3674a327dc251ec8d7dfb13 Mon Sep 17 00:00:00 2001 From: Jake Burkholder Date: Sat, 20 Oct 2001 18:51:10 +0000 Subject: [PATCH] Fix get_cyclecount. Wrap in ifdef _KERNEL. --- sys/sparc64/include/cpu.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/sparc64/include/cpu.h b/sys/sparc64/include/cpu.h index 91e04facfd6..7d322fe0889 100644 --- a/sys/sparc64/include/cpu.h +++ b/sys/sparc64/include/cpu.h @@ -72,13 +72,17 @@ { "wall_cmos_clock", CTLTYPE_INT }, \ } +#ifdef _KERNEL + void fork_trampoline(void); static __inline u_int64_t get_cyclecount(void) { - return (rd(tick)); + return (rdpr(tick)); } +#endif + #endif /* !_MACHINE_CPU_H_ */