Lines Matching full:cmb

27 #include <asm/cmb.h>
220 if (!cdev->private->cmb) in set_schib_wait()
288 cmb_data = cdev->private->cmb; in cmf_copy_block()
306 if (!cdev->private->cmb) in cmf_cmb_copy_wait()
356 cmb_data = cdev->private->cmb; in cmf_generic_reset()
371 * struct cmb_area - container for global cmb data
379 struct cmb *mem;
391 /* ****** old style CMB handling ********/
406 * struct cmb - basic channel measurement block
419 * The cmb area made up from these blocks must be a contiguous array and may
421 * Only one cmb area can be present in the system.
423 struct cmb { struct
441 struct cmb *cmb; in alloc_cmb_single() argument
452 * Find first unused cmb in cmb_area.mem. in alloc_cmb_single()
454 * remains sorted by ->cmb->hw_data pointers. in alloc_cmb_single()
456 cmb = cmb_area.mem; in alloc_cmb_single()
459 data = node->cmb; in alloc_cmb_single()
460 if ((struct cmb*)data->hw_block > cmb) in alloc_cmb_single()
462 cmb++; in alloc_cmb_single()
464 if (cmb - cmb_area.mem >= cmb_area.num_channels) { in alloc_cmb_single()
469 /* insert new cmb */ in alloc_cmb_single()
471 cmb_data->hw_block = cmb; in alloc_cmb_single()
472 cdev->private->cmb = cmb_data; in alloc_cmb_single()
482 struct cmb *mem; in alloc_cmb()
491 cmb_data->last_block = kzalloc(sizeof(struct cmb), GFP_KERNEL); in alloc_cmb()
496 cmb_data->size = sizeof(struct cmb); in alloc_cmb()
501 size = sizeof(struct cmb) * cmb_area.num_channels; in alloc_cmb()
543 cmb_data = priv->cmb; in free_cmb()
544 priv->cmb = NULL; in free_cmb()
552 size = sizeof(struct cmb) * cmb_area.num_channels; in free_cmb()
568 if (!cdev->private->cmb) { in set_cmb()
572 cmb_data = cdev->private->cmb; in set_cmb()
573 offset = mme ? (struct cmb *)cmb_data->hw_block - cmb_area.mem : 0; in set_cmb()
600 struct cmb *cmb; in read_cmb() local
605 cmb_data = cdev->private->cmb; in read_cmb()
609 cmb = cmb_data->hw_block; in read_cmb()
612 ret = __cmb_utilization(cmb->device_connect_time, in read_cmb()
613 cmb->function_pending_time, in read_cmb()
614 cmb->device_disconnect_time, in read_cmb()
618 ret = cmb->ssch_rsch_count; in read_cmb()
621 ret = cmb->sample_count; in read_cmb()
624 val = cmb->device_connect_time; in read_cmb()
627 val = cmb->function_pending_time; in read_cmb()
630 val = cmb->device_disconnect_time; in read_cmb()
633 val = cmb->control_unit_queuing_time; in read_cmb()
636 val = cmb->device_active_only_time; in read_cmb()
641 ret = time_to_avg_nsec(val, cmb->sample_count); in read_cmb()
649 struct cmb *cmb; in readall_cmb() local
659 cmb_data = cdev->private->cmb; in readall_cmb()
668 cmb = cmb_data->last_block; in readall_cmb()
679 data->ssch_rsch_count = cmb->ssch_rsch_count; in readall_cmb()
680 data->sample_count = cmb->sample_count; in readall_cmb()
683 data->device_connect_time = time_to_nsec(cmb->device_connect_time); in readall_cmb()
684 data->function_pending_time = time_to_nsec(cmb->function_pending_time); in readall_cmb()
686 time_to_nsec(cmb->device_disconnect_time); in readall_cmb()
688 = time_to_nsec(cmb->control_unit_queuing_time); in readall_cmb()
690 = time_to_nsec(cmb->device_active_only_time); in readall_cmb()
707 enabled = !!cdev->private->cmb; in cmf_enabled()
725 /* ******** extended cmb handling ********/
783 if (cdev->private->cmb) in alloc_cmbe()
786 cdev->private->cmb = cmb_data; in alloc_cmbe()
816 cmb_data = cdev->private->cmb; in free_cmbe()
817 cdev->private->cmb = NULL; in free_cmbe()
839 if (!cdev->private->cmb) { in set_cmbe()
843 cmb_data = cdev->private->cmb; in set_cmbe()
854 struct cmbe *cmb; in read_cmbe() local
859 cmb_data = cdev->private->cmb; in read_cmbe()
863 cmb = cmb_data->hw_block; in read_cmbe()
866 ret = __cmb_utilization(cmb->device_connect_time, in read_cmbe()
867 cmb->function_pending_time, in read_cmbe()
868 cmb->device_disconnect_time, in read_cmbe()
872 ret = cmb->ssch_rsch_count; in read_cmbe()
875 ret = cmb->sample_count; in read_cmbe()
878 val = cmb->device_connect_time; in read_cmbe()
881 val = cmb->function_pending_time; in read_cmbe()
884 val = cmb->device_disconnect_time; in read_cmbe()
887 val = cmb->control_unit_queuing_time; in read_cmbe()
890 val = cmb->device_active_only_time; in read_cmbe()
893 val = cmb->device_busy_time; in read_cmbe()
896 val = cmb->initial_command_response_time; in read_cmbe()
901 ret = time_to_avg_nsec(val, cmb->sample_count); in read_cmbe()
909 struct cmbe *cmb; in readall_cmbe() local
919 cmb_data = cdev->private->cmb; in readall_cmbe()
937 cmb = cmb_data->last_block; in readall_cmbe()
939 data->ssch_rsch_count = cmb->ssch_rsch_count; in readall_cmbe()
940 data->sample_count = cmb->sample_count; in readall_cmbe()
943 data->device_connect_time = time_to_nsec(cmb->device_connect_time); in readall_cmbe()
944 data->function_pending_time = time_to_nsec(cmb->function_pending_time); in readall_cmbe()
946 time_to_nsec(cmb->device_disconnect_time); in readall_cmbe()
948 = time_to_nsec(cmb->control_unit_queuing_time); in readall_cmbe()
950 = time_to_nsec(cmb->device_active_only_time); in readall_cmbe()
951 data->device_busy_time = time_to_nsec(cmb->device_busy_time); in readall_cmbe()
953 = time_to_nsec(cmb->initial_command_response_time); in readall_cmbe()