2021-04-15 20:38:56

by Mathieu Poirier

[permalink] [raw]
Subject: [PATCH 0/1] coresight: Fix for v5.12-rc7

Hi Greg,

Please consider this patch as a fix for v5.12-rc7. Applies cleanly
to your char-misc-linus branch (e49d033bddf5).

Thanks,
Mathieu

Mike Leach (1):
coresight: etm-perf: Fix define build issue when built as module

drivers/hwtracing/coresight/coresight-etm-perf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--
2.25.1


2021-04-15 20:38:56

by Mathieu Poirier

[permalink] [raw]
Subject: [PATCH 1/1] coresight: etm-perf: Fix define build issue when built as module

From: Mike Leach <[email protected]>

CONFIG_CORESIGHT_SOURCE_ETM4X is undefined when built as module,
CONFIG_CORESIGHT_SOURCE_ETM4X_MODULE is defined instead.

Therefore code in format_attr_contextid_show() not correctly complied
when coresight built as module.

Use IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X) to correct this.

Fixes: 88f11864cf1d ("coresight: etm-perf: Support PID tracing for kernel at EL2")
Signed-off-by: Mike Leach <[email protected]>
Reviewed-by: Leo Yan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mathieu Poirier <[email protected]>
---
drivers/hwtracing/coresight/coresight-etm-perf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
index 0f603b4094f2..a706ba11b93e 100644
--- a/drivers/hwtracing/coresight/coresight-etm-perf.c
+++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
@@ -52,7 +52,7 @@ static ssize_t format_attr_contextid_show(struct device *dev,
{
int pid_fmt = ETM_OPT_CTXTID;

-#if defined(CONFIG_CORESIGHT_SOURCE_ETM4X)
+#if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X)
pid_fmt = is_kernel_in_hyp_mode() ? ETM_OPT_CTXTID2 : ETM_OPT_CTXTID;
#endif
return sprintf(page, "config:%d\n", pid_fmt);
--
2.25.1

2021-04-16 07:03:07

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/1] coresight: Fix for v5.12-rc7

On Thu, Apr 15, 2021 at 02:24:03PM -0600, Mathieu Poirier wrote:
> Hi Greg,
>
> Please consider this patch as a fix for v5.12-rc7. Applies cleanly
> to your char-misc-linus branch (e49d033bddf5).

It's too late for 5.12-final, and really my tree should be closed for
5.13-rc1 now. I can sneak this in for the merge window, is that ok?

thanks,

greg k-h

2021-04-16 08:06:55

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/1] coresight: Fix for v5.12-rc7

On Fri, Apr 16, 2021 at 08:54:00AM +0200, Greg KH wrote:
> On Thu, Apr 15, 2021 at 02:24:03PM -0600, Mathieu Poirier wrote:
> > Hi Greg,
> >
> > Please consider this patch as a fix for v5.12-rc7. Applies cleanly
> > to your char-misc-linus branch (e49d033bddf5).
>
> It's too late for 5.12-final, and really my tree should be closed for
> 5.13-rc1 now. I can sneak this in for the merge window, is that ok?

I've just taken it for my 5.13-rc1 set of patches and added a cc: stable
to get it backported to 5.12.1.

thanks,

greg k-h

2021-04-16 14:48:37

by Mathieu Poirier

[permalink] [raw]
Subject: Re: [PATCH 0/1] coresight: Fix for v5.12-rc7

On Fri, 16 Apr 2021 at 01:36, Greg KH <[email protected]> wrote:
>
> On Fri, Apr 16, 2021 at 08:54:00AM +0200, Greg KH wrote:
> > On Thu, Apr 15, 2021 at 02:24:03PM -0600, Mathieu Poirier wrote:
> > > Hi Greg,
> > >
> > > Please consider this patch as a fix for v5.12-rc7. Applies cleanly
> > > to your char-misc-linus branch (e49d033bddf5).
> >
> > It's too late for 5.12-final, and really my tree should be closed for
> > 5.13-rc1 now. I can sneak this in for the merge window, is that ok?
>

Yes, definitely.

> I've just taken it for my 5.13-rc1 set of patches and added a cc: stable
> to get it backported to 5.12.1.
>

That will be just fine.

> thanks,
>
> greg k-h