diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-04-11 10:47:28 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-04-11 10:47:28 +0200 |
| commit | b6466d53afdb0c3ca058848cd4c12e141aba0763 (patch) | |
| tree | 06da4bf69879a7a26dc78d1b4f4b47ca4aaf4c74 /include/linux/random.h | |
| parent | 4ffa3c977b5da2907eb294dc6d0259a02f2284aa (diff) | |
| parent | 7f00f388712b29005782bad7e4b25942620f3b9c (diff) | |
Merge branch 'x86/urgent' into x86/cpu, to resolve conflict
Conflicts:
arch/x86/kernel/cpu/intel_rdt_schemata.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/random.h')
| -rw-r--r-- | include/linux/random.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/random.h b/include/linux/random.h index 7bd2403e4fef..ed5c3838780d 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -37,14 +37,26 @@ extern void get_random_bytes(void *buf, int nbytes); extern int add_random_ready_callback(struct random_ready_callback *rdy); extern void del_random_ready_callback(struct random_ready_callback *rdy); extern void get_random_bytes_arch(void *buf, int nbytes); -extern int random_int_secret_init(void); #ifndef MODULE extern const struct file_operations random_fops, urandom_fops; #endif -unsigned int get_random_int(void); -unsigned long get_random_long(void); +u32 get_random_u32(void); +u64 get_random_u64(void); +static inline unsigned int get_random_int(void) +{ + return get_random_u32(); +} +static inline unsigned long get_random_long(void) +{ +#if BITS_PER_LONG == 64 + return get_random_u64(); +#else + return get_random_u32(); +#endif +} + unsigned long randomize_page(unsigned long start, unsigned long range); u32 prandom_u32(void); |
