aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ppc64/kernel/head.S2
-rw-r--r--arch/ppc64/kernel/misc.S2
-rw-r--r--arch/ppc64/kernel/vmlinux.lds.S16
-rw-r--r--include/asm-ppc64/elf.h3
-rw-r--r--include/asm-ppc64/mmu.h2
-rw-r--r--include/asm-ppc64/thread_info.h6
6 files changed, 18 insertions, 13 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
1998empty_zero_page: 1998empty_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
3OUTPUT_ARCH(powerpc:common64) 4OUTPUT_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}
diff --git a/include/asm-ppc64/elf.h b/include/asm-ppc64/elf.h
index c919a89343db..e27c2942953c 100644
--- a/include/asm-ppc64/elf.h
+++ b/include/asm-ppc64/elf.h
@@ -5,6 +5,7 @@
5#include <asm/ptrace.h> 5#include <asm/ptrace.h>
6#include <asm/cputable.h> 6#include <asm/cputable.h>
7#include <asm/auxvec.h> 7#include <asm/auxvec.h>
8#include <asm/page.h>
8 9
9/* PowerPC relocations defined by the ABIs */ 10/* PowerPC relocations defined by the ABIs */
10#define R_PPC_NONE 0 11#define R_PPC_NONE 0
@@ -146,7 +147,7 @@ typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
146#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH) 147#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
147 148
148#define USE_ELF_CORE_DUMP 149#define USE_ELF_CORE_DUMP
149#define ELF_EXEC_PAGESIZE 4096 150#define ELF_EXEC_PAGESIZE PAGE_SIZE
150 151
151/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 152/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
152 use of this is to invoke "./ld.so someprog" to test out a new version of 153 use of this is to invoke "./ld.so someprog" to test out a new version of
diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h
index 737e85a5ce3c..d2b0b796d35e 100644
--- a/include/asm-ppc64/mmu.h
+++ b/include/asm-ppc64/mmu.h
@@ -30,7 +30,7 @@
30 30
31/* Location of cpu0's segment table */ 31/* Location of cpu0's segment table */
32#define STAB0_PAGE 0x6 32#define STAB0_PAGE 0x6
33#define STAB0_PHYS_ADDR (STAB0_PAGE<<PAGE_SHIFT) 33#define STAB0_PHYS_ADDR (STAB0_PAGE<<12)
34 34
35#ifndef __ASSEMBLY__ 35#ifndef __ASSEMBLY__
36extern char initial_stab[]; 36extern char initial_stab[];
diff --git a/include/asm-ppc64/thread_info.h b/include/asm-ppc64/thread_info.h
index 0494df6fca74..71244d8a427d 100644
--- a/include/asm-ppc64/thread_info.h
+++ b/include/asm-ppc64/thread_info.h
@@ -54,9 +54,9 @@ struct thread_info {
54 54
55/* thread information allocation */ 55/* thread information allocation */
56 56
57#define THREAD_ORDER 2 57#define THREAD_SHIFT 14
58#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) 58#define THREAD_ORDER (THREAD_SHIFT - PAGE_SHIFT)
59#define THREAD_SHIFT (PAGE_SHIFT + THREAD_ORDER) 59#define THREAD_SIZE (1 << THREAD_SHIFT)
60#ifdef CONFIG_DEBUG_STACK_USAGE 60#ifdef CONFIG_DEBUG_STACK_USAGE
61#define alloc_thread_info(tsk) \ 61#define alloc_thread_info(tsk) \
62 ({ \ 62 ({ \