Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] A fix for the lttng-modules
@ 2014-09-26  2:00 nitin.a.kamble
  2014-09-26  2:00 ` [PATCH 1/1] lttng-modules: fix build issues with the v3.17 kernel nitin.a.kamble
  0 siblings, 1 reply; 6+ messages in thread
From: nitin.a.kamble @ 2014-09-26  2:00 UTC (permalink / raw)
  To: richard.purdie, saul.wold, Openembedded-core, bruce.ashfield,
	tom.zanussi, dvhart

From: Nitin A Kamble <nitin.a.kamble@intel.com>

The lttng-modules recipe was failing with meta-intel BSPs with the
v3.17 kernel. The qemu machines from the poky layers did not get
hit by this issue. The accompanying commit fixes the issue observed in
the lttng-modules recipe. The fix is made in a way to not break on older
kernel versions.
  This is tested with v3.10 and v3.17 kernels with meta-intel BSPs. I
understand that the oecore/poky layer has stopped taking commits for the
upcoming v1.7 release. Let me know, if this commit can not go in the 
oecore/poky layer. In that case, this fix will instead be pushed to the
meta-intel layer.

Thanks,
Nitin


The following changes since commit 8ac8eca2e3bd8c78e2b31ea974930ed0243258a3:

  build-appliance-image: Update to dizzy head revision (2014-09-23 22:10:26 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib nitin/misc
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (1):
  lttng-modules: fix build issues with the v3.17 kernel

 .../fix_build_with_v3.17_kernel.patch              | 111 +++++++++++++++++++++
 meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb   |   1 +
 2 files changed, 112 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch

-- 
1.8.1.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] lttng-modules: fix build issues with the v3.17 kernel
  2014-09-26  2:00 [PATCH 0/1] A fix for the lttng-modules nitin.a.kamble
@ 2014-09-26  2:00 ` nitin.a.kamble
  2014-09-26  2:23   ` Bruce Ashfield
  2014-09-26 17:32   ` Kamble, Nitin A
  0 siblings, 2 replies; 6+ messages in thread
From: nitin.a.kamble @ 2014-09-26  2:00 UTC (permalink / raw)
  To: richard.purdie, saul.wold, Openembedded-core, bruce.ashfield,
	tom.zanussi, dvhart

From: Nitin A Kamble <nitin.a.kamble@intel.com>

The lttng-modules recipe was failing for meta-intel BSPs with the v3.17 kernel.
These BSP kernels were enabling some of the audio codec drivers, whose
structures are changed recently, causing mismatch with lttng-modules code
expectations. The qemu machines did not see this issue as they were not
enabling these sound codec kernel configuration.
  Fix the build issue, by changing the lttng-modules code to match with
the structures used by the v3.17 kernel. The code is conditional on the
kernel version, that way it keeps working with the older kernel versions.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 .../fix_build_with_v3.17_kernel.patch              | 111 +++++++++++++++++++++
 meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb   |   1 +
 2 files changed, 112 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch

diff --git a/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
new file mode 100644
index 0000000..86dfa69
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
@@ -0,0 +1,111 @@
+Upstream-Status: Pending
+
+commit 91ec0897b50c9d3f215ce6790b30bc319a136a4e
+Author: Nitin A Kamble <nitin.a.kamble@intel.com>
+Date:   Thu Sep 25 16:51:24 2014 -0700
+
+    asoc.h: fix build with v3.17 kernel
+    
+    The snd_soc_codec structure has changed in the v3.17 kernel. Some
+    of the redundant fields have been removed. To be specific this commit
+    from the v3.17 kernel causes the build failure for lttng-modules.
+    
+    |commit f4333203ec933f9272c90c7add01774ec2cf94d3
+    |Author: Lars-Peter Clausen <lars@metafoo.de>
+    |Date:   Mon Jun 16 18:13:02 2014 +0200
+    |
+    |    ASoC: Move name and id from CODEC/platform to component
+    |
+    |    The component struct already has a name and id field which are initialized to
+    |    the same values as the same fields in the CODEC and platform structs. So remove
+    |    them from the CODEC and platform structs and used the ones from the component
+    |    struct instead.
+    |
+    |    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+    |    Signed-off-by: Mark Brown <broonie@linaro.org>
+    
+    The asoc.h is changed according to the change in the above kernel commit
+    to fix the lttng-modules build. The change in the lttng-modules code is
+    conditional on the kernel version, so that it does not break builds with
+    previous kernel versions.
+    
+    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+
+diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h
+index 672bea4..bf9cf86 100644
+--- a/instrumentation/events/lttng-module/asoc.h
++++ b/instrumentation/events/lttng-module/asoc.h
+@@ -21,6 +21,14 @@ struct snd_soc_card;
+ struct snd_soc_dapm_widget;
+ #endif
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
++#define CODEC_NAME_FIELD component.name
++#define CODEC_ID_FIELD component.id
++#else
++#define CODEC_NAME_FIELD name
++#define CODEC_ID_FIELD id
++#endif
++
+ /*
+  * Log register events
+  */
+@@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
+ 	TP_ARGS(codec, reg, val),
+ 
+ 	TP_STRUCT__entry(
+-		__string(	name,		codec->name	)
++		__string(	name,		codec->CODEC_NAME_FIELD	)
+ 		__field(	int,		id		)
+ 		__field(	unsigned int,	reg		)
+ 		__field(	unsigned int,	val		)
+ 	),
+ 
+ 	TP_fast_assign(
+-		tp_strcpy(name, codec->name)
+-		tp_assign(id, codec->id)
++		tp_strcpy(name, codec->CODEC_NAME_FIELD)
++		tp_assign(id, codec->CODEC_ID_FIELD)
+ 		tp_assign(reg, reg)
+ 		tp_assign(val, val)
+ 	),
+@@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg,
+ 	TP_ARGS(platform, reg, val),
+ 
+ 	TP_STRUCT__entry(
+-		__string(	name,		platform->name	)
++		__string(	name,		platform->CODEC_NAME_FIELD	)
+ 		__field(	int,		id		)
+ 		__field(	unsigned int,	reg		)
+ 		__field(	unsigned int,	val		)
+ 	),
+ 
+ 	TP_fast_assign(
+-		tp_strcpy(name, platform->name)
+-		tp_assign(id, platform->id)
++		tp_strcpy(name, platform->CODEC_NAME_FIELD)
++		tp_assign(id, platform->CODEC_ID_FIELD)
+ 		tp_assign(reg, reg)
+ 		tp_assign(val, val)
+ 	),
+@@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync,
+ 	TP_ARGS(codec, type, status),
+ 
+ 	TP_STRUCT__entry(
+-		__string(	name,		codec->name	)
++		__string(	name,		codec->CODEC_NAME_FIELD	)
+ 		__string(	status,		status		)
+ 		__string(	type,		type		)
+ 		__field(	int,		id		)
+ 	),
+ 
+ 	TP_fast_assign(
+-		tp_strcpy(name, codec->name)
++		tp_strcpy(name, codec->CODEC_NAME_FIELD)
+ 		tp_strcpy(status, status)
+ 		tp_strcpy(type, type)
+-		tp_assign(id, codec->id)
++		tp_assign(id, codec->CODEC_ID_FIELD)
+ 	),
+ 
+ 	TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
index 04e2b0c..6ff961a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
@@ -21,6 +21,7 @@ SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \
            file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \
            file://Update-statedump-to-3.17-nsproxy-locking.patch \
            file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \
+           file://fix_build_with_v3.17_kernel.patch \
            "
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
-- 
1.8.1.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] lttng-modules: fix build issues with the v3.17 kernel
  2014-09-26  2:00 ` [PATCH 1/1] lttng-modules: fix build issues with the v3.17 kernel nitin.a.kamble
@ 2014-09-26  2:23   ` Bruce Ashfield
  2014-09-26 16:23     ` Kamble, Nitin A
  2014-09-26 17:32   ` Kamble, Nitin A
  1 sibling, 1 reply; 6+ messages in thread
From: Bruce Ashfield @ 2014-09-26  2:23 UTC (permalink / raw)
  To: nitin.a.kamble, richard.purdie, saul.wold, Openembedded-core,
	tom.zanussi, dvhart

On 2014-09-25, 10:00 PM, nitin.a.kamble@intel.com wrote:
> From: Nitin A Kamble <nitin.a.kamble@intel.com>
>
> The lttng-modules recipe was failing for meta-intel BSPs with the v3.17 kernel.
> These BSP kernels were enabling some of the audio codec drivers, whose
> structures are changed recently, causing mismatch with lttng-modules code
> expectations. The qemu machines did not see this issue as they were not
> enabling these sound codec kernel configuration.
>    Fix the build issue, by changing the lttng-modules code to match with
> the structures used by the v3.17 kernel. The code is conditional on the
> kernel version, that way it keeps working with the older kernel versions.
>
> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> ---
>   .../fix_build_with_v3.17_kernel.patch              | 111 +++++++++++++++++++++
>   meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb   |   1 +
>   2 files changed, 112 insertions(+)
>   create mode 100644 meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
>
> diff --git a/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
> new file mode 100644
> index 0000000..86dfa69
> --- /dev/null
> +++ b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
> @@ -0,0 +1,111 @@
> +Upstream-Status: Pending
> +
> +commit 91ec0897b50c9d3f215ce6790b30bc319a136a4e
> +Author: Nitin A Kamble <nitin.a.kamble@intel.com>
> +Date:   Thu Sep 25 16:51:24 2014 -0700
> +
> +    asoc.h: fix build with v3.17 kernel
> +
> +    The snd_soc_codec structure has changed in the v3.17 kernel. Some
> +    of the redundant fields have been removed. To be specific this commit
> +    from the v3.17 kernel causes the build failure for lttng-modules.
> +
> +    |commit f4333203ec933f9272c90c7add01774ec2cf94d3
> +    |Author: Lars-Peter Clausen <lars@metafoo.de>
> +    |Date:   Mon Jun 16 18:13:02 2014 +0200
> +    |
> +    |    ASoC: Move name and id from CODEC/platform to component
> +    |
> +    |    The component struct already has a name and id field which are initialized to
> +    |    the same values as the same fields in the CODEC and platform structs. So remove
> +    |    them from the CODEC and platform structs and used the ones from the component
> +    |    struct instead.
> +    |
> +    |    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> +    |    Signed-off-by: Mark Brown <broonie@linaro.org>
> +
> +    The asoc.h is changed according to the change in the above kernel commit
> +    to fix the lttng-modules build. The change in the lttng-modules code is
> +    conditional on the kernel version, so that it does not break builds with
> +    previous kernel versions.

Nice fix. To be consistent with other patches for lttng, we should probably
put an upstream-status field in the header.

Are you going to send this to the project ? They'll probably want to
tweak it, but for our purposes, this builds and looks fine.

Bruce

