primes
static const u8 primes[] = {
for (i = 0; i < ARRAY_SIZE(primes); i++) {
if (gr->tpc_total % primes[i]) {
gr->screen_tile_row_offset = primes[i];
static const struct primes small_primes = {
const struct primes *p;
struct primes *new;
.primes = {
p = rcu_dereference_protected(primes, lockdep_is_held(&lock));
bitmap_fill(new->primes, sz);
bitmap_copy(new->primes, p->primes, p->sz);
for (y = 2UL; y < sz; y = find_next_bit(new->primes, sz, y + 1))
new->last = clear_multiples(y, new->primes, p->sz, sz);
rcu_assign_pointer(primes, new);
kfree_rcu((struct primes *)p, rcu);
const struct primes *p;
p = rcu_dereference_protected(primes, lockdep_is_held(&lock));
rcu_assign_pointer(primes, &small_primes);
kfree_rcu((struct primes *)p, rcu);
const struct primes *p;
p = rcu_dereference(primes);
p = rcu_dereference(primes);
x = find_next_bit(p->primes, p->last, x + 1);
const struct primes *p;
p = rcu_dereference(primes);
p = rcu_dereference(primes);
result = test_bit(x, p->primes);
static const struct primes small_primes = {
.primes = {
static const struct primes __rcu *primes = RCU_INITIALIZER(&small_primes);
fn(ctx, rcu_dereference(primes));
typedef void (*primes_fn)(void *, const struct primes *);
unsigned long primes[];
bitmap_print_to_pagebuf(true, buf, p->primes, p->sz);
p->last, p->sz, p->primes[BITS_TO_LONGS(p->sz) - 1], buf);
static void dump_primes(void *ctx, const struct primes *p)
const int primes[] = {2,3,5,7,11,13,17,19};
for (i = 0; i < ARRAY_SIZE(primes); ++i)
set_bit(primes[i], bits);
static int primes[] = {251, 509, 1021, 2039, 4093,
#define IP_VS_MH_TAB_SIZE primes[IP_VS_MH_TAB_INDEX]