From: Zi Yan <zi.yan@sent.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Zi Yan <zi.yan@cs.rutgers.edu>,
"David S. Miller" <davem@davemloft.net>,
sparclinux@vger.kernel.org
Subject: [RFC PATCH 8/9] sparc: mm: migrate: add pmd swap entry to support thp migration.
Date: Thu, 26 Apr 2018 10:28:03 -0400 [thread overview]
Message-ID: <20180426142804.180152-9-zi.yan@sent.com> (raw)
In-Reply-To: <20180426142804.180152-1-zi.yan@sent.com>
From: Zi Yan <zi.yan@cs.rutgers.edu>
Signed-off-by: Zi Yan <zi.yan@cs.rutgers.edu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Cc: linux-mm@kvack.org
---
arch/sparc/include/asm/pgtable_32.h | 2 ++
arch/sparc/include/asm/pgtable_64.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
index 4eebed6c6781..293bf9f8f949 100644
--- a/arch/sparc/include/asm/pgtable_32.h
+++ b/arch/sparc/include/asm/pgtable_32.h
@@ -367,7 +367,9 @@ static inline swp_entry_t __swp_entry(unsigned long type, unsigned long offset)
}
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define __pmd_to_swp_entry(pmd) ((swp_entry_t) { pmd_val(pmd) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
+#define __swp_entry_to_pmd(x) ((pmd_t) { (x).val })
static inline unsigned long
__get_phys (unsigned long addr)
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
index 339920fdf9ed..2811aef4a636 100644
--- a/arch/sparc/include/asm/pgtable_64.h
+++ b/arch/sparc/include/asm/pgtable_64.h
@@ -1031,7 +1031,9 @@ pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp);
((long)(offset) << (PAGE_SHIFT + 8UL))) \
} )
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define __pmd_to_swp_entry(pmd) ((swp_entry_t) { pmd_val(pmd) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
+#define __swp_entry_to_pmd(x) ((pmd_t) { (x).val })
int page_in_phys_avail(unsigned long paddr);
--
2.17.0
next prev parent reply other threads:[~2018-04-26 14:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 14:27 [RFC PATCH 0/9] Enable THP migration for all possible architectures Zi Yan
2018-04-26 14:27 ` [RFC PATCH 1/9] arc: mm: migrate: add pmd swap entry to support thp migration Zi Yan
2018-04-26 14:27 ` [RFC PATCH 2/9] arm: " Zi Yan
2018-04-26 14:27 ` [RFC PATCH 3/9] arm64: " Zi Yan
2018-04-26 14:27 ` [RFC PATCH 4/9] i386: " Zi Yan
2018-04-26 14:28 ` [RFC PATCH 5/9] mips: " Zi Yan
2018-04-26 14:28 ` [RFC PATCH 6/9] powerpc: " Zi Yan
2018-04-26 14:28 ` [RFC PATCH 7/9] s390: " Zi Yan
2018-04-26 14:28 ` Zi Yan [this message]
2018-04-26 14:28 ` [RFC PATCH 9/9] mm: migrate: enable thp migration for all possible architectures Zi Yan
2018-04-27 17:36 ` [RFC PATCH 0/9] Enable THP " Gerald Schaefer
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=20180426142804.180152-9-zi.yan@sent.com \
--to=zi.yan@sent.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sparclinux@vger.kernel.org \
--cc=zi.yan@cs.rutgers.edu \
/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