[patch] MIPS: align address to HPAGE_SIZE when updating mmu for thp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make certain that we are always handling head page in all cases if address
is aligned to HPAGE_SIZE.

Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---

--- a/arch/mips/include/asm/pgtable.h	Sat Sep  1 22:27:12 2012
+++ b/arch/mips/include/asm/pgtable.h	Sat Sep  1 22:38:02 2012
@@ -546,7 +546,7 @@ static inline pmd_t pmdp_get_and_clear(s
 static inline void update_mmu_thp(struct vm_area_struct *vma,
 					unsigned long addr, pmd_t *pmdp)
 {
-	update_mmu_cache(vma, addr, (pte_t *)pmdp);
+	update_mmu_cache(vma, addr & HPAGE_PMD_MASK, (pte_t *)pmdp);
 }

 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
--



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux