Skip to content

Commit 08d90f4

Browse files
Alexander Gordeevhcahca
authored andcommitted
s390/mm: fix MAX_DMA_ADDRESS physical vs virtual confusion
MAX_DMA_ADDRESS is defined and treated as a physical address, whereas it should be virtual. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent acf00b5 commit 08d90f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/s390/include/asm/dma.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
* to DMA. It _is_ used for the s390 memory zone split at 2GB caused
1010
* by the 31 bit heritage.
1111
*/
12-
#define MAX_DMA_ADDRESS 0x80000000
12+
#define MAX_DMA_ADDRESS __va(0x80000000)
1313

1414
#endif /* _ASM_S390_DMA_H */

arch/s390/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void __init paging_init(void)
9898
sparse_init();
9999
zone_dma_bits = 31;
100100
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
101-
max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS);
101+
max_zone_pfns[ZONE_DMA] = virt_to_pfn(MAX_DMA_ADDRESS);
102102
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
103103
free_area_init(max_zone_pfns);
104104
}

0 commit comments

Comments
 (0)