From patchwork Fri Sep 18 16:26:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 53934 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 6B2E9218E3 for ; Fri, 18 Sep 2015 16:29:46 +0000 (UTC) Received: by lbot4 with SMTP id t4sf18856525lbo.0 for ; Fri, 18 Sep 2015 09:29:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=XiFPlfKCYNTVH5XJLizmaXkwQhNsqXlzpt0w6ovmmqk=; b=QhzOFzn5UHMvQRUv1zVPsh7P3d6i9GaIcKJCtcp0qHkU09i8gEMynrpg4sQyrvgmuf GZx/VqWoFvhQ0x/3RBncMcDVfdV9EwR4nLD1QkAle5IPH7ugwqttJEZiu4iW0MKOboIN tnvxrr6VI78An7fShC/R8XA9UGi/SKfY96vCy+cnzp9p3nClrrlsdtygIZt2e7lekOdE E0hFcWxiLr1UrVHjUcABVM3Q+QY3788kFpELEdPSAd45WtOCZge24xzz0FX8+C2+CluC Qv5JA+JdVD3gVVONWW5IWL58jUpcE0aDU3lAJPMPhYIIBChp2WB0fYNbd58VoBnRgUOS UAHQ== X-Gm-Message-State: ALoCoQn8PeBMyfzEPS5cWBNsPGTbY2caT/CqEL5b4vIT7PxRbnvNjlOAP4dOi89q0aDs2WPD23j0 X-Received: by 10.180.10.202 with SMTP id k10mr4365608wib.2.1442593785424; Fri, 18 Sep 2015 09:29:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.234 with SMTP id y10ls253966lae.62.gmail; Fri, 18 Sep 2015 09:29:45 -0700 (PDT) X-Received: by 10.112.17.105 with SMTP id n9mr3655894lbd.78.1442593785276; Fri, 18 Sep 2015 09:29:45 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id th8si6596355lbb.153.2015.09.18.09.29.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 09:29:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lamp12 with SMTP id p12so33048482lam.0 for ; Fri, 18 Sep 2015 09:29:45 -0700 (PDT) X-Received: by 10.152.37.135 with SMTP id y7mr3608112laj.106.1442593785131; Fri, 18 Sep 2015 09:29:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp402694lbq; Fri, 18 Sep 2015 09:29:44 -0700 (PDT) X-Received: by 10.50.2.68 with SMTP id 4mr14654889igs.7.1442593781741; Fri, 18 Sep 2015 09:29:41 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id l4si7529900igx.27.2015.09.18.09.29.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 09:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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 1ZcyWZ-0002yv-Md; Fri, 18 Sep 2015 16:28:35 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZcyVj-00023v-JY for linux-arm-kernel@bombadil.infradead.org; Fri, 18 Sep 2015 16:27:43 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by merlin.infradead.org with esmtps (Exim 4.85 #2 (Red Hat Linux)) id 1ZcyVe-0001RX-Rn for linux-arm-kernel@lists.infradead.org; Fri, 18 Sep 2015 16:27:39 +0000 Received: by padhk3 with SMTP id hk3so55049242pad.3 for ; Fri, 18 Sep 2015 09:27:10 -0700 (PDT) X-Received: by 10.68.176.227 with SMTP id cl3mr8276097pbc.8.1442593630488; Fri, 18 Sep 2015 09:27:10 -0700 (PDT) Received: from t430.cg.shawcable.net ([184.64.168.246]) by smtp.gmail.com with ESMTPSA id la4sm9847027pbc.76.2015.09.18.09.27.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Sep 2015 09:27:10 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org, a.p.zijlstra@chello.nl, alexander.shishkin@linux.intel.com, acme@kernel.org, mingo@redhat.com, corbet@lwn.net Subject: [RFC PATCH 06/20] coresight: etm3x: unlocking tracer in default arch init Date: Fri, 18 Sep 2015 10:26:20 -0600 Message-Id: <1442593594-10665-7-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442593594-10665-1-git-send-email-mathieu.poirier@linaro.org> References: <1442593594-10665-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150918_122739_039430_EA69E0C9 X-CRM114-Status: GOOD ( 14.02 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.220.46 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.46 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: al.grant@arm.com, pawel.moll@arm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, tor@ti.com, mike.leach@arm.com, zhang.chunyan@linaro.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mathieu.poirier@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Calling function 'smp_call_function_single()' to unlock the tracer and calling it right after to perform the default initialisation doesn't make sense. Moving 'etm_os_unlock()' just before making the default initialisation results in the same outcome while saving one call to 'smp_call_function_single()'. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm3x.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index c6880c1ade55..a4c158df0fef 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -1867,6 +1867,11 @@ static void etm_init_arch_data(void *info) * certain registers might be ignored. */ etm_clr_pwrdwn(drvdata); + + /* Make sure all registers are accessible */ + etm_os_unlock(drvdata); + drvdata->os_unlock = true; + /* * Set prog bit. It will be set from reset but this is included to * ensure it is set @@ -1961,9 +1966,6 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id) get_online_cpus(); etmdrvdata[drvdata->cpu] = drvdata; - if (!smp_call_function_single(drvdata->cpu, etm_os_unlock, drvdata, 1)) - drvdata->os_unlock = true; - if (smp_call_function_single(drvdata->cpu, etm_init_arch_data, drvdata, 1)) dev_err(dev, "ETM arch init failed\n");