mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
Revert "mm/hugetlb: add folio support to hugetlb specific flag macros"
This reverts commit3283a9894dwhich is commitd03c376d90upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I2df030f2b9346d0b70d9485c5f6c6ba90616c34c Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -625,50 +625,26 @@ enum hugetlb_page_flags {
|
|||||||
*/
|
*/
|
||||||
#ifdef CONFIG_HUGETLB_PAGE
|
#ifdef CONFIG_HUGETLB_PAGE
|
||||||
#define TESTHPAGEFLAG(uname, flname) \
|
#define TESTHPAGEFLAG(uname, flname) \
|
||||||
static __always_inline \
|
|
||||||
bool folio_test_hugetlb_##flname(struct folio *folio) \
|
|
||||||
{ void *private = &folio->private; \
|
|
||||||
return test_bit(HPG_##flname, private); \
|
|
||||||
} \
|
|
||||||
static inline int HPage##uname(struct page *page) \
|
static inline int HPage##uname(struct page *page) \
|
||||||
{ return test_bit(HPG_##flname, &(page->private)); }
|
{ return test_bit(HPG_##flname, &(page->private)); }
|
||||||
|
|
||||||
#define SETHPAGEFLAG(uname, flname) \
|
#define SETHPAGEFLAG(uname, flname) \
|
||||||
static __always_inline \
|
|
||||||
void folio_set_hugetlb_##flname(struct folio *folio) \
|
|
||||||
{ void *private = &folio->private; \
|
|
||||||
set_bit(HPG_##flname, private); \
|
|
||||||
} \
|
|
||||||
static inline void SetHPage##uname(struct page *page) \
|
static inline void SetHPage##uname(struct page *page) \
|
||||||
{ set_bit(HPG_##flname, &(page->private)); }
|
{ set_bit(HPG_##flname, &(page->private)); }
|
||||||
|
|
||||||
#define CLEARHPAGEFLAG(uname, flname) \
|
#define CLEARHPAGEFLAG(uname, flname) \
|
||||||
static __always_inline \
|
|
||||||
void folio_clear_hugetlb_##flname(struct folio *folio) \
|
|
||||||
{ void *private = &folio->private; \
|
|
||||||
clear_bit(HPG_##flname, private); \
|
|
||||||
} \
|
|
||||||
static inline void ClearHPage##uname(struct page *page) \
|
static inline void ClearHPage##uname(struct page *page) \
|
||||||
{ clear_bit(HPG_##flname, &(page->private)); }
|
{ clear_bit(HPG_##flname, &(page->private)); }
|
||||||
#else
|
#else
|
||||||
#define TESTHPAGEFLAG(uname, flname) \
|
#define TESTHPAGEFLAG(uname, flname) \
|
||||||
static inline bool \
|
|
||||||
folio_test_hugetlb_##flname(struct folio *folio) \
|
|
||||||
{ return 0; } \
|
|
||||||
static inline int HPage##uname(struct page *page) \
|
static inline int HPage##uname(struct page *page) \
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
#define SETHPAGEFLAG(uname, flname) \
|
#define SETHPAGEFLAG(uname, flname) \
|
||||||
static inline void \
|
|
||||||
folio_set_hugetlb_##flname(struct folio *folio) \
|
|
||||||
{ } \
|
|
||||||
static inline void SetHPage##uname(struct page *page) \
|
static inline void SetHPage##uname(struct page *page) \
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
#define CLEARHPAGEFLAG(uname, flname) \
|
#define CLEARHPAGEFLAG(uname, flname) \
|
||||||
static inline void \
|
|
||||||
folio_clear_hugetlb_##flname(struct folio *folio) \
|
|
||||||
{ } \
|
|
||||||
static inline void ClearHPage##uname(struct page *page) \
|
static inline void ClearHPage##uname(struct page *page) \
|
||||||
{ }
|
{ }
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user