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: 10707021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC28E13AD for ; Fri, 30 Nov 2018 18:45:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC5D730539 for ; Fri, 30 Nov 2018 18:45:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A092030546; Fri, 30 Nov 2018 18:45:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2DD3730539 for ; Fri, 30 Nov 2018 18:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ilpeG64+88uLNPxdkBLUmPSwVO0lxOXsrrTPCtMi4dg=; b=lJQchRJygkup948S5sQlTGUsM5 RqC2OJXpO+vmoCYpG70gibtrMTTQ8Qwzvj0jkOXk/hT3NUQ/3TVMjI8P6fl3TkevTS5/6CgGAotWR K/W8wc/apB8Vgpinf96rA3YKnibwZSjTI0uMsi9UA5hITMgnFJhJagCuBMtrXfSpPPevqEdgiWt5D WEsp3uFtdH723GiC8oMdwLkTfaG8elWYkpFAxIhyxOLus4ofQdvpeCkM9q4rHIfizHkZEyC+RrSNs vxJEHCl4f9BQQCjs50tnFNi0fYjk4hFQUHUfo7gaajwYUc5xCtbBIp3UCHgT4Aazb5oY8lgIWPhv9 ltwe4hmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnnE-0002xD-9q; Fri, 30 Nov 2018 18:45:36 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnl2-00008b-Nn for linux-arm-kernel@lists.infradead.org; Fri, 30 Nov 2018 18:43:23 +0000 Received: by mail-pl1-x644.google.com with SMTP id x21-v6so3217301pln.9 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=ArV4pXTqdcwx+9/R/MUg/ntLH5U5NHQMj/a5Z7xgB9sQlwl/5ziBYejWgZGKRfXTp2 ff0AMEkVLMD8amJ3Ifr+ijsYe7anku/asEdDZqC9W2AaKAlkW54p4ZLIka/TpzcMTpkR wyShHMukKwsiNk/xG6p21mlFaYiGnSbCa1iB4Nx5g5TczLEAoYBz3RYiQ3zgXvxUVbV0 pKqv97vWY+uupI1rEjNhB8YwzfI5Ro9W7sy6+nRWCFSUbq6cqMX0fsN0xLE/E4szlpm3 RlRYbjZYVeGTX9e3bG9TkjxqvohniyC1cir87Qsq5dg0iu6f5qQrQygTzgVM5O7GpRI/ STpw== X-Gm-Message-State: AA+aEWb7a1XhBKIeILobxX4rHfZOKWhuPA2ZWnltRKOuQIIOpfn8aapL eKg7gW7ens+NRbeIqjtt3j9iIg== X-Google-Smtp-Source: AFSGD/VALCb2sV63kLNOIYaARePo6KW+5Uswi9iWGnIpsSkgaT+Dm+bRhO22GrKkrk/iOVvRTz6YcA== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181130_104320_772163_3039E9F5 X-CRM114-Status: GOOD ( 16.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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: 10707019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A357814BD for ; Fri, 30 Nov 2018 18:44:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95342300C0 for ; Fri, 30 Nov 2018 18:44:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8941430180; Fri, 30 Nov 2018 18:44:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1C9D4300C0 for ; Fri, 30 Nov 2018 18:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=MMiJ4N3DvXOp5xYCg7gkMQEPo+mxy7RoN86Gu2BUAmw=; b=esp3vz981R8KCq3wfAaQN/gbg3 3dswg5SNZKuZjySCncOp6MqbdyU7f34aXzpE4qMR5Q4acmPmz4o94ds60o430ywjbwh+WIBtkSddj MBnY89che8CvkmtDrnuhuvc3OoIIxf1fUoQHP5vRlQNxrw82D/fEwiNEZ+dpcCbvpbs7YX4kheUds xjxAAt1BGZ6fFlJk6c3RhGc+5ZRs1UKyD8lyP3uFdF/xJbDsAxvMprrhh4XI19kzvKztjWBmEP59r fruZ5Nihe/S7K+yekT0zciszq0riiLmzOjoWrWfpKMkfmgrDL56bhi71S76B5+WM9D1nIF5jTkahC Ta00Cdfw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnmP-0001O3-RS; Fri, 30 Nov 2018 18:44:45 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnl3-00008d-Js for linux-arm-kernel@lists.infradead.org; Fri, 30 Nov 2018 18:43:23 +0000 Received: by mail-pg1-x541.google.com with SMTP id y4so2848285pgc.12 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=I0a9ZS5BT6AqZ0rZwLlmLRG9rbtazcSUfbNUgOAa+wo13N2doHQfxP6mDPyBnUFFIy ooGJRXzu8BJ3520uEH7Q//dCXt/t/ms7WkV6XT90Nrlkm7CkjCQZJTbIqSsJ/fY19cco Wk0ps0kUAiBRn01sHSUu+8wwZyigU4C/26XJh8bepIk9zeTY8f6sex1IKfPVRqCkKsbF WhukWWwYpQqFRL5s7bixjAXJIPncdI1U2vW5pp8IjXN5F7D9vvlTbVylpk2NafSXWfkZ H7qvLGHW1WoyR8YpwYa5JY6TOMRY6nHwqYtkG5hWKEQh1U4+z/IXZ4adcHJTfVZ8a8xc h4pw== X-Gm-Message-State: AA+aEWYhrnVgRigkCT5bMVj7cKixnOVcq//kVndIEDaDBitF42rnzbm4 Zhfr+waW7qxz/dIf2dkNbUYKQw== X-Google-Smtp-Source: AFSGD/VE5EDFBI0bjI0ygEYfWERifZ67R/F6hxXNy/YWh0YkeVg1IRgMC1z0Jeq/xRXvQke1Fjsugg== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181130_104321_648157_6DF54B6C X-CRM114-Status: GOOD ( 16.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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: 10707013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1E3E14BD for ; Fri, 30 Nov 2018 18:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3391300C0 for ; Fri, 30 Nov 2018 18:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7C4230180; Fri, 30 Nov 2018 18:44:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5482A300C0 for ; Fri, 30 Nov 2018 18:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=rpz1y5suuu/O6r2uanmLbZqf1Ic/wiy7lg84s4j7cBU=; b=f+pyC+FXQxe3K0s+woD3LeIXlz 3MCimKjZYkhtVglrXdfLJiACv8ZzbvTJ9vaal/NLUn+wSIJVmHbBYlbsh/xcHUOvMYNm2Zp2BBGfv wopPC89pUxorsXre2B36b/p0DRId1Ohvw0XLrbnYwA7GP+HUb7YLb1zm4cgC5ZdmYqpIhQGG71I6S p2tc07gFaqibxNml0ST1kybCpB2/8dYsB8RDGOGB9vjGNYRd4jWPgq6ebTppoFzUNPwUq9jsN8sge YPljPHR6wxxvsYQCJru9OZMbKPnWeNUpNUoH2vTKVB4NhKglW/1vJLEjZuwSG+aWYbO4OMox/0yw5 IUcOzjug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnlm-0000kx-Bu; Fri, 30 Nov 2018 18:44:06 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnl4-00008g-H9 for linux-arm-kernel@lists.infradead.org; Fri, 30 Nov 2018 18:43:24 +0000 Received: by mail-pg1-x542.google.com with SMTP id y4so2848297pgc.12 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=lq3jdIbyC9ZZwDNSXspueQ6PjkIzInKBRJSmlr7tOmEISEqlE5COzmi2V/QZEXpo3D yaxkeFWPxTHud0k8/P3X40hknZK+wJ8BIOH6Y94Q1ON2HiGj38crJ8vzfmhgI7H1yrZd /JAzV7v/eKkEQpLVTIAXdJTq5ENw+dzl75oWpi2gpUXG0BIhMI38DsRmme7ktt/+G1bn Fe6IPUy7hR4jobw/GhViVjzgbzfJI1hbOt45hxw02mVkn0YYONkjHNJ3pOvNZ67E//uL XDhkQK9ESt4D3SJj6DGSmljhxWQjJkOdACXPZMTHZqdECBJLEdVsoUmTKrI2J/blfxp6 bmkg== X-Gm-Message-State: AA+aEWZfxSYOYKBKKqXa+7hLLQdrIu6CFKa54cyWo2La5liHwJXgUnCV mBL0YO5usw7862KiYzBnP8bzaw== X-Google-Smtp-Source: AFSGD/UZy7zWwm4JsDtF8rlBsET0+PI69OZOzPIlytWx/XBEcg/oYw6hn5webSmFz8TovtjTTzOxzw== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181130_104322_570861_46A9D361 X-CRM114-Status: GOOD ( 14.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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: 10707015 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E7F6B14D6 for ; Fri, 30 Nov 2018 18:44:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D99BF300C0 for ; Fri, 30 Nov 2018 18:44:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD99030180; Fri, 30 Nov 2018 18:44:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7E000300C0 for ; Fri, 30 Nov 2018 18:44:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=3r9etLEHGU2T4hjI21vcqPKAnUKvIATtmPRNEB1/0B4=; b=oip8a1WFfRKVT0i9royzYH3/jx HdIF1mtiKvxOKbpRNt3EDKDG6010CsjFFmyBHWREkfBpoBvvdIx9Sz0SLb6h/J76+npfT5lGlHoXC gEEfo16klW29fCy9nbXSs07S5VpV9m9p+oztNshvBjDK0XqkPQFMBRPxwDijhAWVqBgDk5/EtzeSx WQSGdJ3ePnMZCiK+H1fQZOXWB6ewlrQKjwqthE3sPcP8U7UPetjI1PJOWUN1EePo4Vv38/RRDraUG PNnGkGvMm6t/PkGdrEPBzC60nX0sHi9slByBDbfwiBUhsjRuAc6Hk9Fkdlt6WSZeip0yZ+UGsVX5F d3J3TlkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnlx-0000tr-3W; Fri, 30 Nov 2018 18:44:17 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnl4-00009m-H9 for linux-arm-kernel@lists.infradead.org; Fri, 30 Nov 2018 18:43:24 +0000 Received: by mail-pg1-x542.google.com with SMTP id z11so2879266pgu.0 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=kQMl/UeWgc4Oe47nB1YDl9FIkME6gVz5KpgAvq/3Aw5CK8KKrqvrbNgdjFnLPDGKvY GcyRu6CxiN5HjAQ4vLs6KJxW1CIm/kv/JAfvyG7YUcdxanc4YgzJ9APvDZAF/+9MVoCo rNSCkcmPwmx6Jod65ebbkcIpVxEM6W57Z0mPsgsCOAz41x20UXiq4s1/+5DCGUX2sE9R XkItRvtKj7spDtWJU5cIYogbKWwbOxs8ptmG0lcLliMJWMBeCVbNGewI81fARg3CRhDY 7xC23GVgRgs5LQfzFMTUotGo+vTN32/XLtx6Gy+EvAJivtdIZHIcoj6Uf+iVlIDunam8 51uw== X-Gm-Message-State: AA+aEWZM7k1fzjA5Vx0wuCwIRosZu4S1owblErOTWK0kKdT9m4RCkD1t wrmg6DiKK+G/MNsB0AEl/7HJaw== X-Google-Smtp-Source: AFSGD/W3ekytdVJf2nhR+dvTK42U7K/Xnadujo5YqyNEAmBTMNMTRtiirtvTtCqBqMduV3Ba7VgQyw== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181130_104322_562107_B085EBB0 X-CRM114-Status: GOOD ( 14.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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: 10707007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5ED914BD for ; Fri, 30 Nov 2018 18:43:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9743E30542 for ; Fri, 30 Nov 2018 18:43:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B54630548; Fri, 30 Nov 2018 18:43:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3EFAC30542 for ; Fri, 30 Nov 2018 18:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=NahXxWku/pBIXDC9VjwO+Z00A8EnG6McRMrMQe2rvUA=; b=BHV5T7WHnGVaf1nf6Rfm9IW0Bb ixVX6cyi4IofU9rAI+ebBfCrFTm3k8FyFmC2ghPHccbfI36+GkxPiEh++wyN/Wn02OoaOYellsv8U z0mXF+IYC75WDTt2I9fAVEm6Z1wEsW4agUeKEAdRqghjGgJGdr0BMrBAPR9w2qkkTx6ZpMikUYQCn WgpsPf5r5OShsk6aUDZ4y4Xqw62wTmDRa7zzJxLDce2pDq7OiuNZybFPunbLWl66jaiZsLJ35SPdh ugEDSTqB33kneex1rM4Z5m71uZG0JLh7dQftrNxxxCW9xz/TCJ4ukgU4ILJvoGZq1ysAnjxx8XckZ frMWVvrw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnl5-0000DR-CP; Fri, 30 Nov 2018 18:43:23 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnl2-0000A6-8p for linux-arm-kernel@lists.infradead.org; Fri, 30 Nov 2018 18:43:21 +0000 Received: by mail-pg1-x544.google.com with SMTP id d72so2859876pga.9 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=rFkiihMXH9YdioEIME0rV4faHgnf7P4sllgRZQdgn6IXDyGjxd0DEtsKAuXKorDxPb NKECZUQSgK0/m/Ag3W33b8sNqQm7pQNFXiIBGYvlyEw8CYhgyXLtT2nQBKYuc+JRNj8n D+t+QZzAkyLDz5Zn+5uGJzXLRbFGxnHTQJnubu0EbqK9cwvBx6ZfHuOjkXapbhm7z1K/ lK+USh5Irb+O5EdNaShW74nL96gi0mw7ccgSV2Z/7KNQJa9d5KBERiIpuXKZNHJTJj0C gLllUrlCy0i9aEqA2p6ONRge3N9j0R9Uy5KLcMEw3ymyk6fV17+CwQeL+PeaOlz4Gidt 1L7Q== X-Gm-Message-State: AA+aEWaf9LrjnBwploFCILhJlZVoXLA6nw0y+vIRjC8mhqE7vJTHNHXG x7j3Bx/uSjFuOQpt/GYmF8oRsQ== X-Google-Smtp-Source: AFSGD/XzNHY9kWDpwaeQcBGsnouBEkdj5n/q2gSqwQ/Jg+tVRFFP23O62II+IEaE8Low4nMRLrIzbA== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181130_104320_313545_61E6DD27 X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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: 10707017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A8BDE14D6 for ; Fri, 30 Nov 2018 18:44:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98FF9300C0 for ; Fri, 30 Nov 2018 18:44:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BC9930180; Fri, 30 Nov 2018 18:44:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 246E9300C0 for ; Fri, 30 Nov 2018 18:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/n0ldOAC97OiuwBe32+rbPaKhB/WmAtRYtKx2iMW1FE=; b=iOIE4LQqXvms5vfoc4UFjV8/BS epM7s8fn72pmw01jOhAOIrMFnQtlpqJg9CRyvxbXF3xEV6n/qnxrD872CxkiJLubbs30bOBd20eed 1Tl/NZ/6Ko50ns8yAhqzd8doBGy5+D/SVJkqN+uOPDk2UrkPoNSfF0Vx4bsBEWA9nbVjSq2vthjt4 dXrue3uecsVCLtbDr2M7CQ/A41IF8aKcKlGin+F3NxK3JG7Z7ycEF5nlLVQlMh+KG2SggKyGRnmbD DMcgafZq5MTjPZ7eeGQ3Ubup7kRdBHypih0IXQPACWWFabOm5GL8HLO9yIRFxH+KWDHm1il+8XB+M IRJqe2eQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnmB-00018U-59; Fri, 30 Nov 2018 18:44:31 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnl7-0000AE-F6 for linux-arm-kernel@lists.infradead.org; Fri, 30 Nov 2018 18:43:29 +0000 Received: by mail-pf1-x444.google.com with SMTP id i12so3221808pfo.7 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=cnCj/JxXZWu7PosrxsX9K87wbyeGUAAt0JEpIPo/wYUgsSwGkGH2tJIAInTv71+wZQ JHP1Vfbwghhb8v6Yn1dOG0mpY1Ty7od8b1IXbHtoYtFbaqqeDbl57Kc+4hYhMzXLZfn7 4fPT7wEP9EThU8lmEqvC/cYkfLxTPoun07Qph+PuNEDG1w/6UiDypZI4MQXviPt6ufXW 5P5tJBH2XK2fVHybtyMkUEKOX/ZnL4Hipe2uRyft3EpPvt0bCB4KYBjCB+wEKn5mKdaf Idr9jCC10crE68lZM0CKNo10exFg2hgDDW8nRB99FtPxlIvmyjaZ7yS/bSyoAQnNkMBt eBpg== X-Gm-Message-State: AA+aEWabuuJb3g27pQRWj45wlZOUJFoPgyEKsMp6Or5viQmCcOiaH5ZD /VYKmY6kfcb3J6NhUx8k+kNDag== X-Google-Smtp-Source: AFSGD/VruTurxButpnNWTJKd4LeKbbF5ewudhVyxxtbRET00jIeRD7eFXTLI25rW5Panaj2uw8Kn0Q== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181130_104325_872455_3D3C1AEB X-CRM114-Status: GOOD ( 13.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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; }