From: Yisheng Xie <xieyisheng1@huawei.com>
To: Robert Richter <robert.richter@cavium.com>
Cc: Russell King <linux@armlinux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
David Daney <david.daney@cavium.com>,
Mark Rutland <mark.rutland@arm.com>,
Hanjun Guo <hanjun.guo@linaro.org>,
James Morse <james.morse@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Hanjun Guo <guohanjun@huawei.com>,
Xishi Qiu <qiuxishi@huawei.com>
Subject: Re: [PATCH] arm64: mm: Fix NOMAP page initialization
Date: Thu, 15 Dec 2016 11:01:04 +0800 [thread overview]
Message-ID: <4bc9df75-1b67-2428-184e-ce52b5f95528@huawei.com> (raw)
In-Reply-To: <20161214094542.GE5588@rric.localdomain>
hi Robert,
On 2016/12/14 17:45, Robert Richter wrote:
> On 12.12.16 17:53:02, Yisheng Xie wrote:
>> It seems that memblock_is_memory() is also too strict for early_pfn_valid,
>> so what about this patch, which use common pfn_valid as early_pfn_valid
>> when CONFIG_HAVE_ARCH_PFN_VALID=y:
>> ------------
>> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
>> index 0f088f3..9d596f3 100644
>> --- a/include/linux/mmzone.h
>> +++ b/include/linux/mmzone.h
>> @@ -1200,7 +1200,17 @@ static inline int pfn_present(unsigned long pfn)
>> #define pfn_to_nid(pfn) (0)
>> #endif
>>
>> +#ifdef CONFIG_HAVE_ARCH_PFN_VALID
>> +static inline int early_pfn_valid(unsigned long pfn)
>> +{
>> + if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
>> + return 0;
>> + return valid_section(__nr_to_section(pfn_to_section_nr(pfn)));
>> +}
>
> I sent a V2 patch that uses pfn_present(). This only initilizes
> sections with memory.
hmmi 1/4 ? maybe I do not quite catch what your mean, but I do not think
pfn_present is right for this case.
IMO, The valid_section() means the section with mem_map, not section with memory.
And:
pfn_present
-> present_section
which means the section is present but may not have mem_map, so it may not
have page struct at all for that section.
Please let me know, if I miss anything.
Thanks,
Yisheng Xie.
>
> -Robert
>
>> +#define early_pfn_valid early_pfn_valid
>> +#else
>> #define early_pfn_valid(pfn) pfn_valid(pfn)
>> +#endif
>> void sparse_init(void);
>> #else
>> #define sparse_init() do {} while (0)
>>
>>
>>
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-12-15 3:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 18:10 Robert Richter
2016-12-09 19:07 ` Russell King - ARM Linux
2016-12-12 3:12 ` Yisheng Xie
2016-12-12 9:53 ` Yisheng Xie
2016-12-14 9:45 ` Robert Richter
2016-12-15 3:01 ` Yisheng Xie [this message]
2016-12-15 15:48 ` Robert Richter
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=4bc9df75-1b67-2428-184e-ce52b5f95528@huawei.com \
--to=xieyisheng1@huawei.com \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=david.daney@cavium.com \
--cc=guohanjun@huawei.com \
--cc=hanjun.guo@linaro.org \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=qiuxishi@huawei.com \
--cc=robert.richter@cavium.com \
--cc=will.deacon@arm.com \
/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