Skip to content

Commit

Permalink
s390/dump: fix os_info virtual vs physical address confusion
Browse files Browse the repository at this point in the history
[ Upstream commit 9de209c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Alexander Gordeev authored and gregkh committed Aug 17, 2022
1 parent cf0e42e commit 9287df4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/s390/kernel/os_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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);
Expand All @@ -63,7 +63,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
Expand Down

0 comments on commit 9287df4

Please sign in to comment.