@@ -2058,7 +2058,7 @@ static inline long folio_nr_pages(const struct folio *folio)
{
if (!folio_test_large(folio))
return 1;
-#ifdef CONFIG_64BIT
+#if BITS_PER_LONG == 64
return folio->_folio_nr_pages;
#else
return 1L << (folio->_flags_1 & 0xff);
@@ -2083,7 +2083,7 @@ static inline unsigned long compound_nr(struct page *page)
if (!test_bit(PG_head, &folio->flags))
return 1;
-#ifdef CONFIG_64BIT
+#if BITS_PER_LONG == 64
return folio->_folio_nr_pages;
#else
return 1L << (folio->_flags_1 & 0xff);
@@ -370,7 +370,7 @@ struct folio {
atomic_t _entire_mapcount;
atomic_t _nr_pages_mapped;
atomic_t _pincount;
-#ifdef CONFIG_64BIT
+#if BITS_PER_LONG == 64
unsigned int _folio_nr_pages;
#endif
/* private: the union with struct page is transitional */
@@ -682,7 +682,7 @@ static inline void folio_set_order(struct folio *folio, unsigned int order)
return;
folio->_flags_1 = (folio->_flags_1 & ~0xffUL) | order;
-#ifdef CONFIG_64BIT
+#if BITS_PER_LONG == 64
folio->_folio_nr_pages = 1U << order;
#endif
}