aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-01-10 18:53:14 +0100
committerIngo Molnar <mingo@kernel.org>2020-01-10 18:53:14 +0100
commit57ad87ddce79b6d54f8e442d0ecf4b5bbe8c5a9e (patch)
treeeaa43171e82737e8b33239e2e9bc3b4de67b7ddd /include/linux/mm.h
parentMerge branch 'linus' into efi/core, to pick up fixes (diff)
parentmm, x86/mm: Untangle address space layout definitions from basic pgtable type definitions (diff)
downloadlinux-dev-57ad87ddce79b6d54f8e442d0ecf4b5bbe8c5a9e.tar.xz
linux-dev-57ad87ddce79b6d54f8e442d0ecf4b5bbe8c5a9e.zip
Merge branch 'x86/mm' into efi/core, to pick up dependencies
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 80a9162b406c..5dfbc0e56e67 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -625,24 +625,19 @@ unsigned long vmalloc_to_pfn(const void *addr);
* On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there
* is no special casing required.
*/
-static inline bool is_vmalloc_addr(const void *x)
-{
-#ifdef CONFIG_MMU
- unsigned long addr = (unsigned long)x;
-
- return addr >= VMALLOC_START && addr < VMALLOC_END;
-#else
- return false;
-#endif
-}
#ifndef is_ioremap_addr
#define is_ioremap_addr(x) is_vmalloc_addr(x)
#endif
#ifdef CONFIG_MMU
+extern bool is_vmalloc_addr(const void *x);
extern int is_vmalloc_or_module_addr(const void *x);
#else
+static inline bool is_vmalloc_addr(const void *x)
+{
+ return false;
+}
static inline int is_vmalloc_or_module_addr(const void *x)
{
return 0;