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>

+8 -1
+8 -1
arch/powerpc/mm/hugetlbpage.c
··· 736 736 737 737 if (!cpu_has_feature(CPU_FTR_16M_PAGE)) 738 738 return -ENODEV; 739 + 739 740 /* Add supported huge page sizes. Need to change HUGE_MAX_HSTATE 740 741 * and adjust PTE_NONCACHE_NUM if the number of supported huge page 741 742 * sizes changes. 742 743 */ 743 744 set_huge_psize(MMU_PAGE_16M); 744 - set_huge_psize(MMU_PAGE_64K); 745 745 set_huge_psize(MMU_PAGE_16G); 746 + 747 + /* Temporarily disable support for 64K huge pages when 64K SPU local 748 + * store support is enabled as the current implementation conflicts. 749 + */ 750 + #ifndef CONFIG_SPU_FS_64K_LS 751 + set_huge_psize(MMU_PAGE_64K); 752 + #endif 746 753 747 754 for (psize = 0; psize < MMU_PAGE_COUNT; ++psize) { 748 755 if (mmu_huge_psizes[psize]) {