/* * For radix we want generic code to handle hugetlb. But then if we want * both hash and radix to be enabled together we need to workaround the * limitations.
*/ void radix__flush_hugetlb_page(struct vm_area_struct *vma, unsignedlong vmaddr); void radix__local_flush_hugetlb_page(struct vm_area_struct *vma, unsignedlong vmaddr);
#define __HAVE_ARCH_GIGANTIC_PAGE_RUNTIME_SUPPORTED staticinlinebool gigantic_page_runtime_supported(void)
{ /* * We used gigantic page reservation with hypervisor assist in some case. * We cannot use runtime allocation of gigantic pages in those platforms * This is hash translation mode LPARs.
*/ if (firmware_has_feature(FW_FEATURE_LPAR) && !radix_enabled()) returnfalse;
staticinlineint check_and_get_huge_psize(int shift)
{ int mmu_psize;
if (shift > SLICE_HIGH_SHIFT) return -EINVAL;
mmu_psize = shift_to_mmu_psize(shift);
/* * We need to make sure that for different page sizes reported by * firmware we only add hugetlb support for page sizes that can be * supported by linux page table layout. * For now we have * Radix: 2M and 1G * Hash: 16M and 16G
*/ if (radix_enabled()) { if (mmu_psize != MMU_PAGE_2M && mmu_psize != MMU_PAGE_1G) return -EINVAL;
} else { if (mmu_psize != MMU_PAGE_16M && mmu_psize != MMU_PAGE_16G) return -EINVAL;
} return mmu_psize;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.