diff options
| author | Chris Wilson <[email protected]> | 2016-12-22 14:45:14 +0000 |
|---|---|---|
| committer | Daniel Vetter <[email protected]> | 2016-12-27 11:30:56 +0000 |
| commit | cf4a7207b1cb4a3c3fe3aa11a83c9d673722a7f5 (patch) | |
| tree | 664430c374186b63e808e08f65bca635747e14c9 /drivers/gpu/drm/lib/drm_random.c | |
| parent | drm: Compile time enabling for asserts in drm_mm (diff) | |
| download | kernel-cf4a7207b1cb4a3c3fe3aa11a83c9d673722a7f5.tar.gz kernel-cf4a7207b1cb4a3c3fe3aa11a83c9d673722a7f5.zip | |
lib: Add a simple prime number generator
Prime numbers are interesting for testing components that use multiplies
and divides, such as testing DRM's struct drm_mm alignment computations.
v2: Move to lib/, add selftest
v3: Fix initial constants (exclude 0/1 from being primes)
v4: More RCU markup to keep 0day/sparse happy
v5: Fix RCU unwind on module exit, add to kselftests
v6: Tidy computation of bitmap size
v7: for_each_prime_number_from()
v8: Compose small-primes using BIT() for easier verification
v9: Move rcu dance entirely into callers.
v10: Improve quote for Betrand's Postulate (aka Chebyshev's theorem)
Signed-off-by: Chris Wilson <[email protected]>
Cc: Lukas Wunner <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/lib/drm_random.c')
0 files changed, 0 insertions, 0 deletions
