Skip to contentSkip to conversation

init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menu

PATCH In review Josh Triplett 2 participants 5 messages Oct 3, 2014 – Oct 4, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menu

commit 03b8c7b623c80af264c4c8d6111e5c6289933666 ("futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test") added the HAVE_FUTEX_CMPXCHG symbol right below FUTEX. This placed it right in the middle of the options for the EXPERT menu. However, HAVE_FUTEX_CMPXCHG does not depend on EXPERT or FUTEX, so Kconfig stops placing items in the EXPERT menu, and displays the remaining several EXPERT items (starting with EPOLL) directly in the General Setup menu.

Since both users of HAVE_FUTEX_CMPXCHG only select it "if FUTEX", make HAVE_FUTEX_CMPXCHG itself depend on FUTEX. With this change, the subsequent items display as part of the EXPERT menu again; the EMBEDDED menu now appears as the next top-level item in the General Setup menu, which makes General Setup much shorter and more usable.

---

Posting for review. I can upstream this through the tiny tree.

Personally, I'd consider this a bit of a bug in Kconfig; ideally, Kconfig should only consider symbols with prompt strings when considering what to display in a menu. However, in the interim, this one-line patch drastically improves the usability of the "General Setup" config menu.

 init/Kconfig | 1 +
 1 file changed, 1 insertion(+)
init/Kconfig +1 -0
index 31505a5..80a6907 100644
@@ -1477,6 +1477,7 @@ config FUTEX
 
 config HAVE_FUTEX_CMPXCHG
 	bool
+	depends on FUTEX
 	help
 	  Architectures should select this if futex_atomic_cmpxchg_inatomic()
 	  is implemented and always working. This removes a couple of runtime
Signature · 1 line
2.1.1
Acked-by on v1 2/2
#1 lore raw
Quoted 17 lines · Josh Triplett

commit 03b8c7b623c80af264c4c8d6111e5c6289933666 ("futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test") added the HAVE_FUTEX_CMPXCHG symbol right below FUTEX. This placed it right in the middle of the options for the EXPERT menu. However, HAVE_FUTEX_CMPXCHG does not depend on EXPERT or FUTEX, so Kconfig stops placing items in the EXPERT menu, and displays the remaining several EXPERT items (starting with EPOLL) directly in the General Setup menu.

Since both users of HAVE_FUTEX_CMPXCHG only select it "if FUTEX", make HAVE_FUTEX_CMPXCHG itself depend on FUTEX. With this change, the subsequent items display as part of the EXPERT menu again; the EMBEDDED menu now appears as the next top-level item in the General Setup menu, which makes General Setup much shorter and more usable.

---

Quoted 7 lines

Posting for review. I can upstream this through the tiny tree.

Personally, I'd consider this a bit of a bug in Kconfig; ideally, Kconfig should only consider symbols with prompt strings when considering what to display in a menu. However, in the interim, this one-line patch drastically improves the usability of the "General Setup" config menu.

Good catch. Thanks.

I would prefer to see both of your patches merged quickly into 3.17 no matter how they get there.

both patches:

Quoted 16 lines
 init/Kconfig | 1 +
 1 file changed, 1 insertion(+)
init/Kconfig +1 -0
index 31505a5..80a6907 100644
@@ -1477,6 +1477,7 @@ config FUTEX
 
 config HAVE_FUTEX_CMPXCHG
 	bool
+	depends on FUTEX
 	help
 	  Architectures should select this if futex_atomic_cmpxchg_inatomic()
 	  is implemented and always working. This removes a couple of runtime
Signature · 1 line
~Randy
#2 lore raw
Quoted 26 lines · Randy Dunlap
Quoted 17 lines · Josh Triplett

commit 03b8c7b623c80af264c4c8d6111e5c6289933666 ("futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test") added the HAVE_FUTEX_CMPXCHG symbol right below FUTEX. This placed it right in the middle of the options for the EXPERT menu. However, HAVE_FUTEX_CMPXCHG does not depend on EXPERT or FUTEX, so Kconfig stops placing items in the EXPERT menu, and displays the remaining several EXPERT items (starting with EPOLL) directly in the General Setup menu.

Since both users of HAVE_FUTEX_CMPXCHG only select it "if FUTEX", make HAVE_FUTEX_CMPXCHG itself depend on FUTEX. With this change, the subsequent items display as part of the EXPERT menu again; the EMBEDDED menu now appears as the next top-level item in the General Setup menu, which makes General Setup much shorter and more usable.

---

Quoted 7 lines

Posting for review. I can upstream this through the tiny tree.

Personally, I'd consider this a bit of a bug in Kconfig; ideally, Kconfig should only consider symbols with prompt strings when considering what to display in a menu. However, in the interim, this one-line patch drastically improves the usability of the "General Setup" config menu.

