Two small updates to the SMP/hotplug subsystem:

- Add cpuhplock.h to the maintained files
 
   - Provide the missing stubs for lockdep_is_cpus_held() and
     lockdep_is_cpus_write_held() so the usage sites can be simplified.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmotijoQHHRnbHhAa2Vy
 bmVsLm9yZwAKCRCmGPVMDXSYoTWHD/911eh7wl8VLC9czc6rYhVu2ZcKpcbM5Mmd
 VhVEgdPvi06H6l3XJul7PyfziQppqcLS31GQATGO1xkiyGKrc+9+/+xR1Ky68y9F
 q3Duhei80eRP7KtfH1HIHvwdZDAhDZpibjCxHuPj4FBhKsPbkRA5WrAfvBhRekVN
 FMSxU3tMJLIgWRr4DNltmyBxj9GDrhyictzIzSy6pfTso2FYYJZkDTxZayMT5be1
 9d2vScBtp0zizBIgxDshb9rS1h+N7MYBLbAvYhfdCvtIVjIqNWiQ6XCBZdTytTqq
 eTmmH0c7bo/ydKjCy1MJwiAsI+D1k5aq5feF4WOufbW7nw/KEBjz7u0n9mKI85/c
 ntjt9oXlbdKwyYRnNO+5UqporPvAqJ+JvbJPM2vgIUku3VOXZjvVR/FmKzyoORnF
 DMEAxjgupJIinMeisxJLJNkPPUR8JgbUzqAzlaGhjAlfiVf40loyb4hGcrXnziht
 KVpLbRqPWHGufmYVp5ZboKAceKXB65hYVt1y8V5M3nv0JLRs7ZsreWL7Fz/u83yl
 f+tIIRn7qVIY6QAHqErhaYjpeQp6A7F+ehcIDX6i4aJO1wRkXID5hGm/tXaVfSnT
 tlMEfLQaAob61+rGPp32rRPCQC2tbpE90tFmcimkzy2V5Ao0zDyDgTNc3HkUAELA
 u7lHWZrkQQ==
 =vUm0
 -----END PGP SIGNATURE-----

Merge tag 'smp-core-2026-06-13' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip

Pull smp core updates from Thomas Gleixner:
 "Two small updates to the SMP/hotplug subsystem:

   - Add cpuhplock.h to the maintained files

   - Provide the missing stubs for lockdep_is_cpus_held() and
     lockdep_is_cpus_write_held() so the usage sites can be simplified"

* tag 'smp-core-2026-06-13' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip:
  cpu: Add lockdep_is_cpus_held()/lockdep_is_cpus_write_held() stubs for !CONFIG_HOTPLUG_CPU
  MAINTAINERS: Add include/linux/cpuhplock.h to CPU HOTPLUG area
This commit is contained in:
Linus Torvalds 2026-06-15 13:30:04 +05:30
commit 9e94480d81
2 changed files with 5 additions and 3 deletions

View File

@ -6677,6 +6677,7 @@ P: Documentation/process/maintainer-tip.rst
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git smp/core
F: include/linux/cpu.h
F: include/linux/cpuhotplug.h
F: include/linux/cpuhplock.h
F: include/linux/smpboot.h
F: kernel/cpu.c
F: kernel/smpboot.*

View File

@ -12,9 +12,6 @@
struct device;
extern int lockdep_is_cpus_held(void);
extern int lockdep_is_cpus_write_held(void);
#ifdef CONFIG_HOTPLUG_CPU
void cpus_write_lock(void);
void cpus_write_unlock(void);
@ -22,6 +19,8 @@ void cpus_read_lock(void);
void cpus_read_unlock(void);
int cpus_read_trylock(void);
void lockdep_assert_cpus_held(void);
int lockdep_is_cpus_held(void);
int lockdep_is_cpus_write_held(void);
void cpu_hotplug_disable_offlining(void);
void cpu_hotplug_disable(void);
void cpu_hotplug_enable(void);
@ -38,6 +37,8 @@ static inline void cpus_read_lock(void) { }
static inline void cpus_read_unlock(void) { }
static inline int cpus_read_trylock(void) { return true; }
static inline void lockdep_assert_cpus_held(void) { }
static inline int lockdep_is_cpus_held(void) { return 1; }
static inline int lockdep_is_cpus_write_held(void) { return 1; }
static inline void cpu_hotplug_disable_offlining(void) { }
static inline void cpu_hotplug_disable(void) { }
static inline void cpu_hotplug_enable(void) { }