diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-05-12 14:01:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-13 08:02:22 -0700 |
commit | a7dfa9403bf3b03899d5ef5d10b0c5c3f74b0682 (patch) | |
tree | a65021eecb15793d453c1ed1258759312f17e3cb /include/asm-um | |
parent | 6d0742426c9adc7465ef5c62a99a1d3e9696ea19 (diff) | |
download | blackbird-op-linux-a7dfa9403bf3b03899d5ef5d10b0c5c3f74b0682.tar.gz blackbird-op-linux-a7dfa9403bf3b03899d5ef5d10b0c5c3f74b0682.zip |
uml: use PAGE_SIZE in linker scripts
This patch includes page.h header into linker scripts that allow us to
use PAGE_SIZE macro instead of numeric constant.
To be able to include page.h into linker scripts page.h is needed for
some modification - i.e. we need to use __ASSEMBLY__ and _AC macro
[jdike@linux.intel.com - fixed conflict with as-layout.h]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-um')
-rw-r--r-- | include/asm-um/page.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index 381f96b1c825..916e1a61999f 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h @@ -7,16 +7,20 @@ #ifndef __UM_PAGE_H #define __UM_PAGE_H -struct page; - -#include <linux/types.h> -#include <asm/vm-flags.h> +#include <linux/const.h> /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 -#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) +#ifndef __ASSEMBLY__ + +struct page; + +#include <linux/types.h> +#include <asm/vm-flags.h> + /* * These are used to make use of C type-checking.. */ @@ -120,4 +124,5 @@ extern struct page *arch_validate(struct page *page, gfp_t mask, int order); #include <asm-generic/memory_model.h> #include <asm-generic/page.h> -#endif +#endif /* __ASSEMBLY__ */ +#endif /* __UM_PAGE_H */ |