Thread (7 messages) 7 messages, 5 authors, 2016-08-31

Re: [PATCH v2 2/2] HWRNG: thunderx: Add Cavium HWRNG driver for ThunderX SoC.

From: Corentin LABBE <clabbe.montjoie@gmail.com>
Date: 2016-08-24 05:49:37
Also in: linux-arm-kernel, linux-pci, lkml

Hello
+/* Read data from the RNG unit */
+static int cavium_rng_read(struct hwrng *rng, void *dat, size_t max, bool wait)
+{
+	struct cavium_rng *p = container_of(rng, struct cavium_rng, ops);
+	unsigned int size = max;
+
+	while (size >= 8) {
+		*((u64 *)dat) = readq(p->result);
+		size -= 8;
+		dat += 8;
+	}
I think you could use readsq()
This will increase throughput

Regards

LABBE Corentin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help