From patchwork Fri Nov 13 18:45:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 56531 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1213561lbb; Fri, 13 Nov 2015 10:46:59 -0800 (PST) X-Received: by 10.66.122.39 with SMTP id lp7mr34230880pab.74.1447440416172; Fri, 13 Nov 2015 10:46:56 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hd5si28931795pbb.257.2015.11.13.10.46.55; Fri, 13 Nov 2015 10:46:56 -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 S1754911AbbKMSqi (ORCPT + 28 others); Fri, 13 Nov 2015 13:46:38 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36403 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754882AbbKMSqd (ORCPT ); Fri, 13 Nov 2015 13:46:33 -0500 Received: by pacdm15 with SMTP id dm15so107585714pac.3 for ; Fri, 13 Nov 2015 10:46:33 -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=N0+so32Qm//eCDzYZBUC1LufkgPRPDQZ+3tfFLmk/LAL/+wWtPA9TarwXlgLphm30f yHSHgi9Uw8oVqJpm0a/iYqsUUFKtXQAOrwXeWJZgd24zZ40+EQd36pk2FD2u2+Adk5bY 6rRl4ta5Svlmp8ZuTjIZ70UeghRkb65yS2HcM9FI3OrrFg98iMr+EWZ19Q224iKrAVbX rQ1vJNmyuBbCZGckwXzO0DvAcpNtV5kqdF7oIoRuZFBG10PvoiTtrGG6S8eo06xQDabU 5jm1S+8bCrZXGVKbKPab+BpwzPuiCgLwnV8qp9ct6b5ldTYH1vXgjbDVoy9y2dfoWv6O 7tsQ== 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=RxnhXdbmWlHjuOtq/3gahBdO/4DOQ7y0/itB05EIvSU7G2HAbklDT7ABMU9QnYAty7 SDWlc/jr0QjNG116H7Z+e3StEO9yEnJ3beFmdeRP6G0dbFrq5Zqss75pfprbz/qgZw5Q j9HUrym1gmnSJqTVVVFqR+XnWreS/zpwnyftRp0bGjCHZQpV4TxWkdzzsPvdLlBx4SVS 8/ouNfoagojvb8AIcD0CTyvYrEpXBwNCyHaQduzbRwaNiZ+KZKpFcNKVjJ1TsXzd2FRI B8POQ9ucc7ou9dXlMMbACojX3fSRx3LtJ/TTl2+YSGijApqaXlI4QLtcE8kO1oie+1CV NzsQ== X-Gm-Message-State: ALoCoQk2na0TBsKKzLaXQskK5HGWNpDqw6VucOoVqJ+PGWXAj+mi4RpCWeNBiIG8OE5Ogpc9TDQ2 X-Received: by 10.68.194.4 with SMTP id hs4mr34528232pbc.116.1447440393255; Fri, 13 Nov 2015 10:46:33 -0800 (PST) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [184.64.168.246]) by smtp.gmail.com with ESMTPSA id xi7sm21737967pbc.56.2015.11.13.10.46.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Nov 2015 10:46:32 -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: adrian.hunter@intel.com, 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, mathieu.poirier@linaro.org Subject: [PATCH V4 11/26] coresight: etm3x: changing default trace configuration Date: Fri, 13 Nov 2015 11:45:02 -0700 Message-Id: <1447440317-1977-12-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447440317-1977-1-git-send-email-mathieu.poirier@linaro.org> References: <1447440317-1977-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)