diff options
author | Ingo Molnar <mingo@kernel.org> | 2020-01-20 08:05:16 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-01-20 08:05:16 +0100 |
commit | a786810cc864e31237a755b933e8872ba3e118bc (patch) | |
tree | f94bd068691d03be00b582fd2fdabe7ccff0f044 /include/linux/mm.h | |
parent | 4444f8541dad16fefd9b8807ad1451e806ef1d94 (diff) | |
parent | def9d2780727cec3313ed3522d0123158d87224d (diff) | |
download | linux-a786810cc864e31237a755b933e8872ba3e118bc.tar.gz linux-a786810cc864e31237a755b933e8872ba3e118bc.tar.bz2 linux-a786810cc864e31237a755b933e8872ba3e118bc.zip |
Merge tag 'v5.5-rc7' into efi/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 5dfbc0e56e67..67f8451b9a12 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2653,14 +2653,26 @@ static inline bool want_init_on_free(void) !page_poisoning_enabled(); } -#ifdef CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT -DECLARE_STATIC_KEY_TRUE(_debug_pagealloc_enabled); +#ifdef CONFIG_DEBUG_PAGEALLOC +extern void init_debug_pagealloc(void); #else -DECLARE_STATIC_KEY_FALSE(_debug_pagealloc_enabled); +static inline void init_debug_pagealloc(void) {} #endif +extern bool _debug_pagealloc_enabled_early; +DECLARE_STATIC_KEY_FALSE(_debug_pagealloc_enabled); static inline bool debug_pagealloc_enabled(void) { + return IS_ENABLED(CONFIG_DEBUG_PAGEALLOC) && + _debug_pagealloc_enabled_early; +} + +/* + * For use in fast paths after init_debug_pagealloc() has run, or when a + * false negative result is not harmful when called too early. + */ +static inline bool debug_pagealloc_enabled_static(void) +{ if (!IS_ENABLED(CONFIG_DEBUG_PAGEALLOC)) return false; |