> +
> +    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> +
> +diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h
> +index 672bea4..bf9cf86 100644
> +--- a/instrumentation/events/lttng-module/asoc.h
> ++++ b/instrumentation/events/lttng-module/asoc.h
> +@@ -21,6 +21,14 @@ struct snd_soc_card;
> + struct snd_soc_dapm_widget;
> + #endif
> +
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
> ++#define CODEC_NAME_FIELD component.name
> ++#define CODEC_ID_FIELD component.id
> ++#else
> ++#define CODEC_NAME_FIELD name
> ++#define CODEC_ID_FIELD id
> ++#endif
> ++
> + /*
> +  * Log register events
> +  */
> +@@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
> + 	TP_ARGS(codec, reg, val),
> +
> + 	TP_STRUCT__entry(
> +-		__string(	name,		codec->name	)
> ++		__string(	name,		codec->CODEC_NAME_FIELD	)
> + 		__field(	int,		id		)
> + 		__field(	unsigned int,	reg		)
> + 		__field(	unsigned int,	val		)
> + 	),
> +
> + 	TP_fast_assign(
> +-		tp_strcpy(name, codec->name)
> +-		tp_assign(id, codec->id)
> ++		tp_strcpy(name, codec->CODEC_NAME_FIELD)
> ++		tp_assign(id, codec->CODEC_ID_FIELD)
> + 		tp_assign(reg, reg)
> + 		tp_assign(val, val)
> + 	),
> +@@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg,
> + 	TP_ARGS(platform, reg, val),
> +
> + 	TP_STRUCT__entry(
> +-		__string(	name,		platform->name	)
> ++		__string(	name,		platform->CODEC_NAME_FIELD	)
> + 		__field(	int,		id		)
> + 		__field(	unsigned int,	reg		)
> + 		__field(	unsigned int,	val		)
> + 	),
> +
> + 	TP_fast_assign(
> +-		tp_strcpy(name, platform->name)
> +-		tp_assign(id, platform->id)
> ++		tp_strcpy(name, platform->CODEC_NAME_FIELD)
> ++		tp_assign(id, platform->CODEC_ID_FIELD)
> + 		tp_assign(reg, reg)
> + 		tp_assign(val, val)
> + 	),
> +@@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync,
> + 	TP_ARGS(codec, type, status),
> +
> + 	TP_STRUCT__entry(
> +-		__string(	name,		codec->name	)
> ++		__string(	name,		codec->CODEC_NAME_FIELD	)
> + 		__string(	status,		status		)
> + 		__string(	type,		type		)
> + 		__field(	int,		id		)
> + 	),
> +
> + 	TP_fast_assign(
> +-		tp_strcpy(name, codec->name)
> ++		tp_strcpy(name, codec->CODEC_NAME_FIELD)
> + 		tp_strcpy(status, status)
> + 		tp_strcpy(type, type)
> +-		tp_assign(id, codec->id)
> ++		tp_assign(id, codec->CODEC_ID_FIELD)
> + 	),
> +
> + 	TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
> diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
> index 04e2b0c..6ff961a 100644
> --- a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
> +++ b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
> @@ -21,6 +21,7 @@ SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \
>              file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \
>              file://Update-statedump-to-3.17-nsproxy-locking.patch \
>              file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \
> +           file://fix_build_with_v3.17_kernel.patch \
>              "
>
>   export INSTALL_MOD_DIR="kernel/lttng-modules"
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] lttng-modules: fix build issues with the v3.17 kernel
  2014-09-26  2:23   ` Bruce Ashfield
@ 2014-09-26 16:23     ` Kamble, Nitin A
  2014-09-26 17:20       ` Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: Kamble, Nitin A @ 2014-09-26 16:23 UTC (permalink / raw)
  To: Ashfield, Bruce (Wind River), richard.purdie@linuxfoundation.org,
	Wold, Saul, Openembedded-core@lists.openembedded.org,
	Zanussi, Tom, dvhart@linux.intel.com



On 9/25/14, 7:23 PM, "Bruce Ashfield" <bruce.ashfield@windriver.com> wrote:

>On 2014-09-25, 10:00 PM, nitin.a.kamble@intel.com wrote:
>> From: Nitin A Kamble <nitin.a.kamble@intel.com>
>>
>> The lttng-modules recipe was failing for meta-intel BSPs with the v3.17
>>kernel.
>> These BSP kernels were enabling some of the audio codec drivers, whose
>> structures are changed recently, causing mismatch with lttng-modules
>>code
>> expectations. The qemu machines did not see this issue as they were not
>> enabling these sound codec kernel configuration.
>>    Fix the build issue, by changing the lttng-modules code to match with
>> the structures used by the v3.17 kernel. The code is conditional on the
>> kernel version, that way it keeps working with the older kernel
>>versions.
>>
>> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
>> ---
>>   .../fix_build_with_v3.17_kernel.patch              | 111
>>+++++++++++++++++++++
>>   meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb   |   1 +
>>   2 files changed, 112 insertions(+)
>>   create mode 100644
>>meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
>>
>> diff --git 
>>a/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.pat
>>ch 
>>b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.pat
>>ch
>> new file mode 100644
>> index 0000000..86dfa69
>> --- /dev/null
>> +++ 
>>b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.pat
>>ch
>> @@ -0,0 +1,111 @@
>> +Upstream-Status: Pending
>> +
>> +commit 91ec0897b50c9d3f215ce6790b30bc319a136a4e
>> +Author: Nitin A Kamble <nitin.a.kamble@intel.com>
>> +Date:   Thu Sep 25 16:51:24 2014 -0700
>> +
>> +    asoc.h: fix build with v3.17 kernel
>> +
>> +    The snd_soc_codec structure has changed in the v3.17 kernel. Some
>> +    of the redundant fields have been removed. To be specific this
>>commit
>> +    from the v3.17 kernel causes the build failure for lttng-modules.
>> +
>> +    |commit f4333203ec933f9272c90c7add01774ec2cf94d3
>> +    |Author: Lars-Peter Clausen <lars@metafoo.de>
>> +    |Date:   Mon Jun 16 18:13:02 2014 +0200
>> +    |
>> +    |    ASoC: Move name and id from CODEC/platform to component
>> +    |
>> +    |    The component struct already has a name and id field which
>>are initialized to
>> +    |    the same values as the same fields in the CODEC and platform
>>structs. So remove
>> +    |    them from the CODEC and platform structs and used the ones
>>from the component
>> +    |    struct instead.
>> +    |
>> +    |    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> +    |    Signed-off-by: Mark Brown <broonie@linaro.org>
>> +
>> +    The asoc.h is changed according to the change in the above kernel
>>commit
>> +    to fix the lttng-modules build. The change in the lttng-modules
>>code is
>> +    conditional on the kernel version, so that it does not break
>>builds with
>> +    previous kernel versions.
>
>Nice fix. To be consistent with other patches for lttng, we should
>probably
>put an upstream-status field in the header.

It is already at the beginning of the patch. Look few lines above.

>
>Are you going to send this to the project ? They'll probably want to
>tweak it, but for our purposes, this builds and looks fine.

That should be fine. Once it is upstream, the next update to the recipe
can drop the patch.

Nitin

>
>Bruce
>
>> +
>> +    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
>> +
>> +diff --git a/instrumentation/events/lttng-module/asoc.h
>>b/instrumentation/events/lttng-module/asoc.h
>> +index 672bea4..bf9cf86 100644
>> +--- a/instrumentation/events/lttng-module/asoc.h
>> ++++ b/instrumentation/events/lttng-module/asoc.h
>> +@@ -21,6 +21,14 @@ struct snd_soc_card;
>> + struct snd_soc_dapm_widget;
>> + #endif
>> +
>> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
>> ++#define CODEC_NAME_FIELD component.name
>> ++#define CODEC_ID_FIELD component.id
>> ++#else
>> ++#define CODEC_NAME_FIELD name
>> ++#define CODEC_ID_FIELD id
>> ++#endif
>> ++
>> + /*
>> +  * Log register events
>> +  */
>> +@@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
>> + 	TP_ARGS(codec, reg, val),
>> +
>> + 	TP_STRUCT__entry(
>> +-		__string(	name,		codec->name	)
>> ++		__string(	name,		codec->CODEC_NAME_FIELD	)
>> + 		__field(	int,		id		)
>> + 		__field(	unsigned int,	reg		)
>> + 		__field(	unsigned int,	val		)
>> + 	),
>> +
>> + 	TP_fast_assign(
>> +-		tp_strcpy(name, codec->name)
>> +-		tp_assign(id, codec->id)
>> ++		tp_strcpy(name, codec->CODEC_NAME_FIELD)
>> ++		tp_assign(id, codec->CODEC_ID_FIELD)
>> + 		tp_assign(reg, reg)
>> + 		tp_assign(val, val)
>> + 	),
>> +@@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg,
>> + 	TP_ARGS(platform, reg, val),
>> +
>> + 	TP_STRUCT__entry(
>> +-		__string(	name,		platform->name	)
>> ++		__string(	name,		platform->CODEC_NAME_FIELD	)
>> + 		__field(	int,		id		)
>> + 		__field(	unsigned int,	reg		)
>> + 		__field(	unsigned int,	val		)
>> + 	),
>> +
>> + 	TP_fast_assign(
>> +-		tp_strcpy(name, platform->name)
>> +-		tp_assign(id, platform->id)
>> ++		tp_strcpy(name, platform->CODEC_NAME_FIELD)
>> ++		tp_assign(id, platform->CODEC_ID_FIELD)
>> + 		tp_assign(reg, reg)
>> + 		tp_assign(val, val)
>> + 	),
>> +@@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync,
>> + 	TP_ARGS(codec, type, status),
>> +
>> + 	TP_STRUCT__entry(
>> +-		__string(	name,		codec->name	)
>> ++		__string(	name,		codec->CODEC_NAME_FIELD	)
>> + 		__string(	status,		status		)
>> + 		__string(	type,		type		)
>> + 		__field(	int,		id		)
>> + 	),
>> +
>> + 	TP_fast_assign(
>> +-		tp_strcpy(name, codec->name)
>> ++		tp_strcpy(name, codec->CODEC_NAME_FIELD)
>> + 		tp_strcpy(status, status)
>> + 		tp_strcpy(type, type)
>> +-		tp_assign(id, codec->id)
>> ++		tp_assign(id, codec->CODEC_ID_FIELD)
>> + 	),
>> +
>> + 	TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
>> diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>>b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>> index 04e2b0c..6ff961a 100644
>> --- a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>> +++ b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>> @@ -21,6 +21,7 @@ SRC_URI =
>>"git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \
>>              
>>file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \
>>              file://Update-statedump-to-3.17-nsproxy-locking.patch \
>>              
>>file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \
>> +           file://fix_build_with_v3.17_kernel.patch \
>>              "
>>
>>   export INSTALL_MOD_DIR="kernel/lttng-modules"
>>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] lttng-modules: fix build issues with the v3.17 kernel
  2014-09-26 16:23     ` Kamble, Nitin A
