Lines Matching refs:cmb
218 if (!cdev->private->cmb) in set_schib_wait()
286 cmb_data = cdev->private->cmb; in cmf_copy_block()
304 if (!cdev->private->cmb) in cmf_cmb_copy_wait()
354 cmb_data = cdev->private->cmb; in cmf_generic_reset()
377 struct cmb *mem;
421 struct cmb { struct
439 struct cmb *cmb; in alloc_cmb_single() argument
454 cmb = cmb_area.mem; in alloc_cmb_single()
457 data = node->cmb; in alloc_cmb_single()
458 if ((struct cmb*)data->hw_block > cmb) in alloc_cmb_single()
460 cmb++; in alloc_cmb_single()
462 if (cmb - cmb_area.mem >= cmb_area.num_channels) { in alloc_cmb_single()
469 cmb_data->hw_block = cmb; in alloc_cmb_single()
470 cdev->private->cmb = cmb_data; in alloc_cmb_single()
480 struct cmb *mem; in alloc_cmb()
489 cmb_data->last_block = kzalloc(sizeof(struct cmb), GFP_KERNEL); in alloc_cmb()
494 cmb_data->size = sizeof(struct cmb); in alloc_cmb()
499 size = sizeof(struct cmb) * cmb_area.num_channels; in alloc_cmb()
542 cmb_data = priv->cmb; in free_cmb()
543 priv->cmb = NULL; in free_cmb()
551 size = sizeof(struct cmb) * cmb_area.num_channels; in free_cmb()
567 if (!cdev->private->cmb) { in set_cmb()
571 cmb_data = cdev->private->cmb; in set_cmb()
572 offset = mme ? (struct cmb *)cmb_data->hw_block - cmb_area.mem : 0; in set_cmb()
599 struct cmb *cmb; in read_cmb() local
604 cmb_data = cdev->private->cmb; in read_cmb()
608 cmb = cmb_data->hw_block; in read_cmb()
611 ret = __cmb_utilization(cmb->device_connect_time, in read_cmb()
612 cmb->function_pending_time, in read_cmb()
613 cmb->device_disconnect_time, in read_cmb()
617 ret = cmb->ssch_rsch_count; in read_cmb()
620 ret = cmb->sample_count; in read_cmb()
623 val = cmb->device_connect_time; in read_cmb()
626 val = cmb->function_pending_time; in read_cmb()
629 val = cmb->device_disconnect_time; in read_cmb()
632 val = cmb->control_unit_queuing_time; in read_cmb()
635 val = cmb->device_active_only_time; in read_cmb()
640 ret = time_to_avg_nsec(val, cmb->sample_count); in read_cmb()
648 struct cmb *cmb; in readall_cmb() local
658 cmb_data = cdev->private->cmb; in readall_cmb()
667 cmb = cmb_data->last_block; in readall_cmb()
678 data->ssch_rsch_count = cmb->ssch_rsch_count; in readall_cmb()
679 data->sample_count = cmb->sample_count; in readall_cmb()
682 data->device_connect_time = time_to_nsec(cmb->device_connect_time); in readall_cmb()
683 data->function_pending_time = time_to_nsec(cmb->function_pending_time); in readall_cmb()
685 time_to_nsec(cmb->device_disconnect_time); in readall_cmb()
687 = time_to_nsec(cmb->control_unit_queuing_time); in readall_cmb()
689 = time_to_nsec(cmb->device_active_only_time); in readall_cmb()
706 enabled = !!cdev->private->cmb; in cmf_enabled()
782 if (cdev->private->cmb) in alloc_cmbe()
785 cdev->private->cmb = cmb_data; in alloc_cmbe()
815 cmb_data = cdev->private->cmb; in free_cmbe()
816 cdev->private->cmb = NULL; in free_cmbe()
838 if (!cdev->private->cmb) { in set_cmbe()
842 cmb_data = cdev->private->cmb; in set_cmbe()
853 struct cmbe *cmb; in read_cmbe() local
858 cmb_data = cdev->private->cmb; in read_cmbe()
862 cmb = cmb_data->hw_block; in read_cmbe()
865 ret = __cmb_utilization(cmb->device_connect_time, in read_cmbe()
866 cmb->function_pending_time, in read_cmbe()
867 cmb->device_disconnect_time, in read_cmbe()
871 ret = cmb->ssch_rsch_count; in read_cmbe()
874 ret = cmb->sample_count; in read_cmbe()
877 val = cmb->device_connect_time; in read_cmbe()
880 val = cmb->function_pending_time; in read_cmbe()
883 val = cmb->device_disconnect_time; in read_cmbe()
886 val = cmb->control_unit_queuing_time; in read_cmbe()
889 val = cmb->device_active_only_time; in read_cmbe()
892 val = cmb->device_busy_time; in read_cmbe()
895 val = cmb->initial_command_response_time; in read_cmbe()
900 ret = time_to_avg_nsec(val, cmb->sample_count); in read_cmbe()
908 struct cmbe *cmb; in readall_cmbe() local
918 cmb_data = cdev->private->cmb; in readall_cmbe()
936 cmb = cmb_data->last_block; in readall_cmbe()
938 data->ssch_rsch_count = cmb->ssch_rsch_count; in readall_cmbe()
939 data->sample_count = cmb->sample_count; in readall_cmbe()
942 data->device_connect_time = time_to_nsec(cmb->device_connect_time); in readall_cmbe()
943 data->function_pending_time = time_to_nsec(cmb->function_pending_time); in readall_cmbe()
945 time_to_nsec(cmb->device_disconnect_time); in readall_cmbe()
947 = time_to_nsec(cmb->control_unit_queuing_time); in readall_cmbe()
949 = time_to_nsec(cmb->device_active_only_time); in readall_cmbe()
950 data->device_busy_time = time_to_nsec(cmb->device_busy_time); in readall_cmbe()
952 = time_to_nsec(cmb->initial_command_response_time); in readall_cmbe()