powerpc: Disable 64K hugetlb support when doing 64K SPU mappings

Previous thread: powerpc/powermac: Fixup default serial port device for pmac_zilog by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:10 am. (1 message)

Next thread: dlm: check for null in device_write by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:59 am. (1 message)
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:10 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=00df43...
Commit:     00df438e89a9003895948170e1abf64dd4665872
Parent:     025d7917a5ede982a5669c6735ef73a227b9827e
Author:     Benjamin Herrenschmidt <benh@kernel.crashing.org>
AuthorDate: Mon Jul 28 16:13:18 2008 +1000
Committer:  Benjamin Herrenschmidt <benh@kernel.crashing.org>
CommitDate: Mon Jul 28 16:30:53 2008 +1000

    powerpc: Disable 64K hugetlb support when doing 64K SPU mappings
    
    The 64K SPU local store mapping feature is incompatible with the
    64K huge pages support due to the inability of some parts of
    the memory management to differenciate between them while they
    use a different page table format.
    
    For now, disable 64K huge pages when CONFIG_SPU_FS_64K_LS,
    in the long run, this can be fixed by making this feature use
    the hugetlb page table format.
    
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/mm/hugetlbpage.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index ed0aab0..f1c2d55 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -736,14 +736,21 @@ static int __init hugetlbpage_init(void)
 
 	if (!cpu_has_feature(CPU_FTR_16M_PAGE))
 		return -ENODEV;
+
 	/* Add supported huge page sizes.  Need to change HUGE_MAX_HSTATE
 	 * and adjust PTE_NONCACHE_NUM if the number of supported huge page
 	 * sizes changes.
 	 */
 	set_huge_psize(MMU_PAGE_16M);
-	set_huge_psize(MMU_PAGE_64K);
 	set_huge_psize(MMU_PAGE_16G);
 
+	/* Temporarily disable support for 64K huge pages when 64K SPU local
+	 * store support is enabled as the current implementation conflicts.
+	 */
+#ifndef CONFIG_SPU_FS_64K_LS
+	set_huge_psize(MMU_PAGE_64K);
+#endif
+
 	for (psize = 0; psize < MMU_PAGE_COUNT; ++psize) {
 		if (mmu_huge_psizes[psize]) {
 ...
Previous thread: powerpc/powermac: Fixup default serial port device for pmac_zilog by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:10 am. (1 message)

Next thread: dlm: check for null in device_write by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:59 am. (1 message)