Skip to content

Commit

Permalink
s390/setup: fix virtual vs physical address confusion
Browse files Browse the repository at this point in the history
Fix virtual vs physical address confusion. This does not fix a bug
since virtual and physical address spaces are currently the same.

/proc/iomem should report the physical address ranges, so use __pa_symbol()
for resource registration, similar to other architectures.

Signed-off-by: Gerald Schaefer <[email protected]>
Reviewed-by: Alexander Gordeev <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
  • Loading branch information
gerald-schaefer authored and hcahca committed Feb 16, 2024
1 parent b20ea29 commit e8054ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,12 @@ static void __init setup_resources(void)
int j;
u64 i;

code_resource.start = (unsigned long) _text;
code_resource.end = (unsigned long) _etext - 1;
data_resource.start = (unsigned long) _etext;
data_resource.end = (unsigned long) _edata - 1;
bss_resource.start = (unsigned long) __bss_start;
bss_resource.end = (unsigned long) __bss_stop - 1;
code_resource.start = __pa_symbol(_text);
code_resource.end = __pa_symbol(_etext) - 1;
data_resource.start = __pa_symbol(_etext);
data_resource.end = __pa_symbol(_edata) - 1;
bss_resource.start = __pa_symbol(__bss_start);
bss_resource.end = __pa_symbol(__bss_stop) - 1;

for_each_mem_range(i, &start, &end) {
res = memblock_alloc(sizeof(*res), 8);
Expand Down

0 comments on commit e8054ea

Please sign in to comment.