Lines Matching refs:css
894 css_generate_pgid(struct channel_subsystem *css, u32 tod_high) in css_generate_pgid() argument
899 css->global_pgid.pgid_high.ext_cssid.version = 0x80; in css_generate_pgid()
900 css->global_pgid.pgid_high.ext_cssid.cssid = in css_generate_pgid()
901 css->id_valid ? css->cssid : 0; in css_generate_pgid()
903 css->global_pgid.pgid_high.cpu_addr = stap(); in css_generate_pgid()
906 css->global_pgid.cpu_id = cpu_id.ident; in css_generate_pgid()
907 css->global_pgid.cpu_model = cpu_id.machine; in css_generate_pgid()
908 css->global_pgid.tod_high = tod_high; in css_generate_pgid()
913 struct channel_subsystem *css = to_css(dev); in channel_subsystem_release() local
915 mutex_destroy(&css->mutex); in channel_subsystem_release()
916 kfree(css); in channel_subsystem_release()
922 struct channel_subsystem *css = to_css(dev); in real_cssid_show() local
924 if (!css->id_valid) in real_cssid_show()
927 return sprintf(buf, "%x\n", css->cssid); in real_cssid_show()
946 struct channel_subsystem *css = to_css(dev); in cm_enable_show() local
949 mutex_lock(&css->mutex); in cm_enable_show()
950 ret = sprintf(buf, "%x\n", css->cm_enabled); in cm_enable_show()
951 mutex_unlock(&css->mutex); in cm_enable_show()
958 struct channel_subsystem *css = to_css(dev); in cm_enable_store() local
965 mutex_lock(&css->mutex); in cm_enable_store()
968 ret = css->cm_enabled ? chsc_secm(css, 0) : 0; in cm_enable_store()
971 ret = css->cm_enabled ? 0 : chsc_secm(css, 1); in cm_enable_store()
976 mutex_unlock(&css->mutex); in cm_enable_store()
1015 struct channel_subsystem *css; in setup_css() local
1018 css = kzalloc(sizeof(*css), GFP_KERNEL); in setup_css()
1019 if (!css) in setup_css()
1022 channel_subsystems[nr] = css; in setup_css()
1023 dev_set_name(&css->device, "css%x", nr); in setup_css()
1024 css->device.groups = cssdev_attr_groups; in setup_css()
1025 css->device.release = channel_subsystem_release; in setup_css()
1031 ret = dma_coerce_mask_and_coherent(&css->device, DMA_BIT_MASK(64)); in setup_css()
1033 kfree(css); in setup_css()
1037 mutex_init(&css->mutex); in setup_css()
1038 ret = chsc_get_cssid_iid(nr, &css->cssid, &css->iid); in setup_css()
1040 css->id_valid = true; in setup_css()
1041 pr_info("Partition identifier %01x.%01x\n", css->cssid, in setup_css()
1042 css->iid); in setup_css()
1044 css_generate_pgid(css, (u32) (get_tod_clock() >> 32)); in setup_css()
1046 ret = device_register(&css->device); in setup_css()
1048 put_device(&css->device); in setup_css()
1052 css->pseudo_subchannel = kzalloc(sizeof(*css->pseudo_subchannel), in setup_css()
1054 if (!css->pseudo_subchannel) { in setup_css()
1055 device_unregister(&css->device); in setup_css()
1060 css->pseudo_subchannel->dev.parent = &css->device; in setup_css()
1061 css->pseudo_subchannel->dev.release = css_subchannel_release; in setup_css()
1062 mutex_init(&css->pseudo_subchannel->reg_mutex); in setup_css()
1063 ret = css_sch_create_locks(css->pseudo_subchannel); in setup_css()
1065 kfree(css->pseudo_subchannel); in setup_css()
1066 device_unregister(&css->device); in setup_css()
1070 dev_set_name(&css->pseudo_subchannel->dev, "defunct"); in setup_css()
1071 ret = device_register(&css->pseudo_subchannel->dev); in setup_css()
1073 put_device(&css->pseudo_subchannel->dev); in setup_css()
1074 device_unregister(&css->device); in setup_css()
1088 struct channel_subsystem *css; in css_reboot_event() local
1092 for_each_css(css) { in css_reboot_event()
1093 mutex_lock(&css->mutex); in css_reboot_event()
1094 if (css->cm_enabled) in css_reboot_event()
1095 if (chsc_secm(css, 0)) in css_reboot_event()
1097 mutex_unlock(&css->mutex); in css_reboot_event()
1266 struct channel_subsystem *css = channel_subsystems[i]; in css_bus_init() local
1267 device_unregister(&css->pseudo_subchannel->dev); in css_bus_init()
1268 device_unregister(&css->device); in css_bus_init()
1282 struct channel_subsystem *css; in css_bus_cleanup() local
1284 for_each_css(css) { in css_bus_cleanup()
1285 device_unregister(&css->pseudo_subchannel->dev); in css_bus_cleanup()
1286 device_unregister(&css->device); in css_bus_cleanup()