For x86 PUD_SHIFT is 30 and PMD_SHIFT is 21, so the consequence of (PUD_SHIFT-PMD_SHIFT)/2 is 4. Update the comments to the code.
Cc: Yinghai Lu <ying...@kernel.org> Signed-off-by: Lin Feng <linf...@cn.fujitsu.com> --- arch/x86/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 59b7fc4..637a95b 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -389,7 +389,7 @@ static unsigned long __init init_range_memory_mapping( return mapped_ram_size; } -/* (PUD_SHIFT-PMD_SHIFT)/2 */ +/* (PUD_SHIFT-PMD_SHIFT)/2+1 */ #define STEP_SIZE_SHIFT 5 void __init init_mem_mapping(void) { -- 1.8.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/