[3/3] linux-yocto: Backport a patch to fix perf with -fno-common

Submitted by Khem Raj on Aug. 16, 2020, 7:08 a.m. | Patch ID: 175361

Details

Message ID 20200816070814.1303004-3-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Aug. 16, 2020, 7:08 a.m.
Temp fix until linux-yocto picks it up

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-definition-of-traceid_list-global-v.patch | 66 +++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto_5.4.bb  |  2 +
 2 files changed, 68 insertions(+)
 create mode 100644 meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch

Patch hide | download patch | download mbox

diff --git a/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
new file mode 100644
index 0000000000..0fc9876501
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
@@ -0,0 +1,66 @@ 
+From 168200b6d6ea0cb5765943ec5da5b8149701f36a Mon Sep 17 00:00:00 2001
+From: Leo Yan <leo.yan@linaro.org>
+Date: Tue, 5 May 2020 21:36:42 +0800
+Subject: [PATCH] perf cs-etm: Move definition of 'traceid_list' global
+ variable from header file
+
+The variable 'traceid_list' is defined in the header file cs-etm.h,
+if multiple C files include cs-etm.h the compiler might complaint for
+multiple definition of 'traceid_list'.
+
+To fix multiple definition error, move the definition of 'traceid_list'
+into cs-etm.c.
+
+Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
+Reported-by: Thomas Backlund <tmb@mageia.org>
+Signed-off-by: Leo Yan <leo.yan@linaro.org>
+Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
+Reviewed-by: Mike Leach <mike.leach@linaro.org>
+Tested-by: Mike Leach <mike.leach@linaro.org>
+Tested-by: Thomas Backlund <tmb@mageia.org>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
+Cc: Tor Jeremiassen <tor@ti.com>
+Cc: linux-arm-kernel@lists.infradead.org
+Link: http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+---
+ tools/perf/util/cs-etm.c | 3 +++
+ tools/perf/util/cs-etm.h | 3 ---
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
+index 3c802fde4954..c283223fb31f 100644
+--- a/tools/perf/util/cs-etm.c
++++ b/tools/perf/util/cs-etm.c
+@@ -94,6 +94,9 @@ struct cs_etm_queue {
+ 	struct cs_etm_traceid_queue **traceid_queues;
+ };
+ 
++/* RB tree for quick conversion between traceID and metadata pointers */
++static struct intlist *traceid_list;
++
+ static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
+ static int cs_etm__process_queues(struct cs_etm_auxtrace *etm);
+ static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
+diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
+index 650ecc2a6349..4ad925d6d799 100644
+--- a/tools/perf/util/cs-etm.h
++++ b/tools/perf/util/cs-etm.h
+@@ -114,9 +114,6 @@ enum cs_etm_isa {
+ 	CS_ETM_ISA_T32,
+ };
+ 
+-/* RB tree for quick conversion between traceID and metadata pointers */
+-struct intlist *traceid_list;
+-
+ struct cs_etm_queue;
+ 
+ struct cs_etm_packet {
+-- 
+2.28.0
+
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.4.bb b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
index f85c54e7f7..5a3180f36d 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
@@ -32,6 +32,8 @@  SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
 SRC_URI_append_qemuppc64 = " file://defconfig"
 CFLAGS += "-Wno-error"
 
+SRC_URI_append = " file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch"
+
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 LINUX_VERSION ?= "5.4.57"
 

Comments

Bruce Ashfield Aug. 16, 2020, 10:30 p.m.
On Sun, Aug 16, 2020 at 3:08 AM Khem Raj <raj.khem@gmail.com> wrote:

> Temp fix until linux-yocto picks it up
>
>
These really need to be submitted to the linux-yocto mailing list as proper
patches.

When they are submitted like this, it requires me to extract the patch, or
hunt up the original commit, see if it has already been submitted to
linux-stable (and if not, it should be), apply it to the kernel, revert
this commit if it happens to have merged and then finally do my update.

or, it could be submitted to linux-yocto like any patch, and it will be
applied and show up with the next update.

I'll take care of getting this into linux-yocto with my update that is
coming later today.

Cheers,

Bruce



> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  ...-definition-of-traceid_list-global-v.patch | 66 +++++++++++++++++++
>  meta/recipes-kernel/linux/linux-yocto_5.4.bb  |  2 +
>  2 files changed, 68 insertions(+)
>  create mode 100644
> meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
>
> diff --git
> a/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
> b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
> new file mode 100644
> index 0000000000..0fc9876501
> --- /dev/null
> +++
> b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
> @@ -0,0 +1,66 @@
> +From 168200b6d6ea0cb5765943ec5da5b8149701f36a Mon Sep 17 00:00:00 2001
> +From: Leo Yan <leo.yan@linaro.org>
> +Date: Tue, 5 May 2020 21:36:42 +0800
> +Subject: [PATCH] perf cs-etm: Move definition of 'traceid_list' global
> + variable from header file
> +
> +The variable 'traceid_list' is defined in the header file cs-etm.h,
> +if multiple C files include cs-etm.h the compiler might complaint for
> +multiple definition of 'traceid_list'.
> +
> +To fix multiple definition error, move the definition of 'traceid_list'
> +into cs-etm.c.
> +
> +Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
> +Reported-by: Thomas Backlund <tmb@mageia.org>
> +Signed-off-by: Leo Yan <leo.yan@linaro.org>
> +Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> +Reviewed-by: Mike Leach <mike.leach@linaro.org>
> +Tested-by: Mike Leach <mike.leach@linaro.org>
> +Tested-by: Thomas Backlund <tmb@mageia.org>
> +Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> +Cc: Jiri Olsa <jolsa@redhat.com>
> +Cc: Mark Rutland <mark.rutland@arm.com>
> +Cc: Namhyung Kim <namhyung@kernel.org>
> +Cc: Peter Zijlstra <peterz@infradead.org>
> +Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
> +Cc: Tor Jeremiassen <tor@ti.com>
> +Cc: linux-arm-kernel@lists.infradead.org
> +Link:
> http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org
> +Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> +---
> + tools/perf/util/cs-etm.c | 3 +++
> + tools/perf/util/cs-etm.h | 3 ---
> + 2 files changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
> +index 3c802fde4954..c283223fb31f 100644
> +--- a/tools/perf/util/cs-etm.c
> ++++ b/tools/perf/util/cs-etm.c
> +@@ -94,6 +94,9 @@ struct cs_etm_queue {
> +       struct cs_etm_traceid_queue **traceid_queues;
> + };
> +
> ++/* RB tree for quick conversion between traceID and metadata pointers */
> ++static struct intlist *traceid_list;
> ++
> + static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
> + static int cs_etm__process_queues(struct cs_etm_auxtrace *etm);
> + static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
> +diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
> +index 650ecc2a6349..4ad925d6d799 100644
> +--- a/tools/perf/util/cs-etm.h
> ++++ b/tools/perf/util/cs-etm.h
> +@@ -114,9 +114,6 @@ enum cs_etm_isa {
> +       CS_ETM_ISA_T32,
> + };
> +
> +-/* RB tree for quick conversion between traceID and metadata pointers */
> +-struct intlist *traceid_list;
> +-
> + struct cs_etm_queue;
> +
> + struct cs_etm_packet {
> +--
> +2.28.0
> +
> diff --git a/meta/recipes-kernel/linux/linux-yocto_5.4.bb
> b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
> index f85c54e7f7..5a3180f36d 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_5.4.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
> @@ -32,6 +32,8 @@ SRC_URI = "git://
> git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
> <http://git.yoctoproject.org/linux-yocto.git;name=machine;branch=$%7BKBRA>
>  SRC_URI_append_qemuppc64 = " file://defconfig"
>  CFLAGS += "-Wno-error"
>
> +SRC_URI_append = "
> file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch"
> +
>  LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
>  LINUX_VERSION ?= "5.4.57"
>
> --
> 2.28.0
>
> 
>
Bruce Ashfield Aug. 16, 2020, 10:32 p.m.
On Sun, Aug 16, 2020 at 6:31 PM Bruce Ashfield via lists.openembedded.org
<bruce.ashfield=gmail.com@lists.openembedded.org> wrote:

>
>
> On Sun, Aug 16, 2020 at 3:08 AM Khem Raj <raj.khem@gmail.com> wrote:
>
>> Temp fix until linux-yocto picks it up
>>
>>
> These really need to be submitted to the linux-yocto mailing list as
> proper patches.
>
> When they are submitted like this, it requires me to extract the patch, or
> hunt up the original commit, see if it has already been submitted to
> linux-stable (and if not, it should be), apply it to the kernel, revert
> this commit if it happens to have merged and then finally do my update.
>

.. and of course I see that you did send me the commit ID in another email.
I need to read ALL my unread mail first.

I'll do that merge and take care of it shortly.

Bruce



>
> or, it could be submitted to linux-yocto like any patch, and it will be
> applied and show up with the next update.
>
> I'll take care of getting this into linux-yocto with my update that is
> coming later today.
>
> Cheers,
>
> Bruce
>
>
>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  ...-definition-of-traceid_list-global-v.patch | 66 +++++++++++++++++++
>>  meta/recipes-kernel/linux/linux-yocto_5.4.bb  |  2 +
>>  2 files changed, 68 insertions(+)
>>  create mode 100644
>> meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
>>
>> diff --git
>> a/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
>> b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
>> new file mode 100644
>> index 0000000000..0fc9876501
>> --- /dev/null
>> +++
>> b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
>> @@ -0,0 +1,66 @@
>> +From 168200b6d6ea0cb5765943ec5da5b8149701f36a Mon Sep 17 00:00:00 2001
>> +From: Leo Yan <leo.yan@linaro.org>
>> +Date: Tue, 5 May 2020 21:36:42 +0800
>> +Subject: [PATCH] perf cs-etm: Move definition of 'traceid_list' global
>> + variable from header file
>> +
>> +The variable 'traceid_list' is defined in the header file cs-etm.h,
>> +if multiple C files include cs-etm.h the compiler might complaint for
>> +multiple definition of 'traceid_list'.
>> +
>> +To fix multiple definition error, move the definition of 'traceid_list'
>> +into cs-etm.c.
>> +
>> +Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
>> +Reported-by: Thomas Backlund <tmb@mageia.org>
>> +Signed-off-by: Leo Yan <leo.yan@linaro.org>
>> +Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>> +Reviewed-by: Mike Leach <mike.leach@linaro.org>
>> +Tested-by: Mike Leach <mike.leach@linaro.org>
>> +Tested-by: Thomas Backlund <tmb@mageia.org>
>> +Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
>> +Cc: Jiri Olsa <jolsa@redhat.com>
>> +Cc: Mark Rutland <mark.rutland@arm.com>
>> +Cc: Namhyung Kim <namhyung@kernel.org>
>> +Cc: Peter Zijlstra <peterz@infradead.org>
>> +Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
>> +Cc: Tor Jeremiassen <tor@ti.com>
>> +Cc: linux-arm-kernel@lists.infradead.org
>> +Link:
>> http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org
>> +Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>> +---
>> + tools/perf/util/cs-etm.c | 3 +++
>> + tools/perf/util/cs-etm.h | 3 ---
>> + 2 files changed, 3 insertions(+), 3 deletions(-)
>> +
>> +diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
>> +index 3c802fde4954..c283223fb31f 100644
>> +--- a/tools/perf/util/cs-etm.c
>> ++++ b/tools/perf/util/cs-etm.c
>> +@@ -94,6 +94,9 @@ struct cs_etm_queue {
>> +       struct cs_etm_traceid_queue **traceid_queues;
>> + };
>> +
>> ++/* RB tree for quick conversion between traceID and metadata pointers */
>> ++static struct intlist *traceid_list;
>> ++
>> + static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
>> + static int cs_etm__process_queues(struct cs_etm_auxtrace *etm);
>> + static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
>> +diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
>> +index 650ecc2a6349..4ad925d6d799 100644
>> +--- a/tools/perf/util/cs-etm.h
>> ++++ b/tools/perf/util/cs-etm.h
>> +@@ -114,9 +114,6 @@ enum cs_etm_isa {
>> +       CS_ETM_ISA_T32,
>> + };
>> +
>> +-/* RB tree for quick conversion between traceID and metadata pointers */
>> +-struct intlist *traceid_list;
>> +-
>> + struct cs_etm_queue;
>> +
>> + struct cs_etm_packet {
>> +--
>> +2.28.0
>> +
>> diff --git a/meta/recipes-kernel/linux/linux-yocto_5.4.bb
>> b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
>> index f85c54e7f7..5a3180f36d 100644
>> --- a/meta/recipes-kernel/linux/linux-yocto_5.4.bb
>> +++ b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
>> @@ -32,6 +32,8 @@ SRC_URI = "git://
>> git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
>> <http://git.yoctoproject.org/linux-yocto.git;name=machine;branch=$%7BKBRA>
>>  SRC_URI_append_qemuppc64 = " file://defconfig"
>>  CFLAGS += "-Wno-error"
>>
>> +SRC_URI_append = "
>> file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch"
>> +
>>  LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
>>  LINUX_VERSION ?= "5.4.57"
>>
>> --
>> 2.28.0
>>
>>
>>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await thee
> at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
> 
>
Khem Raj Aug. 16, 2020, 11:15 p.m.
On Sun, Aug 16, 2020 at 3:30 PM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>
>
>
> On Sun, Aug 16, 2020 at 3:08 AM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> Temp fix until linux-yocto picks it up
>>
>
> These really need to be submitted to the linux-yocto mailing list as proper patches.
>
> When they are submitted like this, it requires me to extract the patch, or hunt up the original commit, see if it has already been submitted to linux-stable (and if not, it should be), apply it to the kernel, revert this commit if it happens to have merged and then finally do my update.
>

I know, it was a ad-hoc fix for autobuilders if RP wanted to try

> or, it could be submitted to linux-yocto like any patch, and it will be applied and show up with the next update.
>
> I'll take care of getting this into linux-yocto with my update that is coming later today.
>
> Cheers,
>
> Bruce
>
>
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  ...-definition-of-traceid_list-global-v.patch | 66 +++++++++++++++++++
>>  meta/recipes-kernel/linux/linux-yocto_5.4.bb  |  2 +
>>  2 files changed, 68 insertions(+)
>>  create mode 100644 meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
>>
>> diff --git a/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
>> new file mode 100644
>> index 0000000000..0fc9876501
>> --- /dev/null
>> +++ b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
>> @@ -0,0 +1,66 @@
>> +From 168200b6d6ea0cb5765943ec5da5b8149701f36a Mon Sep 17 00:00:00 2001
>> +From: Leo Yan <leo.yan@linaro.org>
>> +Date: Tue, 5 May 2020 21:36:42 +0800
>> +Subject: [PATCH] perf cs-etm: Move definition of 'traceid_list' global
>> + variable from header file
>> +
>> +The variable 'traceid_list' is defined in the header file cs-etm.h,
>> +if multiple C files include cs-etm.h the compiler might complaint for
>> +multiple definition of 'traceid_list'.
>> +
>> +To fix multiple definition error, move the definition of 'traceid_list'
>> +into cs-etm.c.
>> +
>> +Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
>> +Reported-by: Thomas Backlund <tmb@mageia.org>
>> +Signed-off-by: Leo Yan <leo.yan@linaro.org>
>> +Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>> +Reviewed-by: Mike Leach <mike.leach@linaro.org>
>> +Tested-by: Mike Leach <mike.leach@linaro.org>
>> +Tested-by: Thomas Backlund <tmb@mageia.org>
>> +Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
>> +Cc: Jiri Olsa <jolsa@redhat.com>
>> +Cc: Mark Rutland <mark.rutland@arm.com>
>> +Cc: Namhyung Kim <namhyung@kernel.org>
>> +Cc: Peter Zijlstra <peterz@infradead.org>
>> +Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
>> +Cc: Tor Jeremiassen <tor@ti.com>
>> +Cc: linux-arm-kernel@lists.infradead.org
>> +Link: http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org
>> +Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>> +---
>> + tools/perf/util/cs-etm.c | 3 +++
>> + tools/perf/util/cs-etm.h | 3 ---
>> + 2 files changed, 3 insertions(+), 3 deletions(-)
>> +
>> +diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
>> +index 3c802fde4954..c283223fb31f 100644
>> +--- a/tools/perf/util/cs-etm.c
>> ++++ b/tools/perf/util/cs-etm.c
>> +@@ -94,6 +94,9 @@ struct cs_etm_queue {
>> +       struct cs_etm_traceid_queue **traceid_queues;
>> + };
>> +
>> ++/* RB tree for quick conversion between traceID and metadata pointers */
>> ++static struct intlist *traceid_list;
>> ++
>> + static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
>> + static int cs_etm__process_queues(struct cs_etm_auxtrace *etm);
>> + static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
>> +diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
>> +index 650ecc2a6349..4ad925d6d799 100644
>> +--- a/tools/perf/util/cs-etm.h
>> ++++ b/tools/perf/util/cs-etm.h
>> +@@ -114,9 +114,6 @@ enum cs_etm_isa {
>> +       CS_ETM_ISA_T32,
>> + };
>> +
>> +-/* RB tree for quick conversion between traceID and metadata pointers */
>> +-struct intlist *traceid_list;
>> +-
>> + struct cs_etm_queue;
>> +
>> + struct cs_etm_packet {
>> +--
>> +2.28.0
>> +
>> diff --git a/meta/recipes-kernel/linux/linux-yocto_5.4.bb b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
>> index f85c54e7f7..5a3180f36d 100644
>> --- a/meta/recipes-kernel/linux/linux-yocto_5.4.bb
>> +++ b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
>> @@ -32,6 +32,8 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
>>  SRC_URI_append_qemuppc64 = " file://defconfig"
>>  CFLAGS += "-Wno-error"
>>
>> +SRC_URI_append = " file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch"
>> +
>>  LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
>>  LINUX_VERSION ?= "5.4.57"
>>
>> --
>> 2.28.0
>>
>> 
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141550): https://lists.openembedded.org/g/openembedded-core/message/141550
Mute This Topic: https://lists.openembedded.org/mt/76219980/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Bruce Ashfield Aug. 16, 2020, 11:18 p.m.
On Sun, Aug 16, 2020 at 7:15 PM Khem Raj <raj.khem@gmail.com> wrote:

> On Sun, Aug 16, 2020 at 3:30 PM Bruce Ashfield <bruce.ashfield@gmail.com>
> wrote:
> >
> >
> >
> > On Sun, Aug 16, 2020 at 3:08 AM Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >> Temp fix until linux-yocto picks it up
> >>
> >
> > These really need to be submitted to the linux-yocto mailing list as
> proper patches.
> >
> > When they are submitted like this, it requires me to extract the patch,
> or hunt up the original commit, see if it has already been submitted to
> linux-stable (and if not, it should be), apply it to the kernel, revert
> this commit if it happens to have merged and then finally do my update.
> >
>
> I know, it was a ad-hoc fix for autobuilders if RP wanted to try
>

No worries. I should have realized as well. Itchy trigger finger as I work
through the final v5.8 issues :D

Bruce



>
> > or, it could be submitted to linux-yocto like any patch, and it will be
> applied and show up with the next update.
> >
> > I'll take care of getting this into linux-yocto with my update that is
> coming later today.
> >
> > Cheers,
> >
> > Bruce
> >
> >
> >>
> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> ---
> >>  ...-definition-of-traceid_list-global-v.patch | 66 +++++++++++++++++++
> >>  meta/recipes-kernel/linux/linux-yocto_5.4.bb  |  2 +
> >>  2 files changed, 68 insertions(+)
> >>  create mode 100644
> meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
> >>
> >> diff --git
> a/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
> b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
> >> new file mode 100644
> >> index 0000000000..0fc9876501
> >> --- /dev/null
> >> +++
> b/meta/recipes-kernel/linux/files/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
> >> @@ -0,0 +1,66 @@
> >> +From 168200b6d6ea0cb5765943ec5da5b8149701f36a Mon Sep 17 00:00:00 2001
> >> +From: Leo Yan <leo.yan@linaro.org>
> >> +Date: Tue, 5 May 2020 21:36:42 +0800
> >> +Subject: [PATCH] perf cs-etm: Move definition of 'traceid_list' global
> >> + variable from header file
> >> +
> >> +The variable 'traceid_list' is defined in the header file cs-etm.h,
> >> +if multiple C files include cs-etm.h the compiler might complaint for
> >> +multiple definition of 'traceid_list'.
> >> +
> >> +To fix multiple definition error, move the definition of 'traceid_list'
> >> +into cs-etm.c.
> >> +
> >> +Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight
> metadata")
> >> +Reported-by: Thomas Backlund <tmb@mageia.org>
> >> +Signed-off-by: Leo Yan <leo.yan@linaro.org>
> >> +Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> >> +Reviewed-by: Mike Leach <mike.leach@linaro.org>
> >> +Tested-by: Mike Leach <mike.leach@linaro.org>
> >> +Tested-by: Thomas Backlund <tmb@mageia.org>
> >> +Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> >> +Cc: Jiri Olsa <jolsa@redhat.com>
> >> +Cc: Mark Rutland <mark.rutland@arm.com>
> >> +Cc: Namhyung Kim <namhyung@kernel.org>
> >> +Cc: Peter Zijlstra <peterz@infradead.org>
> >> +Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
> >> +Cc: Tor Jeremiassen <tor@ti.com>
> >> +Cc: linux-arm-kernel@lists.infradead.org
> >> +Link:
> http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org
> >> +Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> >> +---
> >> + tools/perf/util/cs-etm.c | 3 +++
> >> + tools/perf/util/cs-etm.h | 3 ---
> >> + 2 files changed, 3 insertions(+), 3 deletions(-)
> >> +
> >> +diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
> >> +index 3c802fde4954..c283223fb31f 100644
> >> +--- a/tools/perf/util/cs-etm.c
> >> ++++ b/tools/perf/util/cs-etm.c
> >> +@@ -94,6 +94,9 @@ struct cs_etm_queue {
> >> +       struct cs_etm_traceid_queue **traceid_queues;
> >> + };
> >> +
> >> ++/* RB tree for quick conversion between traceID and metadata pointers
> */
> >> ++static struct intlist *traceid_list;
> >> ++
> >> + static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
> >> + static int cs_etm__process_queues(struct cs_etm_auxtrace *etm);
> >> + static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace
> *etm,
> >> +diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
> >> +index 650ecc2a6349..4ad925d6d799 100644
> >> +--- a/tools/perf/util/cs-etm.h
> >> ++++ b/tools/perf/util/cs-etm.h
> >> +@@ -114,9 +114,6 @@ enum cs_etm_isa {
> >> +       CS_ETM_ISA_T32,
> >> + };
> >> +
> >> +-/* RB tree for quick conversion between traceID and metadata pointers
> */
> >> +-struct intlist *traceid_list;
> >> +-
> >> + struct cs_etm_queue;
> >> +
> >> + struct cs_etm_packet {
> >> +--
> >> +2.28.0
> >> +
> >> diff --git a/meta/recipes-kernel/linux/linux-yocto_5.4.bb
> b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
> >> index f85c54e7f7..5a3180f36d 100644
> >> --- a/meta/recipes-kernel/linux/linux-yocto_5.4.bb
> >> +++ b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
> >> @@ -32,6 +32,8 @@ SRC_URI = "git://
> git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
> <http://git.yoctoproject.org/linux-yocto.git;name=machine;branch=$%7BKBRA>
> >>  SRC_URI_append_qemuppc64 = " file://defconfig"
> >>  CFLAGS += "-Wno-error"
> >>
> >> +SRC_URI_append = "
> file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch"
> >> +
> >>  LIC_FILES_CHKSUM =
> "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
> >>  LINUX_VERSION ?= "5.4.57"
> >>
> >> --
> >> 2.28.0
> >>
> >> 
> >
> >
> >
> > --
> > - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> > - "Use the force Harry" - Gandalf, Star Trek II
> >
>