Return-Path: Received: from buildserver.ru.mvista.com (unknown [85.21.88.6]) by ozlabs.org (Postfix) with ESMTP id EBC52DE3E2 for ; Sat, 2 Aug 2008 00:14:36 +1000 (EST) Date: Fri, 1 Aug 2008 18:14:35 +0400 From: Anton Vorontsov To: linuxppc-dev@ozlabs.org Subject: [PATCH 8/8] powerpc: last bits to support kdump on ppc32 Message-ID: <20080801141435.GH1161@polina.dev.rtsoft.ru> References: <20080801141306.GA29127@polina.dev.rtsoft.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 In-Reply-To: <20080801141306.GA29127@polina.dev.rtsoft.ru> Cc: Paul Mackerras List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Dale Farnsworth Wire up the trampoline code for ppc32 to relay exceptions from the vectors at address 0 to vectors at address 32MB, and modify Kconfig to enable Kdump support for all powerpcs (except BookE, for now). Signed-off-by: Dale Farnsworth Signed-off-by: Anton Vorontsov --- arch/powerpc/Kconfig | 2 +- arch/powerpc/kernel/crash_dump.c | 6 +++++- arch/powerpc/kernel/setup_32.c | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 587da5e..006a475 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -321,7 +321,7 @@ config KEXEC config CRASH_DUMP bool "Build a kdump crash kernel" - depends on PPC_MULTIPLATFORM && PPC64 + depends on PPC_MULTIPLATFORM && !BOOKE help Build a kernel suitable for use as a kdump capture kernel. The kernel will be linked at a different address than normal, and diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index e0debcc..96cd521 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c @@ -34,7 +34,11 @@ void __init reserve_kdump_trampoline(void) static void __init create_trampoline(unsigned long addr) { - unsigned int *p = (unsigned int *)addr; + unsigned int *p; + + /* XXX: why this code is working without += PAGE_OFFSET on PPC64? */ + addr += PAGE_OFFSET; + p = (unsigned int *)addr; /* The maximum range of a single instruction branch, is the current * instruction's address + (32 MB - 4) bytes. For the trampoline we diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 066e65c..1d76afc 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -121,6 +121,8 @@ notrace void __init machine_init(unsigned long dt_ptr, unsigned long phys) probe_machine(); + setup_kdump_trampoline(); + #ifdef CONFIG_6xx if (cpu_has_feature(CPU_FTR_CAN_DOZE) || cpu_has_feature(CPU_FTR_CAN_NAP)) -- 1.5.5.4