kernel-ark/arch/ppc
Paul Janzen aed9c6ccb8 [PATCH] ppc32: Put cache flush routines back into .relocate_code section
In 2.6.14, we had the following definition of _GLOBAL() in
include/asm-ppc/processor.h:

#define _GLOBAL(n)\
        .stabs __stringify(n:F-1),N_FUN,0,0,n;\
        .globl n;\
n:

In 2.6.15, as part of the great powerpc merge, we moved this definition to
include/asm-powerpc/ppc_asm.h, where it appears (to 32-bit code) as:

#define _GLOBAL(n)      \
        .text;          \
        .stabs __stringify(n:F-1),N_FUN,0,0,n;\
        .globl n;       \
n:

Mostly, this is fine.  However, we also have the following, in
arch/ppc/boot/common/util.S:

        .section ".relocate_code","xa"
[...]
_GLOBAL(flush_instruction_cache)
[...]
_GLOBAL(flush_data_cache)
[...]

The addition of the .text section definition in the definition of
_GLOBAL overrides the .relocate_code section definition.  As a result,
these two functions don't end up in .relocate_code, so they don't get
relocated correctly, and the boot fails.

There's another suspicious-looking usage at kernel/swsusp.S:37 that
someone should look into.  I did not exhaustively search the source
tree, though.

The following is the minimal patch that fixes the immediate problem.
I could easily be convinced that the _GLOBAL definition should be
modified to remove the ".text;" line either instead of, or in addition
to, this fix.

Signed-off-by: Paul Janzen <pcj@linux.sez.to>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09 15:47:08 +11:00
..
4xx_io [PATCH] ppc: fix-up schedule_timeout() usage 2005-11-07 07:53:56 -08:00
8xx_io [PATCH] kfree cleanup: arch 2005-11-07 07:54:06 -08:00
8260_io [PATCH] ppc: fix-up schedule_timeout() usage 2005-11-07 07:53:56 -08:00
amiga
boot [PATCH] ppc32: Put cache flush routines back into .relocate_code section 2006-01-09 15:47:08 +11:00
configs [PATCH] ppc32: Add TQM85xx (8540/8541/8555/8560) board support 2006-01-09 14:53:08 +11:00
kernel [PATCH] powerpc: Fix compile problem in pci.c for ppc32 2006-01-09 15:05:59 +11:00
lib ppc32: use L1_CACHE_SHIFT/L1_CACHE_BYTES 2005-10-17 11:50:32 +10:00
math-emu [PATCH] powerpc: Fix handling of fpscr on 64-bit 2005-10-27 20:48:50 +10:00
mm [PATCH] ppc32 8xx: update_mmu_cache() needs unconditional tlbie 2005-11-16 13:28:22 +11:00
platforms [PATCH] ppc32: Add TQM85xx (8540/8541/8555/8560) board support 2006-01-09 14:53:08 +11:00
syslib [PATCH] ppc32: m8xx watchdog update 2006-01-09 14:50:51 +11:00
xmon [PATCH] ppc: Fix build with CONFIG_CHRP not set 2005-11-16 14:05:07 +11:00
Kconfig ppc: Build in all three of powermac, PREP and CHRP support 2005-12-05 14:39:53 +11:00
Kconfig.debug [PATCH] ppc32: mv64x60 updates & enhancements 2005-09-05 00:06:00 -07:00
Makefile [PATCH] powerpc: Merge bitops.h 2005-11-01 21:49:02 +11:00