Merge tag 'powerpc-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux-2.6-block.git] / arch / powerpc / include / asm / book3s / 64 / hugetlb.h
index 66c1e4f88d654ebf18cadcfff1f906eeae048fce..ec2a55a553c75adb8a66327dc7d756f9f7e0cdfe 100644 (file)
@@ -39,6 +39,14 @@ static inline int hstate_get_psize(struct hstate *hstate)
 #ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE
 static inline bool gigantic_page_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())
+               return false;
+
        return true;
 }
 #endif