Lines Matching refs:sd_dp
344 struct sdebug_defer *sd_dp;
4760 static void sdebug_q_cmd_complete(struct sdebug_defer *sd_dp)
4762 bool aborted = sd_dp->aborted;
4771 sd_dp->defer_t = SDEB_DEFER_NONE;
4773 sd_dp->aborted = false;
4774 qc_idx = sd_dp->qc_idx;
4775 sqp = sdebug_q_arr + sd_dp->sqa_idx;
4778 if (raw_smp_processor_id() != sd_dp->issuing_cpu)
4791 sd_dp->sqa_idx, qc_idx, sd_dp->hc_idx);
4836 struct sdebug_defer *sd_dp = container_of(timer, struct sdebug_defer,
4838 sdebug_q_cmd_complete(sd_dp);
4845 struct sdebug_defer *sd_dp = container_of(work, struct sdebug_defer,
4847 sdebug_q_cmd_complete(sd_dp);
5060 static void stop_qc_helper(struct sdebug_defer *sd_dp,
5063 if (!sd_dp)
5066 hrtimer_cancel(&sd_dp->hrt);
5068 cancel_work_sync(&sd_dp->ew.work);
5081 struct sdebug_defer *sd_dp;
5100 sd_dp = sqcp->sd_dp;
5101 if (sd_dp) {
5102 l_defer_t = sd_dp->defer_t;
5103 sd_dp->defer_t = SDEB_DEFER_NONE;
5107 stop_qc_helper(sd_dp, l_defer_t);
5126 struct sdebug_defer *sd_dp;
5140 sd_dp = sqcp->sd_dp;
5141 if (sd_dp) {
5142 l_defer_t = sd_dp->defer_t;
5143 sd_dp->defer_t = SDEB_DEFER_NONE;
5147 stop_qc_helper(sd_dp, l_defer_t);
5166 kfree(sqcp->sd_dp);
5167 sqcp->sd_dp = NULL;
5411 struct sdebug_defer *sd_dp;
5472 sd_dp = sqcp->sd_dp;
5474 if (!sd_dp) {
5475 sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC);
5476 if (!sd_dp) {
5488 sd_dp->hc_idx = get_tag(cmnd);
5541 kfree(sd_dp);
5550 if (!sd_dp->init_hrt) {
5551 sd_dp->init_hrt = true;
5552 sqcp->sd_dp = sd_dp;
5553 hrtimer_init(&sd_dp->hrt, CLOCK_MONOTONIC,
5555 sd_dp->hrt.function = sdebug_q_cmd_hrt_complete;
5556 sd_dp->sqa_idx = sqp - sdebug_q_arr;
5557 sd_dp->qc_idx = k;
5560 sd_dp->issuing_cpu = raw_smp_processor_id();
5561 sd_dp->defer_t = SDEB_DEFER_HRT;
5563 hrtimer_start(&sd_dp->hrt, kt, HRTIMER_MODE_REL_PINNED);
5565 if (!sd_dp->init_wq) {
5566 sd_dp->init_wq = true;
5567 sqcp->sd_dp = sd_dp;
5568 sd_dp->sqa_idx = sqp - sdebug_q_arr;
5569 sd_dp->qc_idx = k;
5570 INIT_WORK(&sd_dp->ew.work, sdebug_q_cmd_wq_complete);
5573 sd_dp->issuing_cpu = raw_smp_processor_id();
5574 sd_dp->defer_t = SDEB_DEFER_WQ;
5577 sd_dp->aborted = true;
5578 schedule_work(&sd_dp->ew.work);