public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Holzheu <holzheu@linux.vnet.ibm.com>
To: vgoyal@redhat.com
Cc: ebiederm@xmission.com, mahesh@linux.vnet.ibm.com,
	hbabu@us.ibm.com, oomichi@mxs.nes.nec.co.jp, horms@verge.net.au,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-s390@vger.kernel.org
Subject: [patch 1/3] kdump: Add new machine_kexec_finish() architecture callback
Date: Fri, 29 Jul 2011 14:39:45 +0200	[thread overview]
Message-ID: <20110729124000.481435260@linux.vnet.ibm.com> (raw)
In-Reply-To: 20110729123944.562622201@linux.vnet.ibm.com

[-- Attachment #1: s390-kdump-common-kexec_finish.patch --]
[-- Type: text/plain, Size: 1424 bytes --]

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,


  reply	other threads:[~2011-07-29 12:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29 12:39 [patch 0/3] kdump: Add external kdump entry point for s390 stand-alone dump tools Michael Holzheu
2011-07-29 12:39 ` Michael Holzheu [this message]
2011-07-29 12:39 ` [patch 2/3] s390: " Michael Holzheu
2011-07-29 12:39 ` [patch 3/3] kexec-tools: Emit program check on s390 for checksum failure Michael Holzheu
2011-08-19  1:14 ` [patch 0/3] kdump: Add external kdump entry point for s390 stand-alone dump tools Simon Horman
2011-08-19 12:53   ` Michael Holzheu
2011-08-19 13:20     ` Vivek Goyal
2011-08-19 13:36       ` Michael Holzheu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110729124000.481435260@linux.vnet.ibm.com \
    --to=holzheu@linux.vnet.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=hbabu@us.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=oomichi@mxs.nes.nec.co.jp \
    --cc=schwidefsky@de.ibm.com \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox