diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-01-25 03:31:28 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-07 06:38:34 -0500 |
commit | d7a5b2ffa1352f0310630934a56aecbdfb617b72 (patch) | |
tree | 5ec2ed1d4e63d4bd2847531115fd263109a16830 /arch/powerpc/mm/hash_utils_64.c | |
parent | 2fb07d776b3c4473275eb225b6bf2a83755c9bfe (diff) |
[PATCH] powerpc: Always panic if lmb_alloc() fails
Currently most callers of lmb_alloc() don't check if it worked or not, if it
ever does weird bad things will probably happen. The few callers who do check
just panic or BUG_ON.
So make lmb_alloc() panic internally, to catch bugs at the source. The few
callers who did check the result no longer need to.
The only caller that did anything interesting with the return result was
careful_allocation(). For it we create __lmb_alloc_base() which _doesn't_ panic
automatically, a little messy, but passable.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm/hash_utils_64.c')
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 149351a84b94..95b4cd6b65e0 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -430,7 +430,6 @@ void __init htab_initialize(void) | |||
430 | * the absolute address space. | 430 | * the absolute address space. |
431 | */ | 431 | */ |
432 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); | 432 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); |
433 | BUG_ON(table == 0); | ||
434 | 433 | ||
435 | DBG("Hash table allocated at %lx, size: %lx\n", table, | 434 | DBG("Hash table allocated at %lx, size: %lx\n", table, |
436 | htab_size_bytes); | 435 | htab_size_bytes); |