From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Kiper Subject: [PATCH 09/11] x86/xen/enlighten: Add init and crash kexec/kdump hooks Date: Thu, 27 Sep 2012 20:06:36 +0200 Message-ID: <1348769198-29580-10-git-send-email-daniel.kiper@oracle.com> References: <1348769198-29580-1-git-send-email-daniel.kiper@oracle.com> <1348769198-29580-2-git-send-email-daniel.kiper@oracle.com> <1348769198-29580-3-git-send-email-daniel.kiper@oracle.com> <1348769198-29580-4-git-send-email-daniel.kiper@oracle.com> <1348769198-29580-5-git-send-email-daniel.kiper@oracle.com> <1348769198-29580-6-git-send-email-daniel.kiper@oracle.com> <1348769198-29580-7-git-send-email-daniel.kiper@oracle.com> <1348769198-29580-8-git-send-email-daniel.kiper@oracle.com> <1348769198-29580-9-git-send-email-daniel.kiper@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1348769198-29580-9-git-send-email-daniel.kiper@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: konrad.wilk@oracle.com, andrew.cooper3@citrix.com, jbeulich@suse.com, linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com Cc: Daniel Kiper List-Id: xen-devel@lists.xenproject.org Add init and crash kexec/kdump hooks. Signed-off-by: Daniel Kiper --- arch/x86/xen/enlighten.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 1fbe75a..5043d77 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -66,6 +67,7 @@ #include #include #include +#include #ifdef CONFIG_ACPI #include @@ -1237,6 +1239,12 @@ static void xen_machine_power_off(void) static void xen_crash_shutdown(struct pt_regs *regs) { +#ifdef CONFIG_KEXEC + if (kexec_crash_image) { + crash_save_cpu(regs, safe_smp_processor_id()); + return; + } +#endif xen_reboot(SHUTDOWN_crash); } @@ -1315,6 +1323,10 @@ asmlinkage void __init xen_start_kernel(void) xen_init_mmu_ops(); +#ifdef CONFIG_KEXEC + xen_init_kexec_ops(); +#endif + /* Prevent unwanted bits from being set in PTEs. */ __supported_pte_mask &= ~_PAGE_GLOBAL; #if 0 -- 1.5.6.5