Skip to contentSkip to conversation

Jan Kiszka : cobalt: Fix conditional build of lock_vfile registration

Xenomai Philippe Gerum 2 participants 7 messages Jul 26, 2017 – Jul 27, 2017 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 25 lines · git repository hosting
Module: xenomai-jki
Branch: for-forge
Commit: 634a95c9c023dda40607e5e5c1dd43761f59e541
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=634a95c9c023dda40607e5e5c1dd43761f59e541
Author: Jan Kiszka <[email protected]>
Date:   Wed Jul 26 18:50:43 2017 +0200

cobalt: Fix conditional build of lock_vfile registration

There is and there was never a CONFIG_XENO_DEBUG_LOCKING. Fixes de66d324a93d.

---

 kernel/cobalt/procfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/cobalt/procfs.c +0 -0
index 9d193af..85aea0c 100644

kernel/cobalt/procfs.c static struct xnvfile_regular apc_vfile = { · line 219

Quoted 4 lines
kernel/cobalt/procfs.c +0 -1
@@ -216,7 +216,7 @@ static struct xnvfile_regular apc_vfile = {
 void xnprocfs_cleanup_tree(void)
 {
 #ifdef CONFIG_XENO_OPT_DEBUG
-#ifdef CONFIG_XENO_DEBUG_LOCKING

This would reintroduce another bug [1]. Better check for the proper symbol instead, i.e. CONFIG_XENO_OPT_DEBUG_LOCKING.

[1] http://xenomai.org/pipermail/xenomai/2017-February/037136.html

Signature · 1 line
Philippe.
#2 lore raw
Quoted 21 lines · Philippe Gerum
Quoted 20 lines · git repository hosting
Module: xenomai-jki
Branch: for-forge
Commit: 634a95c9c023dda40607e5e5c1dd43761f59e541
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=634a95c9c023dda40607e5e5c1dd43761f59e541
Author: Jan Kiszka <[email protected]>
Date:   Wed Jul 26 18:50:43 2017 +0200

cobalt: Fix conditional build of lock_vfile registration

There is and there was never a CONFIG_XENO_DEBUG_LOCKING. Fixes de66d324a93d.

---

 kernel/cobalt/procfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines

kernel/cobalt/procfs.c static struct xnvfile_regular apc_vfile = { · line 219

Quoted 9 lines
kernel/cobalt/procfs.c +0 -1
index 9d193af..85aea0c 100644
@@ -216,7 +216,7 @@ static struct xnvfile_regular apc_vfile = {
 void xnprocfs_cleanup_tree(void)
 {
 #ifdef CONFIG_XENO_OPT_DEBUG
-#ifdef CONFIG_XENO_DEBUG_LOCKING

This would reintroduce another bug [1]. Better check for the proper symbol instead, i.e. CONFIG_XENO_OPT_DEBUG_LOCKING.

That won't solve the issue either. There is something more seriously broken in the dependencies. Analyzing....

Quoted 3 lines

[1] http://xenomai.org/pipermail/xenomai/2017-February/037136.html

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux
#3 lore raw
Quoted 35 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 20 lines · git repository hosting
Module: xenomai-jki
Branch: for-forge
Commit: 634a95c9c023dda40607e5e5c1dd43761f59e541
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=634a95c9c023dda40607e5e5c1dd43761f59e541
Author: Jan Kiszka <[email protected]>
Date:   Wed Jul 26 18:50:43 2017 +0200

cobalt: Fix conditional build of lock_vfile registration

There is and there was never a CONFIG_XENO_DEBUG_LOCKING. Fixes de66d324a93d.

---

 kernel/cobalt/procfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines

kernel/cobalt/procfs.c static struct xnvfile_regular apc_vfile = { · line 219

Quoted 9 lines
kernel/cobalt/procfs.c +0 -1
index 9d193af..85aea0c 100644
@@ -216,7 +216,7 @@ static struct xnvfile_regular apc_vfile = {
 void xnprocfs_cleanup_tree(void)
 {
 #ifdef CONFIG_XENO_OPT_DEBUG
-#ifdef CONFIG_XENO_DEBUG_LOCKING

This would reintroduce another bug [1]. Better check for the proper symbol instead, i.e. CONFIG_XENO_OPT_DEBUG_LOCKING.

Quoted 3 lines

That won't solve the issue either. There is something more seriously broken in the dependencies. Analyzing....

The problem is that #if IS_ENABLED() does not update the dependencies of that file so that kbuild does not recompile what is actually affected by config changes. A clean rebuild will work.

Solution is to replace *all* #if IS_ENABLED() by proper #ifdef.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux
#4 lore raw
Quoted 40 lines · Jan Kiszka
Quoted 35 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 20 lines · git repository hosting
Module: xenomai-jki
Branch: for-forge
Commit: 634a95c9c023dda40607e5e5c1dd43761f59e541
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=634a95c9c023dda40607e5e5c1dd43761f59e541
Author: Jan Kiszka <[email protected]>
Date:   Wed Jul 26 18:50:43 2017 +0200

cobalt: Fix conditional build of lock_vfile registration

There is and there was never a CONFIG_XENO_DEBUG_LOCKING. Fixes de66d324a93d.

---

 kernel/cobalt/procfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines

kernel/cobalt/procfs.c static struct xnvfile_regular apc_vfile = { · line 219

Quoted 9 lines
kernel/cobalt/procfs.c +0 -1
index 9d193af..85aea0c 100644
@@ -216,7 +216,7 @@ static struct xnvfile_regular apc_vfile = {
 void xnprocfs_cleanup_tree(void)
 {
 #ifdef CONFIG_XENO_OPT_DEBUG
-#ifdef CONFIG_XENO_DEBUG_LOCKING

This would reintroduce another bug [1]. Better check for the proper symbol instead, i.e. CONFIG_XENO_OPT_DEBUG_LOCKING.

Quoted 3 lines

That won't solve the issue either. There is something more seriously broken in the dependencies. Analyzing....

Quoted 6 lines

The problem is that #if IS_ENABLED() does not update the dependencies of that file so that kbuild does not recompile what is actually affected by config changes. A clean rebuild will work.

Solution is to replace *all* #if IS_ENABLED() by proper #ifdef.

Yes, this was the purpose of the initial fix, which used the wrong symbol though. Because the deps was broken, we ended up with some files not being rebuilt when switching between debug modes, leaving xnlock_stats undefined in some cases. We only need to fix the symbol, i.e. #ifdef CONFIG_XENO_DEBUG_LOCKING, and all other occurrences of similar constructs.

Signature · 1 line
Philippe.
#5 lore raw
Quoted 48 lines · Philippe Gerum
Quoted 40 lines · Jan Kiszka
Quoted 35 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 20 lines · git repository hosting
Module: xenomai-jki
Branch: for-forge
Commit: 634a95c9c023dda40607e5e5c1dd43761f59e541
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=634a95c9c023dda40607e5e5c1dd43761f59e541
Author: Jan Kiszka <[email protected]>
Date:   Wed Jul 26 18:50:43 2017 +0200

cobalt: Fix conditional build of lock_vfile registration

There is and there was never a CONFIG_XENO_DEBUG_LOCKING. Fixes de66d324a93d.

---

 kernel/cobalt/procfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines

kernel/cobalt/procfs.c static struct xnvfile_regular apc_vfile = { · line 219

Quoted 9 lines
kernel/cobalt/procfs.c +0 -1
index 9d193af..85aea0c 100644
@@ -216,7 +216,7 @@ static struct xnvfile_regular apc_vfile = {
 void xnprocfs_cleanup_tree(void)
 {
 #ifdef CONFIG_XENO_OPT_DEBUG
-#ifdef CONFIG_XENO_DEBUG_LOCKING

This would reintroduce another bug [1]. Better check for the proper symbol instead, i.e. CONFIG_XENO_OPT_DEBUG_LOCKING.

Quoted 3 lines

That won't solve the issue either. There is something more seriously broken in the dependencies. Analyzing....

Quoted 6 lines

The problem is that #if IS_ENABLED() does not update the dependencies of that file so that kbuild does not recompile what is actually affected by config changes. A clean rebuild will work.

Solution is to replace *all* #if IS_ENABLED() by proper #ifdef.

Quoted 6 lines

Yes, this was the purpose of the initial fix, which used the wrong symbol though. Because the deps was broken, we ended up with some files not being rebuilt when switching between debug modes, leaving xnlock_stats undefined in some cases. We only need to fix the symbol, i.e. #ifdef CONFIG_XENO_DEBUG_LOCKING, and all other occurrences of similar constructs.

Done, see for-forge.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux
#6 lore raw
Quoted 49 lines · Jan Kiszka
Quoted 48 lines · Philippe Gerum
Quoted 46 lines · Jan Kiszka
Quoted 35 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 20 lines · git repository hosting
Module: xenomai-jki
Branch: for-forge
Commit: 634a95c9c023dda40607e5e5c1dd43761f59e541
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=634a95c9c023dda40607e5e5c1dd43761f59e541
Author: Jan Kiszka <[email protected]>
Date:   Wed Jul 26 18:50:43 2017 +0200

cobalt: Fix conditional build of lock_vfile registration

There is and there was never a CONFIG_XENO_DEBUG_LOCKING. Fixes de66d324a93d.

---

 kernel/cobalt/procfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines

kernel/cobalt/procfs.c static struct xnvfile_regular apc_vfile = { · line 219

Quoted 9 lines
kernel/cobalt/procfs.c +0 -1
index 9d193af..85aea0c 100644
@@ -216,7 +216,7 @@ static struct xnvfile_regular apc_vfile = {
 void xnprocfs_cleanup_tree(void)
 {
 #ifdef CONFIG_XENO_OPT_DEBUG
-#ifdef CONFIG_XENO_DEBUG_LOCKING

This would reintroduce another bug [1]. Better check for the proper symbol instead, i.e. CONFIG_XENO_OPT_DEBUG_LOCKING.

Quoted 3 lines

That won't solve the issue either. There is something more seriously broken in the dependencies. Analyzing....

The problem is that #if IS_ENABLED() does not update the dependencies of that file so that kbuild does not recompile what is actually affected by config changes. A clean rebuild will work.

Solution is to replace *all* #if IS_ENABLED() by proper #ifdef.

Quoted 9 lines
Quoted 6 lines

Yes, this was the purpose of the initial fix, which used the wrong symbol though. Because the deps was broken, we ended up with some files not being rebuilt when switching between debug modes, leaving xnlock_stats undefined in some cases. We only need to fix the symbol, i.e. #ifdef CONFIG_XENO_DEBUG_LOCKING, and all other occurrences of similar constructs.

Done, see for-forge.

Pull into -next, thanks.

Signature · 1 line
Philippe.
#7 lore raw
In reply to Jan Kiszka
Quoted 49 lines · Jan Kiszka
Quoted 48 lines · Philippe Gerum
Quoted 46 lines · Jan Kiszka
Quoted 35 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 20 lines · git repository hosting
Module: xenomai-jki
Branch: for-forge
Commit: 634a95c9c023dda40607e5e5c1dd43761f59e541
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=634a95c9c023dda40607e5e5c1dd43761f59e541
Author: Jan Kiszka <[email protected]>
Date:   Wed Jul 26 18:50:43 2017 +0200

cobalt: Fix conditional build of lock_vfile registration

There is and there was never a CONFIG_XENO_DEBUG_LOCKING. Fixes de66d324a93d.

---

 kernel/cobalt/procfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines

kernel/cobalt/procfs.c static struct xnvfile_regular apc_vfile = { · line 219

Quoted 9 lines
kernel/cobalt/procfs.c +0 -1
index 9d193af..85aea0c 100644
@@ -216,7 +216,7 @@ static struct xnvfile_regular apc_vfile = {
 void xnprocfs_cleanup_tree(void)
 {
 #ifdef CONFIG_XENO_OPT_DEBUG
-#ifdef CONFIG_XENO_DEBUG_LOCKING

This would reintroduce another bug [1]. Better check for the proper symbol instead, i.e. CONFIG_XENO_OPT_DEBUG_LOCKING.

Quoted 3 lines

That won't solve the issue either. There is something more seriously broken in the dependencies. Analyzing....

The problem is that #if IS_ENABLED() does not update the dependencies of that file so that kbuild does not recompile what is actually affected by config changes. A clean rebuild will work.

Solution is to replace *all* #if IS_ENABLED() by proper #ifdef.

Quoted 9 lines
Quoted 6 lines

Yes, this was the purpose of the initial fix, which used the wrong symbol though. Because the deps was broken, we ended up with some files not being rebuilt when switching between debug modes, leaving xnlock_stats undefined in some cases. We only need to fix the symbol, i.e. #ifdef CONFIG_XENO_DEBUG_LOCKING, and all other occurrences of similar constructs.

Done, see for-forge.

Pulled into -next, thanks.

Signature · 1 line
Philippe.