From owner-svn-src-stable@freebsd.org Tue Nov 27 17:03:16 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31B971154776; Tue, 27 Nov 2018 17:03:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C84E587112; Tue, 27 Nov 2018 17:03:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A07341E35C; Tue, 27 Nov 2018 17:03:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wARH3Fxi050985; Tue, 27 Nov 2018 17:03:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wARH3FQ8050984; Tue, 27 Nov 2018 17:03:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811271703.wARH3FQ8050984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 27 Nov 2018 17:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341081 - stable/12/sys/riscv/include X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/riscv/include X-SVN-Commit-Revision: 341081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C84E587112 X-Spamd-Result: default: False [1.07 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.00)[-0.001,0]; NEURAL_SPAM_LONG(0.44)[0.441,0]; NEURAL_SPAM_MEDIUM(0.63)[0.632,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 17:03:16 -0000 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 +#include #include #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