aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorLaura Abbott <lauraa@codeaurora.org>2013-08-22 13:46:07 -0700
committerMoyster <oysterized@gmail.com>2019-05-02 21:02:56 +0200
commit55118233f47e9284f72a19bf89396914c9585877 (patch)
tree2ad5eb281f9a56d64bb4c3fe8b8f4b81888e3237 /include/linux/mm.h
parent0deaaafa5e17afebd21198beaa1b053211685488 (diff)
mm: Update is_vmalloc_addr to account for vmalloc savings
is_vmalloc_addr current assumes that all vmalloc addresses exist between VMALLOC_START and VMALLOC_END. This may not be the case when interleaving vmalloc and lowmem. Update the is_vmalloc_addr to properly check for this. Change-Id: I5def3d6ae1a4de59ea36f095b8c73649a37b1f36 Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 8aecdef77..7060750a8 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -325,16 +325,16 @@ 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 int is_vmalloc_addr(const void *x)
-{
-#ifdef CONFIG_MMU
- unsigned long addr = (unsigned long)x;
- return addr >= VMALLOC_START && addr < VMALLOC_END;
+#ifdef CONFIG_MMU
+extern int is_vmalloc_addr(const void *x);
#else
+static inline int is_vmalloc_addr(const void *x)
+{
return 0;
-#endif
}
+#endif
+
#ifdef CONFIG_MMU
extern int is_vmalloc_or_module_addr(const void *x);
#else