From: Chunyan Zhang <zhang.chunyan@linaro.org>
To: alexander.shishkin@linux.intel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/2] intel_th: the number of masters should be (sw_end - sw_start + 1)
Date: Fri, 11 Dec 2015 18:48:00 +0800 [thread overview]
Message-ID: <1449830880-15319-3-git-send-email-zhang.chunyan@linaro.org> (raw)
In-Reply-To: <1449830880-15319-1-git-send-email-zhang.chunyan@linaro.org>
sw_end represents the last software master, sw_start is index of the
first master, so the number of software masters should be
sw_end - sw_start + 1.
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
---
drivers/hwtracing/intel_th/sth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/intel_th/sth.c b/drivers/hwtracing/intel_th/sth.c
index 56101c3..28917d7 100644
--- a/drivers/hwtracing/intel_th/sth.c
+++ b/drivers/hwtracing/intel_th/sth.c
@@ -173,7 +173,7 @@ static int intel_th_sw_init(struct sth_device *sth)
sth->stm.sw_start = reg & 0xffff;
sth->stm.sw_end = reg >> 16;
- sth->sw_nmasters = sth->stm.sw_end - sth->stm.sw_start;
+ sth->sw_nmasters = sth->stm.sw_end - sth->stm.sw_start + 1;
dev_dbg(sth->dev, "sw_start: %x sw_end: %x masters: %x nchannels: %x\n",
sth->stm.sw_start, sth->stm.sw_end, sth->sw_nmasters,
sth->stm.sw_nchannels);
--
1.9.1
next prev parent reply other threads:[~2015-12-11 10:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 10:47 [PATCH v2 0/2] modify the number of masters Chunyan Zhang
2015-12-11 10:47 ` [PATCH v2 1/2] stm: the number of masters should be (sw_end - sw_start + 1) Chunyan Zhang
2015-12-11 10:48 ` Chunyan Zhang [this message]
2016-01-28 3:41 ` [PATCH v2 2/2] intel_th: " Chunyan Zhang
2016-01-28 10:16 ` Alexander Shishkin
2016-01-28 10:55 ` Chunyan Zhang
2016-01-29 4:24 ` [PATCH] intel_th: Show a correct number of masters in debug message Chunyan Zhang
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=1449830880-15319-3-git-send-email-zhang.chunyan@linaro.org \
--to=zhang.chunyan@linaro.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®