Lines Matching refs:css
851 css_generate_pgid(struct channel_subsystem *css, u32 tod_high) in css_generate_pgid() argument
856 css->global_pgid.pgid_high.ext_cssid.version = 0x80; in css_generate_pgid()
857 css->global_pgid.pgid_high.ext_cssid.cssid = in css_generate_pgid()
858 css->id_valid ? css->cssid : 0; in css_generate_pgid()
860 css->global_pgid.pgid_high.cpu_addr = stap(); in css_generate_pgid()
863 css->global_pgid.cpu_id = cpu_id.ident; in css_generate_pgid()
864 css->global_pgid.cpu_model = cpu_id.machine; in css_generate_pgid()
865 css->global_pgid.tod_high = tod_high; in css_generate_pgid()
870 struct channel_subsystem *css = to_css(dev); in channel_subsystem_release() local
872 mutex_destroy(&css->mutex); in channel_subsystem_release()
873 kfree(css); in channel_subsystem_release()
879 struct channel_subsystem *css = to_css(dev); in real_cssid_show() local
881 if (!css->id_valid) in real_cssid_show()
884 return sprintf(buf, "%x\n", css->cssid); in real_cssid_show()
903 struct channel_subsystem *css = to_css(dev); in cm_enable_show() local
906 mutex_lock(&css->mutex); in cm_enable_show()
907 ret = sprintf(buf, "%x\n", css->cm_enabled); in cm_enable_show()
908 mutex_unlock(&css->mutex); in cm_enable_show()
915 struct channel_subsystem *css = to_css(dev); in cm_enable_store() local
922 mutex_lock(&css->mutex); in cm_enable_store()
925 ret = css->cm_enabled ? chsc_secm(css, 0) : 0; in cm_enable_store()
928 ret = css->cm_enabled ? 0 : chsc_secm(css, 1); in cm_enable_store()
933 mutex_unlock(&css->mutex); in cm_enable_store()
972 struct channel_subsystem *css; in setup_css() local
975 css = kzalloc(sizeof(*css), GFP_KERNEL); in setup_css()
976 if (!css) in setup_css()
979 channel_subsystems[nr] = css; in setup_css()
980 dev_set_name(&css->device, "css%x", nr); in setup_css()
981 css->device.groups = cssdev_attr_groups; in setup_css()
982 css->device.release = channel_subsystem_release; in setup_css()
988 ret = dma_coerce_mask_and_coherent(&css->device, DMA_BIT_MASK(64)); in setup_css()
990 kfree(css); in setup_css()
994 mutex_init(&css->mutex); in setup_css()
995 ret = chsc_get_cssid_iid(nr, &css->cssid, &css->iid); in setup_css()
997 css->id_valid = true; in setup_css()
998 pr_info("Partition identifier %01x.%01x\n", css->cssid, in setup_css()
999 css->iid); in setup_css()
1001 css_generate_pgid(css, (u32) (get_tod_clock() >> 32)); in setup_css()
1003 ret = device_register(&css->device); in setup_css()
1005 put_device(&css->device); in setup_css()
1009 css->pseudo_subchannel = kzalloc(sizeof(*css->pseudo_subchannel), in setup_css()
1011 if (!css->pseudo_subchannel) { in setup_css()
1012 device_unregister(&css->device); in setup_css()
1017 css->pseudo_subchannel->dev.parent = &css->device; in setup_css()
1018 css->pseudo_subchannel->dev.release = css_subchannel_release; in setup_css()
1019 mutex_init(&css->pseudo_subchannel->reg_mutex); in setup_css()
1020 ret = css_sch_create_locks(css->pseudo_subchannel); in setup_css()
1022 kfree(css->pseudo_subchannel); in setup_css()
1023 device_unregister(&css->device); in setup_css()
1027 dev_set_name(&css->pseudo_subchannel->dev, "defunct"); in setup_css()
1028 ret = device_register(&css->pseudo_subchannel->dev); in setup_css()
1030 put_device(&css->pseudo_subchannel->dev); in setup_css()
1031 device_unregister(&css->device); in setup_css()
1045 struct channel_subsystem *css; in css_reboot_event() local
1049 for_each_css(css) { in css_reboot_event()
1050 mutex_lock(&css->mutex); in css_reboot_event()
1051 if (css->cm_enabled) in css_reboot_event()
1052 if (chsc_secm(css, 0)) in css_reboot_event()
1054 mutex_unlock(&css->mutex); in css_reboot_event()
1223 struct channel_subsystem *css = channel_subsystems[i]; in css_bus_init() local
1224 device_unregister(&css->pseudo_subchannel->dev); in css_bus_init()
1225 device_unregister(&css->device); in css_bus_init()
1239 struct channel_subsystem *css; in css_bus_cleanup() local
1241 for_each_css(css) { in css_bus_cleanup()
1242 device_unregister(&css->pseudo_subchannel->dev); in css_bus_cleanup()
1243 device_unregister(&css->device); in css_bus_cleanup()