Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31129
b: refs/heads/master
c: 585c304
h: refs/heads/master
i:
  31127: 0ba6814
v: v3
  • Loading branch information
Peter Oberparleiter authored and Martin Schwidefsky committed Jun 29, 2006
1 parent 6d516b0 commit 45f2c47
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 405455734e1cdec09c37233216f9240cb1a058e5
refs/heads/master: 585c3047a881d0f54b93a0dd8ab499b07ed25d09
9 changes: 7 additions & 2 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1689,9 +1689,14 @@ running once the system is up.
decrease the size and leave more room for directly
mapped kernel RAM.

vmhalt= [KNL,S390]
vmhalt= [KNL,S390] Perform z/VM CP command after system halt.
Format: <command>

vmpoff= [KNL,S390]
vmpanic= [KNL,S390] Perform z/VM CP command after kernel panic.
Format: <command>

vmpoff= [KNL,S390] Perform z/VM CP command after power off.
Format: <command>

waveartist= [HW,OSS]
Format: <io>,<irq>,<dma>,<dma2>
Expand Down
34 changes: 34 additions & 0 deletions trunk/arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <linux/seq_file.h>
#include <linux/kernel_stat.h>
#include <linux/device.h>
#include <linux/notifier.h>

#include <asm/uaccess.h>
#include <asm/system.h>
Expand Down Expand Up @@ -115,6 +116,7 @@ void __devinit cpu_init (void)
*/
char vmhalt_cmd[128] = "";
char vmpoff_cmd[128] = "";
char vmpanic_cmd[128] = "";

static inline void strncpy_skip_quote(char *dst, char *src, int n)
{
Expand Down Expand Up @@ -146,6 +148,38 @@ static int __init vmpoff_setup(char *str)

__setup("vmpoff=", vmpoff_setup);

static int vmpanic_notify(struct notifier_block *self, unsigned long event,
void *data)
{
if (MACHINE_IS_VM && strlen(vmpanic_cmd) > 0)
cpcmd(vmpanic_cmd, NULL, 0, NULL);

return NOTIFY_OK;
}

#define PANIC_PRI_VMPANIC 0

static struct notifier_block vmpanic_nb = {
.notifier_call = vmpanic_notify,
.priority = PANIC_PRI_VMPANIC
};

static int __init vmpanic_setup(char *str)
{
static int register_done __initdata = 0;

strncpy_skip_quote(vmpanic_cmd, str, 127);
vmpanic_cmd[127] = 0;
if (!register_done) {
register_done = 1;
atomic_notifier_chain_register(&panic_notifier_list,
&vmpanic_nb);
}
return 1;
}

__setup("vmpanic=", vmpanic_setup);

/*
* condev= and conmode= setup parameter.
*/
Expand Down

0 comments on commit 45f2c47

Please sign in to comment.