mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 16:56:49 +07:00
s390/kasan: add support for mem= kernel parameter
Handle mem= kernel parameter in kasan to limit physical memory. Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
12e55fa194
commit
78333d1f90
@ -268,6 +268,9 @@ void __init kasan_early_init(void)
|
||||
memsize = get_mem_detect_end();
|
||||
if (!memsize)
|
||||
kasan_early_panic("cannot detect physical memory size\n");
|
||||
/* respect mem= cmdline parameter */
|
||||
if (memory_end_set && memsize > memory_end)
|
||||
memsize = memory_end;
|
||||
memsize = min(memsize, KASAN_SHADOW_START);
|
||||
|
||||
if (IS_ENABLED(CONFIG_KASAN_S390_4_LEVEL_PAGING)) {
|
||||
|
Loading…
Reference in New Issue
Block a user