mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
page-types: introduce kpageflags_flags()
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e577ebde9f
commit
48640d69f5
1 changed files with 11 additions and 4 deletions
|
@ -436,6 +436,16 @@ static uint64_t well_known_flags(uint64_t flags)
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint64_t kpageflags_flags(uint64_t flags)
|
||||||
|
{
|
||||||
|
flags = expand_overloaded_flags(flags);
|
||||||
|
|
||||||
|
if (!opt_raw)
|
||||||
|
flags = well_known_flags(flags);
|
||||||
|
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* page frame walker
|
* page frame walker
|
||||||
*/
|
*/
|
||||||
|
@ -470,10 +480,7 @@ static int hash_slot(uint64_t flags)
|
||||||
static void add_page(unsigned long voffset,
|
static void add_page(unsigned long voffset,
|
||||||
unsigned long offset, uint64_t flags)
|
unsigned long offset, uint64_t flags)
|
||||||
{
|
{
|
||||||
flags = expand_overloaded_flags(flags);
|
flags = kpageflags_flags(flags);
|
||||||
|
|
||||||
if (!opt_raw)
|
|
||||||
flags = well_known_flags(flags);
|
|
||||||
|
|
||||||
if (!bit_mask_ok(flags))
|
if (!bit_mask_ok(flags))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue