Page MenuHomeFreeBSD

D49264.id151971.diff
No OneTemporary

D49264.id151971.diff

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

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)

Event Timeline