8 #define KMSG_COMPONENT "sclp_ocf"
9 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
11 #include <linux/kernel.h>
13 #include <linux/stat.h>
14 #include <linux/device.h>
15 #include <linux/string.h>
16 #include <linux/ctype.h>
25 #define OCF_LENGTH_HMC_NETWORK 8UL
26 #define OCF_LENGTH_CPC_NAME 8UL
34 static struct kset *ocf_kset;
49 v = sclp_find_gds_vector(evbuf + 1, (
void *) evbuf + evbuf->
length,
54 v = sclp_find_gds_vector(v + 1, (
void *) v + v->
length, 0x9f22);
58 sv = sclp_find_gds_subvector(v + 1, (
void *) v + v->
length, 0x81);
62 netid = sclp_find_gds_subvector(sv + 1, (
void *) sv + sv->
length, 1);
64 cpc = sclp_find_gds_subvector(sv + 1, (
void *) sv + sv->
length, 2);
66 spin_lock(&sclp_ocf_lock);
69 memcpy(hmc_network, netid + 1, size);
71 hmc_network[
size] = 0;
75 memcpy(cpc_name, cpc + 1, size);
79 spin_unlock(&sclp_ocf_lock);
85 .receiver_fn = sclp_ocf_handler,
93 spin_lock_irq(&sclp_ocf_lock);
95 spin_unlock_irq(&sclp_ocf_lock);
107 spin_lock_irq(&sclp_ocf_lock);
109 spin_unlock_irq(&sclp_ocf_lock);
114 __ATTR(hmc_network, 0444, hmc_network_show,
NULL);
118 &hmc_network_attr.
attr,
126 static int __init ocf_init(
void)
130 INIT_WORK(&sclp_ocf_change_work, sclp_ocf_change_notify);