diff options
-rw-r--r-- | arch/powerpc/Kconfig | 6 | ||||
-rw-r--r-- | arch/powerpc/Makefile | 27 | ||||
-rw-r--r-- | arch/powerpc/kernel/Makefile | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds | 174 | ||||
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 190 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/lpevents.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/Makefile | 8 | ||||
-rw-r--r-- | include/asm-powerpc/system.h | 4 |
8 files changed, 214 insertions, 206 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 953a74be57b6..7f891ebfbd85 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -833,6 +833,12 @@ config PIN_TLB | |||
833 | depends on ADVANCED_OPTIONS && 8xx | 833 | depends on ADVANCED_OPTIONS && 8xx |
834 | endmenu | 834 | endmenu |
835 | 835 | ||
836 | if PPC64 | ||
837 | config KERNEL_START | ||
838 | hex | ||
839 | default "0xc0000000" | ||
840 | endif | ||
841 | |||
836 | source "net/Kconfig" | 842 | source "net/Kconfig" |
837 | 843 | ||
838 | source "drivers/Kconfig" | 844 | source "drivers/Kconfig" |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 9f80deb05ecc..eb1224c24e3e 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -124,12 +124,14 @@ head-$(CONFIG_6xx) += arch/powerpc/kernel/idle_6xx.o | |||
124 | head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o | 124 | head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o |
125 | endif | 125 | endif |
126 | 126 | ||
127 | core-y += arch/powerpc/kernel/ \ | 127 | core-y += arch/powerpc/kernel/ |
128 | arch/$(OLDARCH)/kernel/ \ | 128 | core-y += arch/$(OLDARCH)/kernel/ |
129 | arch/powerpc/mm/ \ | 129 | core-$(CONFIG_PPC32) += arch/powerpc/mm/ |
130 | arch/powerpc/lib/ \ | 130 | core-$(CONFIG_PPC64) += arch/$(OLDARCH)/mm/ |
131 | arch/powerpc/sysdev/ \ | 131 | core-$(CONFIG_PPC32) += arch/powerpc/lib/ |
132 | arch/powerpc/platforms/ | 132 | libs-$(CONFIG_PPC64) += arch/$(OLDARCH)/lib/ |
133 | core-y += arch/powerpc/sysdev/ | ||
134 | core-y += arch/powerpc/platforms/ | ||
133 | core-$(CONFIG_PPC32) += arch/ppc/syslib/ | 135 | core-$(CONFIG_PPC32) += arch/ppc/syslib/ |
134 | core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ | 136 | core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ |
135 | core-$(CONFIG_XMON) += arch/powerpc/xmon/ | 137 | core-$(CONFIG_XMON) += arch/powerpc/xmon/ |
@@ -140,17 +142,20 @@ drivers-$(CONFIG_CPM2) += arch/ppc/8260_io/ | |||
140 | 142 | ||
141 | drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ | 143 | drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ |
142 | 144 | ||
143 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm | 145 | defaultimage-$(CONFIG_PPC32) := uImage zImage |
144 | 146 | defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux | |
145 | .PHONY: $(BOOT_TARGETS) | 147 | KBUILD_IMAGE := $(defaultimage-y) |
146 | 148 | all: $(KBUILD_IMAGE) | |
147 | all: uImage zImage | ||
148 | 149 | ||
149 | CPPFLAGS_vmlinux.lds := -Upowerpc | 150 | CPPFLAGS_vmlinux.lds := -Upowerpc |
150 | 151 | ||
151 | # All the instructions talk about "make bzImage". | 152 | # All the instructions talk about "make bzImage". |
152 | bzImage: zImage | 153 | bzImage: zImage |
153 | 154 | ||
155 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm | ||
156 | |||
157 | .PHONY: $(BOOT_TARGETS) | ||
158 | |||
154 | boot := arch/$(OLDARCH)/boot | 159 | boot := arch/$(OLDARCH)/boot |
155 | 160 | ||
156 | $(BOOT_TARGETS): vmlinux | 161 | $(BOOT_TARGETS): vmlinux |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index b5eff3ef2f3d..be3f9d123a6d 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -6,8 +6,10 @@ ifeq ($(CONFIG_PPC64),y) | |||
6 | EXTRA_CFLAGS += -mno-minimal-toc | 6 | EXTRA_CFLAGS += -mno-minimal-toc |
7 | endif | 7 | endif |
8 | 8 | ||
9 | ifeq ($(CONFIG_PPC32),y) | ||
9 | extra-$(CONFIG_PPC_STD_MMU) := head.o | 10 | extra-$(CONFIG_PPC_STD_MMU) := head.o |
10 | extra_$(CONFIG_PPC64) := head_64.o | 11 | endif |
12 | extra-$(CONFIG_PPC64) := head_64.o | ||
11 | extra-$(CONFIG_40x) := head_4xx.o | 13 | extra-$(CONFIG_40x) := head_4xx.o |
12 | extra-$(CONFIG_44x) := head_44x.o | 14 | extra-$(CONFIG_44x) := head_44x.o |
13 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o | 15 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o |
@@ -23,3 +25,8 @@ ifeq ($(CONFIG_PPC32),y) | |||
23 | obj-$(CONFIG_MODULES) += ppc_ksyms.o | 25 | obj-$(CONFIG_MODULES) += ppc_ksyms.o |
24 | endif | 26 | endif |
25 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o | 27 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o |
28 | |||
29 | ifeq ($(CONFIG_PPC_ISERIES),y) | ||
30 | arch/powerpc/kernel/head_64.o: arch/powerpc/platforms/iseries/lparmap.s | ||
31 | AFLAGS_head_64.o += -Iarch/powerpc/platforms/iseries | ||
32 | endif | ||
diff --git a/arch/powerpc/kernel/vmlinux.lds b/arch/powerpc/kernel/vmlinux.lds deleted file mode 100644 index d62c288a81d0..000000000000 --- a/arch/powerpc/kernel/vmlinux.lds +++ /dev/null | |||
@@ -1,174 +0,0 @@ | |||
1 | /* Align . to a 8 byte boundary equals to maximum function alignment. */ | ||
2 | /* sched.text is aling to function alignment to secure we have same | ||
3 | * address even at second ld pass when generating System.map */ | ||
4 | /* spinlock.text is aling to function alignment to secure we have same | ||
5 | * address even at second ld pass when generating System.map */ | ||
6 | /* DWARF debug sections. | ||
7 | Symbols in the DWARF debugging sections are relative to | ||
8 | the beginning of the section so we begin them at 0. */ | ||
9 | /* Stabs debugging sections. */ | ||
10 | OUTPUT_ARCH(powerpc:common) | ||
11 | jiffies = jiffies_64 + 4; | ||
12 | SECTIONS | ||
13 | { | ||
14 | /* Read-only sections, merged into text segment: */ | ||
15 | . = + SIZEOF_HEADERS; | ||
16 | .interp : { *(.interp) } | ||
17 | .hash : { *(.hash) } | ||
18 | .dynsym : { *(.dynsym) } | ||
19 | .dynstr : { *(.dynstr) } | ||
20 | .rel.text : { *(.rel.text) } | ||
21 | .rela.text : { *(.rela.text) } | ||
22 | .rel.data : { *(.rel.data) } | ||
23 | .rela.data : { *(.rela.data) } | ||
24 | .rel.rodata : { *(.rel.rodata) } | ||
25 | .rela.rodata : { *(.rela.rodata) } | ||
26 | .rel.got : { *(.rel.got) } | ||
27 | .rela.got : { *(.rela.got) } | ||
28 | .rel.ctors : { *(.rel.ctors) } | ||
29 | .rela.ctors : { *(.rela.ctors) } | ||
30 | .rel.dtors : { *(.rel.dtors) } | ||
31 | .rela.dtors : { *(.rela.dtors) } | ||
32 | .rel.bss : { *(.rel.bss) } | ||
33 | .rela.bss : { *(.rela.bss) } | ||
34 | .rel.plt : { *(.rel.plt) } | ||
35 | .rela.plt : { *(.rela.plt) } | ||
36 | /* .init : { *(.init) } =0*/ | ||
37 | .plt : { *(.plt) } | ||
38 | .text : | ||
39 | { | ||
40 | *(.text) | ||
41 | . = ALIGN(8); __sched_text_start = .; *(.sched.text) __sched_text_end = .; | ||
42 | . = ALIGN(8); __lock_text_start = .; *(.spinlock.text) __lock_text_end = .; | ||
43 | *(.fixup) | ||
44 | *(.got1) | ||
45 | __got2_start = .; | ||
46 | *(.got2) | ||
47 | __got2_end = .; | ||
48 | } | ||
49 | _etext = .; | ||
50 | PROVIDE (etext = .); | ||
51 | .rodata : AT(ADDR(.rodata) - 0) { *(.rodata) *(.rodata.*) *(__vermagic) } .rodata1 : AT(ADDR(.rodata1) - 0) { *(.rodata1) } .pci_fixup : AT(ADDR(.pci_fixup) - 0) { __start_pci_fixups_early = .; *(.pci_fixup_early) __end_pci_fixups_early = .; __start_pci_fixups_header = .; *(.pci_fixup_header) __end_pci_fixups_header = .; __start_pci_fixups_final = .; *(.pci_fixup_final) __end_pci_fixups_final = .; __start_pci_fixups_enable = .; *(.pci_fixup_enable) __end_pci_fixups_enable = .; } __ksymtab : AT(ADDR(__ksymtab) - 0) { __start___ksymtab = .; *(__ksymtab) __stop___ksymtab = .; } __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - 0) { __start___ksymtab_gpl = .; *(__ksymtab_gpl) __stop___ksymtab_gpl = .; } __kcrctab : AT(ADDR(__kcrctab) - 0) { __start___kcrctab = .; *(__kcrctab) __stop___kcrctab = .; } __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - 0) { __start___kcrctab_gpl = .; *(__kcrctab_gpl) __stop___kcrctab_gpl = .; } __ksymtab_strings : AT(ADDR(__ksymtab_strings) - 0) { *(__ksymtab_strings) } __param : AT(ADDR(__param) - 0) { __start___param = .; *(__param) __stop___param = .; } | ||
52 | .fini : { *(.fini) } =0 | ||
53 | .ctors : { *(.ctors) } | ||
54 | .dtors : { *(.dtors) } | ||
55 | .fixup : { *(.fixup) } | ||
56 | __ex_table : { | ||
57 | __start___ex_table = .; | ||
58 | *(__ex_table) | ||
59 | __stop___ex_table = .; | ||
60 | } | ||
61 | __bug_table : { | ||
62 | __start___bug_table = .; | ||
63 | *(__bug_table) | ||
64 | __stop___bug_table = .; | ||
65 | } | ||
66 | /* Read-write section, merged into data segment: */ | ||
67 | . = ALIGN(4096); | ||
68 | .data : | ||
69 | { | ||
70 | *(.data) | ||
71 | *(.data1) | ||
72 | *(.sdata) | ||
73 | *(.sdata2) | ||
74 | *(.got.plt) *(.got) | ||
75 | *(.dynamic) | ||
76 | CONSTRUCTORS | ||
77 | } | ||
78 | |||
79 | . = ALIGN(4096); | ||
80 | __nosave_begin = .; | ||
81 | .data_nosave : { *(.data.nosave) } | ||
82 | . = ALIGN(4096); | ||
83 | __nosave_end = .; | ||
84 | |||
85 | . = ALIGN(32); | ||
86 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } | ||
87 | |||
88 | _edata = .; | ||
89 | PROVIDE (edata = .); | ||
90 | |||
91 | . = ALIGN(8192); | ||
92 | .data.init_task : { *(.data.init_task) } | ||
93 | |||
94 | . = ALIGN(4096); | ||
95 | __init_begin = .; | ||
96 | .init.text : { | ||
97 | _sinittext = .; | ||
98 | *(.init.text) | ||
99 | _einittext = .; | ||
100 | } | ||
101 | /* .exit.text is discarded at runtime, not link time, | ||
102 | to deal with references from __bug_table */ | ||
103 | .exit.text : { *(.exit.text) } | ||
104 | .init.data : { | ||
105 | *(.init.data); | ||
106 | __vtop_table_begin = .; | ||
107 | *(.vtop_fixup); | ||
108 | __vtop_table_end = .; | ||
109 | __ptov_table_begin = .; | ||
110 | *(.ptov_fixup); | ||
111 | __ptov_table_end = .; | ||
112 | } | ||
113 | . = ALIGN(16); | ||
114 | __setup_start = .; | ||
115 | .init.setup : { *(.init.setup) } | ||
116 | __setup_end = .; | ||
117 | __initcall_start = .; | ||
118 | .initcall.init : { | ||
119 | *(.initcall1.init) | ||
120 | *(.initcall2.init) | ||
121 | *(.initcall3.init) | ||
122 | *(.initcall4.init) | ||
123 | *(.initcall5.init) | ||
124 | *(.initcall6.init) | ||
125 | *(.initcall7.init) | ||
126 | } | ||
127 | __initcall_end = .; | ||
128 | |||
129 | __con_initcall_start = .; | ||
130 | .con_initcall.init : { *(.con_initcall.init) } | ||
131 | __con_initcall_end = .; | ||
132 | |||
133 | .security_initcall.init : AT(ADDR(.security_initcall.init) - 0) { __security_initcall_start = .; *(.security_initcall.init) __security_initcall_end = .; } | ||
134 | |||
135 | __start___ftr_fixup = .; | ||
136 | __ftr_fixup : { *(__ftr_fixup) } | ||
137 | __stop___ftr_fixup = .; | ||
138 | |||
139 | . = ALIGN(32); | ||
140 | __per_cpu_start = .; | ||
141 | .data.percpu : { *(.data.percpu) } | ||
142 | __per_cpu_end = .; | ||
143 | |||
144 | . = ALIGN(4096); | ||
145 | __initramfs_start = .; | ||
146 | .init.ramfs : { *(.init.ramfs) } | ||
147 | __initramfs_end = .; | ||
148 | |||
149 | . = ALIGN(4096); | ||
150 | __init_end = .; | ||
151 | |||
152 | . = ALIGN(4096); | ||
153 | _sextratext = .; | ||
154 | _eextratext = .; | ||
155 | |||
156 | __bss_start = .; | ||
157 | .bss : | ||
158 | { | ||
159 | *(.sbss) *(.scommon) | ||
160 | *(.dynbss) | ||
161 | *(.bss) | ||
162 | *(COMMON) | ||
163 | } | ||
164 | __bss_stop = .; | ||
165 | |||
166 | _end = . ; | ||
167 | PROVIDE (end = .); | ||
168 | |||
169 | /* Sections to be discarded. */ | ||
170 | /DISCARD/ : { | ||
171 | *(.exitcall.exit) | ||
172 | *(.exit.data) | ||
173 | } | ||
174 | } | ||
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 09c6525cfa61..0587d9c4609d 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -1,10 +1,29 @@ | |||
1 | #include <linux/config.h> | ||
2 | #ifdef CONFIG_PPC64 | ||
3 | #include <asm/page.h> | ||
4 | #endif | ||
1 | #include <asm-generic/vmlinux.lds.h> | 5 | #include <asm-generic/vmlinux.lds.h> |
2 | 6 | ||
7 | #ifdef CONFIG_PPC64 | ||
8 | OUTPUT_ARCH(powerpc:common64) | ||
9 | jiffies = jiffies_64; | ||
10 | #else | ||
3 | OUTPUT_ARCH(powerpc:common) | 11 | OUTPUT_ARCH(powerpc:common) |
4 | jiffies = jiffies_64 + 4; | 12 | jiffies = jiffies_64 + 4; |
13 | #endif | ||
5 | SECTIONS | 14 | SECTIONS |
6 | { | 15 | { |
16 | /* Sections to be discarded. */ | ||
17 | /DISCARD/ : { | ||
18 | *(.exitcall.exit) | ||
19 | #ifdef CONFIG_PPC32 | ||
20 | *(.exit.data) | ||
21 | #endif | ||
22 | } | ||
23 | |||
24 | |||
7 | /* Read-only sections, merged into text segment: */ | 25 | /* Read-only sections, merged into text segment: */ |
26 | #ifdef CONFIG_PPC32 | ||
8 | . = + SIZEOF_HEADERS; | 27 | . = + SIZEOF_HEADERS; |
9 | .interp : { *(.interp) } | 28 | .interp : { *(.interp) } |
10 | .hash : { *(.hash) } | 29 | .hash : { *(.hash) } |
@@ -28,17 +47,30 @@ SECTIONS | |||
28 | .rela.plt : { *(.rela.plt) } | 47 | .rela.plt : { *(.rela.plt) } |
29 | /* .init : { *(.init) } =0*/ | 48 | /* .init : { *(.init) } =0*/ |
30 | .plt : { *(.plt) } | 49 | .plt : { *(.plt) } |
31 | .text : | 50 | #endif |
32 | { | 51 | .text : { |
52 | #ifdef CONFIG_PPC64 | ||
53 | *(.text .text.*) | ||
54 | #else | ||
33 | *(.text) | 55 | *(.text) |
56 | #endif | ||
34 | SCHED_TEXT | 57 | SCHED_TEXT |
35 | LOCK_TEXT | 58 | LOCK_TEXT |
59 | #ifdef CONFIG_PPC64 | ||
60 | KPROBES_TEXT | ||
61 | #endif | ||
36 | *(.fixup) | 62 | *(.fixup) |
63 | #ifdef CONFIG_PPC32 | ||
37 | *(.got1) | 64 | *(.got1) |
38 | __got2_start = .; | 65 | __got2_start = .; |
39 | *(.got2) | 66 | *(.got2) |
40 | __got2_end = .; | 67 | __got2_end = .; |
68 | #else | ||
69 | . = ALIGN(PAGE_SIZE); | ||
70 | _etext = .; | ||
71 | #endif | ||
41 | } | 72 | } |
73 | #ifdef CONFIG_PPC32 | ||
42 | _etext = .; | 74 | _etext = .; |
43 | PROVIDE (etext = .); | 75 | PROVIDE (etext = .); |
44 | 76 | ||
@@ -48,6 +80,7 @@ SECTIONS | |||
48 | .dtors : { *(.dtors) } | 80 | .dtors : { *(.dtors) } |
49 | 81 | ||
50 | .fixup : { *(.fixup) } | 82 | .fixup : { *(.fixup) } |
83 | #endif | ||
51 | 84 | ||
52 | __ex_table : { | 85 | __ex_table : { |
53 | __start___ex_table = .; | 86 | __start___ex_table = .; |
@@ -61,6 +94,17 @@ SECTIONS | |||
61 | __stop___bug_table = .; | 94 | __stop___bug_table = .; |
62 | } | 95 | } |
63 | 96 | ||
97 | #ifdef CONFIG_PPC64 | ||
98 | __ftr_fixup : { | ||
99 | __start___ftr_fixup = .; | ||
100 | *(__ftr_fixup) | ||
101 | __stop___ftr_fixup = .; | ||
102 | } | ||
103 | |||
104 | RODATA | ||
105 | #endif | ||
106 | |||
107 | #ifdef CONFIG_PPC32 | ||
64 | /* Read-write section, merged into data segment: */ | 108 | /* Read-write section, merged into data segment: */ |
65 | . = ALIGN(4096); | 109 | . = ALIGN(4096); |
66 | .data : | 110 | .data : |
@@ -90,16 +134,25 @@ SECTIONS | |||
90 | .data.init_task : { *(.data.init_task) } | 134 | .data.init_task : { *(.data.init_task) } |
91 | 135 | ||
92 | . = ALIGN(4096); | 136 | . = ALIGN(4096); |
137 | #else | ||
138 | /* will be freed after init */ | ||
139 | . = ALIGN(PAGE_SIZE); | ||
140 | #endif | ||
93 | __init_begin = .; | 141 | __init_begin = .; |
94 | .init.text : { | 142 | .init.text : { |
95 | _sinittext = .; | 143 | _sinittext = .; |
96 | *(.init.text) | 144 | *(.init.text) |
97 | _einittext = .; | 145 | _einittext = .; |
98 | } | 146 | } |
147 | #ifdef CONFIG_PPC32 | ||
99 | /* .exit.text is discarded at runtime, not link time, | 148 | /* .exit.text is discarded at runtime, not link time, |
100 | to deal with references from __bug_table */ | 149 | to deal with references from __bug_table */ |
101 | .exit.text : { *(.exit.text) } | 150 | .exit.text : { *(.exit.text) } |
151 | #endif | ||
102 | .init.data : { | 152 | .init.data : { |
153 | #ifdef CONFIG_PPC64 | ||
154 | *(.init.data) | ||
155 | #else | ||
103 | *(.init.data); | 156 | *(.init.data); |
104 | __vtop_table_begin = .; | 157 | __vtop_table_begin = .; |
105 | *(.vtop_fixup); | 158 | *(.vtop_fixup); |
@@ -107,13 +160,31 @@ SECTIONS | |||
107 | __ptov_table_begin = .; | 160 | __ptov_table_begin = .; |
108 | *(.ptov_fixup); | 161 | *(.ptov_fixup); |
109 | __ptov_table_end = .; | 162 | __ptov_table_end = .; |
163 | #endif | ||
110 | } | 164 | } |
165 | |||
111 | . = ALIGN(16); | 166 | . = ALIGN(16); |
167 | #ifdef CONFIG_PPC32 | ||
112 | __setup_start = .; | 168 | __setup_start = .; |
113 | .init.setup : { *(.init.setup) } | 169 | #endif |
170 | .init.setup : { | ||
171 | #ifdef CONFIG_PPC64 | ||
172 | __setup_start = .; | ||
173 | #endif | ||
174 | *(.init.setup) | ||
175 | #ifdef CONFIG_PPC64 | ||
176 | __setup_end = .; | ||
177 | #endif | ||
178 | } | ||
179 | #ifdef CONFIG_PPC32 | ||
114 | __setup_end = .; | 180 | __setup_end = .; |
181 | |||
115 | __initcall_start = .; | 182 | __initcall_start = .; |
183 | #endif | ||
116 | .initcall.init : { | 184 | .initcall.init : { |
185 | #ifdef CONFIG_PPC64 | ||
186 | __initcall_start = .; | ||
187 | #endif | ||
117 | *(.initcall1.init) | 188 | *(.initcall1.init) |
118 | *(.initcall2.init) | 189 | *(.initcall2.init) |
119 | *(.initcall3.init) | 190 | *(.initcall3.init) |
@@ -121,27 +192,109 @@ SECTIONS | |||
121 | *(.initcall5.init) | 192 | *(.initcall5.init) |
122 | *(.initcall6.init) | 193 | *(.initcall6.init) |
123 | *(.initcall7.init) | 194 | *(.initcall7.init) |
195 | #ifdef CONFIG_PPC64 | ||
196 | __initcall_end = .; | ||
197 | #endif | ||
124 | } | 198 | } |
199 | #ifdef CONFIG_PPC32 | ||
125 | __initcall_end = .; | 200 | __initcall_end = .; |
126 | 201 | ||
127 | __con_initcall_start = .; | 202 | __con_initcall_start = .; |
128 | .con_initcall.init : { *(.con_initcall.init) } | 203 | #endif |
204 | .con_initcall.init : { | ||
205 | #ifdef CONFIG_PPC64 | ||
206 | __con_initcall_start = .; | ||
207 | #endif | ||
208 | *(.con_initcall.init) | ||
209 | #ifdef CONFIG_PPC64 | ||
210 | __con_initcall_end = .; | ||
211 | #endif | ||
212 | } | ||
213 | #ifdef CONFIG_PPC32 | ||
129 | __con_initcall_end = .; | 214 | __con_initcall_end = .; |
215 | #endif | ||
130 | 216 | ||
131 | SECURITY_INIT | 217 | SECURITY_INIT |
132 | 218 | ||
219 | #ifdef CONFIG_PPC32 | ||
133 | __start___ftr_fixup = .; | 220 | __start___ftr_fixup = .; |
134 | __ftr_fixup : { *(__ftr_fixup) } | 221 | __ftr_fixup : { *(__ftr_fixup) } |
135 | __stop___ftr_fixup = .; | 222 | __stop___ftr_fixup = .; |
223 | #else | ||
224 | . = ALIGN(PAGE_SIZE); | ||
225 | .init.ramfs : { | ||
226 | __initramfs_start = .; | ||
227 | *(.init.ramfs) | ||
228 | __initramfs_end = .; | ||
229 | } | ||
230 | #endif | ||
136 | 231 | ||
232 | #ifdef CONFIG_PPC32 | ||
137 | . = ALIGN(32); | 233 | . = ALIGN(32); |
138 | __per_cpu_start = .; | 234 | __per_cpu_start = .; |
139 | .data.percpu : { *(.data.percpu) } | 235 | #endif |
236 | .data.percpu : { | ||
237 | #ifdef CONFIG_PPC64 | ||
238 | __per_cpu_start = .; | ||
239 | #endif | ||
240 | *(.data.percpu) | ||
241 | #ifdef CONFIG_PPC64 | ||
242 | __per_cpu_end = .; | ||
243 | #endif | ||
244 | } | ||
245 | #ifdef CONFIG_PPC32 | ||
140 | __per_cpu_end = .; | 246 | __per_cpu_end = .; |
247 | #endif | ||
141 | 248 | ||
249 | #ifdef CONFIG_PPC64 | ||
250 | . = ALIGN(PAGE_SIZE); | ||
251 | . = ALIGN(16384); | ||
252 | __init_end = .; | ||
253 | /* freed after init ends here */ | ||
254 | |||
255 | |||
256 | /* Read/write sections */ | ||
257 | . = ALIGN(PAGE_SIZE); | ||
258 | . = ALIGN(16384); | ||
259 | /* The initial task and kernel stack */ | ||
260 | .data.init_task : { | ||
261 | *(.data.init_task) | ||
262 | } | ||
263 | |||
264 | . = ALIGN(PAGE_SIZE); | ||
265 | .data.page_aligned : { | ||
266 | *(.data.page_aligned) | ||
267 | } | ||
268 | |||
269 | .data.cacheline_aligned : { | ||
270 | *(.data.cacheline_aligned) | ||
271 | } | ||
272 | |||
273 | .data : { | ||
274 | *(.data .data.rel* .toc1) | ||
275 | *(.branch_lt) | ||
276 | } | ||
277 | |||
278 | .opd : { | ||
279 | *(.opd) | ||
280 | } | ||
281 | |||
282 | .got : { | ||
283 | __toc_start = .; | ||
284 | *(.got) | ||
285 | *(.toc) | ||
286 | . = ALIGN(PAGE_SIZE); | ||
287 | _edata = .; | ||
288 | } | ||
289 | |||
290 | |||
291 | . = ALIGN(PAGE_SIZE); | ||
292 | #else | ||
142 | . = ALIGN(4096); | 293 | . = ALIGN(4096); |
143 | __initramfs_start = .; | 294 | __initramfs_start = .; |
144 | .init.ramfs : { *(.init.ramfs) } | 295 | .init.ramfs : { |
296 | *(.init.ramfs) | ||
297 | } | ||
145 | __initramfs_end = .; | 298 | __initramfs_end = .; |
146 | 299 | ||
147 | . = ALIGN(4096); | 300 | . = ALIGN(4096); |
@@ -152,21 +305,30 @@ SECTIONS | |||
152 | _eextratext = .; | 305 | _eextratext = .; |
153 | 306 | ||
154 | __bss_start = .; | 307 | __bss_start = .; |
155 | .bss : | 308 | #endif |
156 | { | 309 | .bss : { |
310 | #ifdef CONFIG_PPC64 | ||
311 | __bss_start = .; | ||
312 | #else | ||
157 | *(.sbss) *(.scommon) | 313 | *(.sbss) *(.scommon) |
158 | *(.dynbss) | 314 | *(.dynbss) |
315 | #endif | ||
159 | *(.bss) | 316 | *(.bss) |
317 | #ifdef CONFIG_PPC32 | ||
160 | *(COMMON) | 318 | *(COMMON) |
319 | #else | ||
320 | __bss_stop = .; | ||
321 | #endif | ||
161 | } | 322 | } |
323 | #ifdef CONFIG_PPC32 | ||
162 | __bss_stop = .; | 324 | __bss_stop = .; |
325 | #endif | ||
163 | 326 | ||
327 | #ifdef CONFIG_PPC64 | ||
328 | . = ALIGN(PAGE_SIZE); | ||
329 | #endif | ||
164 | _end = . ; | 330 | _end = . ; |
331 | #ifdef CONFIG_PPC32 | ||
165 | PROVIDE (end = .); | 332 | PROVIDE (end = .); |
166 | 333 | #endif | |
167 | /* Sections to be discarded. */ | ||
168 | /DISCARD/ : { | ||
169 | *(.exitcall.exit) | ||
170 | *(.exit.data) | ||
171 | } | ||
172 | } | 334 | } |
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index 883603027ccf..f8b4155b0481 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/bootmem.h> | 13 | #include <linux/bootmem.h> |
14 | #include <linux/seq_file.h> | 14 | #include <linux/seq_file.h> |
15 | #include <linux/proc_fs.h> | 15 | #include <linux/proc_fs.h> |
16 | #include <linux/module.h> | ||
17 | |||
16 | #include <asm/system.h> | 18 | #include <asm/system.h> |
17 | #include <asm/paca.h> | 19 | #include <asm/paca.h> |
18 | #include <asm/iSeries/ItLpQueue.h> | 20 | #include <asm/iSeries/ItLpQueue.h> |
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile index 90a1519342da..2fdcc4b63d40 100644 --- a/arch/ppc64/kernel/Makefile +++ b/arch/ppc64/kernel/Makefile | |||
@@ -2,10 +2,10 @@ | |||
2 | # Makefile for the linux ppc64 kernel. | 2 | # Makefile for the linux ppc64 kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | ifneq ($(CONFIG_PPC_MERGE),y) | ||
6 | |||
7 | EXTRA_CFLAGS += -mno-minimal-toc | 5 | EXTRA_CFLAGS += -mno-minimal-toc |
6 | ifneq ($(CONFIG_PPC_MERGE),y) | ||
8 | extra-y := head.o vmlinux.lds | 7 | extra-y := head.o vmlinux.lds |
8 | endif | ||
9 | 9 | ||
10 | obj-y := setup.o entry.o irq.o idle.o dma.o \ | 10 | obj-y := setup.o entry.o irq.o idle.o dma.o \ |
11 | time.o process.o signal.o syscalls.o misc.o ptrace.o \ | 11 | time.o process.o signal.o syscalls.o misc.o ptrace.o \ |
@@ -70,11 +70,9 @@ obj-$(CONFIG_KPROBES) += kprobes.o | |||
70 | 70 | ||
71 | CFLAGS_ioctl32.o += -Ifs/ | 71 | CFLAGS_ioctl32.o += -Ifs/ |
72 | 72 | ||
73 | ifneq ($(CONFIG_PPC_MERGE),y) | ||
73 | ifeq ($(CONFIG_PPC_ISERIES),y) | 74 | ifeq ($(CONFIG_PPC_ISERIES),y) |
74 | arch/ppc64/kernel/head.o: arch/powerpc/platforms/iseries/lparmap.s | 75 | arch/ppc64/kernel/head.o: arch/powerpc/platforms/iseries/lparmap.s |
75 | AFLAGS_head.o += -Iarch/powerpc/platforms/iseries | 76 | AFLAGS_head.o += -Iarch/powerpc/platforms/iseries |
76 | endif | 77 | endif |
77 | |||
78 | else | ||
79 | |||
80 | endif | 78 | endif |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 1b64879a02c3..027479dcbf43 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -118,10 +118,10 @@ extern void _set_L3CR(unsigned long); | |||
118 | #endif | 118 | #endif |
119 | 119 | ||
120 | extern void via_cuda_init(void); | 120 | extern void via_cuda_init(void); |
121 | extern void pmac_nvram_init(void); | ||
122 | extern void read_rtc_time(void); | 121 | extern void read_rtc_time(void); |
123 | extern void pmac_find_display(void); | 122 | extern void pmac_find_display(void); |
124 | extern void giveup_fpu(struct task_struct *); | 123 | extern void giveup_fpu(struct task_struct *); |
124 | extern void disable_kernel_fp(void); | ||
125 | extern void enable_kernel_fp(void); | 125 | extern void enable_kernel_fp(void); |
126 | extern void flush_fp_to_thread(struct task_struct *); | 126 | extern void flush_fp_to_thread(struct task_struct *); |
127 | extern void enable_kernel_altivec(void); | 127 | extern void enable_kernel_altivec(void); |
@@ -346,5 +346,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, | |||
346 | 346 | ||
347 | #define arch_align_stack(x) (x) | 347 | #define arch_align_stack(x) (x) |
348 | 348 | ||
349 | extern unsigned long reloc_offset(void); | ||
350 | |||
349 | #endif /* __KERNEL__ */ | 351 | #endif /* __KERNEL__ */ |
350 | #endif /* _ASM_POWERPC_SYSTEM_H */ | 352 | #endif /* _ASM_POWERPC_SYSTEM_H */ |