Skip to content

Commit

Permalink
fixup; hw: always serialize rdtsc reads
Browse files Browse the repository at this point in the history
Since rdtsc() provides ordered timestamps now, we should reordering of
statements by the compiler too.

Issues genodelabs#5215, genodelabs#5430
  • Loading branch information
atopia committed Jan 22, 2025
1 parent d904299 commit bf140c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions repos/base-hw/src/include/hw/spec/x86_64/x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ struct Hw::Tsc
"rdtsc;"
"lfence;"
: "=a"(low), "=d"(high)
:
: "memory"
);
return (Genode::uint64_t)(high) << 32 | low;
}
Expand Down

0 comments on commit bf140c1

Please sign in to comment.