Skip to content

Commit 04f11ed

Browse files
Alexander GordeevVasily Gorbik
authored andcommitted
s390/setup: use physical pointers for memblock_reserve()
memblock_reserve() function accepts physcal address of a memory block to be reserved, but provided with virtual memory pointers. Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent e035389 commit 04f11ed

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

arch/s390/kernel/setup.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -805,13 +805,10 @@ static void __init check_initrd(void)
805805
*/
806806
static void __init reserve_kernel(void)
807807
{
808-
unsigned long start_pfn = PFN_UP(__pa(_end));
809-
810808
memblock_reserve(0, STARTUP_NORMAL_OFFSET);
811-
memblock_reserve((unsigned long)sclp_early_sccb, EXT_SCCB_READ_SCP);
812809
memblock_reserve(__amode31_base, __eamode31 - __samode31);
813-
memblock_reserve((unsigned long)_stext, PFN_PHYS(start_pfn)
814-
- (unsigned long)_stext);
810+
memblock_reserve(__pa(sclp_early_sccb), EXT_SCCB_READ_SCP);
811+
memblock_reserve(__pa(_stext), _end - _stext);
815812
}
816813

817814
static void __init setup_memory(void)

0 commit comments

Comments
 (0)