From: Suzuki K Poulose <Suzuki.Poulose@arm.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>,
linux-arm-kernel@lists.infradead.org
Cc: alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] coresight: etb10: Splitting function etb_enable()
Date: Thu, 16 Aug 2018 16:44:47 +0100 [thread overview]
Message-ID: <500292f8-d2ef-534d-9331-6a4ea7471c19@arm.com> (raw)
In-Reply-To: <1534284866-2523-2-git-send-email-mathieu.poirier@linaro.org>
On 14/08/18 23:14, Mathieu Poirier wrote:
> Up until now the relative simplicity of enabling the ETB made it
> possible to accommodate processing for both sysFS and perf methods.
> But work on claimtags and CPU-wide trace scenarios is adding some
> complexity, making the current code messy and hard to maintain.
>
> As such follow what has been done for ETF and ETR components and split
> function etb_enable() so that processing for both API can be done
> cleanly.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> ---
> +static int etb_enable(struct coresight_device *csdev, u32 mode, void *data)
> +{
> + int ret;
> + struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
> +
> + switch (mode) {
> + case CS_MODE_SYSFS:
> + ret = etb_enable_sysfs(csdev);
> + break;
> + case CS_MODE_PERF:
> + ret = etb_enable_perf(csdev, data);
> + break;
> + default:
> + ret = -EINVAL;
> + break;
> + }
> +
> + if (ret)
> + return ret;
> +
> + dev_dbg(drvdata->dev, "ETB enabled\n");
> + return 0;
> +}
> +
Looks good.
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
next prev parent reply other threads:[~2018-08-16 15:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 22:14 [PATCH 1/2] coresight: etb10: Refactor etb_drvdata::mode handling Mathieu Poirier
2018-08-14 22:14 ` [PATCH 2/2] coresight: etb10: Splitting function etb_enable() Mathieu Poirier
2018-08-16 15:44 ` Suzuki K Poulose [this message]
2018-08-16 15:13 ` [PATCH 1/2] coresight: etb10: Refactor etb_drvdata::mode handling Suzuki K Poulose
2018-08-16 15:48 ` Mathieu Poirier
2018-08-16 15:50 ` Suzuki K Poulose
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=500292f8-d2ef-534d-9331-6a4ea7471c19@arm.com \
--to=suzuki.poulose@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
/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