Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102792253
D35461.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35461.diff
View Options
diff --git a/sys/riscv/riscv/timer.c b/sys/riscv/riscv/timer.c
--- a/sys/riscv/riscv/timer.c
+++ b/sys/riscv/riscv/timer.c
@@ -78,30 +78,17 @@
};
static inline uint64_t
-get_cycles(void)
+get_timecount(void)
{
return (rdtime());
}
-static long
-get_counts(struct riscv_timer_softc *sc)
-{
- uint64_t counts;
-
- counts = get_cycles();
-
- return (counts);
-}
-
static u_int
-riscv_timer_tc_get_timecount(struct timecounter *tc)
+riscv_timer_tc_get_timecount(struct timecounter *tc __unused)
{
- struct riscv_timer_softc *sc;
-
- sc = tc->tc_priv;
- return (get_counts(sc));
+ return (get_timecount());
}
static uint32_t
@@ -120,7 +107,7 @@
if (first != 0) {
counts = ((uint32_t)et->et_frequency * first) >> 32;
- sbi_set_timer(get_cycles() + counts);
+ sbi_set_timer(get_timecount() + counts);
csr_set(sie, SIE_STIE);
return (0);
@@ -286,10 +273,10 @@
else
counts = usec * counts_per_usec;
- first = get_counts(riscv_timer_sc);
+ first = get_timecount();
while (counts > 0) {
- last = get_counts(riscv_timer_sc);
+ last = get_timecount();
counts -= (int64_t)(last - first);
first = last;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 6:31 AM (22 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14691363
Default Alt Text
D35461.diff (1 KB)
Attached To
Mode
D35461: riscv timer: remove intermediate helper
Attached
Detach File
Event Timeline
Log In to Comment