]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/powerpc/include/asm/book3s/64/hugetlb.h
powerpc/hugetlb: Don't do runtime allocation of 16G pages in LPAR configuration
[linux.git] / arch / powerpc / include / asm / book3s / 64 / hugetlb.h
index 5b0177733994eaeb86572b81a8d378b0cd4f1879..46130ef4941cfaf2c8aef77377bdce59ccc53637 100644 (file)
@@ -35,6 +35,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