@ 2014-09-26 17:20       ` Bruce Ashfield
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Ashfield @ 2014-09-26 17:20 UTC (permalink / raw)
  To: Kamble, Nitin A, richard.purdie@linuxfoundation.org, WOLD, SAUL,
	Openembedded-core@lists.openembedded.org, ZANUSSI, TOM,
	dvhart@linux.intel.com

On 14-09-26 12:23 PM, Kamble, Nitin A wrote:
>
>
> On 9/25/14, 7:23 PM, "Bruce Ashfield" <bruce.ashfield@windriver.com> wrote:
>
>> On 2014-09-25, 10:00 PM, nitin.a.kamble@intel.com wrote:
>>> From: Nitin A Kamble <nitin.a.kamble@intel.com>
>>>
>>> The lttng-modules recipe was failing for meta-intel BSPs with the v3.17
>>> kernel.
>>> These BSP kernels were enabling some of the audio codec drivers, whose
>>> structures are changed recently, causing mismatch with lttng-modules
>>> code
>>> expectations. The qemu machines did not see this issue as they were not
>>> enabling these sound codec kernel configuration.
>>>     Fix the build issue, by changing the lttng-modules code to match with
>>> the structures used by the v3.17 kernel. The code is conditional on the
>>> kernel version, that way it keeps working with the older kernel
>>> versions.
>>>
>>> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
>>> ---
>>>    .../fix_build_with_v3.17_kernel.patch              | 111
>>> +++++++++++++++++++++
>>>    meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb   |   1 +
>>>    2 files changed, 112 insertions(+)
>>>    create mode 100644
>>> meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
>>>
>>> diff --git
>>> a/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.pat
>>> ch
>>> b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.pat
>>> ch
>>> new file mode 100644
>>> index 0000000..86dfa69
>>> --- /dev/null
>>> +++
>>> b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.pat
>>> ch
>>> @@ -0,0 +1,111 @@
>>> +Upstream-Status: Pending
>>> +
>>> +commit 91ec0897b50c9d3f215ce6790b30bc319a136a4e
>>> +Author: Nitin A Kamble <nitin.a.kamble@intel.com>
>>> +Date:   Thu Sep 25 16:51:24 2014 -0700
>>> +
>>> +    asoc.h: fix build with v3.17 kernel
>>> +
>>> +    The snd_soc_codec structure has changed in the v3.17 kernel. Some
>>> +    of the redundant fields have been removed. To be specific this
>>> commit
>>> +    from the v3.17 kernel causes the build failure for lttng-modules.
>>> +
>>> +    |commit f4333203ec933f9272c90c7add01774ec2cf94d3
>>> +    |Author: Lars-Peter Clausen <lars@metafoo.de>
>>> +    |Date:   Mon Jun 16 18:13:02 2014 +0200
>>> +    |
>>> +    |    ASoC: Move name and id from CODEC/platform to component
>>> +    |
>>> +    |    The component struct already has a name and id field which
>>> are initialized to
>>> +    |    the same values as the same fields in the CODEC and platform
>>> structs. So remove
>>> +    |    them from the CODEC and platform structs and used the ones
>> >from the component
>>> +    |    struct instead.
>>> +    |
>>> +    |    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>>> +    |    Signed-off-by: Mark Brown <broonie@linaro.org>
>>> +
>>> +    The asoc.h is changed according to the change in the above kernel
>>> commit
>>> +    to fix the lttng-modules build. The change in the lttng-modules
>>> code is
>>> +    conditional on the kernel version, so that it does not break
>>> builds with
>>> +    previous kernel versions.
>>
>> Nice fix. To be consistent with other patches for lttng, we should
>> probably
>> put an upstream-status field in the header.
>
> It is already at the beginning of the patch. Look few lines above.

aha. Missed that. It it typically closer to the signed-off-by, so I
didn't look there.

Bruce

>
>>
>> Are you going to send this to the project ? They'll probably want to
>> tweak it, but for our purposes, this builds and looks fine.
>
> That should be fine. Once it is upstream, the next update to the recipe
> can drop the patch.
>
> Nitin
>
>>
>> Bruce
>>
>>> +
>>> +    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
>>> +
>>> +diff --git a/instrumentation/events/lttng-module/asoc.h
>>> b/instrumentation/events/lttng-module/asoc.h
>>> +index 672bea4..bf9cf86 100644
>>> +--- a/instrumentation/events/lttng-module/asoc.h
>>> ++++ b/instrumentation/events/lttng-module/asoc.h
>>> +@@ -21,6 +21,14 @@ struct snd_soc_card;
>>> + struct snd_soc_dapm_widget;
>>> + #endif
>>> +
>>> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
>>> ++#define CODEC_NAME_FIELD component.name
>>> ++#define CODEC_ID_FIELD component.id
>>> ++#else
>>> ++#define CODEC_NAME_FIELD name
>>> ++#define CODEC_ID_FIELD id
>>> ++#endif
>>> ++
>>> + /*
>>> +  * Log register events
>>> +  */
>>> +@@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
>>> +    TP_ARGS(codec, reg, val),
>>> +
>>> +    TP_STRUCT__entry(
>>> +-           __string(       name,           codec->name     )
>>> ++           __string(       name,           codec->CODEC_NAME_FIELD )
>>> +            __field(        int,            id              )
>>> +            __field(        unsigned int,   reg             )
>>> +            __field(        unsigned int,   val             )
>>> +    ),
>>> +
>>> +    TP_fast_assign(
>>> +-           tp_strcpy(name, codec->name)
>>> +-           tp_assign(id, codec->id)
>>> ++           tp_strcpy(name, codec->CODEC_NAME_FIELD)
>>> ++           tp_assign(id, codec->CODEC_ID_FIELD)
>>> +            tp_assign(reg, reg)
>>> +            tp_assign(val, val)
>>> +    ),
>>> +@@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg,
>>> +    TP_ARGS(platform, reg, val),
>>> +
>>> +    TP_STRUCT__entry(
>>> +-           __string(       name,           platform->name  )
>>> ++           __string(       name,           platform->CODEC_NAME_FIELD      )
>>> +            __field(        int,            id              )
>>> +            __field(        unsigned int,   reg             )
>>> +            __field(        unsigned int,   val             )
>>> +    ),
>>> +
>>> +    TP_fast_assign(
>>> +-           tp_strcpy(name, platform->name)
>>> +-           tp_assign(id, platform->id)
>>> ++           tp_strcpy(name, platform->CODEC_NAME_FIELD)
>>> ++           tp_assign(id, platform->CODEC_ID_FIELD)
>>> +            tp_assign(reg, reg)
>>> +            tp_assign(val, val)
>>> +    ),
>>> +@@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync,
>>> +    TP_ARGS(codec, type, status),
>>> +
>>> +    TP_STRUCT__entry(
>>> +-           __string(       name,           codec->name     )
>>> ++           __string(       name,           codec->CODEC_NAME_FIELD )
>>> +            __string(       status,         status          )
>>> +            __string(       type,           type            )
>>> +            __field(        int,            id              )
>>> +    ),
>>> +
>>> +    TP_fast_assign(
>>> +-           tp_strcpy(name, codec->name)
>>> ++           tp_strcpy(name, codec->CODEC_NAME_FIELD)
>>> +            tp_strcpy(status, status)
>>> +            tp_strcpy(type, type)
>>> +-           tp_assign(id, codec->id)
>>> ++           tp_assign(id, codec->CODEC_ID_FIELD)
>>> +    ),
>>> +
>>> +    TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
>>> diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>>> b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>>> index 04e2b0c..6ff961a 100644
>>> --- a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>>> +++ b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>>> @@ -21,6 +21,7 @@ SRC_URI =
>>> "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \
>>>
>>> file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \
>>>               file://Update-statedump-to-3.17-nsproxy-locking.patch \
>>>
>>> file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \
>>> +           file://fix_build_with_v3.17_kernel.patch \
>>>               "
>>>
>>>    export INSTALL_MOD_DIR="kernel/lttng-modules"
>>>
>>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] lttng-modules: fix build issues with the v3.17 kernel
  2014-09-26  2:00 ` [PATCH 1/1] lttng-modules: fix build issues with the v3.17 kernel nitin.a.kamble
  2014-09-26  2:23   ` Bruce Ashfield
@ 2014-09-26 17:32   ` Kamble, Nitin A
  1 sibling, 0 replies; 6+ messages in thread
