x86/mm: Fix the size calculation of mapping tables
x86/mm: Fix the size calculation of mapping tables

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 <0f114804888b88d50037b04b42e57b858d851b87@gmail.com>
Cc: Yinghai Lu <0674548f4d596393408a51d6287a76ebba2f42aa@kernel.org>
Cc: Tejun Heo <546b05909706652891a87f7bfe385ae147f61f91@kernel.org>
Cc: <8e9f1e80641c44cf70549aac1d99876be945c156@gmail.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Link: babd7a883cf9958a695c13852bd17e5eed0eeb5b@git.kernel.org
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas