lkml.org 
[lkml]   [2005]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.12-rc4-mm2, alpha and mips broke
Jan Dittmer <jdittmer@ppp0.net> wrote:
>
> Comparing 2.6.12-rc4-mm1 to 2.6.12-rc4-mm2 (defconfig)
> ======================================================
>
> - alpha: broke
> AR arch/alpha/lib/lib.a
> GEN .version
> CHK include/linux/compile.h
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1
> mm/built-in.o(.text+0xe79c):/usr/src/ctest/mm/kernel/mm/slab.c:339: undefined reference to `__bad_size'
> mm/built-in.o(.text+0xe7a0):/usr/src/ctest/mm/kernel/mm/slab.c:339: undefined reference to `__bad_size'
> make[1]: *** [.tmp_vmlinux1] Error 1
> make: *** [_all] Error 2
>

argh, I forgot to add the patch to the series file, sorry.


From: Andrew Morton <akpm@osdl.org>

This doesn't work (on alpha, at least).

It's not inside __builtin_constant_p() so the compiler cannot be sure that all
the possible sizes have been checked for.

Cc: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

mm/slab.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)

diff -puN mm/slab.c~numa-aware-slab-allocator-v3-__bad_size-fix mm/slab.c
--- 25-alpha/mm/slab.c~numa-aware-slab-allocator-v3-__bad_size-fix 2005-05-15 22:25:33.000000000 -0700
+++ 25-alpha-akpm/mm/slab.c 2005-05-15 22:30:10.000000000 -0700
@@ -325,7 +325,8 @@ struct kmem_list3 __initdata initkmem_li
*/
static inline int index_of(const size_t size)
{
- int i = 0;
+ if (__builtin_constant_p(size)) {
+ int i = 0;

#define CACHE(x) \
if (size <=x) \
@@ -334,11 +335,12 @@ static inline int index_of(const size_t
i++;
#include "linux/kmalloc_sizes.h"
#undef CACHE
- {
- extern void __bad_size(void);
- __bad_size();
- return 0;
+ {
+ extern void __bad_size(void);
+ __bad_size();
+ }
}
+ return 0;
}

#define INDEX_AC index_of(sizeof(struct array_cache))
_
>
> - mips: broke
> CC mm/mempool.o
> CC mm/oom_kill.o
> CC mm/fadvise.o
> CC mm/page_alloc.o
> CC mm/page-writeback.o
> CC mm/pdflush.o
> CC mm/readahead.o
> CC mm/slab.o
> mm/slab.c:117:2: #error "Broken Configuration: CONFIG_NUMA not set but MAX_NUMNODES !=1 !!"
> make[1]: *** [mm/slab.o] Error 1
> make: *** [mm] Error 2
>

OK, Christoph is scratching his head over that one.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-16 22:21    [W:0.190 / U:0.428 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site