aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/random/randomdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/random/randomdev.c')
-rw-r--r--sys/dev/random/randomdev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index 6d637ab5a53e..ced4dd8067d9 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -303,16 +303,16 @@ randomdev_accumulate(uint8_t *buf, u_int count)
/* Extra timing here is helpful to scrape scheduler jitter entropy */
randomdev_hash_init(&hash);
- timestamp = (uint32_t)get_cyclecount();
+ timestamp = random_get_cyclecount();
randomdev_hash_iterate(&hash, &timestamp, sizeof(timestamp));
randomdev_hash_iterate(&hash, buf, count);
- timestamp = (uint32_t)get_cyclecount();
+ timestamp = random_get_cyclecount();
randomdev_hash_iterate(&hash, &timestamp, sizeof(timestamp));
randomdev_hash_finish(&hash, entropy_data);
for (i = 0; i < RANDOM_KEYSIZE_WORDS; i += sizeof(event.he_entropy)/sizeof(event.he_entropy[0])) {
- event.he_somecounter = (uint32_t)get_cyclecount();
+ event.he_somecounter = random_get_cyclecount();
event.he_size = sizeof(event.he_entropy);
- event.he_source = RANDOM_CACHED;
+ event.he_source = RANDOM_RANDOMDEV;
event.he_destination = destination++; /* Harmless cheating */
memcpy(event.he_entropy, entropy_data + i, sizeof(event.he_entropy));
p_random_alg_context->ra_event_processor(&event);