mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daejun Park <daejun7.park@samsung.com>
To: Ziqi Chen <quic_ziqichen@quicinc.com>,
	"quic_asutoshd@quicinc.com" <quic_asutoshd@quicinc.com>,
	"quic_cang@quicinc.com" <quic_cang@quicinc.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"mani@kernel.org" <mani@kernel.org>,
	"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	JunWoo Lee <junwoo80.lee@samsung.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	ALIM AKHTAR <alim.akhtar@samsung.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Daejun Park <daejun7.park@samsung.com>
Subject: RE: [PATCH v3] scsi: ufs: core: Add trace event for MCQ
Date: Fri, 24 Feb 2023 07:27:45 +0900	[thread overview]
Message-ID: <20230223222745epcms2p2a85ca78bc48f366869fa224afa18799d@epcms2p2> (raw)
In-Reply-To: <1677051569-81113-1-git-send-email-quic_ziqichen@quicinc.com>

Hi Ziqi Chen,

...
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 3b3cf78..67cb90d 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -426,6 +426,7 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
>          struct ufshcd_lrb *lrbp = &hba->lrb[tag];
>          struct scsi_cmnd *cmd = lrbp->cmd;
>          struct request *rq = scsi_cmd_to_rq(cmd);
> +        struct ufs_hw_queue *hwq;
>          int transfer_len = -1;
>  
>          if (!cmd)
> @@ -456,9 +457,16 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
>          }
>  
>          intr = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
> -        doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL);
> -        trace_ufshcd_command(dev_name(hba->dev), str_t, tag,
> -                        doorbell, transfer_len, intr, lba, opcode, group_id);
> +
> +        if (is_mcq_enabled(hba)) {
> +                hwq = ufshcd_mcq_req_to_hwq(hba, rq);
> +                trace_ufshcd_command_mcq(dev_name(hba->dev), str_t, tag,
> +                                hwq, transfer_len, intr, lba, opcode, group_id);
How about passing member variables of hwq instead of passing hwq?

> +        } else {
> +                doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL);
> +                trace_ufshcd_command(dev_name(hba->dev), str_t, tag,
> +                                doorbell, transfer_len, intr, lba, opcode, group_id);
> +        }
>  }
>  
>  static void ufshcd_print_clk_freqs(struct ufs_hba *hba)
> diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h
> index 599739e..604b2cd 100644
> --- a/include/trace/events/ufs.h
> +++ b/include/trace/events/ufs.h
> @@ -10,6 +10,7 @@
>  #define _TRACE_UFS_H
>  
>  #include <linux/tracepoint.h>
> +#include <ufs/ufshcd.h>
Then, it can be removed.

Thanks,
Daejun

      parent reply	other threads:[~2023-02-23 22:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  7:39 Ziqi Chen
2023-02-22 19:27 ` Bean Huo
2023-02-23  9:44 ` Can Guo
     [not found] ` <CGME20230222074027epcas2p4138c95d79ac3cd7dca4745080c747fa1@epcms2p2>
2023-02-23 22:27   ` Daejun Park [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230223222745epcms2p2a85ca78bc48f366869fa224afa18799d@epcms2p2 \
    --to=daejun7.park@samsung.com \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=junwoo80.lee@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mhiramat@kernel.org \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_cang@quicinc.com \
    --cc=quic_ziqichen@quicinc.com \
    --cc=rostedt@goodmis.org \
    --cc=stanley.chu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®