From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: yinghai@kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: mm: Remove unnecessary assignment for max_pfn_mapped:q
Date: Fri, 10 May 2013 17:01:12 +0800 [thread overview]
Message-ID: <518CB758.4000101@cn.fujitsu.com> (raw)
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.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/mm/init.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index fdc5dca..404c889 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -416,7 +416,6 @@ void __init init_mem_mapping(void)
/* step_size need to be small so pgt_buf from BRK could cover it */
step_size = PMD_SIZE;
- max_pfn_mapped = 0; /* will get exact value next */
min_pfn_mapped = real_end >> PAGE_SHIFT;
last_start = start = real_end;
while (last_start > ISA_END_ADDRESS) {
--
1.7.1
next reply other threads:[~2013-05-10 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-10 9:01 Zhang Yanfei [this message]
2013-05-10 9:27 ` [PATCH] x86: mm: Remove unnecessary assignment for max_pfn_mapped:q Yinghai Lu
2013-05-10 10:28 ` Zhang Yanfei
2013-05-10 14:57 ` Yinghai Lu
2013-05-11 7:36 ` Ingo Molnar
2013-05-15 4:44 ` [PATCH] x86: mm: Remove unnecessary assignment for max_pfn_mapped Zhang Yanfei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=518CB758.4000101@cn.fujitsu.com \
--to=zhangyanfei@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox