Lines Matching defs:shift
56 #define CTOR(shift) static void ctor_##shift(void *addr) \
58 memset(addr, 0, sizeof(void *) << (shift)); \
64 static inline void (*ctor(int shift))(void *)
68 switch (shift) {
99 void pgtable_cache_add(unsigned int shift)
102 unsigned long table_size = sizeof(void *) << shift;
110 * shift value in the low bits. All tables must be aligned so
120 BUG_ON(shift > MAX_PGTABLE_INDEX_SIZE);
122 if (PGT_CACHE(shift))
126 name = kasprintf(GFP_KERNEL, "pgtable-2^%d", shift);
128 new = kmem_cache_create(name, table_size, align, 0, ctor(shift));
130 panic("Could not allocate pgtable cache for order %d", shift);
133 pgtable_cache[shift] = new;
135 pr_debug("Allocated pgtable cache for order %d\n", shift);