aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/slub_def.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index ca0c076b2374..c8668d161dd8 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -177,7 +177,8 @@ static __always_inline int kmalloc_index(size_t size)
177 if (size <= 4 * 1024) return 12; 177 if (size <= 4 * 1024) return 12;
178/* 178/*
179 * The following is only needed to support architectures with a larger page 179 * The following is only needed to support architectures with a larger page
180 * size than 4k. 180 * size than 4k. We need to support 2 * PAGE_SIZE here. So for a 64k page
181 * size we would have to go up to 128k.
181 */ 182 */
182 if (size <= 8 * 1024) return 13; 183 if (size <= 8 * 1024) return 13;
183 if (size <= 16 * 1024) return 14; 184 if (size <= 16 * 1024) return 14;
@@ -188,7 +189,8 @@ static __always_inline int kmalloc_index(size_t size)
188 if (size <= 512 * 1024) return 19; 189 if (size <= 512 * 1024) return 19;
189 if (size <= 1024 * 1024) return 20; 190 if (size <= 1024 * 1024) return 20;
190 if (size <= 2 * 1024 * 1024) return 21; 191 if (size <= 2 * 1024 * 1024) return 21;
191 return -1; 192 BUG();
193 return -1; /* Will never be reached */
192 194
193/* 195/*
194 * What we really wanted to do and cannot do because of compiler issues is: 196 * What we really wanted to do and cannot do because of compiler issues is: