x86/mm: Fix the size calculation of mapping tables
authorWANG Cong <xiyou.wangcong@gmail.com>
Mon, 5 Mar 2012 23:05:13 +0000 (15:05 -0800)
committerIngo Molnar <mingo@elte.hu>
Tue, 6 Mar 2012 08:38:26 +0000 (09:38 +0100)
For machines that enable PSE, the first 2/4M memory region still uses
4K pages, so needs more PTEs in this case, but
find_early_table_space() doesn't count this.

This patch fixes it.

The bug was found via code review, no misbehavior of the kernel
was observed.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: <ianfang.cn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/n/tip-kq6a00qe33h7c7ais2xsywnh@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>

No differences found