Re: [PATCH] x86: mm: Remove unnecessary assignment for max_pfn_mapped:q

Yinghai Lu
2013-05-10T09:27:15Z

On Fri, May 10, 2013 at 2:01 AM, Zhang Yanfei
<zhangyanfei@cn.fujitsu.com> wrote:
> init_memory_mapping will set max_pfn_mapped:
> int_memory_mapping
> --> add_pfn_range_mapped
> --> max_pfn_mapped = max(max_pfn_mapped, end_pfn)
>
> In init_mem_mapping, before we set max_pfn_mapped to 0, we
> have already called init_memory_mapping to setup pagetable
> for [0, ISA_END_ADDRESS], and that sets max_pfn_mapped. So
> the assignment to 0 is not necessary, remove it.

NAK.

for 32bit or Xen, max_pfn_mapped is set way before in head_32.S and
xen-enlighen.

Yinghai