summaryrefslogtreecommitdiffstats
path: root/arch/riscv/mm
diff options
context:
space:
mode:
authorZong Li <zong@andestech.com>2018-06-25 16:49:37 +0800
committerPalmer Dabbelt <palmer@sifive.com>2018-07-04 13:53:21 -0700
commitd5fad48cfb4b183d87960904c177eeeb9412b929 (patch)
tree350d18542b7b7e13f6e301ccd60c6543bf47d2ef /arch/riscv/mm
parent021c91791a5e7e85c567452f1be3e4c2c6cb6063 (diff)
downloadlinux-d5fad48cfb4b183d87960904c177eeeb9412b929.tar.bz2
RISC-V: Add conditional macro for zone of DMA32
The DMA32 is for 64-bit usage. Signed-off-by: Zong Li <zong@andestech.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/mm')
-rw-r--r--arch/riscv/mm/init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index c77df8142be2..58a522f9bcc3 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -28,7 +28,9 @@ static void __init zone_sizes_init(void)
{
unsigned long max_zone_pfns[MAX_NR_ZONES] = { 0, };
+#ifdef CONFIG_ZONE_DMA32
max_zone_pfns[ZONE_DMA32] = PFN_DOWN(min(4UL * SZ_1G, max_low_pfn));
+#endif
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
free_area_init_nodes(max_zone_pfns);