diff options
author | Alexander Gordeev <agordeev@linux.ibm.com> | 2023-09-01 16:12:13 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-09-05 21:12:51 +0300 |
commit | 08d90f46c7ddff0cbd3fefbddf1d2bd53ce4b477 (patch) | |
tree | 71d770d7d88f0d2a623ebcf3638bdb7a70800f3b /arch | |
parent | acf00b5ef9f83069ddbea274ab32931f8573e98b (diff) | |
download | linux-08d90f46c7ddff0cbd3fefbddf1d2bd53ce4b477.tar.xz |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/include/asm/dma.h | 2 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/include/asm/dma.h b/arch/s390/include/asm/dma.h index c260adb25997..7fe3e31956d7 100644 --- a/arch/s390/include/asm/dma.h +++ b/arch/s390/include/asm/dma.h @@ -9,6 +9,6 @@ * to DMA. It _is_ used for the s390 memory zone split at 2GB caused * by the 31 bit heritage. */ -#define MAX_DMA_ADDRESS 0x80000000 +#define MAX_DMA_ADDRESS __va(0x80000000) #endif /* _ASM_S390_DMA_H */ diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index d1631f8e53b5..8b94d2212d33 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -98,7 +98,7 @@ void __init paging_init(void) sparse_init(); zone_dma_bits = 31; memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); - max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); + max_zone_pfns[ZONE_DMA] = virt_to_pfn(MAX_DMA_ADDRESS); max_zone_pfns[ZONE_NORMAL] = max_low_pfn; free_area_init(max_zone_pfns); } |