Add and use a generic version of devmem_is_allowed()
[sfrench/cifs-2.6.git] / lib / Kconfig.debug
index ebe5ab111e65ac2a689024bb3963eebe821672e4..c63fc68f9bf2e85bfc38a9192c70996b7f3f57e7 100644 (file)
@@ -212,9 +212,10 @@ config DEBUG_INFO
 
          If unsure, say N.
 
+if DEBUG_INFO
+
 config DEBUG_INFO_REDUCED
        bool "Reduce debugging information"
-       depends on DEBUG_INFO
        help
          If you say Y here gcc is instructed to generate less debugging
          information for structure types. This means that tools that
@@ -227,7 +228,6 @@ config DEBUG_INFO_REDUCED
 
 config DEBUG_INFO_COMPRESSED
        bool "Compressed debugging information"
-       depends on DEBUG_INFO
        depends on $(cc-option,-gz=zlib)
        depends on $(ld-option,--compress-debug-sections=zlib)
        help
@@ -243,7 +243,6 @@ config DEBUG_INFO_COMPRESSED
 
 config DEBUG_INFO_SPLIT
        bool "Produce split debuginfo in .dwo files"
-       depends on DEBUG_INFO
        depends on $(cc-option,-gsplit-dwarf)
        help
          Generate debug info into separate .dwo files. This significantly
@@ -259,7 +258,6 @@ config DEBUG_INFO_SPLIT
 
 config DEBUG_INFO_DWARF4
        bool "Generate dwarf4 debuginfo"
-       depends on DEBUG_INFO
        depends on $(cc-option,-gdwarf-4)
        help
          Generate dwarf4 debug info. This requires recent versions
@@ -269,7 +267,6 @@ config DEBUG_INFO_DWARF4
 
 config DEBUG_INFO_BTF
        bool "Generate BTF typeinfo"
-       depends on DEBUG_INFO
        depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
        depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
        help
@@ -279,7 +276,6 @@ config DEBUG_INFO_BTF
 
 config GDB_SCRIPTS
        bool "Provide GDB scripts for kernel debugging"
-       depends on DEBUG_INFO
        help
          This creates the required links to GDB helper scripts in the
          build directory. If you load vmlinux into gdb, the helper
@@ -288,6 +284,8 @@ config GDB_SCRIPTS
          instance. See Documentation/dev-tools/gdb-kernel-debugging.rst
          for further details.
 
+endif # DEBUG_INFO
+
 config ENABLE_MUST_CHECK
        bool "Enable __must_check logic"
        default y
@@ -1367,6 +1365,27 @@ config WW_MUTEX_SELFTEST
          Say M if you want these self tests to build as a module.
          Say N if you are unsure.
 
+config SCF_TORTURE_TEST
+       tristate "torture tests for smp_call_function*()"
+       depends on DEBUG_KERNEL
+       select TORTURE_TEST
+       help
+         This option provides a kernel module that runs torture tests
+         on the smp_call_function() family of primitives.  The kernel
+         module may be built after the fact on the running kernel to
+         be tested, if desired.
+
+config CSD_LOCK_WAIT_DEBUG
+       bool "Debugging for csd_lock_wait(), called from smp_call_function*()"
+       depends on DEBUG_KERNEL
+       depends on 64BIT
+       default n
+       help
+         This option enables debug prints when CPUs are slow to respond
+         to the smp_call_function*() IPI wrappers.  These debug prints
+         include the IPI handler function currently executing (if any)
+         and relevant stack traces.
+
 endmenu # lock debugging
 
 config TRACE_IRQFLAGS
@@ -1626,7 +1645,7 @@ config ARCH_HAS_DEVMEM_IS_ALLOWED
 config STRICT_DEVMEM
        bool "Filter access to /dev/mem"
        depends on MMU && DEVMEM
-       depends on ARCH_HAS_DEVMEM_IS_ALLOWED
+       depends on ARCH_HAS_DEVMEM_IS_ALLOWED || GENERIC_LIB_DEVMEM_IS_ALLOWED
        default y if PPC || X86 || ARM64
        help
          If this option is disabled, you allow userspace (root) access to all
@@ -2042,13 +2061,6 @@ config TEST_BITMAP
 
          If unsure, say N.
 
-config TEST_BITFIELD
-       tristate "Test bitfield functions at runtime"
-       help
-         Enable this option to test the bitfield functions at boot.
-
-         If unsure, say N.
-
 config TEST_UUID
        tristate "Test functions located in the uuid module at runtime"
 
@@ -2198,6 +2210,22 @@ config TEST_SYSCTL
 
          If unsure, say N.
 
+config BITFIELD_KUNIT
+       tristate "KUnit test bitfield functions at runtime"
+       depends on KUNIT
+       help
+         Enable this option to test the bitfield functions at boot.
+
+         KUnit tests run during boot and output the results to the debug log
+         in TAP format (http://testanything.org/). Only useful for kernel devs
+         running the KUnit test harness, and not intended for inclusion into a
+         production build.
+
+         For more information on KUnit and unit tests in general please refer
+         to the KUnit documentation in Documentation/dev-tools/kunit/.
+
+         If unsure, say N.
+
 config SYSCTL_KUNIT_TEST
        tristate "KUnit test for sysctl" if !KUNIT_ALL_TESTS
        depends on KUNIT