Lines Matching refs:sd_dp
288 struct sdebug_defer *sd_dp; member
3708 static void sdebug_q_cmd_complete(struct sdebug_defer *sd_dp) in sdebug_q_cmd_complete() argument
3710 bool aborted = sd_dp->aborted; in sdebug_q_cmd_complete()
3719 sd_dp->defer_t = SDEB_DEFER_NONE; in sdebug_q_cmd_complete()
3721 sd_dp->aborted = false; in sdebug_q_cmd_complete()
3722 qc_idx = sd_dp->qc_idx; in sdebug_q_cmd_complete()
3723 sqp = sdebug_q_arr + sd_dp->sqa_idx; in sdebug_q_cmd_complete()
3726 if (raw_smp_processor_id() != sd_dp->issuing_cpu) in sdebug_q_cmd_complete()
3739 sd_dp->sqa_idx, qc_idx); in sdebug_q_cmd_complete()
3784 struct sdebug_defer *sd_dp = container_of(timer, struct sdebug_defer, in sdebug_q_cmd_hrt_complete() local
3786 sdebug_q_cmd_complete(sd_dp); in sdebug_q_cmd_hrt_complete()
3793 struct sdebug_defer *sd_dp = container_of(work, struct sdebug_defer, in sdebug_q_cmd_wq_complete() local
3795 sdebug_q_cmd_complete(sd_dp); in sdebug_q_cmd_wq_complete()
3909 static void stop_qc_helper(struct sdebug_defer *sd_dp, in stop_qc_helper() argument
3912 if (!sd_dp) in stop_qc_helper()
3915 hrtimer_cancel(&sd_dp->hrt); in stop_qc_helper()
3917 cancel_work_sync(&sd_dp->ew.work); in stop_qc_helper()
3930 struct sdebug_defer *sd_dp; in stop_queued_cmnd() local
3949 sd_dp = sqcp->sd_dp; in stop_queued_cmnd()
3950 if (sd_dp) { in stop_queued_cmnd()
3951 l_defer_t = sd_dp->defer_t; in stop_queued_cmnd()
3952 sd_dp->defer_t = SDEB_DEFER_NONE; in stop_queued_cmnd()
3956 stop_qc_helper(sd_dp, l_defer_t); in stop_queued_cmnd()
3975 struct sdebug_defer *sd_dp; in stop_all_queued() local
3989 sd_dp = sqcp->sd_dp; in stop_all_queued()
3990 if (sd_dp) { in stop_all_queued()
3991 l_defer_t = sd_dp->defer_t; in stop_all_queued()
3992 sd_dp->defer_t = SDEB_DEFER_NONE; in stop_all_queued()
3996 stop_qc_helper(sd_dp, l_defer_t); in stop_all_queued()
4015 kfree(sqcp->sd_dp); in free_all_queued()
4016 sqcp->sd_dp = NULL; in free_all_queued()
4265 struct sdebug_defer *sd_dp; in schedule_resp() local
4328 sd_dp = sqcp->sd_dp; in schedule_resp()
4332 if (sd_dp == NULL) { in schedule_resp()
4333 sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC); in schedule_resp()
4334 if (sd_dp == NULL) in schedule_resp()
4360 if (!sd_dp->init_hrt) { in schedule_resp()
4361 sd_dp->init_hrt = true; in schedule_resp()
4362 sqcp->sd_dp = sd_dp; in schedule_resp()
4363 hrtimer_init(&sd_dp->hrt, CLOCK_MONOTONIC, in schedule_resp()
4365 sd_dp->hrt.function = sdebug_q_cmd_hrt_complete; in schedule_resp()
4366 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
4367 sd_dp->qc_idx = k; in schedule_resp()
4370 sd_dp->issuing_cpu = raw_smp_processor_id(); in schedule_resp()
4371 sd_dp->defer_t = SDEB_DEFER_HRT; in schedule_resp()
4372 hrtimer_start(&sd_dp->hrt, kt, HRTIMER_MODE_REL_PINNED); in schedule_resp()
4374 if (!sd_dp->init_wq) { in schedule_resp()
4375 sd_dp->init_wq = true; in schedule_resp()
4376 sqcp->sd_dp = sd_dp; in schedule_resp()
4377 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
4378 sd_dp->qc_idx = k; in schedule_resp()
4379 INIT_WORK(&sd_dp->ew.work, sdebug_q_cmd_wq_complete); in schedule_resp()
4382 sd_dp->issuing_cpu = raw_smp_processor_id(); in schedule_resp()
4383 sd_dp->defer_t = SDEB_DEFER_WQ; in schedule_resp()
4385 sd_dp->aborted = true; in schedule_resp()
4386 schedule_work(&sd_dp->ew.work); in schedule_resp()