* [PATCH-tip] locking/qspinlock: Remove unnecessary BUG_ON() call
@ 2019-02-25 1:14 Waiman Long
2019-02-25 12:12 ` Will Deacon
2019-02-28 7:02 ` [tip:locking/core] " tip-bot for Waiman Long
0 siblings, 2 replies; 3+ messages in thread
From: Waiman Long @ 2019-02-25 1:14 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Will Deacon; +Cc: linux-kernel, Waiman Long
With the > 4 nesting levels case handled by the commit d682b596d993
("locking/qspinlock: Handle > 4 slowpath nesting levels"), the BUG_ON()
call in encode_tail() will never be triggered. Remove it.
Signed-off-by: Waiman Long <longman@redhat.com>
---
kernel/locking/qspinlock.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
index 21ee51b..5e9247d 100644
--- a/kernel/locking/qspinlock.c
+++ b/kernel/locking/qspinlock.c
@@ -124,9 +124,6 @@ static inline __pure u32 encode_tail(int cpu, int idx)
{
u32 tail;
-#ifdef CONFIG_DEBUG_SPINLOCK
- BUG_ON(idx > 3);
-#endif
tail = (cpu + 1) << _Q_TAIL_CPU_OFFSET;
tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH-tip] locking/qspinlock: Remove unnecessary BUG_ON() call
2019-02-25 1:14 [PATCH-tip] locking/qspinlock: Remove unnecessary BUG_ON() call Waiman Long
@ 2019-02-25 12:12 ` Will Deacon
2019-02-28 7:02 ` [tip:locking/core] " tip-bot for Waiman Long
1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2019-02-25 12:12 UTC (permalink / raw)
To: Waiman Long; +Cc: Peter Zijlstra, Ingo Molnar, linux-kernel
On Sun, Feb 24, 2019 at 08:14:13PM -0500, Waiman Long wrote:
> With the > 4 nesting levels case handled by the commit d682b596d993
> ("locking/qspinlock: Handle > 4 slowpath nesting levels"), the BUG_ON()
> call in encode_tail() will never be triggered. Remove it.
>
> Signed-off-by: Waiman Long <longman@redhat.com>
> ---
> kernel/locking/qspinlock.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
> index 21ee51b..5e9247d 100644
> --- a/kernel/locking/qspinlock.c
> +++ b/kernel/locking/qspinlock.c
> @@ -124,9 +124,6 @@ static inline __pure u32 encode_tail(int cpu, int idx)
> {
> u32 tail;
>
> -#ifdef CONFIG_DEBUG_SPINLOCK
> - BUG_ON(idx > 3);
> -#endif
> tail = (cpu + 1) << _Q_TAIL_CPU_OFFSET;
> tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */
Acked-by: Will Deacon <will.deacon@arm.com>
Will
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip:locking/core] locking/qspinlock: Remove unnecessary BUG_ON() call
2019-02-25 1:14 [PATCH-tip] locking/qspinlock: Remove unnecessary BUG_ON() call Waiman Long
2019-02-25 12:12 ` Will Deacon
@ 2019-02-28 7:02 ` tip-bot for Waiman Long
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Waiman Long @ 2019-02-28 7:02 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, tglx, paulmck, hpa, mingo, longman, akpm, torvalds,
will.deacon, peterz
Commit-ID: 733000c7ffd9d9c8c4fdfd82f0d41956c8cf0537
Gitweb: https://git.kernel.org/tip/733000c7ffd9d9c8c4fdfd82f0d41956c8cf0537
Author: Waiman Long <longman@redhat.com>
AuthorDate: Sun, 24 Feb 2019 20:14:13 -0500
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 28 Feb 2019 07:55:38 +0100
locking/qspinlock: Remove unnecessary BUG_ON() call
With the > 4 nesting levels case handled by the commit:
d682b596d993 ("locking/qspinlock: Handle > 4 slowpath nesting levels")
the BUG_ON() call in encode_tail() will never actually be triggered.
Remove it.
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1551057253-3231-1-git-send-email-longman@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/locking/qspinlock.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
index 21ee51b47961..5e9247dc2515 100644
--- a/kernel/locking/qspinlock.c
+++ b/kernel/locking/qspinlock.c
@@ -124,9 +124,6 @@ static inline __pure u32 encode_tail(int cpu, int idx)
{
u32 tail;
-#ifdef CONFIG_DEBUG_SPINLOCK
- BUG_ON(idx > 3);
-#endif
tail = (cpu + 1) << _Q_TAIL_CPU_OFFSET;
tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-28 7:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-25 1:14 [PATCH-tip] locking/qspinlock: Remove unnecessary BUG_ON() call Waiman Long
2019-02-25 12:12 ` Will Deacon
2019-02-28 7:02 ` [tip:locking/core] " tip-bot for Waiman Long
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome