lkml.org 
[lkml]   [2018]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/5] RISC-V: Add conditional macro for zone of DMA32
Date
The DMA32 is for 64-bit usage.

Signed-off-by: Zong Li <zong@andestech.com>
---
arch/riscv/mm/init.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index c77df8142be2..91a5852e28fd 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -28,8 +28,11 @@ 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));
+#else
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
+#endif

free_area_init_nodes(max_zone_pfns);
}
--
2.16.1
\
 
 \ /
  Last update: 2018-06-21 03:50    [W:0.115 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site