[PATCH v5 08/13] coresight: Interpret perf config with ATTR_CFG_GET_FLD()
Leo Yan
leo.yan at arm.com
Wed Nov 19 04:36:47 PST 2025
On Wed, Nov 19, 2025 at 12:00:30PM +0000, James Clark wrote:
[...]
> ... But then to make
> the code match the warning it might also make sense to change CONFIG_ARM64
> back to CONFIG_CORESIGHT_SOURCE_ETM4X, which Leo suggested to change. Maybe
> I can just delete the warning text, practically this warning can never be
> hit.
Armv8 CPUs can runs in aarch32 mode, strictly speaking, we should also
can run ETMv4 driver in aarch32 mode as well. Then CONFIG_ARM64 is the
right choice, this can remind us that `is_kernel_in_hyp_mode()` is
always stick to aarch64 mode.
static ssize_t format_attr_contextid_show(struct device *dev,
struct device_attribute *attr,
char *page)
{
#if IS_ENABLED(CONFIG_ARM64)
if (is_kernel_in_hyp_mode())
return contextid2_show(dev, attr, page);
#endif
return contextid1_show(dev, attr, page);
}
Thanks,
Leo
More information about the linux-arm-kernel
mailing list