aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/slub_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/slub_def.h')
-rw-r--r--include/linux/slub_def.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 4ba59cfc1f75..6d14409c4d9a 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -10,9 +10,10 @@
10#include <linux/gfp.h> 10#include <linux/gfp.h>
11#include <linux/workqueue.h> 11#include <linux/workqueue.h>
12#include <linux/kobject.h> 12#include <linux/kobject.h>
13#include <linux/kmemtrace.h>
14#include <linux/kmemleak.h> 13#include <linux/kmemleak.h>
15 14
15#include <trace/events/kmem.h>
16
16enum stat_item { 17enum stat_item {
17 ALLOC_FASTPATH, /* Allocation from cpu slab */ 18 ALLOC_FASTPATH, /* Allocation from cpu slab */
18 ALLOC_SLOWPATH, /* Allocation by getting a new cpu slab */ 19 ALLOC_SLOWPATH, /* Allocation by getting a new cpu slab */
@@ -105,15 +106,17 @@ struct kmem_cache {
105/* 106/*
106 * Kmalloc subsystem. 107 * Kmalloc subsystem.
107 */ 108 */
108#if defined(ARCH_KMALLOC_MINALIGN) && ARCH_KMALLOC_MINALIGN > 8 109#if defined(ARCH_DMA_MINALIGN) && ARCH_DMA_MINALIGN > 8
109#define KMALLOC_MIN_SIZE ARCH_KMALLOC_MINALIGN 110#define KMALLOC_MIN_SIZE ARCH_DMA_MINALIGN
110#else 111#else
111#define KMALLOC_MIN_SIZE 8 112#define KMALLOC_MIN_SIZE 8
112#endif 113#endif
113 114
114#define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE) 115#define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE)
115 116
116#ifndef ARCH_KMALLOC_MINALIGN 117#ifdef ARCH_DMA_MINALIGN
118#define ARCH_KMALLOC_MINALIGN ARCH_DMA_MINALIGN
119#else
117#define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long) 120#define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long)
118#endif 121#endif
119 122