linux-mips
[Top] [All Lists]

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

To: Ralf Baechle <ralf@linux-mips.org>, Hillf Danton <dhillf@gmail.com>, linux-mips@linux-mips.org
Subject: [patch] MIPS: align address to HPAGE_SIZE when updating mmu for thp
From: Hillf Danton <dhillf@gmail.com>
Date: Sat, 1 Sep 2012 23:01:12 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=r0OZiZ0zzPsK9c0N9CexNfLBdMDybaQwdYOZBEHUTjI=; b=vuk/HxXIuDo3AZngAm4HjbBaVpDA2D48hGF8ib0r46J2ELq+F8QbIvq2I0aC7sqkbb 8/vSYooc2QdmPAFIVf98g+L2sKWQJ5oaU8RgXSVrTqxea42/KRCWpDIsqKrjykIT466m TwJYhWWLGTlh1tKxvaoEvb/XkKvjManHSb42yiJzvhFOmevy2lKgh4ULHYSgyhBNUxZg RFskidxejfXfeMeA8pHEp+9fw06ccB5VOCo10MuX2lUKqgtLyAgUeHYxZ3TL72jxPOXZ zteBNqq5VF+1dtaiajUDIqBoh0PnpLYbHEFUOspDHhY7kdVmrbohcPhbJ3ZP13CI87cV xQKg==
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Sender: linux-mips-bounce@linux-mips.org
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@gmail.com>
---

--- 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 */
--

<Prev in Thread] Current Thread [Next in Thread>
  • [patch] MIPS: align address to HPAGE_SIZE when updating mmu for thp, Hillf Danton <=