linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Yicong Yang <yangyicong@huawei.com>
Cc: <suzuki.poulose@arm.com>, <mathieu.poirier@linaro.org>,
	<linux-kernel@vger.kernel.org>,
	<alexander.shishkin@linux.intel.com>, <helgaas@kernel.org>,
	<linux-pci@vger.kernel.org>, <prime.zeng@hisilicon.com>,
	<linuxarm@huawei.com>, <yangyicong@hisilicon.com>,
	<hejunhao3@huawei.com>
Subject: Re: [PATCH 1/5] hwtracing: hisi_ptt: Disable interrupt after trace end
Date: Fri, 25 Aug 2023 12:23:10 +0100	[thread overview]
Message-ID: <20230825122310.0000073f@Huawei.com> (raw)
In-Reply-To: <20230809081825.11518-2-yangyicong@huawei.com>

On Wed, 9 Aug 2023 16:18:21 +0800
Yicong Yang <yangyicong@huawei.com> wrote:

> From: Yicong Yang <yangyicong@hisilicon.com>
> 
> On trace end we disable the hardware but leave the interrupt
> unmasked. Mask the interrupt to make the process reverse to
> the start. No actual issue since hardware should send no
> interrupt after disabled.
> 
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  drivers/hwtracing/ptt/hisi_ptt.c | 4 ++++
>  drivers/hwtracing/ptt/hisi_ptt.h | 1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c
> index ba081b6d2435..5f0a8e653ae8 100644
> --- a/drivers/hwtracing/ptt/hisi_ptt.c
> +++ b/drivers/hwtracing/ptt/hisi_ptt.c
> @@ -183,6 +183,10 @@ static void hisi_ptt_wait_dma_reset_done(struct hisi_ptt *hisi_ptt)
>  static void hisi_ptt_trace_end(struct hisi_ptt *hisi_ptt)
>  {
>  	writel(0, hisi_ptt->iobase + HISI_PTT_TRACE_CTRL);
> +
> +	/* Mask the interrupt on the end */
> +	writel(HISI_PTT_TRACE_INT_MASK_ALL, hisi_ptt->iobase + HISI_PTT_TRACE_INT_MASK);
> +
>  	hisi_ptt->trace_ctrl.started = false;
>  }
>  
> diff --git a/drivers/hwtracing/ptt/hisi_ptt.h b/drivers/hwtracing/ptt/hisi_ptt.h
> index e17f045d7e72..46030aa88081 100644
> --- a/drivers/hwtracing/ptt/hisi_ptt.h
> +++ b/drivers/hwtracing/ptt/hisi_ptt.h
> @@ -47,6 +47,7 @@
>  #define HISI_PTT_TRACE_INT_STAT		0x0890
>  #define   HISI_PTT_TRACE_INT_STAT_MASK	GENMASK(3, 0)
>  #define HISI_PTT_TRACE_INT_MASK		0x0894
> +#define   HISI_PTT_TRACE_INT_MASK_ALL	GENMASK(3, 0)
>  #define HISI_PTT_TUNING_INT_STAT	0x0898
>  #define   HISI_PTT_TUNING_INT_STAT_MASK	BIT(0)
>  #define HISI_PTT_TRACE_WR_STS		0x08a0


  reply	other threads:[~2023-08-25 11:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09  8:18 [PATCH 0/5] Several updates for PTT driver Yicong Yang
2023-08-09  8:18 ` [PATCH 1/5] hwtracing: hisi_ptt: Disable interrupt after trace end Yicong Yang
2023-08-25 11:23   ` Jonathan Cameron [this message]
2023-08-09  8:18 ` [PATCH 2/5] hwtracing: hisi_ptt: Handle the interrupt in hardirq context Yicong Yang
2023-08-25 11:24   ` Jonathan Cameron
2023-08-09  8:18 ` [PATCH 3/5] hwtracing: hisi_ptt: Optimize the trace data committing Yicong Yang
2023-08-25 11:24   ` Jonathan Cameron
2023-08-09  8:18 ` [PATCH 4/5] hwtracing: hisi_ptt: Don't try to attach a task Yicong Yang
2023-08-25 11:25   ` Jonathan Cameron
2023-08-09  8:18 ` [PATCH 5/5] hwtracing: hisi_ptt: Add dummy callback pmu::read() Yicong Yang
2023-08-25 11:25   ` Jonathan Cameron

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=20230825122310.0000073f@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=hejunhao3@huawei.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=suzuki.poulose@arm.com \
    --cc=yangyicong@hisilicon.com \
    --cc=yangyicong@huawei.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;
as well as URLs for NNTP newsgroup(s).