From: Kamble, Nitin A @ 2014-09-26 17:32 UTC (permalink / raw)
  To: Kamble, Nitin A, richard.purdie@linuxfoundation.org, Wold, Saul,
	Openembedded-core@lists.openembedded.org,
	Ashfield, Bruce (Wind River), Zanussi, Tom,
	dvhart@linux.intel.com

RP, Saul,
  FYI, The fix for lttng-modules has gone upstream now. I have updated the
patch accordingly on the contrib branch.

Thanks,
Nitin


On 9/25/14, 7:00 PM, "Kamble, Nitin A" <nitin.a.kamble@intel.com> wrote:

>From: Nitin A Kamble <nitin.a.kamble@intel.com>
>
>The lttng-modules recipe was failing for meta-intel BSPs with the v3.17
>kernel.
>These BSP kernels were enabling some of the audio codec drivers, whose
>structures are changed recently, causing mismatch with lttng-modules code
>expectations. The qemu machines did not see this issue as they were not
>enabling these sound codec kernel configuration.
>  Fix the build issue, by changing the lttng-modules code to match with
>the structures used by the v3.17 kernel. The code is conditional on the
>kernel version, that way it keeps working with the older kernel versions.
>
>Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
>---
> .../fix_build_with_v3.17_kernel.patch              | 111
>+++++++++++++++++++++
> meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb   |   1 +
> 2 files changed, 112 insertions(+)
> create mode 100644
>meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
>
>diff --git 
>a/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patc
>h 
>b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patc
>h
>new file mode 100644
>index 0000000..86dfa69
>--- /dev/null
>+++ 
>b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patc
>h
>@@ -0,0 +1,111 @@
>+Upstream-Status: Pending
>+
>+commit 91ec0897b50c9d3f215ce6790b30bc319a136a4e
>+Author: Nitin A Kamble <nitin.a.kamble@intel.com>
>+Date:   Thu Sep 25 16:51:24 2014 -0700
>+
>+    asoc.h: fix build with v3.17 kernel
>+    
>+    The snd_soc_codec structure has changed in the v3.17 kernel. Some
>+    of the redundant fields have been removed. To be specific this commit
>+    from the v3.17 kernel causes the build failure for lttng-modules.
>+    
>+    |commit f4333203ec933f9272c90c7add01774ec2cf94d3
>+    |Author: Lars-Peter Clausen <lars@metafoo.de>
>+    |Date:   Mon Jun 16 18:13:02 2014 +0200
>+    |
>+    |    ASoC: Move name and id from CODEC/platform to component
>+    |
>+    |    The component struct already has a name and id field which are
>initialized to
>+    |    the same values as the same fields in the CODEC and platform
>structs. So remove
>+    |    them from the CODEC and platform structs and used the ones from
>the component
>+    |    struct instead.
>+    |
>+    |    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>+    |    Signed-off-by: Mark Brown <broonie@linaro.org>
>+    
>+    The asoc.h is changed according to the change in the above kernel
>commit
>+    to fix the lttng-modules build. The change in the lttng-modules code
>is
>+    conditional on the kernel version, so that it does not break builds
>with
>+    previous kernel versions.
>+    
>+    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
>+
>+diff --git a/instrumentation/events/lttng-module/asoc.h
>b/instrumentation/events/lttng-module/asoc.h
>+index 672bea4..bf9cf86 100644
>+--- a/instrumentation/events/lttng-module/asoc.h
>++++ b/instrumentation/events/lttng-module/asoc.h
>+@@ -21,6 +21,14 @@ struct snd_soc_card;
>+ struct snd_soc_dapm_widget;
>+ #endif
>+ 
>++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
>++#define CODEC_NAME_FIELD component.name
>++#define CODEC_ID_FIELD component.id
>++#else
>++#define CODEC_NAME_FIELD name
>++#define CODEC_ID_FIELD id
>++#endif
>++
>+ /*
>+  * Log register events
>+  */
>+@@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
>+ 	TP_ARGS(codec, reg, val),
>+ 
>+ 	TP_STRUCT__entry(
>+-		__string(	name,		codec->name	)
>++		__string(	name,		codec->CODEC_NAME_FIELD	)
>+ 		__field(	int,		id		)
>+ 		__field(	unsigned int,	reg		)
>+ 		__field(	unsigned int,	val		)
>+ 	),
>+ 
>+ 	TP_fast_assign(
>+-		tp_strcpy(name, codec->name)
>+-		tp_assign(id, codec->id)
>++		tp_strcpy(name, codec->CODEC_NAME_FIELD)
>++		tp_assign(id, codec->CODEC_ID_FIELD)
>+ 		tp_assign(reg, reg)
>+ 		tp_assign(val, val)
>+ 	),
>+@@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg,
>+ 	TP_ARGS(platform, reg, val),
>+ 
>+ 	TP_STRUCT__entry(
>+-		__string(	name,		platform->name	)
>++		__string(	name,		platform->CODEC_NAME_FIELD	)
>+ 		__field(	int,		id		)
>+ 		__field(	unsigned int,	reg		)
>+ 		__field(	unsigned int,	val		)
>+ 	),
>+ 
>+ 	TP_fast_assign(
>+-		tp_strcpy(name, platform->name)
>+-		tp_assign(id, platform->id)
>++		tp_strcpy(name, platform->CODEC_NAME_FIELD)
>++		tp_assign(id, platform->CODEC_ID_FIELD)
>+ 		tp_assign(reg, reg)
>+ 		tp_assign(val, val)
>+ 	),
>+@@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync,
>+ 	TP_ARGS(codec, type, status),
>+ 
>+ 	TP_STRUCT__entry(
>+-		__string(	name,		codec->name	)
>++		__string(	name,		codec->CODEC_NAME_FIELD	)
>+ 		__string(	status,		status		)
>+ 		__string(	type,		type		)
>+ 		__field(	int,		id		)
>+ 	),
>+ 
>+ 	TP_fast_assign(
>+-		tp_strcpy(name, codec->name)
>++		tp_strcpy(name, codec->CODEC_NAME_FIELD)
>+ 		tp_strcpy(status, status)
>+ 		tp_strcpy(type, type)
>+-		tp_assign(id, codec->id)
>++		tp_assign(id, codec->CODEC_ID_FIELD)
>+ 	),
>+ 
>+ 	TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
>diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>index 04e2b0c..6ff961a 100644
>--- a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>+++ b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
>@@ -21,6 +21,7 @@ SRC_URI =
>"git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \
>            
>file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \
>            file://Update-statedump-to-3.17-nsproxy-locking.patch \
>            file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \
>+           file://fix_build_with_v3.17_kernel.patch \
>            "
> 
> export INSTALL_MOD_DIR="kernel/lttng-modules"
>-- 
>1.8.1.4
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-26 17:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26  2:00 [PATCH 0/1] A fix for the lttng-modules nitin.a.kamble
2014-09-26  2:00 ` [PATCH 1/1] lttng-modules: fix build issues with the v3.17 kernel nitin.a.kamble
2014-09-26  2:23   ` Bruce Ashfield
2014-09-26 16:23     ` Kamble, Nitin A
2014-09-26 17:20       ` Bruce Ashfield
2014-09-26 17:32   ` Kamble, Nitin A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox