|
@@ -364,6 +364,20 @@ typedef struct { signed long pd; } hugepd_t;
|
|
|
|
|
|
#ifdef CONFIG_HUGETLB_PAGE
|
|
|
#ifdef CONFIG_PPC_BOOK3S_64
|
|
|
+#ifdef CONFIG_PPC_64K_PAGES
|
|
|
+/*
|
|
|
+ * With 64k page size, we have hugepage ptes in the pgd and pmd entries. We don't
|
|
|
+ * need to setup hugepage directory for them. Our pte and page directory format
|
|
|
+ * enable us to have this enabled. But to avoid errors when implementing new
|
|
|
+ * features disable hugepd for 64K. We enable a debug version here, So we catch
|
|
|
+ * wrong usage.
|
|
|
+ */
|
|
|
+#ifdef CONFIG_DEBUG_VM
|
|
|
+extern int hugepd_ok(hugepd_t hpd);
|
|
|
+#else
|
|
|
+#define hugepd_ok(x) (0)
|
|
|
+#endif
|
|
|
+#else
|
|
|
static inline int hugepd_ok(hugepd_t hpd)
|
|
|
{
|
|
|
/*
|
|
@@ -372,6 +386,7 @@ static inline int hugepd_ok(hugepd_t hpd)
|
|
|
*/
|
|
|
return (((hpd.pd & 0x3) == 0x0) && ((hpd.pd & HUGEPD_SHIFT_MASK) != 0));
|
|
|
}
|
|
|
+#endif
|
|
|
#else
|
|
|
static inline int hugepd_ok(hugepd_t hpd)
|
|
|
{
|