[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230511095409.7005-1-sunying@nj.iscas.ac.cn>
Date: Thu, 11 May 2023 17:54:09 +0800
From: sunying@...iscas.ac.cn
To: peterz@...radead.org, mingo@...hat.com, will@...nel.org
Cc: linux-kernel@...r.kernel.org, Ying Sun <sunying@...iscas.ac.cn>
Subject: [PATCH] locking/rwsem: Add configuration dependency constraints consistent with source file
From: Ying Sun <sunying@...iscas.ac.cn>
"CONFIG_RWSEM_SPIN_ON_OWNER" and "CONFIG_DEBUG_RWSEMS" are used in
kernel/locking/rwsem.c while "#ifndef CONFIG_PREEMPT_RT" is met,
which means they are available only if "CONFIG_PREEMPT_RT" is turned off.
To ensure that the corresponding source code can be compiled
when "CONFIG_RWSEM_SPIN_ON_OWNER" and "CONFIG_DEBUG_RWSEMS" are turned on,
it is recommended to add a dependency constraint on "CONFIG_PREEMPT_RT"
in kconfig.
Suggested-by: Yanjie Ren <renyanjie01@...il.com>
Signed-off-by: Ying Sun <sunying@...iscas.ac.cn>
---
kernel/Kconfig.locks | 2 +-
lib/Kconfig.debug | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks
index 4198f0273ecd..0e3462b08543 100644
--- a/kernel/Kconfig.locks
+++ b/kernel/Kconfig.locks
@@ -230,7 +230,7 @@ config MUTEX_SPIN_ON_OWNER
config RWSEM_SPIN_ON_OWNER
def_bool y
- depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW
+ depends on SMP && ARCH_SUPPORTS_ATOMIC_RMW && !PREEMPT_RT
config LOCK_SPIN_ON_OWNER
def_bool y
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index f202648dead9..0b392b1bd741 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1342,7 +1342,7 @@ config DEBUG_WW_MUTEX_SLOWPATH
config DEBUG_RWSEMS
bool "RW Semaphore debugging: basic checks"
- depends on DEBUG_KERNEL
+ depends on DEBUG_KERNEL && !PREEMPT_RT
help
This debugging feature allows mismatched rw semaphore locks
and unlocks to be detected and reported.
--
2.17.1
Powered by blists - more mailing lists