locking: remove three unused Kconfig symbols
PATCH 1/1 locking: remove three unused Kconfig symbols
The Kconfig symbols ARCH_INLINE_READ_UNLOCK_IRQ, ARCH_INLINE_SPIN_UNLOCK_IRQ, and ARCH_INLINE_WRITE_UNLOCK_IRQ were added in v2.6.33, but have never actually been used. It is safe to remove these.
---
Untested. These three symbols were added in commit 6beb000923882f6204ea2cfcd932e568e900803f ("locking: Make inlining decision Kconfig based").
arch/s390/Kconfig | 3 --- kernel/Kconfig.locks | 10 ---------- 2 files changed, 13 deletions(-)
arch/s390/Kconfig +0 -3
@@ -70,7 +70,6 @@ config S390 select ARCH_INLINE_READ_TRYLOCK select ARCH_INLINE_READ_UNLOCK select ARCH_INLINE_READ_UNLOCK_BH - select ARCH_INLINE_READ_UNLOCK_IRQ select ARCH_INLINE_READ_UNLOCK_IRQRESTORE select ARCH_INLINE_SPIN_LOCK select ARCH_INLINE_SPIN_LOCK_BH
@@ -80,7 +79,6 @@ config S390 select ARCH_INLINE_SPIN_TRYLOCK_BH select ARCH_INLINE_SPIN_UNLOCK select ARCH_INLINE_SPIN_UNLOCK_BH - select ARCH_INLINE_SPIN_UNLOCK_IRQ select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE select ARCH_INLINE_WRITE_LOCK select ARCH_INLINE_WRITE_LOCK_BH
@@ -89,7 +87,6 @@ config S390 select ARCH_INLINE_WRITE_TRYLOCK select ARCH_INLINE_WRITE_UNLOCK select ARCH_INLINE_WRITE_UNLOCK_BH - select ARCH_INLINE_WRITE_UNLOCK_IRQ select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE select ARCH_SAVE_PAGE_KEYS if HIBERNATION select ARCH_WANT_IPC_PARSE_VERSION
kernel/Kconfig.locks +0 -10
@@ -25,9 +25,6 @@ config ARCH_INLINE_SPIN_UNLOCK config ARCH_INLINE_SPIN_UNLOCK_BH bool -config ARCH_INLINE_SPIN_UNLOCK_IRQ - bool - config ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE bool
@@ -53,13 +50,9 @@ config ARCH_INLINE_READ_UNLOCK config ARCH_INLINE_READ_UNLOCK_BH bool -config ARCH_INLINE_READ_UNLOCK_IRQ - bool - config ARCH_INLINE_READ_UNLOCK_IRQRESTORE bool - config ARCH_INLINE_WRITE_TRYLOCK bool
@@ -81,9 +74,6 @@ config ARCH_INLINE_WRITE_UNLOCK config ARCH_INLINE_WRITE_UNLOCK_BH bool -config ARCH_INLINE_WRITE_UNLOCK_IRQ - bool - config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE bool
Signature · 1 line
1.7.11.7
Quoted 72 lines · Paul Bolle
The
KconfigsymbolsARCH_INLINE_READ_UNLOCK_IRQ,ARCH_INLINE_SPIN_UNLOCK_IRQ, andARCH_INLINE_WRITE_UNLOCK_IRQwere added in v2.6.33, but have never actually been used. It is safe to remove these.Signed-off-by Paul Bolle <[email protected]>---
Untested. These three symbols were added in commit6beb000923882f6204ea2cfcd932e568e900803f("locking: Make inlining decisionKconfigbased").arch/s390/Kconfig | 3 --- kernel/Kconfig.locks | 10 ---------- 2 files changed, 13 deletions(-)arch/s390/Kconfig +0
-3@@ -70,7 +70,6 @@ config S390 select ARCH_INLINE_READ_TRYLOCK select ARCH_INLINE_READ_UNLOCK select ARCH_INLINE_READ_UNLOCK_BH - select ARCH_INLINE_READ_UNLOCK_IRQ select ARCH_INLINE_READ_UNLOCK_IRQRESTORE select ARCH_INLINE_SPIN_LOCK select ARCH_INLINE_SPIN_LOCK_BH@@ -80,7 +79,6 @@ config S390 select ARCH_INLINE_SPIN_TRYLOCK_BH select ARCH_INLINE_SPIN_UNLOCK select ARCH_INLINE_SPIN_UNLOCK_BH - select ARCH_INLINE_SPIN_UNLOCK_IRQ select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE select ARCH_INLINE_WRITE_LOCK select ARCH_INLINE_WRITE_LOCK_BH@@ -89,7 +87,6 @@ config S390 select ARCH_INLINE_WRITE_TRYLOCK select ARCH_INLINE_WRITE_UNLOCK select ARCH_INLINE_WRITE_UNLOCK_BH - select ARCH_INLINE_WRITE_UNLOCK_IRQ select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE select ARCH_SAVE_PAGE_KEYS if HIBERNATION select ARCH_WANT_IPC_PARSE_VERSIONkernel/Kconfig.locks +0
-7@@ -25,9 +25,6 @@ config ARCH_INLINE_SPIN_UNLOCK config ARCH_INLINE_SPIN_UNLOCK_BH bool -config ARCH_INLINE_SPIN_UNLOCK_IRQ - bool - config ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE bool@@ -53,13 +50,9 @@ config ARCH_INLINE_READ_UNLOCK config ARCH_INLINE_READ_UNLOCK_BH bool -config ARCH_INLINE_READ_UNLOCK_IRQ - bool - config ARCH_INLINE_READ_UNLOCK_IRQRESTORE bool - config ARCH_INLINE_WRITE_TRYLOCK bool
kernel/Kconfig.locks config ARCH_INLINE_WRITE_UNLOCK · line 78
Quoted 8 lines
kernel/Kconfig.locks +0
-3@@ -81,9 +74,6 @@ config ARCH_INLINE_WRITE_UNLOCK config ARCH_INLINE_WRITE_UNLOCK_BH bool -config ARCH_INLINE_WRITE_UNLOCK_IRQ - bool - config ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE bool
Erm, if you look at the code in question you'll see that they are unused I think due to a bug:
config INLINE_READ_UNLOCK_IRQ
def_bool y
depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_BHShouldn't that depend on ARCH_INLINE_READ_UNLOCK_IRQ?
Similarly for the others.
Thanks,
Ingo
Quoted 9 lines · Ingo Molnar
Quoted 5 lines · Paul Bolle
The
KconfigsymbolsARCH_INLINE_READ_UNLOCK_IRQ,ARCH_INLINE_SPIN_UNLOCK_IRQ, andARCH_INLINE_WRITE_UNLOCK_IRQwere added in v2.6.33, but have never actually been used. It is safe to remove these.Erm, if you look at the code in question you'll see that they are unused I think due to a bug:
Quoted 7 lines
config
INLINE_READ_UNLOCK_IRQdef_bool y depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_BHShouldn't that depend on
ARCH_INLINE_READ_UNLOCK_IRQ?Similarly for the others.
Yes, that seems correct. I must admit that I didn't spot that possibility, but then again this Kconfig file is near unreadable (too much repetition for human readers).
Would you have any idea why this problem wasn't noticed in 16 (!) releases? Fedora 17, which I did this patch on, has Kconfig symbolk PREEMPT not set. Is it perhaps commit to not enable that option?
Paul Bolle
Quoted 3 lines · Paul Bolle
Would you have any idea why this problem wasn't noticed in 16 (!) releases? Fedora 17, which I did this patch on, has
Kconfigsymbolk PREEMPT not set. Is it perhaps commit to not enable that option?
s/commit/common/ (and, obviously, s/symbolk/symbol/).
Paul Bolle
Quoted 14 lines · Paul Bolle
Quoted 13 lines · Ingo Molnar
Quoted 5 lines · Paul Bolle
The
KconfigsymbolsARCH_INLINE_READ_UNLOCK_IRQ,ARCH_INLINE_SPIN_UNLOCK_IRQ, andARCH_INLINE_WRITE_UNLOCK_IRQwere added in v2.6.33, but have never actually been used. It is safe to remove these.Erm, if you look at the code in question you'll see that they are unused I think due to a bug:
config
INLINE_READ_UNLOCK_IRQdef_bool y depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_BH
Quoted 7 lines
Quoted 3 lines
Shouldn't that depend on
ARCH_INLINE_READ_UNLOCK_IRQ?Similarly for the others.
Yes, that seems correct. I must admit that I didn't spot that possibility, but then again this
Kconfigfile is near unreadable (too much repetition for human readers).
Yeah, Kconfig isn't a very sophisticated language - it's the COBOL of config languages.
Quoted 3 lines
Would you have any idea why this problem wasn't noticed in 16 (!) releases? Fedora 17, which I did this patch on, has
Kconfigsymbolk PREEMPT not set. Is it perhaps commit to not enable that option?
AFAICS it's a latent bug: it can only be noticed if these switches are set to different values by an arch - but the defaults and s390 (the two main cases) never do that.
So it's not causing any runtime problems today - but should be fixed nevertheless, now that you noticed it! :-)
Thanks,
Ingo
PATCH v2 1/1 locking: Fix copy/paste errors "ARCH_INLINE_*_UNLOCK_BH"
The Kconfig symbols ARCH_INLINE_READ_UNLOCK_IRQ, ARCH_INLINE_SPIN_UNLOCK_IRQ, and ARCH_INLINE_WRITE_UNLOCK_IRQ were added in v2.6.33, but have never actually been used. Ingo Molnar spotted that this is caused by three identical copy/paste erros. Eg, the Kconfig entry for
INLINE_READ_UNLOCK_IRQ
has an (optional) dependency on
ARCH_INLINE_READ_UNLOCK_BH
were it apparently should depend on
ARCH_INLINE_READ_UNLOCK_IRQ
instead. Likewise for the Kconfig entries for INLINE_SPIN_UNLOCK_IRQ and INLINE_WRITE_UNLOCK_IRQ. Fix these three errors.
---
0) v1 was titled "locking: remove three unused Kconfig symbols".
1) Still untested.
kernel/Kconfig.locks | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/Kconfig.locks +3 -3
@@ -138,7 +138,7 @@ config INLINE_SPIN_UNLOCK_BH config INLINE_SPIN_UNLOCK_IRQ def_bool y - depends on !PREEMPT || ARCH_INLINE_SPIN_UNLOCK_BH + depends on !PREEMPT || ARCH_INLINE_SPIN_UNLOCK_IRQ config INLINE_SPIN_UNLOCK_IRQRESTORE def_bool y
@@ -175,7 +175,7 @@ config INLINE_READ_UNLOCK_BH config INLINE_READ_UNLOCK_IRQ def_bool y - depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_BH + depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_IRQ config INLINE_READ_UNLOCK_IRQRESTORE def_bool y
@@ -212,7 +212,7 @@ config INLINE_WRITE_UNLOCK_BH config INLINE_WRITE_UNLOCK_IRQ def_bool y - depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK_BH + depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK_IRQ config INLINE_WRITE_UNLOCK_IRQRESTORE def_bool y
Signature · 1 line
1.7.11.7
Re: [PATCH v2] locking: Fix copy/paste errors "ARCH_INLINE_*_UNLOCK_BH"
Quoted 10 lines · Paul Bolle
The
KconfigsymbolsARCH_INLINE_READ_UNLOCK_IRQ,ARCH_INLINE_SPIN_UNLOCK_IRQ, andARCH_INLINE_WRITE_UNLOCK_IRQwere added in v2.6.33, but have never actually been used. Ingo Molnar spotted that this is caused by three identical copy/paste erros. Eg, theKconfigentry for
INLINE_READ_UNLOCK_IRQhas an (optional) dependency on
ARCH_INLINE_READ_UNLOCK_BH
Quoted 8 lines
were it apparently should depend on
ARCH_INLINE_READ_UNLOCK_IRQinstead. Likewise for the
Kconfigentries forINLINE_SPIN_UNLOCK_IRQandINLINE_WRITE_UNLOCK_IRQ. Fix these three errors.Reported-by Ingo Molnar <[email protected]>Signed-off-by Paul Bolle <[email protected]>
Thanks!
tip-bot for Paul Bolle
merge bot[tip:core/locking] locking: Fix copy/paste errors of " ARCH_INLINE_*_UNLOCK_BH"
In reply to Paul Bollelocking: Fix copy/paste errors of "ARCH_INLINE_*_UNLOCK_BH"
Commit-ID: 4eedb77a9cd8f2e68b31c8b9a20524a50727c16f Gitweb: http://git.kernel.org/tip/4eedb77a9cd8f2e68b31c8b9a20524a50727c16f Author: Paul Bolle <[email protected]> AuthorDate: Fri, 17 May 2013 10:51:33 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 28 May 2013 08:50:00 +0200
locking: Fix copy/paste errors of "ARCH_INLINE_*_UNLOCK_BH"
The Kconfig symbols ARCH_INLINE_READ_UNLOCK_IRQ, ARCH_INLINE_SPIN_UNLOCK_IRQ, and ARCH_INLINE_WRITE_UNLOCK_IRQ were added in v2.6.33, but have never actually been used. Ingo Molnar spotted that this is caused by three identical copy/paste erros. Eg, the Kconfig entry for
INLINE_READ_UNLOCK_IRQ
has an (optional) dependency on:
ARCH_INLINE_READ_UNLOCK_BH
were it apparently should depend on:
ARCH_INLINE_READ_UNLOCK_IRQ
instead. Likewise for the Kconfig entries for INLINE_SPIN_UNLOCK_IRQ and INLINE_WRITE_UNLOCK_IRQ. Fix these three errors.
This never really caused any real problems as these symbols are set (or unset) in a group - but it's worth fixing it nevertheless.
--- kernel/Kconfig.locks | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/Kconfig.locks +3 -3
@@ -138,7 +138,7 @@ config INLINE_SPIN_UNLOCK_BH config INLINE_SPIN_UNLOCK_IRQ def_bool y - depends on !PREEMPT || ARCH_INLINE_SPIN_UNLOCK_BH + depends on !PREEMPT || ARCH_INLINE_SPIN_UNLOCK_IRQ config INLINE_SPIN_UNLOCK_IRQRESTORE def_bool y
@@ -175,7 +175,7 @@ config INLINE_READ_UNLOCK_BH config INLINE_READ_UNLOCK_IRQ def_bool y - depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_BH + depends on !PREEMPT || ARCH_INLINE_READ_UNLOCK_IRQ config INLINE_READ_UNLOCK_IRQRESTORE def_bool y
@@ -212,7 +212,7 @@ config INLINE_WRITE_UNLOCK_BH config INLINE_WRITE_UNLOCK_IRQ def_bool y - depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK_BH + depends on !PREEMPT || ARCH_INLINE_WRITE_UNLOCK_IRQ config INLINE_WRITE_UNLOCK_IRQRESTORE def_bool y