mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Yinghai Lu <[email protected]> LKML-Reference: <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Peter Jones <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> CC: Jan Beulich <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
This commit is contained in:
parent
b4a5e8a1de
commit
042be38e61
3 changed files with 26 additions and 7 deletions
|
|
@ -52,7 +52,7 @@ EXPORT_SYMBOL_GPL(ibft_addr);
|
|||
* Routine used to find the iSCSI Boot Format Table. The logical
|
||||
* kernel address is set in the ibft_addr global variable.
|
||||
*/
|
||||
void __init reserve_ibft_region(void)
|
||||
unsigned long __init find_ibft_region(unsigned long *sizep)
|
||||
{
|
||||
unsigned long pos;
|
||||
unsigned int len = 0;
|
||||
|
|
@ -78,6 +78,11 @@ void __init reserve_ibft_region(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (ibft_addr)
|
||||
reserve_bootmem(pos, PAGE_ALIGN(len), BOOTMEM_DEFAULT);
|
||||
if (ibft_addr) {
|
||||
*sizep = PAGE_ALIGN(len);
|
||||
return pos;
|
||||
}
|
||||
|
||||
*sizep = 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue