Thread (5 messages) flat view 5 messages, 2 authors, 2017-02-20

Re: [PATCH] powerpc/mm/hugetlb: Filter out hugepage size not supported by page table layout

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2017-02-19 21:06:08

On Sun, 2017-02-19 at 15:48 +0530, Aneesh Kumar K.V wrote:
+#ifdef CONFIG_PPC_BOOK3S_64
+       /*
+        * 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
+        * Hash: 16M and 16G
+        */
+       if (radix_enabled()) {
+               if (mmu_psize != MMU_PAGE_2M)
+                       return -EINVAL;
+       } else {
+               if (mmu_psize != MMU_PAGE_16M && mmu_psize != MMU_PAGE_16G)
+                       return -EINVAL;
+       }
Hash could support others... Same with radix and PUD level pages.

Why do we need that ? Won't FW provide separate properties for hash and
radix page sizes anyway ?

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help