diff options
author | Alexander Gordeev <agordeev@linux.ibm.com> | 2022-01-26 13:47:59 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2022-02-06 23:31:29 +0100 |
commit | 9de209c7d584d6e06ad92f120d83d4f27c200497 (patch) | |
tree | f8240b9a8c62581396d9800cd3b59aa6eaea1099 /arch/s390/kernel | |
parent | 628c66942e233d73def54fa458641cfc96be6660 (diff) | |
download | lwn-9de209c7d584d6e06ad92f120d83d4f27c200497.tar.gz lwn-9de209c7d584d6e06ad92f120d83d4f27c200497.zip |
s390/dump: fix os_info virtual vs physical address confusion
Due to historical reasons os_info handling functions misuse
the notion of physical vs virtual addresses difference.
Note: this does not fix a bug currently, since virtual
and physical addresses are identical.
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>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/os_info.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/os_info.c b/arch/s390/kernel/os_info.c index 4bef35b79b93..fa2be71b2c6b 100644 --- a/arch/s390/kernel/os_info.c +++ b/arch/s390/kernel/os_info.c @@ -45,7 +45,7 @@ void os_info_crashkernel_add(unsigned long base, unsigned long size) */ void os_info_entry_add(int nr, void *ptr, u64 size) { - os_info.entry[nr].addr = (u64)(unsigned long)ptr; + os_info.entry[nr].addr = __pa(ptr); os_info.entry[nr].size = size; os_info.entry[nr].csum = (__force u32)csum_partial(ptr, size, 0); os_info.csum = os_info_csum(&os_info); @@ -62,7 +62,7 @@ void __init os_info_init(void) os_info.version_minor = OS_INFO_VERSION_MINOR; os_info.magic = OS_INFO_MAGIC; os_info.csum = os_info_csum(&os_info); - mem_assign_absolute(S390_lowcore.os_info, (unsigned long) ptr); + mem_assign_absolute(S390_lowcore.os_info, __pa(ptr)); } #ifdef CONFIG_CRASH_DUMP |