]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fixup lwsync at runtime
authorKumar Gala <galak@kernel.crashing.org>
Tue, 1 Jul 2008 15:16:40 +0000 (01:16 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 3 Jul 2008 06:58:10 +0000 (16:58 +1000)
commitdc6133e235260bc0840c19f3176a3c81bd1cd78d
tree6ecc861f4f45a5d26309bf12683aa0372358ef7c
parenta28635135f21d1e9911499018cfc2a7fe886d565
powerpc: Fixup lwsync at runtime

To allow for a single kernel image on e500 v1/v2/mc we need to fixup lwsync
at runtime.  On e500v1/v2 lwsync causes an illop so we need to patch up
the code.  We default to 'sync' since that is always safe and if the cpu
is capable we will replace 'sync' with 'lwsync'.

We introduce CPU_FTR_LWSYNC as a way to determine at runtime if this is
needed.  This flag could be moved elsewhere since we dont really use it
for the normal CPU_FTR purpose.

Finally we only store the relative offset in the fixup section to keep it
as small as possible rather than using a full fixup_entry.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
13 files changed:
arch/powerpc/kernel/module.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/vdso.c
arch/powerpc/kernel/vdso32/vdso32.lds.S
arch/powerpc/kernel/vdso64/vdso64.lds.S
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/lib/feature-fixups-test.S
arch/powerpc/lib/feature-fixups.c
include/asm-powerpc/code-patching.h
include/asm-powerpc/cputable.h
include/asm-powerpc/feature-fixups.h
include/asm-powerpc/synch.h