s390/setup: use virtual address for STSI instruction
authorAlexander Gordeev <agordeev@linux.ibm.com>
Thu, 7 Oct 2021 10:14:09 +0000 (12:14 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 26 Oct 2021 13:21:28 +0000 (15:21 +0200)
Provide virtual memory pointer for system-information block.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/setup.c

index 191fc96..5f0b0dc 100644 (file)
@@ -879,14 +879,12 @@ static void __init setup_randomness(void)
 {
        struct sysinfo_3_2_2 *vmms;
 
-       vmms = (struct sysinfo_3_2_2 *) memblock_phys_alloc(PAGE_SIZE,
-                                                           PAGE_SIZE);
+       vmms = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
        if (!vmms)
                panic("Failed to allocate memory for sysinfo structure\n");
-
        if (stsi(vmms, 3, 2, 2) == 0 && vmms->count)
                add_device_randomness(&vmms->vm, sizeof(vmms->vm[0]) * vmms->count);
-       memblock_free((unsigned long) vmms, PAGE_SIZE);
+       memblock_free_ptr(vmms, PAGE_SIZE);
 }
 
 /*