|
@@ -460,15 +460,14 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
|
|
|
return &mm->page_table_lock;
|
|
|
}
|
|
|
|
|
|
-static inline bool hugepages_supported(void)
|
|
|
-{
|
|
|
- /*
|
|
|
- * Some platform decide whether they support huge pages at boot
|
|
|
- * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when
|
|
|
- * there is no such support
|
|
|
- */
|
|
|
- return HPAGE_SHIFT != 0;
|
|
|
-}
|
|
|
+#ifndef hugepages_supported
|
|
|
+/*
|
|
|
+ * Some platform decide whether they support huge pages at boot
|
|
|
+ * time. Some of them, such as powerpc, set HPAGE_SHIFT to 0
|
|
|
+ * when there is no such support
|
|
|
+ */
|
|
|
+#define hugepages_supported() (HPAGE_SHIFT != 0)
|
|
|
+#endif
|
|
|
|
|
|
#else /* CONFIG_HUGETLB_PAGE */
|
|
|
struct hstate {};
|