From patchwork Mon Nov 23 18:33:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 57173 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1602422lbb; Mon, 23 Nov 2015 10:34:33 -0800 (PST) X-Received: by 10.98.14.75 with SMTP id w72mr17900216pfi.166.1448303672062; Mon, 23 Nov 2015 10:34:32 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zs7si21650234pbc.125.2015.11.23.10.34.31; Mon, 23 Nov 2015 10:34:32 -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; 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; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754987AbbKWSeU (ORCPT + 28 others); Mon, 23 Nov 2015 13:34:20 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33292 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754917AbbKWSeQ (ORCPT ); Mon, 23 Nov 2015 13:34:16 -0500 Received: by pabfh17 with SMTP id fh17so204845086pab.0 for ; Mon, 23 Nov 2015 10:34:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kpLf532a/C3BWhV5MguyABNGhms3XdtB/nFLQq4rmnw=; b=joEFLqFMlc4oQHgCNpguPY92QdbWMDjJitL/Y4ErXhi51yRKq/2WkXTmBR67CaqFXc Ot07GyZ5nTTODbJaNl8CA0mVtECaLS2JwsztjwMBYrRJ6AKqYpXKNOqFHmcWQ0mQsPQM 301+q+J3YbCUEd339sEQSLpw4iX+jL3Fv9CCG9fNMaBQN5opEQ0p3dTf3/ClSDxFxNHR /msaHj+e/aCERXtVn12VILIc/mQc2Ci3sT1Isf4Fj6yqROZv6WYFi/tgAT0/ZHg/73uz fVHfWcJBsT47+KdgQYK4kllnW+TKEcKvPC6wzlveczFXSVpLqUSWylTkXjHdqkLeT+Oy A7Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kpLf532a/C3BWhV5MguyABNGhms3XdtB/nFLQq4rmnw=; b=MI43uef5NrAG7HKLs3hEkPr2wrx92Brvqxof8js9VFWvFY3J9K7vocm3gqLEcra/zm iuAmiK8hb+zN1pzl0YCK8ck/UAy8bGCQgTdssplRl1T51gOGBTGK5QcAOR5rDV8+ANGU +kf+C+OS1r7CVAmQwQ+lsy9KXOEOn3GJrDobSpZPVERycMX8cWYagSjj8se6wUEepdky jXyzE8rF8XB3leEqvgPoDf/BbMT1IV+sQ2Bl9Lu31HnPMa83/ew2ME1ySiSFQklmPb7A 2/aGtUgPFyXlqfSICmVOZ7C61c9O4zY1ktcRUtRzhMt2p/mA5kfQBlNguANOQA7p0K4e XQwA== X-Gm-Message-State: ALoCoQlybRbLseAsCTb2kepBgjksAXylL1mZM7HQdonhtnVx28JPEult/WRQgWP43FLwgN+jVKDd X-Received: by 10.68.142.74 with SMTP id ru10mr37152535pbb.157.1448303655832; Mon, 23 Nov 2015 10:34:15 -0800 (PST) Received: from t430.cg.shawcable.net ([184.64.168.246]) by smtp.gmail.com with ESMTPSA id r20sm10865186pfa.93.2015.11.23.10.34.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Nov 2015 10:34:15 -0800 (PST) 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, nicolas.pitre@linaro.org Cc: zhang.chunyan@linaro.org, mike.leach@arm.com, tor@ti.com, al.grant@arm.com, pawel.moll@arm.com, fainelli@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH V4 11/26] coresight: etm3x: changing default trace configuration Date: Mon, 23 Nov 2015 11:33:03 -0700 Message-Id: <1448303598-11249-12-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448303598-11249-1-git-send-email-mathieu.poirier@linaro.org> References: <1448303598-11249-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 Changing default configuration to include the entire address range rather than just the kernel. That way traces are more inclusive and it is easier to narrow down if needed. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm.h | 2 ++ drivers/hwtracing/coresight/coresight-etm3x.c | 29 ++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/hwtracing/coresight/coresight-etm.h b/drivers/hwtracing/coresight/coresight-etm.h index a8663780a908..f01862fc98dd 100644 --- a/drivers/hwtracing/coresight/coresight-etm.h +++ b/drivers/hwtracing/coresight/coresight-etm.h @@ -146,6 +146,7 @@ * @startstop_ctrl: setting for register ETMTSSCR. * @enable_event: setting for register ETMTEEVR. * @enable_ctrl1: setting for register ETMTECR1. + * @enable_ctrl2: setting for register ETMTECR2. * @fifofull_level: setting for register ETMFFLR. * @addr_idx: index for the address comparator selection. * @addr_val: value for address comparator register. @@ -179,6 +180,7 @@ struct etm_config { u32 startstop_ctrl; u32 enable_event; u32 enable_ctrl1; + u32 enable_ctrl2; u32 fifofull_level; u8 addr_idx; u32 addr_val[ETM_MAX_ADDR_CMP]; diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index d1235711b576..4c54e104b610 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -607,26 +607,23 @@ static void etm_init_arch_data(void *info) static void etm_init_default_data(struct etm_config *config) { - u32 flags = (1 << 0 | /* instruction execute*/ - 3 << 3 | /* ARM instruction */ - 0 << 5 | /* No data value comparison */ - 0 << 7 | /* No exact mach */ - 0 << 8 | /* Ignore context ID */ - 0 << 10); /* Security ignored */ - if (WARN_ON_ONCE(!config)) return; - config->ctrl = (ETMCR_CYC_ACC | ETMCR_TIMESTAMP_EN); - config->enable_ctrl1 = ETMTECR1_ADDR_COMP_1; - config->addr_val[0] = (u32) _stext; - config->addr_val[1] = (u32) _etext; - config->addr_acctype[0] = flags; - config->addr_acctype[1] = flags; - config->addr_type[0] = ETM_ADDR_TYPE_RANGE; - config->addr_type[1] = ETM_ADDR_TYPE_RANGE; - etm_set_default(config); + + /* + * Taken verbatim from the TRM: + * + * To trace all memory: + * set bit [24] in register 0x009, the ETMTECR1, to 1 + * set all other bits in register 0x009, the ETMTECR1, to 0 + * set all bits in register 0x007, the ETMTECR2, to 0 + * set register 0x008, the ETMTEEVR, to 0x6F (TRUE). + */ + config->enable_ctrl1 = BIT(24); + config->enable_ctrl2 = 0x0; + config->enable_event = ETM_HARD_WIRE_RES_A; } static void etm_init_trace_id(struct etm_drvdata *drvdata)