From patchwork Mon Feb 16 21:37:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 5834751 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 197219F380 for ; Mon, 16 Feb 2015 22:52:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42393201E4 for ; Mon, 16 Feb 2015 22:52:23 +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 E7B0D200FE for ; Mon, 16 Feb 2015 22:52:21 +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 1YNUUW-0005a5-N2; Mon, 16 Feb 2015 22:50:12 +0000 Received: from mail-by2on0137.outbound.protection.outlook.com ([207.46.100.137] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YNUUU-0004TW-Bs for linux-arm-kernel@lists.infradead.org; Mon, 16 Feb 2015 22:50:10 +0000 Received: from BY2PR03CA042.namprd03.prod.outlook.com (10.141.249.15) by CY1PR0301MB1226.namprd03.prod.outlook.com (25.161.212.148) with Microsoft SMTP Server (TLS) id 15.1.87.18; Mon, 16 Feb 2015 22:49:45 +0000 Received: from BN1BFFO11FD050.protection.gbl (2a01:111:f400:7c10::1:145) by BY2PR03CA042.outlook.office365.com (2a01:111:e400:2c5d::15) with Microsoft SMTP Server (TLS) id 15.1.87.13 via Frontend Transport; Mon, 16 Feb 2015 22:49:45 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD050.mail.protection.outlook.com (10.58.145.5) with Microsoft SMTP Server (TLS) id 15.1.99.6 via Frontend Transport; Mon, 16 Feb 2015 22:49:44 +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 t1GMne6B008132; Mon, 16 Feb 2015 15:49:41 -0700 From: To: Subject: [PATCH 1/1] ARM: coresignth: fix system halt when etm enable and add nosmp to command line Date: Tue, 17 Feb 2015 05:37:54 +0800 Message-ID: <1424122674-21361-1-git-send-email-Frank.Li@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (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)(339900001)(30594002)(85426001)(104016003)(48376002)(47776003)(110136001)(77156002)(62966003)(50986999)(50466002)(36756003)(92566002)(77096005)(105606002)(229853001)(19580405001)(6806004)(19580395003)(46102003)(2351001)(86362001)(87936001)(50226001)(106466001)(86152002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB1226; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1226; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:CY1PR0301MB1226; X-Forefront-PRVS: 0489CFBAC9 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1226; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2015 22:49:44.3763 (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: CY1PR0301MB1226 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150216_145010_446273_541A29A9 X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. 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 --- 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; } }