diff options
-rw-r--r-- | arch/um/include/as-layout.h | 14 | ||||
-rw-r--r-- | arch/um/kernel/dyn.lds.S | 7 | ||||
-rw-r--r-- | arch/um/kernel/uml.lds.S | 7 | ||||
-rw-r--r-- | include/asm-um/page.h | 17 |
4 files changed, 26 insertions, 19 deletions
diff --git a/arch/um/include/as-layout.h b/arch/um/include/as-layout.h index cac542d8ff70..58e852dfb0ce 100644 --- a/arch/um/include/as-layout.h +++ b/arch/um/include/as-layout.h | |||
@@ -23,16 +23,16 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifdef __ASSEMBLY__ | 25 | #ifdef __ASSEMBLY__ |
26 | #define _AC(X, Y) (Y) | 26 | #define _UML_AC(X, Y) (Y) |
27 | #else | 27 | #else |
28 | #define __AC(X, Y) (X (Y)) | 28 | #define __UML_AC(X, Y) (X(Y)) |
29 | #define _AC(X, Y) __AC(X, Y) | 29 | #define _UML_AC(X, Y) __UML_AC(X, Y) |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #define STUB_START _AC(, 0x100000) | 32 | #define STUB_START _UML_AC(, 0x100000) |
33 | #define STUB_CODE _AC((unsigned long), STUB_START) | 33 | #define STUB_CODE _UML_AC((unsigned long), STUB_START) |
34 | #define STUB_DATA _AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE) | 34 | #define STUB_DATA _UML_AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE) |
35 | #define STUB_END _AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE) | 35 | #define STUB_END _UML_AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE) |
36 | 36 | ||
37 | #ifndef __ASSEMBLY__ | 37 | #ifndef __ASSEMBLY__ |
38 | 38 | ||
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S index 26090b7f323e..9975e1ab44fb 100644 --- a/arch/um/kernel/dyn.lds.S +++ b/arch/um/kernel/dyn.lds.S | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <asm-generic/vmlinux.lds.h> | 1 | #include <asm-generic/vmlinux.lds.h> |
2 | #include <asm/page.h> | ||
2 | 3 | ||
3 | OUTPUT_FORMAT(ELF_FORMAT) | 4 | OUTPUT_FORMAT(ELF_FORMAT) |
4 | OUTPUT_ARCH(ELF_ARCH) | 5 | OUTPUT_ARCH(ELF_ARCH) |
@@ -21,7 +22,7 @@ SECTIONS | |||
21 | _einittext = .; | 22 | _einittext = .; |
22 | } | 23 | } |
23 | 24 | ||
24 | . = ALIGN(4096); | 25 | . = ALIGN(PAGE_SIZE); |
25 | 26 | ||
26 | /* Read-only sections, merged into text segment: */ | 27 | /* Read-only sections, merged into text segment: */ |
27 | .hash : { *(.hash) } | 28 | .hash : { *(.hash) } |
@@ -68,9 +69,9 @@ SECTIONS | |||
68 | /* .gnu.warning sections are handled specially by elf32.em. */ | 69 | /* .gnu.warning sections are handled specially by elf32.em. */ |
69 | *(.gnu.warning) | 70 | *(.gnu.warning) |
70 | 71 | ||
71 | . = ALIGN(4096); | 72 | . = ALIGN(PAGE_SIZE); |
72 | } =0x90909090 | 73 | } =0x90909090 |
73 | . = ALIGN(4096); | 74 | . = ALIGN(PAGE_SIZE); |
74 | .syscall_stub : { | 75 | .syscall_stub : { |
75 | __syscall_stub_start = .; | 76 | __syscall_stub_start = .; |
76 | *(.__syscall_stub*) | 77 | *(.__syscall_stub*) |
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S index 5828c1d54505..11b835248b86 100644 --- a/arch/um/kernel/uml.lds.S +++ b/arch/um/kernel/uml.lds.S | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <asm-generic/vmlinux.lds.h> | 1 | #include <asm-generic/vmlinux.lds.h> |
2 | #include <asm/page.h> | ||
2 | 3 | ||
3 | OUTPUT_FORMAT(ELF_FORMAT) | 4 | OUTPUT_FORMAT(ELF_FORMAT) |
4 | OUTPUT_ARCH(ELF_ARCH) | 5 | OUTPUT_ARCH(ELF_ARCH) |
@@ -26,7 +27,7 @@ SECTIONS | |||
26 | INIT_TEXT | 27 | INIT_TEXT |
27 | _einittext = .; | 28 | _einittext = .; |
28 | } | 29 | } |
29 | . = ALIGN(4096); | 30 | . = ALIGN(PAGE_SIZE); |
30 | 31 | ||
31 | .text : | 32 | .text : |
32 | { | 33 | { |
@@ -39,7 +40,7 @@ SECTIONS | |||
39 | *(.gnu.linkonce.t*) | 40 | *(.gnu.linkonce.t*) |
40 | } | 41 | } |
41 | 42 | ||
42 | . = ALIGN(4096); | 43 | . = ALIGN(PAGE_SIZE); |
43 | .syscall_stub : { | 44 | .syscall_stub : { |
44 | __syscall_stub_start = .; | 45 | __syscall_stub_start = .; |
45 | *(.__syscall_stub*) | 46 | *(.__syscall_stub*) |
@@ -79,7 +80,7 @@ SECTIONS | |||
79 | .sdata : { *(.sdata) } | 80 | .sdata : { *(.sdata) } |
80 | _edata = .; | 81 | _edata = .; |
81 | PROVIDE (edata = .); | 82 | PROVIDE (edata = .); |
82 | . = ALIGN(0x1000); | 83 | . = ALIGN(PAGE_SIZE); |
83 | .sbss : | 84 | .sbss : |
84 | { | 85 | { |
85 | __bss_start = .; | 86 | __bss_start = .; |
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 @@ | |||
7 | #ifndef __UM_PAGE_H | 7 | #ifndef __UM_PAGE_H |
8 | #define __UM_PAGE_H | 8 | #define __UM_PAGE_H |
9 | 9 | ||
10 | struct page; | 10 | #include <linux/const.h> |
11 | |||
12 | #include <linux/types.h> | ||
13 | #include <asm/vm-flags.h> | ||
14 | 11 | ||
15 | /* PAGE_SHIFT determines the page size */ | 12 | /* PAGE_SHIFT determines the page size */ |
16 | #define PAGE_SHIFT 12 | 13 | #define PAGE_SHIFT 12 |
17 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 14 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) |
18 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 15 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
19 | 16 | ||
17 | #ifndef __ASSEMBLY__ | ||
18 | |||
19 | struct page; | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | #include <asm/vm-flags.h> | ||
23 | |||
20 | /* | 24 | /* |
21 | * These are used to make use of C type-checking.. | 25 | * These are used to make use of C type-checking.. |
22 | */ | 26 | */ |
@@ -120,4 +124,5 @@ extern struct page *arch_validate(struct page *page, gfp_t mask, int order); | |||
120 | #include <asm-generic/memory_model.h> | 124 | #include <asm-generic/memory_model.h> |
121 | #include <asm-generic/page.h> | 125 | #include <asm-generic/page.h> |
122 | 126 | ||
123 | #endif | 127 | #endif /* __ASSEMBLY__ */ |
128 | #endif /* __UM_PAGE_H */ | ||