Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160292903
D49264.id151971.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
930 B
Referenced Files
None
Subscribers
None
D49264.id151971.diff
View Options
diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c
--- a/sys/arm/arm/generic_timer.c
+++ b/sys/arm/arm/generic_timer.c
@@ -800,26 +800,18 @@
BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE);
#endif
-static int64_t
+static uint64_t
arm_tmr_get_counts(int usec)
{
- int64_t counts, counts_per_usec;
+ uint64_t counts_per_usec;
+
+ if (usec < 0)
+ return (0);
/* Get the number of times to count */
counts_per_usec = ((arm_tmr_timecount.tc_frequency / 1000000) + 1);
- /*
- * Clamp the timeout at a maximum value (about 32 seconds with
- * a 66MHz clock). *Nobody* should be delay()ing for anywhere
- * near that length of time and if they are, they should be hung
- * out to dry.
- */
- if (usec >= (0x80000000U / counts_per_usec))
- counts = (0x80000000U / counts_per_usec) - 1;
- else
- counts = usec * counts_per_usec;
-
- return counts;
+ return (usec * counts_per_usec);
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 24, 12:12 AM (2 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34264681
Default Alt Text
D49264.id151971.diff (930 B)
Attached To
Mode
D49264: arm: Remove an overflow check from the timer
Attached
Detach File
Event Timeline
Log In to Comment