svn commit: r341081 - stable/12/sys/riscv/include
Mark Johnston
markj at FreeBSD.org
Tue Nov 27 17:03:16 UTC 2018
Author: markj
Date: Tue Nov 27 17:03:15 2018
New Revision: 341081
URL: https://svnweb.freebsd.org/changeset/base/341081
Log:
MFC r340400:
RISC-V: Implement get_cyclecount(9).
Modified:
stable/12/sys/riscv/include/cpu.h
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/riscv/include/cpu.h
==============================================================================
--- stable/12/sys/riscv/include/cpu.h Tue Nov 27 17:02:15 2018 (r341080)
+++ stable/12/sys/riscv/include/cpu.h Tue Nov 27 17:03:15 2018 (r341081)
@@ -38,6 +38,7 @@
#define _MACHINE_CPU_H_
#include <machine/atomic.h>
+#include <machine/cpufunc.h>
#include <machine/frame.h>
#define TRAPF_PC(tfp) ((tfp)->tf_ra)
@@ -86,8 +87,7 @@ static __inline uint64_t
get_cyclecount(void)
{
- /* TODO: This is bogus */
- return (1);
+ return (rdcycle());
}
#endif
More information about the svn-src-stable
mailing list