mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Chao Xu <xuchao066@163.com>
Cc: suzuki.poulose@arm.com, mike.leach@arm.com,
	james.clark@linaro.org, alexander.shishkin@linux.intel.com,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v1] coresight: funnel: inport schedule by priority can not take work
Date: Tue, 27 Oct 2026 08:41:33 +0000	[thread overview]
Message-ID: <20261027084133.GA766279@e132581.arm.com> (raw)
In-Reply-To: <20261025131308.7158-1-xuchao066@163.com>

Hi,

On Sun, Oct 25, 2026 at 09:13:07PM +0800, Chao Xu wrote:
> Before enable funnel, priority must be set. Changing the port
> priorities in real time is not supported.

> If the priority control register is written when one or more of ports
> are enable, then the write is silently rejected.

Could you cite the relevant documentation in commit log?

  The CoreSight SoC-600 TRM, section 9.11.2, PRIORITYCONTROL, a funnel
  rejects priority register writes whenever any port is enabled. The
  current sequence therefore prevent the configured priorities from
  taking effect.

  Write the priority register before enabling the first port.

> Signed-off-by: Chao Xu <xuchao066@163.com>
> ---
>  drivers/hwtracing/coresight/coresight-funnel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c
> index af40814ce560..17f985798d7f 100644
> --- a/drivers/hwtracing/coresight/coresight-funnel.c
> +++ b/drivers/hwtracing/coresight/coresight-funnel.c
> @@ -66,8 +66,8 @@ static int dynamic_funnel_enable_hw(struct funnel_drvdata *drvdata, int port)
>  	functl &= ~FUNNEL_HOLDTIME_MASK;
>  	functl |= FUNNEL_HOLDTIME;
>  	functl |= (1 << port);
> -	writel_relaxed(functl, drvdata->base + FUNNEL_FUNCTL);
>  	writel_relaxed(drvdata->priority, drvdata->base + FUNNEL_PRICTL);
> +	writel_relaxed(functl, drvdata->base + FUNNEL_FUNCTL);

Please move the priority write into the first port branch:

  /* Claim the device only when we enable the first slave */
  if (!(functl & FUNNEL_ENSx_MASK)) {
          rc = coresight_claim_device_unlocked(csdev);
          if (rc)
                  goto done;

          /* Update priorities while all ports are disabled */
          writel_relaxed(drvdata->priority,
                         drvdata->base + FUNNEL_PRICTL);
  }

Thanks,
Leo

  reply	other threads:[~2026-10-27  8:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 13:13 Chao Xu
2026-10-27  8:41 ` Leo Yan [this message]
2026-10-27 15:17   ` Chao Xu
  -- strict thread matches above, loose matches on Subject: below --
2026-10-25  3:52 Chao Xu

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=20261027084133.GA766279@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.leach@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=xuchao066@163.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®