Patchwork [RFC,9/9] powerpc: mm: Enable numa faulting for hugepages

login
register
mail settings
Submitter Aneesh Kumar K.V
Date Oct. 22, 2013, 11:28 a.m.
Message ID <1382441300-1513-10-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/285411/
State Superseded
Headers show

Comments

Aneesh Kumar K.V - Oct. 22, 2013, 11:28 a.m.
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>

Provide numa related functions for updating pmd entries.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/pgtable.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index 67ea8fb..aa3add7 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -95,19 +95,19 @@  static inline void change_pmd_protnuma(struct mm_struct *mm, unsigned long addr,
 #define pmd_numa pmd_numa
 static inline int pmd_numa(pmd_t pmd)
 {
-	return 0;
+	return pte_numa(pmd_pte(pmd));
 }
 
 #define pmd_mknonnuma pmd_mknonnuma
 static inline pmd_t pmd_mknonnuma(pmd_t pmd)
 {
-	return pmd;
+	return pte_pmd(pte_mknonnuma(pmd_pte(pmd)));
 }
 
 #define pmd_mknuma pmd_mknuma
 static inline pmd_t pmd_mknuma(pmd_t pmd)
 {
-	return pmd;
+	return pte_pmd(pte_mknuma(pmd_pte(pmd)));
 }
 
 # else