From: Huaisheng HS1 Ye <yehs1@lenovo.com>
To: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Cc: "mhocko@suse.com" <mhocko@suse.com>,
"willy@infradead.org" <willy@infradead.org>,
"vbabka@suse.cz" <vbabka@suse.cz>,
"mgorman@techsingularity.net" <mgorman@techsingularity.net>,
"pasha.tatashin@oracle.com" <pasha.tatashin@oracle.com>,
"alexander.levin@verizon.com" <alexander.levin@verizon.com>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
"penguin-kernel@I-love.SAKURA.ne.jp"
<penguin-kernel@I-love.SAKURA.ne.jp>,
"colyli@suse.de" <colyli@suse.de>,
NingTing Cheng <chengnt@lenovo.com>,
Ocean HY1 He <hehy1@lenovo.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: [External] [RFC PATCH v1 6/6] arch/x86/mm: create page table mapping for DRAM and NVDIMM both
Date: Tue, 8 May 2018 02:35:13 +0000 [thread overview]
Message-ID: <HK2PR03MB1684101846A9D9639BE00001929A0@HK2PR03MB1684.apcprd03.prod.outlook.com> (raw)
In-Reply-To: <1525746628-114136-7-git-send-email-yehs1@lenovo.com>
Create PTE, PMD, PUD and P4D levels page table mapping for physical
addresses of DRAM and NVDIMM both. Here E820_TYPE_PMEM represents
the region of e820_table.
Signed-off-by: Huaisheng Ye <yehs1@lenovo.com>
Signed-off-by: Ocean He <hehy1@lenovo.com>
---
arch/x86/mm/init_64.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index af11a28..c03c2091 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -420,6 +420,10 @@ void __init cleanup_highmap(void)
if (!after_bootmem &&
!e820__mapped_any(paddr & PAGE_MASK, paddr_next,
E820_TYPE_RAM) &&
+#ifdef CONFIG_ZONE_NVM
+ !e820__mapped_any(paddr & PAGE_MASK, paddr_next,
+ E820_TYPE_PMEM) &&
+#endif
!e820__mapped_any(paddr & PAGE_MASK, paddr_next,
E820_TYPE_RESERVED_KERN))
set_pte(pte, __pte(0));
@@ -475,6 +479,10 @@ void __init cleanup_highmap(void)
if (!after_bootmem &&
!e820__mapped_any(paddr & PMD_MASK, paddr_next,
E820_TYPE_RAM) &&
+#ifdef CONFIG_ZONE_NVM
+ !e820__mapped_any(paddr & PAGE_MASK, paddr_next,
+ E820_TYPE_PMEM) &&
+#endif
!e820__mapped_any(paddr & PMD_MASK, paddr_next,
E820_TYPE_RESERVED_KERN))
set_pmd(pmd, __pmd(0));
@@ -561,6 +569,10 @@ void __init cleanup_highmap(void)
if (!after_bootmem &&
!e820__mapped_any(paddr & PUD_MASK, paddr_next,
E820_TYPE_RAM) &&
+#ifdef CONFIG_ZONE_NVM
+ !e820__mapped_any(paddr & PAGE_MASK, paddr_next,
+ E820_TYPE_PMEM) &&
+#endif
!e820__mapped_any(paddr & PUD_MASK, paddr_next,
E820_TYPE_RESERVED_KERN))
set_pud(pud, __pud(0));
@@ -647,6 +659,10 @@ void __init cleanup_highmap(void)
if (!after_bootmem &&
!e820__mapped_any(paddr & P4D_MASK, paddr_next,
E820_TYPE_RAM) &&
+#ifdef CONFIG_ZONE_NVM
+ !e820__mapped_any(paddr & PAGE_MASK, paddr_next,
+ E820_TYPE_PMEM) &&
+#endif
!e820__mapped_any(paddr & P4D_MASK, paddr_next,
E820_TYPE_RESERVED_KERN))
set_p4d(p4d, __p4d(0));
--
1.8.3.1
next prev parent reply other threads:[~2018-05-08 2:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-08 2:30 [RFC PATCH v1 0/6] use mm to manage NVDIMM (pmem) zone Huaisheng Ye
[not found] ` <1525746628-114136-2-git-send-email-yehs1@lenovo.com>
2018-05-08 2:30 ` [External] [RFC PATCH v1 1/6] mm/memblock: Expand definition of flags to support NVDIMM Huaisheng HS1 Ye
2018-05-08 2:30 ` [RFC PATCH v1 4/6] arch/x86/kernel: mark NVDIMM regions from e820_table Huaisheng Ye
[not found] ` <1525746628-114136-3-git-send-email-yehs1@lenovo.com>
2018-05-08 2:32 ` [External] [RFC PATCH v1 2/6] mm/page_alloc.c: get pfn range with flags of memblock Huaisheng HS1 Ye
[not found] ` <1525746628-114136-4-git-send-email-yehs1@lenovo.com>
2018-05-08 2:33 ` [External] [RFC PATCH v1 3/6] mm, zone_type: create ZONE_NVM and fill into GFP_ZONE_TABLE Huaisheng HS1 Ye
2018-05-08 4:43 ` Randy Dunlap
2018-05-09 4:22 ` Huaisheng HS1 Ye
2018-05-09 11:47 ` Michal Hocko
2018-05-09 14:04 ` Huaisheng HS1 Ye
2018-05-09 20:56 ` Michal Hocko
2018-05-10 3:53 ` Huaisheng HS1 Ye
[not found] ` <1525746628-114136-6-git-send-email-yehs1@lenovo.com>
2018-05-08 2:34 ` [External] [RFC PATCH v1 5/6] mm: get zone spanned pages separately for DRAM and NVDIMM Huaisheng HS1 Ye
[not found] ` <1525746628-114136-7-git-send-email-yehs1@lenovo.com>
2018-05-08 2:35 ` Huaisheng HS1 Ye [this message]
2018-05-10 7:57 ` [RFC PATCH v1 0/6] use mm to manage NVDIMM (pmem) zone Michal Hocko
2018-05-10 8:41 ` Michal Hocko
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=HK2PR03MB1684101846A9D9639BE00001929A0@HK2PR03MB1684.apcprd03.prod.outlook.com \
--to=yehs1@lenovo.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.levin@verizon.com \
--cc=chengnt@lenovo.com \
--cc=colyli@suse.de \
--cc=hannes@cmpxchg.org \
--cc=hehy1@lenovo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=pasha.tatashin@oracle.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=vbabka@suse.cz \
--cc=willy@infradead.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