From: Leo Yan <leo.yan@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: mark.rutland@arm.com, Al Grant <al.grant@arm.com>,
lkp@intel.com, mathieu.poirier@linaro.org,
alexander.shishkin@linux.intel.com, coresight@lists.linaro.org,
john.garry@huawei.com, acme@kernel.org, peterz@infradead.org,
mingo@redhat.com, will@kernel.org,
linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org
Subject: Re: [PATCH] coresight: etm-perf: Add support for PID tracing for kernel at EL2
Date: Mon, 11 Jan 2021 08:05:15 +0800 [thread overview]
Message-ID: <20210111000515.GA3241@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <fb44270e-bdd7-3c3e-41ab-e4a2ad74e4f3@arm.com>
On Sun, Jan 10, 2021 at 10:34:57PM +0000, Suzuki Kuruppassery Poulose wrote:
> On 1/10/21 1:41 AM, Leo Yan wrote:
> > Hi Suzuki,
> >
> > On Sun, Jan 10, 2021 at 01:24:30AM +0000, Suzuki Kuruppassery Poulose wrote:
> >
> > [...]
> >
> > > +static ssize_t format_attr_pid_show(struct device *dev,
> > > + struct device_attribute *attr,
> > > + char *page)
> > > +{
> > > + int pid_fmt = ETM_OPT_CTXTID;
> > > +
> > > +#ifdef CONFIG_CORESIGHT_SOURCE_ETM4X
> > > + if (is_kernel_in_hyp_mode())
> > > + pid_fmt = ETM_OPT_CTXTID_IN_VMID;
> > > +#endif
> >
> > I have a different idea for this. As Armv8 Arm describes: "The
> > Virtualization Host Extensions only apply to an implementation that
> > includes EL2 using AArch64.", seems to me it's more reasable to use
> > the condition "#ifdef CONFIG_64BIT", like below:
> >
> > #ifdef CONFIG_64BIT
> > if (is_kernel_in_hyp_mode())
> > pid_fmt = ETM_OPT_CTXTID_IN_VMID;
> > #endif
> >
> > Please let me know if this is better or not. I will resend the patch
> > series after agreement.
>
> I did think of that. But CORESIGHT_SOURCE_ETM4X already depends on CONFIG_ARM64.
> So, that is more restrictive in terms of usage. And this wouldn't be the only
> build failure if someone tried enable ETM4X for arm32. So I wouldn't worry about
> someone trying to use ETM4X on arm32 accidentally.
Makes sense, will send v2 with this change.
Thanks for confirmation,
Leo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2021-01-11 0:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202101091731.R1nMP6tg-lkp@intel.com>
2021-01-10 1:24 ` [PATCH] coresight: etm-perf: Add support for PID tracing for kernel at EL2 Suzuki K Poulose
2021-01-10 1:41 ` Leo Yan
2021-01-10 22:34 ` Suzuki K Poulose
2021-01-11 0:05 ` Leo Yan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210111000515.GA3241@leoy-ThinkPad-X240s \
--to=leo.yan@linaro.org \
--cc=acme@kernel.org \
--cc=al.grant@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=john.garry@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lkp@intel.com \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox