mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
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.com Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Oscar Salvador <osalvador@suse.de> Cc: Muchun Song <muchun.song@linux.dev> Cc: Peter Xu <peterx@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
7aad25b4b4
commit
63818aaf0d
|
|
@ -625,18 +625,14 @@ 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) \
|
||||
{ set_bit(HPG_##flname, &(page->private)); }
|
||||
}
|
||||
|
||||
#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) \
|
||||
{ clear_bit(HPG_##flname, &(page->private)); }
|
||||
}
|
||||
#else
|
||||
#define TESTHPAGEFLAG(uname, flname) \
|
||||
static inline bool \
|
||||
|
|
@ -648,15 +644,11 @@ static inline int HPage##uname(struct page *page) \
|
|||
#define SETHPAGEFLAG(uname, flname) \
|
||||
static inline void \
|
||||
folio_set_hugetlb_##flname(struct folio *folio) \
|
||||
{ } \
|
||||
static inline void SetHPage##uname(struct page *page) \
|
||||
{ }
|
||||
|
||||
#define CLEARHPAGEFLAG(uname, flname) \
|
||||
static inline void \
|
||||
folio_clear_hugetlb_##flname(struct folio *folio) \
|
||||
{ } \
|
||||
static inline void ClearHPage##uname(struct page *page) \
|
||||
{ }
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user