diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-21 19:42:20 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-21 19:42:20 +0100 |
commit | b876d08f816527af257e13d89fb0d3b4b849223c (patch) | |
tree | 40569f568230f918ca55f04b355e251747f913ed /mm | |
parent | b364776ad1208a71f0c53578c84619a395412a8d (diff) | |
parent | 2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/pci/dmar.c
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 2 | ||||
-rw-r--r-- | mm/tiny-shmem.c | 1 | ||||
-rw-r--r-- | mm/vmalloc.c | 19 |
3 files changed, 17 insertions, 5 deletions
diff --git a/mm/memory.c b/mm/memory.c index 3a6c4a65832..164951c4730 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -64,8 +64,6 @@ #include "internal.h" -#include "internal.h" - #ifndef CONFIG_NEED_MULTIPLE_NODES /* use the per-pgdat data instead for discontigmem - mbligh */ unsigned long max_mapnr; diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c index 8d7a27a6335..3e67d575ee6 100644 --- a/mm/tiny-shmem.c +++ b/mm/tiny-shmem.c @@ -95,6 +95,7 @@ put_dentry: put_memory: return ERR_PTR(error); } +EXPORT_SYMBOL_GPL(shmem_file_setup); /** * shmem_zero_setup - setup a shared anonymous mapping diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 712ae47af0b..65ae576030d 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -17,7 +17,6 @@ #include <linux/interrupt.h> #include <linux/seq_file.h> #include <linux/debugobjects.h> -#include <linux/vmalloc.h> #include <linux/kallsyms.h> #include <linux/list.h> #include <linux/rbtree.h> @@ -175,6 +174,21 @@ static int vmap_page_range(unsigned long addr, unsigned long end, return nr; } +static inline int is_vmalloc_or_module_addr(const void *x) +{ + /* + * x86-64 and sparc64 put modules in a special place, + * and fall back on vmalloc() if that fails. Others + * just put it in the vmalloc space. + */ +#if defined(CONFIG_MODULES) && defined(MODULES_VADDR) + unsigned long addr = (unsigned long)x; + if (addr >= MODULES_VADDR && addr < MODULES_END) + return 1; +#endif + return is_vmalloc_addr(x); +} + /* * Walk a vmap address to the struct page it maps. */ @@ -188,8 +202,7 @@ struct page *vmalloc_to_page(const void *vmalloc_addr) * XXX we might need to change this if we add VIRTUAL_BUG_ON for * architectures that do not vmalloc module space */ - VIRTUAL_BUG_ON(!is_vmalloc_addr(vmalloc_addr) && - !is_module_address(addr)); + VIRTUAL_BUG_ON(!is_vmalloc_or_module_addr(vmalloc_addr)); if (!pgd_none(*pgd)) { pud_t *pud = pud_offset(pgd, addr); |