diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-12-28 03:47:54 +0300 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-12-30 02:47:55 +0300 |
commit | 45635ab5e41bcde94a82f9a05d660ef77fe38c1b (patch) | |
tree | 921816cb229327b3f14b32275d6ff8dec06f22b5 /arch/x86/include/asm/page_types.h | |
parent | 1a4a678b12c84db9ae5dce424e0e97f0559bb57c (diff) | |
download | linux-45635ab5e41bcde94a82f9a05d660ef77fe38c1b.tar.xz |
x86: Change get_max_mapped() to inline
Move it into head file. to prepare use it in other files.
[ hpa: added missing <linux/types.h> and changed type to phys_addr_t. ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4D1933BA.8000508@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/page_types.h')
-rw-r--r-- | arch/x86/include/asm/page_types.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_types.h index 1df66211fd1b..93626e699679 100644 --- a/arch/x86/include/asm/page_types.h +++ b/arch/x86/include/asm/page_types.h @@ -2,6 +2,7 @@ #define _ASM_X86_PAGE_DEFS_H #include <linux/const.h> +#include <linux/types.h> /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 @@ -45,6 +46,11 @@ extern int devmem_is_allowed(unsigned long pagenr); extern unsigned long max_low_pfn_mapped; extern unsigned long max_pfn_mapped; +static inline phys_addr_t get_max_mapped(void) +{ + return (phys_addr_t)max_pfn_mapped << PAGE_SHIFT; +} + extern unsigned long init_memory_mapping(unsigned long start, unsigned long end); |