Quoted 7 lines

Good catch. Thanks.

I would prefer to see both of your patches merged quickly into 3.17 no matter how they get there.

both patches:

Both of the fixes are entirely about Kconfig usability, don't affect the built kernel, and have existed for quite a few kernel releases, so I hadn't planned to get them into 3.17 at the last minute. I'd just planned to submit them during the 3.18 merge window when that opens.

Do you really think they should be pushed into 3.17 at this point?

If you'd like, I could get them into 3.18 and mark them for stable, instead.

- Josh Triplett

#3 lore raw
Quoted 35 lines · Josh Triplett
Quoted 26 lines · Randy Dunlap
Quoted 17 lines · Josh Triplett

commit 03b8c7b623c80af264c4c8d6111e5c6289933666 ("futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test") added the HAVE_FUTEX_CMPXCHG symbol right below FUTEX. This placed it right in the middle of the options for the EXPERT menu. However, HAVE_FUTEX_CMPXCHG does not depend on EXPERT or FUTEX, so Kconfig stops placing items in the EXPERT menu, and displays the remaining several EXPERT items (starting with EPOLL) directly in the General Setup menu.

Since both users of HAVE_FUTEX_CMPXCHG only select it "if FUTEX", make HAVE_FUTEX_CMPXCHG itself depend on FUTEX. With this change, the subsequent items display as part of the EXPERT menu again; the EMBEDDED menu now appears as the next top-level item in the General Setup menu, which makes General Setup much shorter and more usable.

---

Quoted 7 lines

Posting for review. I can upstream this through the tiny tree.

Personally, I'd consider this a bit of a bug in Kconfig; ideally, Kconfig should only consider symbols with prompt strings when considering what to display in a menu. However, in the interim, this one-line patch drastically improves the usability of the "General Setup" config menu.

Quoted 7 lines

Good catch. Thanks.

I would prefer to see both of your patches merged quickly into 3.17 no matter how they get there.

both patches:

Quoted 6 lines

Both of the fixes are entirely about Kconfig usability, don't affect the built kernel, and have existed for quite a few kernel releases, so I hadn't planned to get them into 3.17 at the last minute. I'd just planned to submit them during the 3.18 merge window when that opens.

Do you really think they should be pushed into 3.17 at this point?

Both of them are bugs IMO, even though they are usability/presentation bugs. and they make the menu system confusing.

Quoted 2 lines

If you'd like, I could get them into 3.18 and mark them for stable, instead.

Do that at a minimum, please.

Signature · 1 line
~Randy
#4 lore raw
Quoted 41 lines · Randy Dunlap
Quoted 40 lines · Josh Triplett
Quoted 26 lines · Randy Dunlap
Quoted 17 lines · Josh Triplett

commit 03b8c7b623c80af264c4c8d6111e5c6289933666 ("futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test") added the HAVE_FUTEX_CMPXCHG symbol right below FUTEX. This placed it right in the middle of the options for the EXPERT menu. However, HAVE_FUTEX_CMPXCHG does not depend on EXPERT or FUTEX, so Kconfig stops placing items in the EXPERT menu, and displays the remaining several EXPERT items (starting with EPOLL) directly in the General Setup menu.

Since both users of HAVE_FUTEX_CMPXCHG only select it "if FUTEX", make HAVE_FUTEX_CMPXCHG itself depend on FUTEX. With this change, the subsequent items display as part of the EXPERT menu again; the EMBEDDED menu now appears as the next top-level item in the General Setup menu, which makes General Setup much shorter and more usable.

---

Quoted 7 lines

Posting for review. I can upstream this through the tiny tree.

Personally, I'd consider this a bit of a bug in Kconfig; ideally, Kconfig should only consider symbols with prompt strings when considering what to display in a menu. However, in the interim, this one-line patch drastically improves the usability of the "General Setup" config menu.

Quoted 7 lines

Good catch. Thanks.

I would prefer to see both of your patches merged quickly into 3.17 no matter how they get there.

both patches:

Both of the fixes are entirely about Kconfig usability, don't affect the built kernel, and have existed for quite a few kernel releases, so I hadn't planned to get them into 3.17 at the last minute. I'd just planned to submit them during the 3.18 merge window when that opens.

Quoted 4 lines
Quoted 1 line

Do you really think they should be pushed into 3.17 at this point?

Both of them are bugs IMO, even though they are usability/presentation bugs. and they make the menu system confusing.

OK, I've pushed just these two patches (with your acks and a Cc to stable) to tiny/kconfig, and I'll send a direct pull request for that branch to Linus for 3.17.

- Josh Triplett