linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Frank.Li@freescale.com (Frank.Li at freescale.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1 v2] ARM: coresight: fix system halt when etm enable and add nosmp to command line
Date: Thu, 19 Feb 2015 21:57:55 +0800	[thread overview]
Message-ID: <1424354275-18747-1-git-send-email-Frank.Li@freescale.com> (raw)

From: Frank Li <Frank.Li@freescale.com>

when nosmp set, only 1 core enabled. try to access disable core will halt.
dts need added arm,primecell-periphid =  <id> for none-boot core
otherwise amba_device_add will halt when read peripheral id.

Signed-off-by: Frank Li <Frank.Li@freescale.com>
---
Change from v1 to v2
	- fixed typo

 drivers/coresight/coresight-etm3x.c | 4 ++++
 drivers/coresight/of_coresight.c    | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/coresight/coresight-etm3x.c b/drivers/coresight/coresight-etm3x.c
index 73c3669..d312952 100644
--- a/drivers/coresight/coresight-etm3x.c
+++ b/drivers/coresight/coresight-etm3x.c
@@ -1829,6 +1829,10 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id)
 		return ret;
 
 	drvdata->cpu = pdata ? pdata->cpu : 0;
+	if (drvdata->cpu < 0) {
+		ret = -EINVAL;
+		goto err_arch_supported;
+	}
 
 	get_online_cpus();
 	etmdrvdata[drvdata->cpu] = drvdata;
diff --git a/drivers/coresight/of_coresight.c b/drivers/coresight/of_coresight.c
index c3efa41..6804bbd 100644
--- a/drivers/coresight/of_coresight.c
+++ b/drivers/coresight/of_coresight.c
@@ -196,8 +196,7 @@ struct coresight_platform_data *of_get_coresight_platform_data(
 		if (cell) {
 			hwid = of_read_number(cell, of_n_addr_cells(dn));
 			index = get_logical_index(hwid);
-			if (index != -EINVAL)
-				pdata->cpu = index;
+			pdata->cpu = index;
 		}
 	}
 
-- 
1.9.1

             reply	other threads:[~2015-02-19 13:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 13:57 Frank.Li at freescale.com [this message]
2015-02-20  7:18 ` [PATCH 1/1 v2] ARM: coresight: fix system halt when etm enable and add nosmp to command line Dirk Behme
2015-02-20 14:15   ` Zhi Li
2015-02-24 22:00 ` Mathieu Poirier
2015-03-13 15:56   ` Zhi Li

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=1424354275-18747-1-git-send-email-Frank.Li@freescale.com \
    --to=frank.li@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).