]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpu: export lockdep_assert_cpus_held()
authorHamza Mahfooz <hamzamahfooz@linux.microsoft.com>
Fri, 17 Jan 2025 20:33:06 +0000 (15:33 -0500)
committerWei Liu <wei.liu@kernel.org>
Thu, 13 Feb 2025 23:43:57 +0000 (23:43 +0000)
If CONFIG_HYPERV=m, lockdep_assert_cpus_held() is undefined for HyperV.
So, export the function so that GPL drivers can use it more broadly.

Cc: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20250117203309.192072-1-hamzamahfooz@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20250117203309.192072-1-hamzamahfooz@linux.microsoft.com>

kernel/cpu.c

index 07455d25329c901dedd78fa6b4839ee23219d024..ca56397c3b1dad791837a6a736da66d3a9cba5a5 100644 (file)
@@ -526,6 +526,7 @@ void lockdep_assert_cpus_held(void)
 
        percpu_rwsem_assert_held(&cpu_hotplug_lock);
 }
+EXPORT_SYMBOL_GPL(lockdep_assert_cpus_held);
 
 #ifdef CONFIG_LOCKDEP
 int lockdep_is_cpus_held(void)