diff options
author | Olof Johansson <olof@lixom.net> | 2005-09-19 23:47:41 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-21 05:21:07 -0400 |
commit | 637a6ff6ce525d8495df944550efea0f023dd521 (patch) | |
tree | f4d31da12a348ecf9136cef8f5986172d6af6003 /arch | |
parent | d0035c62d9145a2ce3057c8182a7ff0b4921a41c (diff) |
[PATCH] ppc64: Updated Olof misc updates 3/3
Replace some of the hard-coded constants with PAGE_SIZE/SHIFT/ORDER where
appropriate.
Likewise, in a couple of places it doesn't make sense to base some
allocations on page size when all that's required is a constant 4K,
etc.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/head.S | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/misc.S | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/vmlinux.lds.S | 16 |
3 files changed, 12 insertions, 8 deletions
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S index 72c61041151a..22a5ee07e1ea 100644 --- a/arch/ppc64/kernel/head.S +++ b/arch/ppc64/kernel/head.S | |||
@@ -1992,7 +1992,7 @@ _GLOBAL(smp_release_cpus) | |||
1992 | */ | 1992 | */ |
1993 | .section ".bss" | 1993 | .section ".bss" |
1994 | 1994 | ||
1995 | .align 12 | 1995 | .align PAGE_SHIFT |
1996 | 1996 | ||
1997 | .globl empty_zero_page | 1997 | .globl empty_zero_page |
1998 | empty_zero_page: | 1998 | empty_zero_page: |
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S index e7241ad80a08..a25b59759ddb 100644 --- a/arch/ppc64/kernel/misc.S +++ b/arch/ppc64/kernel/misc.S | |||
@@ -329,7 +329,7 @@ _GLOBAL(__flush_dcache_icache) | |||
329 | 329 | ||
330 | /* Flush the dcache */ | 330 | /* Flush the dcache */ |
331 | ld r7,PPC64_CACHES@toc(r2) | 331 | ld r7,PPC64_CACHES@toc(r2) |
332 | clrrdi r3,r3,12 /* Page align */ | 332 | clrrdi r3,r3,PAGE_SHIFT /* Page align */ |
333 | lwz r4,DCACHEL1LINESPERPAGE(r7) /* Get # dcache lines per page */ | 333 | lwz r4,DCACHEL1LINESPERPAGE(r7) /* Get # dcache lines per page */ |
334 | lwz r5,DCACHEL1LINESIZE(r7) /* Get dcache line size */ | 334 | lwz r5,DCACHEL1LINESIZE(r7) /* Get dcache line size */ |
335 | mr r6,r3 | 335 | mr r6,r3 |
diff --git a/arch/ppc64/kernel/vmlinux.lds.S b/arch/ppc64/kernel/vmlinux.lds.S index 0306510bc4ff..f34d514432ac 100644 --- a/arch/ppc64/kernel/vmlinux.lds.S +++ b/arch/ppc64/kernel/vmlinux.lds.S | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <asm/page.h> | ||
1 | #include <asm-generic/vmlinux.lds.h> | 2 | #include <asm-generic/vmlinux.lds.h> |
2 | 3 | ||
3 | OUTPUT_ARCH(powerpc:common64) | 4 | OUTPUT_ARCH(powerpc:common64) |
@@ -17,7 +18,7 @@ SECTIONS | |||
17 | LOCK_TEXT | 18 | LOCK_TEXT |
18 | KPROBES_TEXT | 19 | KPROBES_TEXT |
19 | *(.fixup) | 20 | *(.fixup) |
20 | . = ALIGN(4096); | 21 | . = ALIGN(PAGE_SIZE); |
21 | _etext = .; | 22 | _etext = .; |
22 | } | 23 | } |
23 | 24 | ||
@@ -43,7 +44,7 @@ SECTIONS | |||
43 | 44 | ||
44 | 45 | ||
45 | /* will be freed after init */ | 46 | /* will be freed after init */ |
46 | . = ALIGN(4096); | 47 | . = ALIGN(PAGE_SIZE); |
47 | __init_begin = .; | 48 | __init_begin = .; |
48 | 49 | ||
49 | .init.text : { | 50 | .init.text : { |
@@ -83,7 +84,7 @@ SECTIONS | |||
83 | 84 | ||
84 | SECURITY_INIT | 85 | SECURITY_INIT |
85 | 86 | ||
86 | . = ALIGN(4096); | 87 | . = ALIGN(PAGE_SIZE); |
87 | .init.ramfs : { | 88 | .init.ramfs : { |
88 | __initramfs_start = .; | 89 | __initramfs_start = .; |
89 | *(.init.ramfs) | 90 | *(.init.ramfs) |
@@ -96,18 +97,21 @@ SECTIONS | |||
96 | __per_cpu_end = .; | 97 | __per_cpu_end = .; |
97 | } | 98 | } |
98 | 99 | ||
100 | . = ALIGN(PAGE_SIZE); | ||
99 | . = ALIGN(16384); | 101 | . = ALIGN(16384); |
100 | __init_end = .; | 102 | __init_end = .; |
101 | /* freed after init ends here */ | 103 | /* freed after init ends here */ |
102 | 104 | ||
103 | 105 | ||
104 | /* Read/write sections */ | 106 | /* Read/write sections */ |
107 | . = ALIGN(PAGE_SIZE); | ||
105 | . = ALIGN(16384); | 108 | . = ALIGN(16384); |
106 | /* The initial task and kernel stack */ | 109 | /* The initial task and kernel stack */ |
107 | .data.init_task : { | 110 | .data.init_task : { |
108 | *(.data.init_task) | 111 | *(.data.init_task) |
109 | } | 112 | } |
110 | 113 | ||
114 | . = ALIGN(PAGE_SIZE); | ||
111 | .data.page_aligned : { | 115 | .data.page_aligned : { |
112 | *(.data.page_aligned) | 116 | *(.data.page_aligned) |
113 | } | 117 | } |
@@ -129,18 +133,18 @@ SECTIONS | |||
129 | __toc_start = .; | 133 | __toc_start = .; |
130 | *(.got) | 134 | *(.got) |
131 | *(.toc) | 135 | *(.toc) |
132 | . = ALIGN(4096); | 136 | . = ALIGN(PAGE_SIZE); |
133 | _edata = .; | 137 | _edata = .; |
134 | } | 138 | } |
135 | 139 | ||
136 | 140 | ||
137 | . = ALIGN(4096); | 141 | . = ALIGN(PAGE_SIZE); |
138 | .bss : { | 142 | .bss : { |
139 | __bss_start = .; | 143 | __bss_start = .; |
140 | *(.bss) | 144 | *(.bss) |
141 | __bss_stop = .; | 145 | __bss_stop = .; |
142 | } | 146 | } |
143 | 147 | ||
144 | . = ALIGN(4096); | 148 | . = ALIGN(PAGE_SIZE); |
145 | _end = . ; | 149 | _end = . ; |
146 | } | 150 | } |