Mark some variables __read_mostly.
This commit is contained in:
parent
808c0b52c7
commit
b8cae62e30
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rndpseudo.c,v 1.33 2015/04/21 12:51:53 riastradh Exp $ */
|
||||
/* $NetBSD: rndpseudo.c,v 1.34 2015/04/21 12:57:03 riastradh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.33 2015/04/21 12:51:53 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.34 2015/04/21 12:57:03 riastradh Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -87,7 +87,7 @@ __KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.33 2015/04/21 12:51:53 riastradh Exp
|
|||
*/
|
||||
#define RND_TEMP_BUFFER_SIZE 512
|
||||
|
||||
static pool_cache_t rnd_temp_buffer_cache;
|
||||
static pool_cache_t rnd_temp_buffer_cache __read_mostly;
|
||||
|
||||
/*
|
||||
* Per-open state -- a lazily initialized CPRNG.
|
||||
|
@ -97,12 +97,12 @@ struct rnd_ctx {
|
|||
bool rc_hard;
|
||||
};
|
||||
|
||||
static pool_cache_t rnd_ctx_cache;
|
||||
static pool_cache_t rnd_ctx_cache __read_mostly;
|
||||
|
||||
/*
|
||||
* The per-CPU RNGs used for short requests
|
||||
*/
|
||||
static percpu_t *percpu_urandom_cprng;
|
||||
static percpu_t *percpu_urandom_cprng __read_mostly;
|
||||
|
||||
/* Used by ioconf.c to attach the rnd pseudo-device. */
|
||||
void rndattach(int);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_rndq.c,v 1.69 2015/04/21 12:07:31 riastradh Exp $ */
|
||||
/* $NetBSD: kern_rndq.c,v 1.70 2015/04/21 12:55:57 riastradh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.69 2015/04/21 12:07:31 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.70 2015/04/21 12:55:57 riastradh Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/atomic.h>
|
||||
|
@ -117,7 +117,7 @@ static struct {
|
|||
/*
|
||||
* Memory pool for sample buffers
|
||||
*/
|
||||
static pool_cache_t rnd_mempc;
|
||||
static pool_cache_t rnd_mempc __read_mostly;
|
||||
|
||||
/*
|
||||
* Global entropy pool and sources.
|
||||
|
@ -148,7 +148,8 @@ static krndsource_t rnd_source_no_collect = {
|
|||
|
||||
krndsource_t rnd_printf_source, rnd_autoconf_source;
|
||||
|
||||
static void *rnd_process, *rnd_wakeup;
|
||||
static void *rnd_process __read_mostly;
|
||||
static void *rnd_wakeup __read_mostly;
|
||||
|
||||
static inline uint32_t rnd_counter(void);
|
||||
static void rnd_intr(void *);
|
||||
|
|
Loading…
Reference in New Issue