Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3038178pxb; Tue, 12 Jan 2021 05:00:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbUNiNQ9e9O0BPxJEhIntsILDC50cc8yD2Fy42GFGzCAalUthu5oDzG5DYNdhya5wK8ixF X-Received: by 2002:a17:907:36a:: with SMTP id rs10mr1674612ejb.281.1610456442609; Tue, 12 Jan 2021 05:00:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610456442; cv=none; d=google.com; s=arc-20160816; b=0X5pSmcbVkXiuH1LuFy2kPVpLTt1A5bjEy5fOOp1Dgo8b22kfkNfc6pSISDtIoNqRf qPt1RVf1rSPZ8Z/ckByCoG29xn7ewPNDM95dCtQutRDH/BCSNTiG4rNw81PkIm7QXzO2 o6iUzUch9S0QAPHh5mmAO7qyfDtSCNUuwjCHryr6xe6q0nLDkjGp9IgQ5B41sj7s6X/B Jxeu7YepBDVnSaisjEKe1+mhirU4CNTi3sSUQoP2uRF5h01qH8fYQc4hYZdR6fxUGzvP 5Jd+iAGVtutaKIOynxiMVGTmu/G3ZSKPURO9CasI+rntaeS+MBeQ7FxiGZrGKSTx3nso Kwww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=3zmpGC7Qn6kZlockOoADmz7MUJ1/+3N9fOMN57+A1yg=; b=cfKNiZG4QktkcQFk+U4f9RqPw7gU0396JEdTDiWeqEbcHGuzAugs9n3NJQam4/XA9R qXEPazohCRbNoNTMI8aTNQ40fHA2Ral4kSaJy16GLRaG9wyDpFWmktjdwzm1mLS6P6Ws cvOr132XvP+/5xs4gJIAyFr+iO0JELej1JFKx6HzRhdyiRJEDCvtpB0hTJKnRQCl5Mvr cD459+w82zTn8MftPjAQUyDDg85Frls55mTjOwq+fPaoxv5khYgBDVkqmOU8IrPxgyUt W+o0Xp1W8FElwpESTQBVrKtjF9aOZ1eCaXL39HYRzz59eIg1OAYWPr2TBgVnsLo3BUlv iudg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si1063680ejr.370.2021.01.12.05.00.18; Tue, 12 Jan 2021 05:00:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729179AbhALLEB (ORCPT + 99 others); Tue, 12 Jan 2021 06:04:01 -0500 Received: from foss.arm.com ([217.140.110.172]:44040 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbhALLEB (ORCPT ); Tue, 12 Jan 2021 06:04:01 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 69CBD1042; Tue, 12 Jan 2021 03:03:15 -0800 (PST) Received: from [10.57.39.145] (unknown [10.57.39.145]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EB9263F66E; Tue, 12 Jan 2021 03:03:11 -0800 (PST) Subject: Re: [PATCH v1 1/7] coresight: etm-perf: Add support for PID tracing for kernel at EL2 To: Leo Yan , Mike Leach Cc: Arnaldo Carvalho de Melo , Mathieu Poirier , Alexander Shishkin , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , Namhyung Kim , Daniel Kiss , Denis Nikitin , Coresight ML , linux-arm-kernel , Linux Kernel Mailing List , Al Grant References: <20210109074435.626855-1-leo.yan@linaro.org> <20210109074435.626855-2-leo.yan@linaro.org> <20210112085826.GC18965@leoy-ThinkPad-X240s> From: Suzuki K Poulose Message-ID: Date: Tue, 12 Jan 2021 11:03:02 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210112085826.GC18965@leoy-ThinkPad-X240s> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/12/21 8:58 AM, Leo Yan wrote: > Hi Mike, > > On Mon, Jan 11, 2021 at 04:22:39PM +0000, Mike Leach wrote: > > [...] > >>> diff --git a/include/linux/coresight-pmu.h b/include/linux/coresight-pmu.h >>> index b0e35eec6499..927c6285ce5d 100644 >>> --- a/include/linux/coresight-pmu.h >>> +++ b/include/linux/coresight-pmu.h >>> @@ -11,16 +11,19 @@ >>> #define CORESIGHT_ETM_PMU_SEED 0x10 >>> >>> /* ETMv3.5/PTM's ETMCR config bit */ >>> -#define ETM_OPT_CYCACC 12 >>> -#define ETM_OPT_CTXTID 14 >>> -#define ETM_OPT_TS 28 >>> -#define ETM_OPT_RETSTK 29 >>> +#define ETM_OPT_CYCACC 12 >>> +#define ETM_OPT_CTXTID 14 >>> +#define ETM_OPT_CTXTID_IN_VMID 15 >> >> Minor issue here - ETMv3.x / PTM cannot trace CXTID in VMID so this >> may better be named ETM4_OPT_CTXTID_IN_VMID, rather than be grouped >> with the ETM3.5 options? > > I looked into this suggestion but found it's complex than I assumed. > This config bits are not only used for ETMv3.x / PTM, it's also used > as an configuration interface between user space in Perf and kernel > drivers. > Exactly. I believe this problematic. We are stuckwith using the ETM3.x/PTM config bits for the CS_ETM pmu, which is a bit wierd and the allocation of the config bits are sparse. The problem with changing them now, will break older perf tools decoding a perf.data from a newer kernel. I believe we are stuck with this. I would recommend simply updating the comment to reflect that, thats the generic CS PMU ABI for configuration which was initially based on ETM3.x. Suzuki