lkml.org 
[lkml]   [2012]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 09/11] x86/xen/enlighten: Add init and crash kexec/kdump hooks
Date
Add init and crash kexec/kdump hooks.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
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 586d838..e5b4d0d 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -31,6 +31,7 @@
#include <linux/pci.h>
#include <linux/gfp.h>
#include <linux/memblock.h>
+#include <linux/kexec.h>

#include <xen/xen.h>
#include <xen/events.h>
@@ -67,6 +68,7 @@
#include <asm/hypervisor.h>
#include <asm/mwait.h>
#include <asm/pci_x86.h>
+#include <asm/xen/kexec.h>

#ifdef CONFIG_ACPI
#include <linux/acpi.h>
@@ -1254,6 +1256,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);
}

@@ -1331,6 +1339,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


\
 
 \ /
  Last update: 2012-11-20 17:21    [W:0.079 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site