Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: fast clock_gettime on FreeBSD, use physical/virtual ARM timer #460

Merged
merged 1 commit into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/runtime/sys_freebsd_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ TEXT runtime·getCntxct(SB),NOSPLIT,$0
BEQ 3(PC)

// get CNTPCT (Physical Count Register) into R0
MRS CNTPCT_EL0, R0 // SIGILL
MRS CNTPCT_EL0, R0
B 2(PC)

// get CNTVCT (Virtual Count Register) into R0
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/vdso_freebsd_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func getCntxct(physical bool) uint32
func (th *vdsoTimehands) getTimecounter() (uint32, bool) {
switch th.algo {
case _VDSO_TH_ALGO_ARM_GENTIM:
return getCntxct(false), true
return getCntxct(th.physical != 0), true
default:
return 0, false
}
Expand Down