mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
s390/mem_detect: replace tprot loop with binary search
In a situation when other memory detection methods are not available (no SCLP and no z/VM diag260), continuous online memory is assumed. Replacing tprot loop with faster binary search, as only online memory end has to be found. Reviewed-by: Heiko Carstens <[email protected]> Reviewed-by: Martin Schwidefsky <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
parent
cd45c99561
commit
54c57795e8
4 changed files with 20 additions and 36 deletions
|
|
@ -272,7 +272,7 @@ int __init sclp_early_get_info(struct read_info_sccb *info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int __init sclp_early_get_meminfo(unsigned long *mem, unsigned long *rzm)
|
||||
int __init sclp_early_get_memsize(unsigned long *mem)
|
||||
{
|
||||
unsigned long rnmax;
|
||||
unsigned long rnsize;
|
||||
|
|
@ -285,7 +285,6 @@ int __init sclp_early_get_meminfo(unsigned long *mem, unsigned long *rzm)
|
|||
rnsize = sccb->rnsize ? sccb->rnsize : sccb->rnsize2;
|
||||
rnsize <<= 20;
|
||||
*mem = rnsize * rnmax;
|
||||
*rzm = rnsize;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue