From c6887064e6913c9d4167fc374f8af4ed40ff4181 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Fri, 20 May 2011 09:42:48 -0500 Subject: [PATCH] --- yaml --- r: 248627 b: refs/heads/master c: 3e0c2ab67e48f77c2da0a5c826aac397792a214e h: refs/heads/master i: 248625: 8f41be17e8ea1d66c9ad1eb04c45f408df8dfcfb 248623: 0b9774026752cbfa929e116d2fc35eaf8de373c0 v: v3 --- [refs] | 2 +- trunk/include/linux/slub_def.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b7269be17f11..25dc25a987b9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 442b06bcea23a01934d3da7ec5898fa154a6cafb +refs/heads/master: 3e0c2ab67e48f77c2da0a5c826aac397792a214e diff --git a/trunk/include/linux/slub_def.h b/trunk/include/linux/slub_def.h index ca0c076b2374..c8668d161dd8 100644 --- a/trunk/include/linux/slub_def.h +++ b/trunk/include/linux/slub_def.h @@ -177,7 +177,8 @@ static __always_inline int kmalloc_index(size_t size) if (size <= 4 * 1024) return 12; /* * The following is only needed to support architectures with a larger page - * size than 4k. + * size than 4k. We need to support 2 * PAGE_SIZE here. So for a 64k page + * size we would have to go up to 128k. */ if (size <= 8 * 1024) return 13; if (size <= 16 * 1024) return 14; @@ -188,7 +189,8 @@ static __always_inline int kmalloc_index(size_t size) if (size <= 512 * 1024) return 19; if (size <= 1024 * 1024) return 20; if (size <= 2 * 1024 * 1024) return 21; - return -1; + BUG(); + return -1; /* Will never be reached */ /* * What we really wanted to do and cannot do because of compiler issues is: