Commit 63818aaf authored by Sidhartha Kumar's avatar Sidhartha Kumar Committed by Andrew Morton

mm/hugetlb: remove {Set,Clear}Hpage macros

All users have been converted to use the folio version of these macros, we
can safely remove the page based interface.

Link: https://lkml.kernel.org/r/20240520224407.110062-1-sidhartha.kumar@oracle.comSigned-off-by: default avatarSidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarOscar Salvador <osalvador@suse.de>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 7aad25b4
...@@ -625,18 +625,14 @@ static __always_inline \ ...@@ -625,18 +625,14 @@ static __always_inline \
void folio_set_hugetlb_##flname(struct folio *folio) \ void folio_set_hugetlb_##flname(struct folio *folio) \
{ void *private = &folio->private; \ { void *private = &folio->private; \
set_bit(HPG_##flname, private); \ set_bit(HPG_##flname, private); \
} \ }
static inline void SetHPage##uname(struct page *page) \
{ set_bit(HPG_##flname, &(page->private)); }
#define CLEARHPAGEFLAG(uname, flname) \ #define CLEARHPAGEFLAG(uname, flname) \
static __always_inline \ static __always_inline \
void folio_clear_hugetlb_##flname(struct folio *folio) \ void folio_clear_hugetlb_##flname(struct folio *folio) \
{ void *private = &folio->private; \ { void *private = &folio->private; \
clear_bit(HPG_##flname, private); \ clear_bit(HPG_##flname, private); \
} \ }
static inline void ClearHPage##uname(struct page *page) \
{ clear_bit(HPG_##flname, &(page->private)); }
#else #else
#define TESTHPAGEFLAG(uname, flname) \ #define TESTHPAGEFLAG(uname, flname) \
static inline bool \ static inline bool \
...@@ -648,15 +644,11 @@ static inline int HPage##uname(struct page *page) \ ...@@ -648,15 +644,11 @@ static inline int HPage##uname(struct page *page) \
#define SETHPAGEFLAG(uname, flname) \ #define SETHPAGEFLAG(uname, flname) \
static inline void \ static inline void \
folio_set_hugetlb_##flname(struct folio *folio) \ folio_set_hugetlb_##flname(struct folio *folio) \
{ } \
static inline void SetHPage##uname(struct page *page) \
{ } { }
#define CLEARHPAGEFLAG(uname, flname) \ #define CLEARHPAGEFLAG(uname, flname) \
static inline void \ static inline void \
folio_clear_hugetlb_##flname(struct folio *folio) \ folio_clear_hugetlb_##flname(struct folio *folio) \
{ } \
static inline void ClearHPage##uname(struct page *page) \
{ } { }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment