From patchwork Fri Nov 30 18:43:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 152579 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3989740ljp; Fri, 30 Nov 2018 10:43:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/W1shtoD06h1v1AbEJ+C+s27KLH34Si9f7V9pVxXROiyb6ge80zQaltd0ogDLZU2yJ8Xn4C X-Received: by 2002:a17:902:6681:: with SMTP id e1-v6mr6598765plk.173.1543603393728; Fri, 30 Nov 2018 10:43:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543603393; cv=none; d=google.com; s=arc-20160816; b=zp1zcbWAjDRDlXOiWwKAm/L1kK8Be8jdvYf/Mz9n6rAqlKU3QOokviocbPhM1mWGvP AtBxIYic7zHJIkkidRS4VW+8cJS4RU3O+/pB8Ck/wIJqnyA9hWSRQq1GgaCVnUKrXc9P OdIYsDK2YhUqk5KMFq1fLmW5u9bSoG3Z+O0XNXMoCofo0XY6DVzvWf9GGAdBCNnwg2pC Edm4NQePbkdUaOiLIfQlzT2nTSdaYdUsV+COcsrN1i/MFSxa0a7dsl7xKZnE7pIRhRhH XGpUrSNE0lazGPSou0dxnXQoEnDT+sP/vuJbFmPMZZcnz60o7gamTTGtt2QSzDtr6mW2 iDag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=YQ8V65+iAbYCwafIxsu/qixXdC63ZH4JkQ5OQ19U4Gs=; b=KLZ35dDCvdgi7h2ejZjtdRkzgNlvwRsnm0d/dJuAInpWIbw+uNbWCKHFUOl8NPZG8s CiFwZSwsGqJEiMDMEifISpqalsVyWNAuwNEfIxZb+/qboAcNuUjU7TJpD/RIBt/lh6EP X/drC2hQFeWwOHyop6qaitMfgyFJjD5pqKBFZWhEXYBBHUrq2shH1FZ/4nqSTmdUHQM6 8xyAwvZTt+ENtO425EbhNEYfVPN2rdh1bO6pAKwp6BFwW4a6ec0CDjLjUtvMJk40BTCq NjY0eSj41pn4yLME63skf/7DKKZniByn7KFHbheAxOK1GHCMu+hHp9bVlzfP1y8fYjqi l62w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iF3DXd+2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18si5407846plz.105.2018.11.30.10.43.13; Fri, 30 Nov 2018 10:43:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iF3DXd+2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbeLAFxX (ORCPT + 32 others); Sat, 1 Dec 2018 00:53:23 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:45452 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbeLAFxW (ORCPT ); Sat, 1 Dec 2018 00:53:22 -0500 Received: by mail-pl1-f195.google.com with SMTP id a14so3203540plm.12 for ; Fri, 30 Nov 2018 10:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YQ8V65+iAbYCwafIxsu/qixXdC63ZH4JkQ5OQ19U4Gs=; b=iF3DXd+2Blda6rapqabTdvaXC2MzxGz9RMkey1xEMGRqu+T9w5m4YGfGPH7bRGrg9q HiXRadkTk23UznKu4S+xWuuNO6BtKV5M2tF3Ev+Hmd8TJKHzEHqP9h9CgVfl+JossOhM Pncvrrq6by1HknrOi47aKPXVs5HRLMbRO7sTo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YQ8V65+iAbYCwafIxsu/qixXdC63ZH4JkQ5OQ19U4Gs=; b=VXb28StibzxmcA57Cin3ExFiJlxw7HNSy39egClgeYGt1mx4MZ+wO6gsfRPMoXdWPN 3XNAvRhFMJrWNIDcsTnhsoxFr1ZwMR26y+17zupibX9972nQUPn67EInQzrWbfcB/oby yndghepeuStmddBscNeNqQuUDiKTqPTuCmam2fHOdLDzYesjlyC2PWXm/NY+f5/FzMU+ +3AdXdXPKcZ6UT/5AHsjrx6sqW392UvQ2Bp6E2aQc7w7028rYV6YeH5FBNwzg9VIbDwV CJO5N9bjzPVAuNfq7Hnkc19ElNN2pwVPlSlOuPEJrsi3n3o3xPC1/5Mlr8YRJLU8bXfg +4Kg== X-Gm-Message-State: AA+aEWYyuUSSfApMlqu5U08OLJpvJAWZ94bQrmfa8z7tPb89Ef6Jna65 QFF/vM2gM24PucgKs5sxU3peL4y03e0= X-Received: by 2002:a17:902:59c8:: with SMTP id d8mr6794781plj.116.1543603390155; Fri, 30 Nov 2018 10:43:10 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l184sm12743147pfc.112.2018.11.30.10.43.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 10:43:09 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] coresight: tmc: Fix bad register address for CLAIM Date: Fri, 30 Nov 2018 11:43:02 -0700 Message-Id: <1543603387-32645-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> References: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan Commit 4d3ebd3658d8 ("coreisght: tmc: Claim device before use") uses CLAIM tag to validate if the device is available, it needs to pass the device base address to access related registers. In the function tmc_etb_disable_hw() it wrongly passes the driver data pointer as register base address, thus it's easily to produce the kernel warning info like below: [ 83.579898] WARNING: CPU: 4 PID: 2970 at drivers/hwtracing/coresight/coresight.c:207 coresight_disclaim_device_unlocked+0x44/0x80 [ 83.591448] Modules linked in: [ 83.594485] CPU: 4 PID: 2970 Comm: uname Not tainted 4.19.0-rc6-00417-g721b509 #110 [ 83.602067] Hardware name: ARM Juno development board (r2) (DT) [ 83.607932] pstate: 80000085 (Nzcv daIf -PAN -UAO) [ 83.612681] pc : coresight_disclaim_device_unlocked+0x44/0x80 [ 83.618375] lr : coresight_disclaim_device_unlocked+0x44/0x80 [ 83.624064] sp : ffff00000fe3ba20 [ 83.627347] x29: ffff00000fe3ba20 x28: ffff80002d430dc0 [ 83.632618] x27: ffff800033177c00 x26: ffff80002eb44480 [ 83.637889] x25: 0000000000000001 x24: ffff800033c72600 [ 83.643160] x23: ffff0000099b11f8 x22: ffff0000099b11c8 [ 83.648430] x21: 0000000000000002 x20: ffff800033a90418 [ 83.653701] x19: ffff0000099b11c8 x18: 0000000000000000 [ 83.658971] x17: 0000000000000000 x16: 0000000000000000 [ 83.664241] x15: 0000000000000000 x14: 0000000000000000 [ 83.669511] x13: 0000000000000000 x12: 0000000000000000 [ 83.674782] x11: 0000000000000000 x10: 0000000000000000 [ 83.680052] x9 : 0000000000000000 x8 : 0000000000000001 [ 83.685322] x7 : 0000000000010000 x6 : ffff800033ebab18 [ 83.690593] x5 : ffff800033ebab18 x4 : ffff800033e6c698 [ 83.695862] x3 : 0000000000000001 x2 : 0000000000000000 [ 83.701133] x1 : 0000000000000000 x0 : 0000000000000001 [ 83.706404] Call trace: [ 83.708830] coresight_disclaim_device_unlocked+0x44/0x80 [ 83.714180] coresight_disclaim_device+0x34/0x48 [ 83.718756] tmc_disable_etf_sink+0xc4/0xf0 [ 83.722902] coresight_disable_path_from+0xc8/0x240 [ 83.727735] coresight_disable_path+0x24/0x30 [ 83.732053] etm_event_stop+0x130/0x170 [ 83.735854] etm_event_del+0x24/0x30 [ 83.739399] event_sched_out.isra.51+0xcc/0x1e8 [ 83.743887] group_sched_out.part.53+0x44/0xb0 [ 83.748291] ctx_sched_out+0x298/0x2b8 [ 83.752005] task_ctx_sched_out+0x74/0xa8 [ 83.755980] perf_event_exit_task+0x140/0x418 [ 83.760298] do_exit+0x3f4/0xcf0 [ 83.763497] do_group_exit+0x5c/0xc0 [ 83.767041] __arm64_sys_exit_group+0x24/0x28 [ 83.771359] el0_svc_common+0x110/0x178 [ 83.775160] el0_svc_handler+0x94/0xe8 [ 83.778875] el0_svc+0x8/0xc [ 83.781728] ---[ end trace 02d8d8eac46db9e5 ]--- This patch is to fix this bug by using 'drvdata->base' as the register base address for CLAIM related operation. Fixes: 4d3ebd3658d8 ("coreisght: tmc: Claim device before use") Cc: Suzuki Poulose Cc: Mathieu Poirier Cc: Mike Leach Cc: Robert Walker Signed-off-by: Leo Yan Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c index 53fc83b72a49..5864ac55e275 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c @@ -86,7 +86,7 @@ static void __tmc_etb_disable_hw(struct tmc_drvdata *drvdata) static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata) { - coresight_disclaim_device(drvdata); + coresight_disclaim_device(drvdata->base); __tmc_etb_disable_hw(drvdata); } From patchwork Fri Nov 30 18:43:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 152584 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3990122ljp; Fri, 30 Nov 2018 10:43:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/WIYny4BYuaFPVQj5drI/NPwOu1f6ec9ik7joyhOc14DZG6sQirqr6yAC8TU2RPP6yoJCJ4 X-Received: by 2002:a63:d846:: with SMTP id k6mr4653383pgj.251.1543603418507; Fri, 30 Nov 2018 10:43:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543603418; cv=none; d=google.com; s=arc-20160816; b=DN0NTyPyoDmBOyXCI9UNhrjqmiUP9NEtGzISzh67l8gzFIVLdqpi4zBac3ve7JURY5 +C5XdUQyhMzok4k92KeV9MVDdP4ZNt4nFOChTEbAfyYUMv+P+raYvD+4TKlE3dnCVyfW BG5T/ha3UdTOpkio+96/RPD4xc3A99Yt5qrew6x90e4igoojfom86ZonviL2WNfh0C2H DiQkadIJeTf6ddWDZ2fJPTTRM5HHZLOGqAwTxKW/WMtMlrbLp/yh8ridggOfb4IoiExK KiRTxaNHeZySHipwGIYSv2UwEN9m9R/Vnq/BGtgpdyfpqLYx9h90Q48+8WjL+u23PGUn +cJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=OXwnhYG6hQi1Mbl3UXmr0yioawjZlr4QoOQbaBfX9RQ=; b=nRCMbs1niHfCKKMgIdqa0tTvaYoIe2yHH7+q+SVnGbs+H+OVs7wqndHlPwAjI4vFgv 0Zd8YcCpUhlIpPGboe9wnHNNcZCHNjNzXiNX2zFnZLyz8bSPhpW//IgOV8mPlIX4F/dk fx918Ad9kIxwDAb/Hku33OF0frB1vBSeyIivy8HKUGlSuMq7Hah6sjXRleXCHWFCDv+6 N1kiO5O3Avwi06jooZm/G4z8rVy0nlprnwhLbzn6FsAnkxWVqe55O/eGWr/gSoESbgiv SyzhfvtXjLJLzWGQZ//e6iHrrGp6fYcB/EvUCLVzqPpGBDtf5ltRFgmTqJKjNqBEffI+ J0rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i8F6CGCO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v35si5549086pgl.130.2018.11.30.10.43.38; Fri, 30 Nov 2018 10:43:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i8F6CGCO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726989AbeLAFxs (ORCPT + 32 others); Sat, 1 Dec 2018 00:53:48 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:44913 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbeLAFxX (ORCPT ); Sat, 1 Dec 2018 00:53:23 -0500 Received: by mail-pg1-f196.google.com with SMTP id t13so2847591pgr.11 for ; Fri, 30 Nov 2018 10:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OXwnhYG6hQi1Mbl3UXmr0yioawjZlr4QoOQbaBfX9RQ=; b=i8F6CGCOfAYjBRuRriccxKKihlxKdkJTiuAsuI6Rq1UYlMykqzsgSxTWcNZx/3bOHZ /1AgbfSqt6i639mZt5TdOoUi4CbHFTV6TpjFSNET1okOzpwje2RZCNlXpn2zcCpPOHX+ R8BLpWofEXs+urLmVufc6Pa4eMSj0HY5czx08= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OXwnhYG6hQi1Mbl3UXmr0yioawjZlr4QoOQbaBfX9RQ=; b=inxTgtk2/mTarJewI7RjWNw1KtTC7QAtGGIdzgnBxX5Ez0AL7lnbenEvvD6sC3Tt5k TaHjPJ84NOp8/g/AUEzrYHnG0Q+3PcG4gLEvNKAeUAVtOLrkKVslnxoQ0w8fP/cmINpz 0BxleYG2IZs4Bh/FJkvsZVXUdxK7/883HHkk43YCSQWTqs0rBWkBDsn37WuRmqxPq2sT OcCow72X/pizmVZZcxToIJGS/uWn8Wf+3k8avl5rhnzACCoKJZ8asZj9vWsu3ox9a7Rx Nr5z6wwQcfPGvqiO6DL8dEHzovhwQ2Xdz/ndBjrUWeDEu4J/fS2wEV0lKuYsKAnLFFEp a09Q== X-Gm-Message-State: AA+aEWbhEEHkrzfDU8pccDPJ9U7/nM4UMxqvyAaCDwTVIoei56LnU+V8 i4NtyVsia9X1T2+P9hK1RBDU6ixGv1w= X-Received: by 2002:a63:e80e:: with SMTP id s14mr5726174pgh.30.1543603391042; Fri, 30 Nov 2018 10:43:11 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l184sm12743147pfc.112.2018.11.30.10.43.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 10:43:10 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] coresight: etb10: Add support for CLAIM tag Date: Fri, 30 Nov 2018 11:43:03 -0700 Message-Id: <1543603387-32645-3-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> References: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following in the footstep of what was done for other CoreSight devices, add CLAIM tag support to ETB10 in order to synchronise access to the HW between the kernel and an external agent. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-etb10.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c index 824be0c5f592..105782ea64c7 100644 --- a/drivers/hwtracing/coresight/coresight-etb10.c +++ b/drivers/hwtracing/coresight/coresight-etb10.c @@ -136,6 +136,11 @@ static void __etb_enable_hw(struct etb_drvdata *drvdata) static int etb_enable_hw(struct etb_drvdata *drvdata) { + int rc = coresight_claim_device(drvdata->base); + + if (rc) + return rc; + __etb_enable_hw(drvdata); return 0; } @@ -223,7 +228,7 @@ static int etb_enable(struct coresight_device *csdev, u32 mode, void *data) return 0; } -static void etb_disable_hw(struct etb_drvdata *drvdata) +static void __etb_disable_hw(struct etb_drvdata *drvdata) { u32 ffcr; @@ -313,6 +318,13 @@ static void etb_dump_hw(struct etb_drvdata *drvdata) CS_LOCK(drvdata->base); } +static void etb_disable_hw(struct etb_drvdata *drvdata) +{ + __etb_disable_hw(drvdata); + etb_dump_hw(drvdata); + coresight_disclaim_device(drvdata->base); +} + static void etb_disable(struct coresight_device *csdev) { struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); @@ -323,7 +335,6 @@ static void etb_disable(struct coresight_device *csdev) /* Disable the ETB only if it needs to */ if (drvdata->mode != CS_MODE_DISABLED) { etb_disable_hw(drvdata); - etb_dump_hw(drvdata); drvdata->mode = CS_MODE_DISABLED; } spin_unlock_irqrestore(&drvdata->spinlock, flags); @@ -402,7 +413,7 @@ static unsigned long etb_update_buffer(struct coresight_device *csdev, capacity = drvdata->buffer_depth * ETB_FRAME_SIZE_WORDS; - etb_disable_hw(drvdata); + __etb_disable_hw(drvdata); CS_UNLOCK(drvdata->base); /* unit is in words, not bytes */ @@ -510,7 +521,7 @@ static unsigned long etb_update_buffer(struct coresight_device *csdev, handle->head = (cur * PAGE_SIZE) + offset; to_read = buf->nr_pages << PAGE_SHIFT; } - etb_enable_hw(drvdata); + __etb_enable_hw(drvdata); CS_LOCK(drvdata->base); return to_read; @@ -534,9 +545,9 @@ static void etb_dump(struct etb_drvdata *drvdata) spin_lock_irqsave(&drvdata->spinlock, flags); if (drvdata->mode == CS_MODE_SYSFS) { - etb_disable_hw(drvdata); + __etb_disable_hw(drvdata); etb_dump_hw(drvdata); - etb_enable_hw(drvdata); + __etb_enable_hw(drvdata); } spin_unlock_irqrestore(&drvdata->spinlock, flags); From patchwork Fri Nov 30 18:43:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 152580 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3989768ljp; Fri, 30 Nov 2018 10:43:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/WAY/FU0yQDbBxv7+qIV/JuDM8zX6N2hpOB6UzhpADC+2BtB39yzucx2BZgNNgJxMNXi67k X-Received: by 2002:a63:9d05:: with SMTP id i5mr5300203pgd.98.1543603395497; Fri, 30 Nov 2018 10:43:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543603395; cv=none; d=google.com; s=arc-20160816; b=dAlmCU2rNwm4dph7VweGC1SuMyv86jWm7RPuhXBbHg4aQgEe0BVPXcTSOTNs+YDoFD mZSVY3IPyE+YyBYc6AubQUAnwSOIcUQdacHZ2R08FiembnukfHgRiigWepa7rHgQF9h3 B0LdKKNhUfVdPcoGK+2HxH1UW7oXz0EJVmFdXG6Q4+iXY0/k6UApM3j25CWkThnqQzSW sT19EaXqYdcRkBkEe+YEDrydBYpy8fizCMDOzqlIQ34QKKn/c2PomDn/KZqEB5dyPSVO QbkB5YMzqxUBUrQnYi/sHSzm4sJ9jsugei0z/Iq/ww/x9Zg2wn2mUWA2rxW5O23Nn3ea q8ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=a54bpJWkTONWX4xBh3sap+Bcri1qS8QIiPLNgbLvU28=; b=X+LPfB9t8ZppvIHkViW4gWNgsSdbFPLAkByzPP7j9Ie4fQxhif2SQdodcDORX1tl3l HtBdjyS8asHpMOpThA2WKBivOvmccHImR/jeiroEbCyp/SqQypMRP9pNglHhvuEvUBJC OAdu6bJcI9o+z/sQkm0C2to6TCMbCf1RjSWsIB1igDTmh8+zyvpunK0Kp8W+xIsxoxnd ADy/xGcq2ffLjZAs0QClfGS80EANUiyIx/LjtzeClMF4hZED1FmDx0Lo1ntOQTpbwRbI Ndi2vr89csc+472ZyZOJPA/VZiPp2lBX62dwYdOJIynIpDqZ2zeyvNYcROURnJUNQP7W hRUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="C9iAkn/e"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 28si7547336pfm.50.2018.11.30.10.43.15; Fri, 30 Nov 2018 10:43:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="C9iAkn/e"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbeLAFxY (ORCPT + 32 others); Sat, 1 Dec 2018 00:53:24 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42289 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbeLAFxX (ORCPT ); Sat, 1 Dec 2018 00:53:23 -0500 Received: by mail-pg1-f193.google.com with SMTP id d72so2859848pga.9 for ; Fri, 30 Nov 2018 10:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a54bpJWkTONWX4xBh3sap+Bcri1qS8QIiPLNgbLvU28=; b=C9iAkn/eQ81AquoFVcDRP4BXRSDPvwi5lVom0WpXgdndGwCZmQdUQsc0LJ39BK7HH0 kCT8HZiFlMoI5S4CO9wUbiQmU+YZDXl22GevrHwzuI5arIPYrQvWzJxP3iPajaMdBtt3 B7ETOxXhQlqkn/G+DbDeFP7LSMBZC/Fqh/uNw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=a54bpJWkTONWX4xBh3sap+Bcri1qS8QIiPLNgbLvU28=; b=b/2sIEzY6iBWO411LIZJw+7iKR150WRbkVkf1P+b+KcfofhArui0FasDH+AqnVwgnN YCPqnYs9VBz3X4I55/+Fpisn3sU1bmBgNngJGzXqZkO6j59ZbkJwT63Kfoyx/vOq8MpP eFCGu2bTX75j9JDDq8gHWDT4lY6Esth40NRckkZMlGiEN0cC0tAK2deJkfmRn9FLWvIv OniSdk1TxC/esx3MjMrhgXC5+G3abHalgCjuf78tbX0wVy0JnUrodt4Hh5pSIkvKTJlD XPaSeztqSOKTrnDs2IHXh6NTh4FHy66v1ulSZGc1yQpc9XQbA/wllRE3E39VtZpZH3+V L5XQ== X-Gm-Message-State: AA+aEWay07siDFjv5z4e1bdZuAMsWclVrk/LZZR+umIwVgrf2mI48CxJ qz/tUlcHCyZTVPKlfNbuF94YYw== X-Received: by 2002:a62:1541:: with SMTP id 62mr6721900pfv.230.1543603391929; Fri, 30 Nov 2018 10:43:11 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l184sm12743147pfc.112.2018.11.30.10.43.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 10:43:11 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] coresight: etf: Release CLAIM tag after disabling the HW Date: Fri, 30 Nov 2018 11:43:04 -0700 Message-Id: <1543603387-32645-4-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> References: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch rectifies the sequence of events in function tmc_etb_disable_hw() by disabling the HW first and then releasing the CLAIM tag. Otherwise we could be corrupting the configuration done by an external agent that would have claimed the device after we have released it. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c index 5864ac55e275..a5f053f2db2c 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c @@ -86,8 +86,8 @@ static void __tmc_etb_disable_hw(struct tmc_drvdata *drvdata) static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata) { - coresight_disclaim_device(drvdata->base); __tmc_etb_disable_hw(drvdata); + coresight_disclaim_device(drvdata->base); } static void __tmc_etf_enable_hw(struct tmc_drvdata *drvdata) From patchwork Fri Nov 30 18:43:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 152581 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3989790ljp; Fri, 30 Nov 2018 10:43:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/VbRiN9bTyT2H27rk0SHBmHsE18DZ95R9GK7diyNYlRdBPhaP5yM/0IVfl4MElCPR1HiXCP X-Received: by 2002:a63:e20a:: with SMTP id q10mr4440065pgh.206.1543603396772; Fri, 30 Nov 2018 10:43:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543603396; cv=none; d=google.com; s=arc-20160816; b=iONsAiXPFFwih31Egtv0yfgEaggLnhzhpNf/KeHfL2B4BEFwFIKSCzuRKNk6nuA6ue xhwVnbGVBdldTVqG5R8JoqvHEzGZ0yL4GEp9fXRAqVa/LHXH2qxEh8ZWbakNc6igkIuw 0W6PuymVB7ozAb59Ty9AZCsd7JPAkOnOfjdEYtYlwBC3AkfB75lRA68EuvzEyzOUmq97 Hxy44M8LxBO5mEImeRoUFDS3rG1E2gQBweuDcPKDpD1q8Q74NRqr8vl1K11Z+wCZhFvd bmbAhEyHRMm1qjXQ8Bs9fAH4nr7h7V7Xw3ZJTbAq9+QQ1Z75y0NaMNJotID+zcwJ0H0l 1IyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Vzhe1k+4Sg0ipa3ln5fdFCWCmxq09KTUkxbptlEwH0o=; b=ZlobyNmxX0/nJoy92SdlTEgiVr/1kzfvKHoZOuwj+Bk1ZSbxP6+QNW9cYQFR4MFrUP hLpVdp6ITM2PsAyXbxkopD4zMm8gih3X0aSweYfM6wI1nb5tbvar/44Rz9QfdO5qfawR GvAkgNpmJ7Hj2LEGL0Tzdf591BaMxrPlkZ2QWbc3a+BXi46YKvffADqiJZl7wbZ0jIHu t9/fl1NAYR6CZW4cvpWEEKZ7voJfM/TZNqrkuUD86IXEAOuzGHYXreOZ5MS/pLDBh7Qi /NP+cUNgYL1s4L7DEw/ZwGdM50aqSQGRnRx10FGoTNuLNRXHMCos220GpfJiiCAU3ydU Bg/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MNfo2gVn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p186si5620599pgp.37.2018.11.30.10.43.16; Fri, 30 Nov 2018 10:43:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MNfo2gVn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726886AbeLAFxZ (ORCPT + 32 others); Sat, 1 Dec 2018 00:53:25 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38167 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbeLAFxY (ORCPT ); Sat, 1 Dec 2018 00:53:24 -0500 Received: by mail-pg1-f195.google.com with SMTP id g189so2867142pgc.5 for ; Fri, 30 Nov 2018 10:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Vzhe1k+4Sg0ipa3ln5fdFCWCmxq09KTUkxbptlEwH0o=; b=MNfo2gVn4M21WigIT/e+iaNN9ezDzgUXXWXSfwDo6u8q7wl0e60KnDGwCVXDsPm4hw vGgJ6SDizOsZu+A7J39csL3PzLfeo7a8ZE2fACs5tsPKjnE7IciTWbA3BpmortyQr5Zv 0CwpP4AXmrzSuXAd+4YgQQMaw597TfE0vRN+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Vzhe1k+4Sg0ipa3ln5fdFCWCmxq09KTUkxbptlEwH0o=; b=cmOd9C4jOv9733vSgxrIYqgmp8Eiobb5Stm07/gooLWPg4DeBvcTN6hTebKSzhhhot mrn1e1iu8SwehJoL0oREHrubLUsoFr/a5joWDChKk2sTBPEk422SpNyhB5DiGG573qB8 dfWzlZz/LQFDkcFAJqSlHfMc4MPjKgiJ+B3nwR3qUnB3LsviJIeAPwtDDBQTccTd75fU p5ZgbW4MZ3ijyDzy339wm6YLZFTgsnpHeB/X3nSlc/kP1AE2PTJaqu2Id/MxVtcoMrtn 5V2sKJTii1CXABXlSRriCHknsotLzyiwYI07gsojtldtrQXuPmoly6u80tTK76nVEvqt nheA== X-Gm-Message-State: AA+aEWab1YjS7MhjIzbvCE6Iz5di2t50eGP5ZW3kXdcAtJMEBmZAmag8 u1gM00waNwu7yQfn5ctY/vkc+49Qsqw= X-Received: by 2002:a62:29c3:: with SMTP id p186mr6786256pfp.117.1543603392931; Fri, 30 Nov 2018 10:43:12 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l184sm12743147pfc.112.2018.11.30.10.43.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 10:43:12 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] coresight: etm3x: Deal with CLAIM tag before and after accessing HW Date: Fri, 30 Nov 2018 11:43:05 -0700 Message-Id: <1543603387-32645-5-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> References: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch moves access to the CLAIM tag so that no modification to the HW happens before and after the CLAIM operation has been carried. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-etm3x.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index fd5c4cca7db5..6f30d52da9e4 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -363,15 +363,16 @@ static int etm_enable_hw(struct etm_drvdata *drvdata) CS_UNLOCK(drvdata->base); + rc = coresight_claim_device_unlocked(drvdata->base); + if (rc) + goto done; + /* Turn engine on */ etm_clr_pwrdwn(drvdata); /* Apply power to trace registers */ etm_set_pwrup(drvdata); /* Make sure all registers are accessible */ etm_os_unlock(drvdata); - rc = coresight_claim_device_unlocked(drvdata->base); - if (rc) - goto done; etm_set_prog(drvdata); @@ -422,8 +423,6 @@ static int etm_enable_hw(struct etm_drvdata *drvdata) etm_clr_prog(drvdata); done: - if (rc) - etm_set_pwrdwn(drvdata); CS_LOCK(drvdata->base); dev_dbg(drvdata->dev, "cpu: %d enable smp call done: %d\n", @@ -577,9 +576,9 @@ static void etm_disable_hw(void *info) for (i = 0; i < drvdata->nr_cntr; i++) config->cntr_val[i] = etm_readl(drvdata, ETMCNTVRn(i)); + etm_set_pwrdwn(drvdata); coresight_disclaim_device_unlocked(drvdata->base); - etm_set_pwrdwn(drvdata); CS_LOCK(drvdata->base); dev_dbg(drvdata->dev, "cpu: %d disable smp call done\n", drvdata->cpu); From patchwork Fri Nov 30 18:43:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 152582 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3989809ljp; Fri, 30 Nov 2018 10:43:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/VNZ0gT8AcS4Bf6yo4D1aG+oQA2sOMliEK6vsQ/r61TdwCuAFpJMXlwBMC9dPbO4TrxSqJT X-Received: by 2002:a63:3e05:: with SMTP id l5mr5339314pga.96.1543603397987; Fri, 30 Nov 2018 10:43:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543603397; cv=none; d=google.com; s=arc-20160816; b=aqI+dPhwE4rOt6HvjRHyH+/cQoBUKnBoaYM1dU5nUQuSFU+rJ0c/g+e2RZIshrWt2t uJ/miKbESZrHm7B5clrLtBV8un2fWzfbh+uuoS9+tc+opp78scdqHddB+m6koRTgE6YM E/Ug8uP+VWxNz1mdUbPV0CDhHKgtiSzN/VkKuesShRvr3YZAL3DvcUky33WYN7th4LVH j8QT24QHxS6BeZQ3MSh8ghw7UQH8YmWY7LVp0qRFtvhnm/NWZu2xQ3jyUjVITQ2GcRQS /ACBKHC1W3DS3nCjHtN+3aV6jJlFk34QHKcm04J3Rj6XlRSpOsAFWQ0Gxrj0/nTQqejw 55OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=c70yC8nTUX49YKlETWoE+QkSk9SIJlmG5ulj2mcAOIQ=; b=oDt2wHCXJZQ3SnaGpwG7vYraje5/QY1OZmrqMf2W2cqWCXxdODhNAgK5xJMp4+CNJM v0VINZ8ir8r3B4Qg0dZ7CFEfSdUguQp3TseUaqL6jUnUBFUUijUEEthHmAmO3Gnw0QMx ug5bQDP99cAsgIaJQ0C/+1bANY+7g7vypAo/h231A7tynKhmKGZHI0oEpU7nbbbP42OZ a7jNEia1jHPJIZk8Ug+5ufIaYLkHs+z+8INT48Q6SlsjQ+fFQrqH5LL5DHBgC7cMLgW7 oWRRUvX9kRDR4bwWav4TMQAuk50NFCLC4nAaMoXy5rLA4gbeQWxcWWAnU5isfS8vGKoV tnxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HasY6LQt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v35si5549086pgl.130.2018.11.30.10.43.17; Fri, 30 Nov 2018 10:43:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HasY6LQt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726924AbeLAFx0 (ORCPT + 32 others); Sat, 1 Dec 2018 00:53:26 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:32891 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbeLAFxZ (ORCPT ); Sat, 1 Dec 2018 00:53:25 -0500 Received: by mail-pf1-f195.google.com with SMTP id c123so3239063pfb.0 for ; Fri, 30 Nov 2018 10:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=c70yC8nTUX49YKlETWoE+QkSk9SIJlmG5ulj2mcAOIQ=; b=HasY6LQt1kbAfq6HXFV0B4/cxttvkZ5qDQxWLYxJwURXGtGt+IFNl6b7i/Le9BSliE N1hXLFUfFfhxNcZVFV/YhkWv6metAzkUiggaHlRr5tl8WUxqLnDFSJTOeQter7MuF0/+ p/asvmqul8e5yGAsEwGJmPoIW6ni/dnP0qpZ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=c70yC8nTUX49YKlETWoE+QkSk9SIJlmG5ulj2mcAOIQ=; b=EKUpSmIUQQjaOCWmVNyTVXi4z53EYMaPgC82Wq6o0bPAxQbV+VSXRtqg2QLQFsOW2v UdBqrFJlzwxQyjqrh3E+bt4oo1Y61HiSW63886I7gI7YO6yfiiDIn4QJNHI3ox7uYSUo FJU3evrVQANFFlwr2l/ntAePX2BvUfpWOJHuPmkEMI07YdhvLMDzf1IJI9c7F31ShF35 TerwC+rJJjxSIyPg+Myvfs4Kdo89yDrX9c2BtmlHFdXP3GvS8CI9r1QJFDlk3EAzV0gR b0wsR1xT2ukwFbDM69I5i0zHjOgPTTFfkb/4X1h14Pvv0638q4OzFJN91psvFQ8F7cCr wPQg== X-Gm-Message-State: AA+aEWY14YYDSL5un1HQwaQXaSCZ7nR/7Y1qpoVSQToJqkC5+RNnKUV5 EZ1y38WN0uLluwlfSaJzFqDpXQ== X-Received: by 2002:a63:4f5e:: with SMTP id p30mr5734462pgl.71.1543603393874; Fri, 30 Nov 2018 10:43:13 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l184sm12743147pfc.112.2018.11.30.10.43.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 10:43:13 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] coresight: etm3x: Release CLAIM tag when operated from perf Date: Fri, 30 Nov 2018 11:43:06 -0700 Message-Id: <1543603387-32645-6-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> References: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch deals with the release of the CLAIM tag when the ETM is operated from perf. Otherwise the tag is left asserted and subsequent requests to use the device fail. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-etm3x.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index 6f30d52da9e4..9a63e87ea5f3 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -601,6 +601,7 @@ static void etm_disable_perf(struct coresight_device *csdev) * power down the tracer. */ etm_set_pwrdwn(drvdata); + coresight_disclaim_device_unlocked(drvdata->base); CS_LOCK(drvdata->base); } From patchwork Fri Nov 30 18:43:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 152583 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3989816ljp; Fri, 30 Nov 2018 10:43:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/WFwKddgEuT6Lfbc+pwM09fbHq3Aa23XAduiXH+0NG+0bLRG39j26k/higp//q/WlwoVLXQ X-Received: by 2002:a62:42d4:: with SMTP id h81mr6635050pfd.259.1543603398411; Fri, 30 Nov 2018 10:43:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543603398; cv=none; d=google.com; s=arc-20160816; b=p17trz9JRee2EC2ZczluazJiFHaELeOjtFiXEesUmBeLjSlhq+7LbzDSPgYA1k0CQM qfPxXGNNyUuzuS1D3RUFqEwpldDmZJNy6PUwnuohtSBhF2OMRJF1trNW12wH284SLSgm n8AmnIHZrZZa3p5ZXbSSxAZZQCKABZxt+fnf19AEzbmNWU7gXXpzaKfw29Fg0pSupIT7 Es+ty3crBEkBDOzZOXsJXgcbhRp2quvkwOwEOJIbznURva3LlzS0GT0hS3iB/c94HMKR 4BZl0FM4eBoYywRNIN6DC0IaZACr4QwazDmQ9/8BEAng6t/BhoY2Z2lWy5s3Dc/UNuqM F9AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=IG7KRCWaojU1bB2x6elFS8JLJg5OGapgO5FtAnCgCzM=; b=ajfFr+4ouLOfw4UEnFcd6CvlFv+7FGfUmOaWY3FHI9wEg7lu+hYHuWIRRUoxgGuRWE vQCrPcj36cHMx/Mholvk3YEAbhMITvfZ+9JyHFy7wgLVdX0hz3Y1lvIBq6jJJCPdKFi9 aL0686W4PbyqJGVNzCA1mTY4GwMOtcMY8KX8LL1D49nan6fq8tpPLBxc6xymPpcgxY+9 p3zkSNGLJp85I9nfDSCsEfxgAn+XPRgll1/Oa8zR9ImOAncmSArytXAlzghD3/QZV3a5 6KVX6usdc/1K+jnAxmaXkVgkrmjbIKYWBJzFN0lAK0Kn/ieRex9tbGqDHd+qDI0j2Aa5 vwSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eR81Gzpz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v35si5549086pgl.130.2018.11.30.10.43.18; Fri, 30 Nov 2018 10:43:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eR81Gzpz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbeLAFx1 (ORCPT + 32 others); Sat, 1 Dec 2018 00:53:27 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43611 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726895AbeLAFx0 (ORCPT ); Sat, 1 Dec 2018 00:53:26 -0500 Received: by mail-pg1-f196.google.com with SMTP id v28so2856085pgk.10 for ; Fri, 30 Nov 2018 10:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IG7KRCWaojU1bB2x6elFS8JLJg5OGapgO5FtAnCgCzM=; b=eR81GzpzDzdMjHwlH7UN8hQc2PhFXh4zxkagfQpuLUEoJz/H3yCRLL4gV6X7c6pL2g xOIZZUGPma3AUQJsZIb4UnRjn3c7Ez6dWs+y1LRv28eyBAa298s25pm+O1kOCe6zbokD je/h9wBxtXRRbXRY8jrb8Je0qcjAi8kN7JyMs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IG7KRCWaojU1bB2x6elFS8JLJg5OGapgO5FtAnCgCzM=; b=TNCniwNF7dbp2wqUEf7cuyhvEZejGWh+TzPbnW2xr/9EE4bs+rZKQiLDksyWQJ/GjG w6E83xMBQZKBZ03wDvBQD6l5KugLhXEfDuXTQHHhaTtZKcgVkaHpqBAm0MQG8IQvDoqA gOgYtSSKNsKwNC2GzzlH+aTNePonL+lvut2w9SJHL9CyDOo/R7UlTa8yvWXoi+fU9W/h hT/SvVo4iv+9b/AKLJ9vu0Dt5jGXOAYD8mElZn2lC6AjvZvfeq+RS5bmPGG2HpPRJ9/o eKIoiANAjxypK4VRqnKobP28iibD57smo0xte09E0uEv6OTbOva/ewbuSzAs4ste36lD qhjQ== X-Gm-Message-State: AA+aEWY9fhhcUw8aZ7peSljXnHtCuX0CItasWaSrSffP0nnXpc038i4H SMrsO8yO7Ov+FpEBlz9qdXt3w7d+Nbg= X-Received: by 2002:a63:9749:: with SMTP id d9mr5591505pgo.415.1543603394789; Fri, 30 Nov 2018 10:43:14 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l184sm12743147pfc.112.2018.11.30.10.43.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 10:43:14 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] coresight: fix spelling mistake "deffered" -> "deferred" Date: Fri, 30 Nov 2018 11:43:07 -0700 Message-Id: <1543603387-32645-7-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> References: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King There is a spelling mistake in the dev_info error message, fix it. Signed-off-by: Colin Ian King Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-stm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c index 35d6f9709274..ef339ff22090 100644 --- a/drivers/hwtracing/coresight/coresight-stm.c +++ b/drivers/hwtracing/coresight/coresight-stm.c @@ -856,7 +856,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id) if (stm_register_device(dev, &drvdata->stm, THIS_MODULE)) { dev_info(dev, - "stm_register_device failed, probing deffered\n"); + "stm_register_device failed, probing deferred\n"); return -EPROBE_DEFER; }