Subject: cell: fake mmu_psize array to enable 64k pages Firmware currently does not have the right properties for enabling 64k pages, so just claim we have them anyway. Obviously, this patch must not get merged, instead the firmware will have to fix their device tree. Currently, this is broken. Enabling 64k pages in the kernel configuration will crash your kernel, we need to debug that. Signed-off-by: Arnd Bergmann --- Index: linus-2.6/arch/powerpc/mm/hash_utils_64.c =================================================================== --- linus-2.6.orig/arch/powerpc/mm/hash_utils_64.c +++ linus-2.6/arch/powerpc/mm/hash_utils_64.c @@ -134,6 +134,30 @@ struct mmu_psize_def mmu_psize_defaults_ }, }; +struct mmu_psize_def mmu_psize_defaults_cell[] = { + [MMU_PAGE_4K] = { + .shift = 12, + .sllp = 0, + .penc = 0, + .avpnm = 0, + .tlbiel = 1, + }, + [MMU_PAGE_64K] = { + .shift = 16, + .sllp = SLB_VSID_L | SLB_VSID_LP_01, + .penc = 0, + .avpnm = 0, + .tlbiel = 1, + }, + [MMU_PAGE_16M] = { + .shift = 24, + .sllp = SLB_VSID_L, + .penc = 0, + .avpnm = 0x1UL, + .tlbiel = 0, + }, +}; + int htab_bolt_mapping(unsigned long vstart, unsigned long vend, unsigned long pstart, unsigned long mode, int psize) @@ -299,6 +323,9 @@ static void __init htab_init_page_sizes( cpu_has_feature(CPU_FTR_16M_PAGE)) memcpy(mmu_psize_defs, mmu_psize_defaults_gp, sizeof(mmu_psize_defaults_gp)); + if (_machine == PLATFORM_CELL) + memcpy(mmu_psize_defs, mmu_psize_defaults_cell, + sizeof(mmu_psize_defaults_cell)); found: /* * Pick a size for the linear mapping. Currently, we only support