/* * kexec.c - kexec system call * Copyright (C) 2002-2004 Eric Biederman <ebiederm@xmission.com> * * This source code is licensed under the GNU General Public License, * Version 2. See the file COPYING for more details. */#include<linux/capability.h>#include<linux/mm.h>#include<linux/file.h>#include<linux/slab.h>#include<linux/fs.h>#include<linux/kexec.h>#include<linux/mutex.h>#include<linux/list.h>#include<linux/highmem.h>#include<linux/syscalls.h>#include<linux/reboot.h>#include<linux/ioport.h>#include<linux/hardirq.h>#include<linux/elf.h>#include<linux/elfcore.h>#include<linux/utsrelease.h>#include<linux/utsname.h>#include<linux/numa.h>#include<linux/suspend.h>#include<linux/device.h>#include<linux/freezer.h>#include<linux/pm.h>#include<linux/cpu.h>#include<linux/console.h>#include<asm/page.h>#include<asm/uaccess.h>#include<asm/io.h>#include<asm/system.h>#include<asm/sections.h>/* Per cpu memory for storing cpu states in case of system crash. */note_buf_t*crash_notes;/* vmcoreinfo stuff */unsignedcharvmcoreinfo_data[VMCOREINFO_BYTES];u32vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4];size_tvmcoreinfo_size;size_tvmcoreinfo_max_size=sizeof(vmcoreinfo_data);/* Location of the reserved area for the crash kernel */structresourcecrashk_res={