diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-04-01 17:32:43 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-04-01 19:12:48 -0400 |
commit | 042be38e6106ed70b42d096ab4a1ed4187e510e6 (patch) | |
tree | fb3599873f28cf36dbc76b6cd0a84f3e89e5e8cb /drivers/firmware | |
parent | b4a5e8a1deca7e61ebaffb37344766b0f0e9f327 (diff) |
ibft, x86: Change reserve_ibft_region() to find_ibft_region()
This allows arch code could decide the way to reserve the ibft.
And we should reserve ibft as early as possible, instead of BOOTMEM
stage, in case the table is in RAM range and is not reserved by BIOS
(this will often be the case.)
Move to just after find_smp_config().
Also when CONFIG_NO_BOOTMEM=y, We will not have reserve_bootmem() anymore.
-v2: fix typo about ibft pointed by Konrad Rzeszutek Wilk <konrad@darnok.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4BB510FB.80601@kernel.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Peter Jones <pjones@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
CC: Jan Beulich <jbeulich@novell.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/iscsi_ibft_find.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/firmware/iscsi_ibft_find.c b/drivers/firmware/iscsi_ibft_find.c index dfb15c06c88f..8f5d9e258829 100644 --- a/drivers/firmware/iscsi_ibft_find.c +++ b/drivers/firmware/iscsi_ibft_find.c | |||
@@ -52,7 +52,7 @@ EXPORT_SYMBOL_GPL(ibft_addr); | |||
52 | * Routine used to find the iSCSI Boot Format Table. The logical | 52 | * Routine used to find the iSCSI Boot Format Table. The logical |
53 | * kernel address is set in the ibft_addr global variable. | 53 | * kernel address is set in the ibft_addr global variable. |
54 | */ | 54 | */ |
55 | void __init reserve_ibft_region(void) | 55 | unsigned long __init find_ibft_region(unsigned long *sizep) |
56 | { | 56 | { |
57 | unsigned long pos; | 57 | unsigned long pos; |
58 | unsigned int len = 0; | 58 | unsigned int len = 0; |
@@ -78,6 +78,11 @@ void __init reserve_ibft_region(void) | |||
78 | } | 78 | } |
79 | } | 79 | } |
80 | } | 80 | } |
81 | if (ibft_addr) | 81 | if (ibft_addr) { |
82 | reserve_bootmem(pos, PAGE_ALIGN(len), BOOTMEM_DEFAULT); | 82 | *sizep = PAGE_ALIGN(len); |
83 | return pos; | ||
84 | } | ||
85 | |||
86 | *sizep = 0; | ||
87 | return 0; | ||
83 | } | 88 | } |