10 #include <linux/module.h>
11 #include <linux/device.h>
12 #include <linux/stat.h>
13 #include <linux/string.h>
14 #include <linux/slab.h>
15 #include <linux/ctype.h>
18 #include <linux/errno.h>
20 #include <linux/sysctl.h>
21 #include <linux/utsname.h>
24 static int callhome_enabled;
27 static int sclp_async_send_wait(
char *
message);
30 #define SCLP_NORMAL_WRITE 0x00
55 strncat(data, init_utsname()->nodename,
56 sizeof(init_utsname()->nodename));
57 sclp_async_send_wait(data);
62 .notifier_call = call_home_on_panic,
74 if (!*count || (*ppos && !write)) {
79 len =
snprintf(buf,
sizeof(buf),
"%d\n", callhome_enabled);
88 if (val != 0 && val != 1)
90 callhome_enabled =
val;
97 static struct ctl_table callhome_table[] = {
99 .procname =
"callhome",
101 .proc_handler = proc_handler_callhome,
106 static struct ctl_table kern_dir_table[] = {
108 .procname =
"kernel",
111 .child = callhome_table,
120 static int sclp_async_send_wait(
char *
message)
126 if (!callhome_enabled)
129 sccb->
evbuf.rtype = 0xA5;
130 sccb->
evbuf.otype = 0x00;
133 request->
sccb = sccb;
141 sccb->
evbuf.header.length =
sizeof(sccb->
evbuf);
152 spin_unlock_irqrestore(&sclp_async_lock, flags);
156 request->
sccb)->header.response_code;
159 if (evb->
header.flags != 0x80)
164 static int __init sclp_async_init(
void)
176 if (!callhome_sysctl_header)
180 if (!request || !sccb)
183 &call_home_panic_nb);
197 static void __exit sclp_async_exit(
void)
200 &call_home_panic_nb);