Lines Matching defs:shift
71 #define CTOR(shift) static void ctor_##shift(void *addr) \
73 memset(addr, 0, sizeof(void *) << (shift)); \
79 static inline void (*ctor(int shift))(void *)
83 switch (shift) {
114 void pgtable_cache_add(unsigned int shift)
117 unsigned long table_size = sizeof(void *) << shift;
125 * shift value in the low bits. All tables must be aligned so
135 BUG_ON(shift > MAX_PGTABLE_INDEX_SIZE);
137 if (PGT_CACHE(shift))
141 name = kasprintf(GFP_KERNEL, "pgtable-2^%d", shift);
143 new = kmem_cache_create(name, table_size, align, 0, ctor(shift));
145 panic("Could not allocate pgtable cache for order %d", shift);
148 pgtable_cache[shift] = new;
150 pr_debug("Allocated pgtable cache for order %d\n", shift);