From patchwork Thu Feb 19 13:57:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 5852341 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 31432BF440 for ; Thu, 19 Feb 2015 15:12:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8706520295 for ; Thu, 19 Feb 2015 15:12:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4E9C20279 for ; Thu, 19 Feb 2015 15:12:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YOSkK-0007lE-TG; Thu, 19 Feb 2015 15:10:32 +0000 Received: from mail-bn1on0139.outbound.protection.outlook.com ([157.56.110.139] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YOSkD-0006jd-KQ for linux-arm-kernel@lists.infradead.org; Thu, 19 Feb 2015 15:10:29 +0000 Received: from CH1PR03CA002.namprd03.prod.outlook.com (10.255.156.147) by BY1PR0301MB1222.namprd03.prod.outlook.com (25.161.203.18) with Microsoft SMTP Server (TLS) id 15.1.87.18; Thu, 19 Feb 2015 15:10:02 +0000 Received: from BN1AFFO11FD034.protection.gbl (10.255.156.132) by CH1PR03CA002.outlook.office365.com (10.255.156.147) with Microsoft SMTP Server (TLS) id 15.1.93.16 via Frontend Transport; Thu, 19 Feb 2015 15:10:01 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD034.mail.protection.outlook.com (10.58.52.158) with Microsoft SMTP Server (TLS) id 15.1.99.6 via Frontend Transport; Thu, 19 Feb 2015 15:09:59 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t1JF9u5t027683; Thu, 19 Feb 2015 08:09:57 -0700 From: To: , 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 Message-ID: <1424354275-18747-1-git-send-email-Frank.Li@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 Received-SPF: TempError (protection.outlook.com: error in processing during lookup of freescale.com: DNS Timeout) Authentication-Results: spf=temperror (sender IP is 192.88.158.2) smtp.mailfrom=Frank.Li@freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(30594002)(199003)(189002)(229853001)(47776003)(97736003)(64706001)(50226001)(104016003)(48376002)(77156002)(50466002)(36756003)(62966003)(69596002)(86362001)(86152002)(19580405001)(19580395003)(6806004)(92566002)(87936001)(46102003)(50986999)(77096005)(68736005)(81156004)(106466001)(105606002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1222; H:az84smr01.freescale.net; FPR:; SPF:TempError; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1222; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005003); SRVR:BY1PR0301MB1222; X-Forefront-PRVS: 0492FD61DD X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1222; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2015 15:09:59.7925 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1222 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150219_071025_926515_70994CED X-CRM114-Status: GOOD ( 10.76 ) X-Spam-Score: -0.0 (/) Cc: Frank Li , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Frank Li when nosmp set, only 1 core enabled. try to access disable core will halt. dts need added arm,primecell-periphid = for none-boot core otherwise amba_device_add will halt when read peripheral id. Signed-off-by: Frank Li --- 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; } }