1 --- a/arch/powerpc/boot/crtsavres.S
5 - * Special support for eabi and SVR4
7 - * Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
8 - * Copyright 2008 Freescale Semiconductor, Inc.
9 - * Written By Michael Meissner
11 - * Based on gcc/config/rs6000/crtsavres.asm from gcc
13 - * This file is free software; you can redistribute it and/or modify it
14 - * under the terms of the GNU General Public License as published by the
15 - * Free Software Foundation; either version 2, or (at your option) any
18 - * In addition to the permissions in the GNU General Public License, the
19 - * Free Software Foundation gives you unlimited permission to link the
20 - * compiled version of this file with other programs, and to distribute
21 - * those programs without any restriction coming from the use of this
22 - * file. (The General Public License restrictions do apply in other
23 - * respects; for example, they cover modification of the file, and
24 - * distribution when not linked into another program.)
26 - * This file is distributed in the hope that it will be useful, but
27 - * WITHOUT ANY WARRANTY; without even the implied warranty of
28 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 - * General Public License for more details.
31 - * You should have received a copy of the GNU General Public License
32 - * along with this program; see the file COPYING. If not, write to
33 - * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
34 - * Boston, MA 02110-1301, USA.
36 - * As a special exception, if you link this library with files
37 - * compiled with GCC to produce an executable, this does not cause
38 - * the resulting executable to be covered by the GNU General Public License.
39 - * This exception does not however invalidate any other reasons why
40 - * the executable file might be covered by the GNU General Public License.
46 -/* On PowerPC64 Linux, these functions are provided by the linker. */
47 -#ifndef __powerpc64__
49 -#define _GLOBAL(name) \
50 - .type name,@function; \
54 -/* Routines for saving integer registers, called by the compiler. */
55 -/* Called with r11 pointing to the stack header word of the caller of the */
56 -/* function, just beyond the end of the integer save area. */
59 -_GLOBAL(_save32gpr_14)
60 - stw 14,-72(11) /* save gp registers */
62 -_GLOBAL(_save32gpr_15)
65 -_GLOBAL(_save32gpr_16)
68 -_GLOBAL(_save32gpr_17)
71 -_GLOBAL(_save32gpr_18)
74 -_GLOBAL(_save32gpr_19)
77 -_GLOBAL(_save32gpr_20)
80 -_GLOBAL(_save32gpr_21)
83 -_GLOBAL(_save32gpr_22)
86 -_GLOBAL(_save32gpr_23)
89 -_GLOBAL(_save32gpr_24)
92 -_GLOBAL(_save32gpr_25)
95 -_GLOBAL(_save32gpr_26)
98 -_GLOBAL(_save32gpr_27)
100 -_GLOBAL(_savegpr_28)
101 -_GLOBAL(_save32gpr_28)
103 -_GLOBAL(_savegpr_29)
104 -_GLOBAL(_save32gpr_29)
106 -_GLOBAL(_savegpr_30)
107 -_GLOBAL(_save32gpr_30)
109 -_GLOBAL(_savegpr_31)
110 -_GLOBAL(_save32gpr_31)
114 -/* Routines for restoring integer registers, called by the compiler. */
115 -/* Called with r11 pointing to the stack header word of the caller of the */
116 -/* function, just beyond the end of the integer restore area. */
118 -_GLOBAL(_restgpr_14)
119 -_GLOBAL(_rest32gpr_14)
120 - lwz 14,-72(11) /* restore gp registers */
121 -_GLOBAL(_restgpr_15)
122 -_GLOBAL(_rest32gpr_15)
124 -_GLOBAL(_restgpr_16)
125 -_GLOBAL(_rest32gpr_16)
127 -_GLOBAL(_restgpr_17)
128 -_GLOBAL(_rest32gpr_17)
130 -_GLOBAL(_restgpr_18)
131 -_GLOBAL(_rest32gpr_18)
133 -_GLOBAL(_restgpr_19)
134 -_GLOBAL(_rest32gpr_19)
136 -_GLOBAL(_restgpr_20)
137 -_GLOBAL(_rest32gpr_20)
139 -_GLOBAL(_restgpr_21)
140 -_GLOBAL(_rest32gpr_21)
142 -_GLOBAL(_restgpr_22)
143 -_GLOBAL(_rest32gpr_22)
145 -_GLOBAL(_restgpr_23)
146 -_GLOBAL(_rest32gpr_23)
148 -_GLOBAL(_restgpr_24)
149 -_GLOBAL(_rest32gpr_24)
151 -_GLOBAL(_restgpr_25)
152 -_GLOBAL(_rest32gpr_25)
154 -_GLOBAL(_restgpr_26)
155 -_GLOBAL(_rest32gpr_26)
157 -_GLOBAL(_restgpr_27)
158 -_GLOBAL(_rest32gpr_27)
160 -_GLOBAL(_restgpr_28)
161 -_GLOBAL(_rest32gpr_28)
163 -_GLOBAL(_restgpr_29)
164 -_GLOBAL(_rest32gpr_29)
166 -_GLOBAL(_restgpr_30)
167 -_GLOBAL(_rest32gpr_30)
169 -_GLOBAL(_restgpr_31)
170 -_GLOBAL(_rest32gpr_31)
174 -/* Routines for restoring integer registers, called by the compiler. */
175 -/* Called with r11 pointing to the stack header word of the caller of the */
176 -/* function, just beyond the end of the integer restore area. */
178 -_GLOBAL(_restgpr_14_x)
179 -_GLOBAL(_rest32gpr_14_x)
180 - lwz 14,-72(11) /* restore gp registers */
181 -_GLOBAL(_restgpr_15_x)
182 -_GLOBAL(_rest32gpr_15_x)
184 -_GLOBAL(_restgpr_16_x)
185 -_GLOBAL(_rest32gpr_16_x)
187 -_GLOBAL(_restgpr_17_x)
188 -_GLOBAL(_rest32gpr_17_x)
190 -_GLOBAL(_restgpr_18_x)
191 -_GLOBAL(_rest32gpr_18_x)
193 -_GLOBAL(_restgpr_19_x)
194 -_GLOBAL(_rest32gpr_19_x)
196 -_GLOBAL(_restgpr_20_x)
197 -_GLOBAL(_rest32gpr_20_x)
199 -_GLOBAL(_restgpr_21_x)
200 -_GLOBAL(_rest32gpr_21_x)
202 -_GLOBAL(_restgpr_22_x)
203 -_GLOBAL(_rest32gpr_22_x)
205 -_GLOBAL(_restgpr_23_x)
206 -_GLOBAL(_rest32gpr_23_x)
208 -_GLOBAL(_restgpr_24_x)
209 -_GLOBAL(_rest32gpr_24_x)
211 -_GLOBAL(_restgpr_25_x)
212 -_GLOBAL(_rest32gpr_25_x)
214 -_GLOBAL(_restgpr_26_x)
215 -_GLOBAL(_rest32gpr_26_x)
217 -_GLOBAL(_restgpr_27_x)
218 -_GLOBAL(_rest32gpr_27_x)
220 -_GLOBAL(_restgpr_28_x)
221 -_GLOBAL(_rest32gpr_28_x)
223 -_GLOBAL(_restgpr_29_x)
224 -_GLOBAL(_rest32gpr_29_x)
226 -_GLOBAL(_restgpr_30_x)
227 -_GLOBAL(_rest32gpr_30_x)
229 -_GLOBAL(_restgpr_31_x)
230 -_GLOBAL(_rest32gpr_31_x)
237 --- a/arch/powerpc/boot/Makefile
238 +++ b/arch/powerpc/boot/Makefile
239 @@ -54,7 +54,7 @@ $(addprefix $(obj)/,$(zlib) cuboot-c2k.o
240 $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
242 src-libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
243 -src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \
244 +src-wlib := string.S crt0.S stdio.c main.c \
245 $(addprefix libfdt/,$(src-libfdt)) libfdt-wrapper.c \
246 ns16550.c serial.c simple_alloc.c div64.S util.S \
247 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
248 --- a/arch/powerpc/kernel/prom_init_check.sh
249 +++ b/arch/powerpc/kernel/prom_init_check.sh
250 @@ -48,20 +48,6 @@ do
254 - # ignore register save/restore funcitons
255 - if [ "${UNDEF:0:9}" = "_restgpr_" ]; then
258 - if [ "${UNDEF:0:11}" = "_rest32gpr_" ]; then
261 - if [ "${UNDEF:0:9}" = "_savegpr_" ]; then
264 - if [ "${UNDEF:0:11}" = "_save32gpr_" ]; then
268 if [ $OK -eq 0 ]; then
270 echo "Error: External symbol '$UNDEF' referenced" \
271 --- a/arch/powerpc/lib/crtsavres.S
275 - * Special support for eabi and SVR4
277 - * Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
278 - * Copyright 2008 Freescale Semiconductor, Inc.
279 - * Written By Michael Meissner
281 - * Based on gcc/config/rs6000/crtsavres.asm from gcc
283 - * This file is free software; you can redistribute it and/or modify it
284 - * under the terms of the GNU General Public License as published by the
285 - * Free Software Foundation; either version 2, or (at your option) any
288 - * In addition to the permissions in the GNU General Public License, the
289 - * Free Software Foundation gives you unlimited permission to link the
290 - * compiled version of this file with other programs, and to distribute
291 - * those programs without any restriction coming from the use of this
292 - * file. (The General Public License restrictions do apply in other
293 - * respects; for example, they cover modification of the file, and
294 - * distribution when not linked into another program.)
296 - * This file is distributed in the hope that it will be useful, but
297 - * WITHOUT ANY WARRANTY; without even the implied warranty of
298 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
299 - * General Public License for more details.
301 - * You should have received a copy of the GNU General Public License
302 - * along with this program; see the file COPYING. If not, write to
303 - * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
304 - * Boston, MA 02110-1301, USA.
306 - * As a special exception, if you link this library with files
307 - * compiled with GCC to produce an executable, this does not cause
308 - * the resulting executable to be covered by the GNU General Public License.
309 - * This exception does not however invalidate any other reasons why
310 - * the executable file might be covered by the GNU General Public License.
313 -#include <asm/ppc_asm.h>
315 - .file "crtsavres.S"
318 -#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
320 -/* Routines for saving integer registers, called by the compiler. */
321 -/* Called with r11 pointing to the stack header word of the caller of the */
322 -/* function, just beyond the end of the integer save area. */
324 -_GLOBAL(_savegpr_14)
325 -_GLOBAL(_save32gpr_14)
326 - stw 14,-72(11) /* save gp registers */
327 -_GLOBAL(_savegpr_15)
328 -_GLOBAL(_save32gpr_15)
330 -_GLOBAL(_savegpr_16)
331 -_GLOBAL(_save32gpr_16)
333 -_GLOBAL(_savegpr_17)
334 -_GLOBAL(_save32gpr_17)
336 -_GLOBAL(_savegpr_18)
337 -_GLOBAL(_save32gpr_18)
339 -_GLOBAL(_savegpr_19)
340 -_GLOBAL(_save32gpr_19)
342 -_GLOBAL(_savegpr_20)
343 -_GLOBAL(_save32gpr_20)
345 -_GLOBAL(_savegpr_21)
346 -_GLOBAL(_save32gpr_21)
348 -_GLOBAL(_savegpr_22)
349 -_GLOBAL(_save32gpr_22)
351 -_GLOBAL(_savegpr_23)
352 -_GLOBAL(_save32gpr_23)
354 -_GLOBAL(_savegpr_24)
355 -_GLOBAL(_save32gpr_24)
357 -_GLOBAL(_savegpr_25)
358 -_GLOBAL(_save32gpr_25)
360 -_GLOBAL(_savegpr_26)
361 -_GLOBAL(_save32gpr_26)
363 -_GLOBAL(_savegpr_27)
364 -_GLOBAL(_save32gpr_27)
366 -_GLOBAL(_savegpr_28)
367 -_GLOBAL(_save32gpr_28)
369 -_GLOBAL(_savegpr_29)
370 -_GLOBAL(_save32gpr_29)
372 -_GLOBAL(_savegpr_30)
373 -_GLOBAL(_save32gpr_30)
375 -_GLOBAL(_savegpr_31)
376 -_GLOBAL(_save32gpr_31)
380 -/* Routines for restoring integer registers, called by the compiler. */
381 -/* Called with r11 pointing to the stack header word of the caller of the */
382 -/* function, just beyond the end of the integer restore area. */
384 -_GLOBAL(_restgpr_14)
385 -_GLOBAL(_rest32gpr_14)
386 - lwz 14,-72(11) /* restore gp registers */
387 -_GLOBAL(_restgpr_15)
388 -_GLOBAL(_rest32gpr_15)
390 -_GLOBAL(_restgpr_16)
391 -_GLOBAL(_rest32gpr_16)
393 -_GLOBAL(_restgpr_17)
394 -_GLOBAL(_rest32gpr_17)
396 -_GLOBAL(_restgpr_18)
397 -_GLOBAL(_rest32gpr_18)
399 -_GLOBAL(_restgpr_19)
400 -_GLOBAL(_rest32gpr_19)
402 -_GLOBAL(_restgpr_20)
403 -_GLOBAL(_rest32gpr_20)
405 -_GLOBAL(_restgpr_21)
406 -_GLOBAL(_rest32gpr_21)
408 -_GLOBAL(_restgpr_22)
409 -_GLOBAL(_rest32gpr_22)
411 -_GLOBAL(_restgpr_23)
412 -_GLOBAL(_rest32gpr_23)
414 -_GLOBAL(_restgpr_24)
415 -_GLOBAL(_rest32gpr_24)
417 -_GLOBAL(_restgpr_25)
418 -_GLOBAL(_rest32gpr_25)
420 -_GLOBAL(_restgpr_26)
421 -_GLOBAL(_rest32gpr_26)
423 -_GLOBAL(_restgpr_27)
424 -_GLOBAL(_rest32gpr_27)
426 -_GLOBAL(_restgpr_28)
427 -_GLOBAL(_rest32gpr_28)
429 -_GLOBAL(_restgpr_29)
430 -_GLOBAL(_rest32gpr_29)
432 -_GLOBAL(_restgpr_30)
433 -_GLOBAL(_rest32gpr_30)
435 -_GLOBAL(_restgpr_31)
436 -_GLOBAL(_rest32gpr_31)
440 -/* Routines for restoring integer registers, called by the compiler. */
441 -/* Called with r11 pointing to the stack header word of the caller of the */
442 -/* function, just beyond the end of the integer restore area. */
444 -_GLOBAL(_restgpr_14_x)
445 -_GLOBAL(_rest32gpr_14_x)
446 - lwz 14,-72(11) /* restore gp registers */
447 -_GLOBAL(_restgpr_15_x)
448 -_GLOBAL(_rest32gpr_15_x)
450 -_GLOBAL(_restgpr_16_x)
451 -_GLOBAL(_rest32gpr_16_x)
453 -_GLOBAL(_restgpr_17_x)
454 -_GLOBAL(_rest32gpr_17_x)
456 -_GLOBAL(_restgpr_18_x)
457 -_GLOBAL(_rest32gpr_18_x)
459 -_GLOBAL(_restgpr_19_x)
460 -_GLOBAL(_rest32gpr_19_x)
462 -_GLOBAL(_restgpr_20_x)
463 -_GLOBAL(_rest32gpr_20_x)
465 -_GLOBAL(_restgpr_21_x)
466 -_GLOBAL(_rest32gpr_21_x)
468 -_GLOBAL(_restgpr_22_x)
469 -_GLOBAL(_rest32gpr_22_x)
471 -_GLOBAL(_restgpr_23_x)
472 -_GLOBAL(_rest32gpr_23_x)
474 -_GLOBAL(_restgpr_24_x)
475 -_GLOBAL(_rest32gpr_24_x)
477 -_GLOBAL(_restgpr_25_x)
478 -_GLOBAL(_rest32gpr_25_x)
480 -_GLOBAL(_restgpr_26_x)
481 -_GLOBAL(_rest32gpr_26_x)
483 -_GLOBAL(_restgpr_27_x)
484 -_GLOBAL(_rest32gpr_27_x)
486 -_GLOBAL(_restgpr_28_x)
487 -_GLOBAL(_rest32gpr_28_x)
489 -_GLOBAL(_restgpr_29_x)
490 -_GLOBAL(_rest32gpr_29_x)
492 -_GLOBAL(_restgpr_30_x)
493 -_GLOBAL(_rest32gpr_30_x)
495 -_GLOBAL(_restgpr_31_x)
496 -_GLOBAL(_rest32gpr_31_x)
503 --- a/arch/powerpc/lib/Makefile
504 +++ b/arch/powerpc/lib/Makefile
505 @@ -8,7 +8,7 @@ endif
507 obj-y := string.o alloc.o \
508 checksum_$(CONFIG_WORD_SIZE).o
509 -obj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o
510 +obj-$(CONFIG_PPC32) += div64.o copy_32.o
511 obj-$(CONFIG_HAS_IOMEM) += devres.o
513 obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \
514 --- a/arch/powerpc/Makefile
515 +++ b/arch/powerpc/Makefile
516 @@ -92,8 +92,6 @@ endif
518 KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
521 -LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
524 ifeq ($(CONFIG_TUNE_CELL),y)