lkml.org 
[lkml]   [2011]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 1/3] kdump: Add new machine_kexec_finish() architecture callback
    From: Michael Holzheu <holzheu@linux.vnet.ibm.com>

    In order to be able to set the "kdump active" flag on s390, this patch adds
    the new kexec architecture callback "machine_kexec_finish()".

    Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
    ---
    include/linux/kexec.h | 1 +
    kernel/kexec.c | 8 ++++++++
    2 files changed, 9 insertions(+)

    --- a/include/linux/kexec.h
    +++ b/include/linux/kexec.h
    @@ -115,6 +115,7 @@ struct kimage {
    /* kexec interface functions */
    extern void machine_kexec(struct kimage *image);
    extern int machine_kexec_prepare(struct kimage *image);
    +extern void machine_kexec_finish(struct kimage *image, int flags);
    extern void machine_kexec_cleanup(struct kimage *image);
    extern asmlinkage long sys_kexec_load(unsigned long entry,
    unsigned long nr_segments,
    --- a/kernel/kexec.c
    +++ b/kernel/kexec.c
    @@ -1017,6 +1017,7 @@ SYSCALL_DEFINE4(kexec_load, unsigned lon
    kimage_terminate(image);
    }
    /* Install the new kernel, and Uninstall the old */
    + machine_kexec_finish(image, flags);
    image = xchg(dest_image, image);

    out:
    @@ -1026,6 +1027,13 @@ out:
    return result;
    }

    +/*
    + * provide an empty default implementation here -- architecture
    + * code may override this
    + */
    +void __weak machine_kexec_finish(struct kimage *image, int flags)
    +{}
    +
    #ifdef CONFIG_COMPAT
    asmlinkage long compat_sys_kexec_load(unsigned long entry,
    unsigned long nr_segments,


    \
     
     \ /
      Last update: 2011-07-29 14:43    [W:0.035 / U:0.972 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site