diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-01-25 09:31:28 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-07 12:38:34 +0100 |
commit | d7a5b2ffa1352f0310630934a56aecbdfb617b72 (patch) | |
tree | 5ec2ed1d4e63d4bd2847531115fd263109a16830 /include/asm-powerpc/lmb.h | |
parent | [PATCH] powerpc: cleaned up fsl_soc.c (diff) | |
download | linux-d7a5b2ffa1352f0310630934a56aecbdfb617b72.tar.xz linux-d7a5b2ffa1352f0310630934a56aecbdfb617b72.zip |
[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 'include/asm-powerpc/lmb.h')
-rw-r--r-- | include/asm-powerpc/lmb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-powerpc/lmb.h b/include/asm-powerpc/lmb.h index d3546c4c9f46..4fda8eaaeaf4 100644 --- a/include/asm-powerpc/lmb.h +++ b/include/asm-powerpc/lmb.h @@ -48,6 +48,8 @@ extern long __init lmb_reserve(unsigned long, unsigned long); extern unsigned long __init lmb_alloc(unsigned long, unsigned long); extern unsigned long __init lmb_alloc_base(unsigned long, unsigned long, unsigned long); +extern unsigned long __init __lmb_alloc_base(unsigned long, unsigned long, + unsigned long); extern unsigned long __init lmb_phys_mem_size(void); extern unsigned long __init lmb_end_of_DRAM(void); extern unsigned long __init lmb_abs_to_phys(unsigned long); |