Lines Matching defs:cmb

27 #include <asm/cmb.h>
218 if (!cdev->private->cmb)
286 cmb_data = cdev->private->cmb;
304 if (!cdev->private->cmb)
354 cmb_data = cdev->private->cmb;
369 * struct cmb_area - container for global cmb data
377 struct cmb *mem;
404 * struct cmb - basic channel measurement block
417 * The cmb area made up from these blocks must be a contiguous array and may
419 * Only one cmb area can be present in the system.
421 struct cmb {
439 struct cmb *cmb;
450 * Find first unused cmb in cmb_area.mem.
452 * remains sorted by ->cmb->hw_data pointers.
454 cmb = cmb_area.mem;
457 data = node->cmb;
458 if ((struct cmb*)data->hw_block > cmb)
460 cmb++;
462 if (cmb - cmb_area.mem >= cmb_area.num_channels) {
467 /* insert new cmb */
469 cmb_data->hw_block = cmb;
470 cdev->private->cmb = cmb_data;
480 struct cmb *mem;
489 cmb_data->last_block = kzalloc(sizeof(struct cmb), GFP_KERNEL);
494 cmb_data->size = sizeof(struct cmb);
499 size = sizeof(struct cmb) * cmb_area.num_channels;
542 cmb_data = priv->cmb;
543 priv->cmb = NULL;
551 size = sizeof(struct cmb) * cmb_area.num_channels;
567 if (!cdev->private->cmb) {
571 cmb_data = cdev->private->cmb;
572 offset = mme ? (struct cmb *)cmb_data->hw_block - cmb_area.mem : 0;
599 struct cmb *cmb;
604 cmb_data = cdev->private->cmb;
608 cmb = cmb_data->hw_block;
611 ret = __cmb_utilization(cmb->device_connect_time,
612 cmb->function_pending_time,
613 cmb->device_disconnect_time,
617 ret = cmb->ssch_rsch_count;
620 ret = cmb->sample_count;
623 val = cmb->device_connect_time;
626 val = cmb->function_pending_time;
629 val = cmb->device_disconnect_time;
632 val = cmb->control_unit_queuing_time;
635 val = cmb->device_active_only_time;
640 ret = time_to_avg_nsec(val, cmb->sample_count);
648 struct cmb *cmb;
658 cmb_data = cdev->private->cmb;
667 cmb = cmb_data->last_block;
678 data->ssch_rsch_count = cmb->ssch_rsch_count;
679 data->sample_count = cmb->sample_count;
682 data->device_connect_time = time_to_nsec(cmb->device_connect_time);
683 data->function_pending_time = time_to_nsec(cmb->function_pending_time);
685 time_to_nsec(cmb->device_disconnect_time);
687 = time_to_nsec(cmb->control_unit_queuing_time);
689 = time_to_nsec(cmb->device_active_only_time);
706 enabled = !!cdev->private->cmb;
724 /* ******** extended cmb handling ********/
782 if (cdev->private->cmb)
785 cdev->private->cmb = cmb_data;
815 cmb_data = cdev->private->cmb;
816 cdev->private->cmb = NULL;
838 if (!cdev->private->cmb) {
842 cmb_data = cdev->private->cmb;
853 struct cmbe *cmb;
858 cmb_data = cdev->private->cmb;
862 cmb = cmb_data->hw_block;
865 ret = __cmb_utilization(cmb->device_connect_time,
866 cmb->function_pending_time,
867 cmb->device_disconnect_time,
871 ret = cmb->ssch_rsch_count;
874 ret = cmb->sample_count;
877 val = cmb->device_connect_time;
880 val = cmb->function_pending_time;
883 val = cmb->device_disconnect_time;
886 val = cmb->control_unit_queuing_time;
889 val = cmb->device_active_only_time;
892 val = cmb->device_busy_time;
895 val = cmb->initial_command_response_time;
900 ret = time_to_avg_nsec(val, cmb->sample_count);
908 struct cmbe *cmb;
918 cmb_data = cdev->private->cmb;
936 cmb = cmb_data->last_block;
938 data->ssch_rsch_count = cmb->ssch_rsch_count;
939 data->sample_count = cmb->sample_count;
942 data->device_connect_time = time_to_nsec(cmb->device_connect_time);
943 data->function_pending_time = time_to_nsec(cmb->function_pending_time);
945 time_to_nsec(cmb->device_disconnect_time);
947 = time_to_nsec(cmb->control_unit_queuing_time);
949 = time_to_nsec(cmb->device_active_only_time);
950 data->device_busy_time = time_to_nsec(cmb->device_busy_time);
952 = time_to_nsec(cmb->initial_command_response_time);