From nobody Mon Jun 8 09:48:07 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B118333F5A7 for ; Thu, 4 Jun 2026 03:38:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780544340; cv=none; b=OlzpuP0fUH8TxwxCx8LPDZWPRkgDtix5RGKOuXZ+SRNcLL/uvVg2BCmT/avYp584/aX7MuejTEmeP5QboDsuzY+avtgE28OAEjmg0I58jIAWDhi1540cribXmq1HksM3lSt7A6TqTK+zN/m8qDm78Ry0NIv+/OuoVNcM2nJ/2/c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780544340; c=relaxed/simple; bh=LVxOvm3y5WPr3XXQ57nwT5bPLmOkBDMGOeKBg413c5w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EtzydlOtHSuPNfMXs60MS+0Az480OQIAlsU2rC2t6UksTYC6gz9p7hX0SRKz01FYWsPNIT0QtlwuPbywvph0OFTelVU9psrlDH664seNj/N4CxX9M272EdqN5iFf5NpfX4bM8rBGGWtHreJLD/VIQIKK0lzeOYQm5MNpTIoy6w0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Oa2pWiF/; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Oa2pWiF/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1780544339; x=1812080339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LVxOvm3y5WPr3XXQ57nwT5bPLmOkBDMGOeKBg413c5w=; b=Oa2pWiF/APz5Rgl/6PDijebsal4URhYHH1midvoSaKAaI6k2Qb86Qx1H TvLIBxv8+84J3DYQ6/OmmZpeFXlVji6iMXr+uHLvGzAjVyrwRxqZXQ3Ps oQc5pQIJerCaivCY918AJAnCWmFqgBPCiGRFg6dgua0LjT89FojW+rHwV 5OTkdw4eL36abYRqexlAV204IRY7ELnqiZViQt7OfoVVRp9+hmQK4UQmC ++aUnjpibo6EPtazI44UGwaPWJSyj6tXsFZml6+J2/YRi5BFyxVyp13rP a3yI6QNnG4LYTEb8Xs1jcYgjP9hWGYRvJ2rjMMzuMQF3gprhCJ2rOyEu/ w==; X-CSE-ConnectionGUID: ZoFAzSsYSvOyf2ZxECH2oA== X-CSE-MsgGUID: Odo5vH8CTpm1+flTLt3XHg== X-IronPort-AV: E=McAfee;i="6800,10657,11806"; a="81341973" X-IronPort-AV: E=Sophos;i="6.24,186,1774335600"; d="scan'208";a="81341973" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2026 20:38:57 -0700 X-CSE-ConnectionGUID: mX4Y5afjSl6s/WaEggaNww== X-CSE-MsgGUID: I4OucpCvTBux9nDo8ize3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,186,1774335600"; d="scan'208";a="246250157" Received: from rchatre-desk1.jf.intel.com ([10.165.154.99]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2026 20:38:57 -0700 From: Reinette Chatre To: tglx@kernel.org, peterz@infradead.org, bp@alien8.de, frederic@kernel.org, tony.luck@intel.com Cc: reinette.chatre@intel.com, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] MAINTAINERS: Add include/linux/cpuhplock.h to CPU HOTPLUG area Date: Wed, 3 Jun 2026 20:38:46 -0700 Message-ID: X-Mailer: git-send-email 2.50.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The move of CPU hotplug function declarations to include/linux/cpuhplock.h did not update the CPU HOTPLUG section of MAINTAINERS. Update it now. Fixes: 195fb517ee25 ("cpu: Move CPU hotplug function declarations into thei= r own header") Signed-off-by: Reinette Chatre --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e4833d334edc..42de7dd62b46 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6675,6 +6675,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.* --=20 2.50.1 From nobody Mon Jun 8 09:48:07 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAC3D388881 for ; Thu, 4 Jun 2026 03:38:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780544340; cv=none; b=d+pbYSRwB4A04v2LV6wD689R5xtWbMo/8RwGMgZmmmBfWeclY2pkh5dHlesgC8u8darTngb2/kjl0Lvyb3ikPaizIWiExctB90iObiUVnBSOWPRWdN0BAOylsxDvyPaxZyFJqCtiaCzMV05rkrN09ZILaz99b6jC8to6CaC3elU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780544340; c=relaxed/simple; bh=/hSMwksG9O5U8ApEon+CJa74VdinkYsKEAcFXchDwk0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LLNsogJh+1fp94LgksnZmzd3axsvDbhOdgvVqqxtvImSoZuz7EuAgtPn0WPh9UKc4XhjW31LXbk8RuoazZ/NppcZ2fCWNHuDBz61buYdlFvRkVaoDxJaG0nEY7ocP4013M0YH47MqLAKRY5aNBO+6qWwSWvzTMRB9ZK5ArH0mP4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=aSxoYNmU; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aSxoYNmU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1780544339; x=1812080339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/hSMwksG9O5U8ApEon+CJa74VdinkYsKEAcFXchDwk0=; b=aSxoYNmUk677msdeh2umrAGu9wvUGPpEbxPXgxAJQfiF18UJBhhyzov7 GnZl1ac4ojrlXSt1mTAiezdqv0u+LFBV8U3H7KYjOeBKy2xXkj7V4F2Xy umKq7fZIcpAMjrnjwhWNi/jwxWKn+NyoUGPC9GEG+fAKLIRFNwYyTDmL7 gSEsB0YIsQBrZVmc2L6EEFhV7n4pxX0QCz7c0TiXzul7ACbC/dKW3y/53 ZluWz01tXAObdNwogxFzdk9D4p4cwrU+AGWz6kBcAcgsviNSq2b4N/BJc 7bpbg72/T2a4Tak+v14Mi1URSc2xXGLo8KtdsYtoZj45aRf2o3lzee/k2 w==; X-CSE-ConnectionGUID: kPRphi1uR/2wa0NRfSDLNA== X-CSE-MsgGUID: tqdBKiGSQlKyiv5X0ubE/Q== X-IronPort-AV: E=McAfee;i="6800,10657,11806"; a="81341977" X-IronPort-AV: E=Sophos;i="6.24,186,1774335600"; d="scan'208";a="81341977" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2026 20:38:57 -0700 X-CSE-ConnectionGUID: X3InzUE0TtSaj3S4ni9JNw== X-CSE-MsgGUID: Q0MoqMY7RH2+k4GilelOLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,186,1774335600"; d="scan'208";a="246250160" Received: from rchatre-desk1.jf.intel.com ([10.165.154.99]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2026 20:38:57 -0700 From: Reinette Chatre To: tglx@kernel.org, peterz@infradead.org, bp@alien8.de, frederic@kernel.org, tony.luck@intel.com Cc: reinette.chatre@intel.com, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] cpu: Add lockdep_is_cpus_held()/lockdep_is_cpus_write_held() stubs for !CONFIG_HOTPLUG_CPU Date: Wed, 3 Jun 2026 20:38:47 -0700 Message-ID: <7484f0b58fd86153d445819cc4e172adba16cff9.1780543665.git.reinette.chatre@intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" lockdep_is_cpus_held() and lockdep_is_cpus_write_held() are undefined when !CONFIG_HOTPLUG_CPU. This is ok because their few callers protect the calls with a "if (IS_ENABLED(CONFIG_HOTPLUG_CPU) ..." check. It is error prone to require callers to protect lockdep_is_cpus_held() and lockdep_is_cpus_write_held() with an IS_ENABLED(CONFIG_HOTPLUG_CPU) check while the custom for equivalent functions, for example the more prevalent lockdep_is_held(), is to not require similar protection. It is also inconsistent with CPU hotplug lockdep code self since related call lockdep_assert_cpus_held() does not require protection. Create stubs for lockdep_is_cpus_held() and lockdep_is_cpus_write_held() that returns 1 (LOCK_STATE_UNKNOWN/LOCK_STATE_HELD) when !CONFIG_HOTPLUG_CP= U. This makes the CPU hotplug lockdep checks consistent while following existing lockdep custom. Drop the "extern" from the function declaration as part of the move to match kernel coding style. Keep the IS_ENABLED(CONFIG_HOTPLUG_CPU) checks in existing users since removing them would change the logic of these expressions. Reported-by: Sashiko Closes: https://sashiko.dev/#/patchset/cover.1780456704.git.reinette.chatre= %40intel.com?part=3D1 Signed-off-by: Reinette Chatre --- While this was reported by Sashiko this is not a bugfix since all callers use the "IS_ENABLED(CONFIG_HOTPLUG_CPU)" protection. The Sashiko report was triggered by a review of code that adds more lockdep_is_cpus_held() calls but omitted the "IS_ENABLED(CONFIG_HOTPLUG_CPU)" protection. --- include/linux/cpuhplock.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/cpuhplock.h b/include/linux/cpuhplock.h index 286b3ab92e15..42f6a095ba5b 100644 --- a/include/linux/cpuhplock.h +++ b/include/linux/cpuhplock.h @@ -12,9 +12,6 @@ =20 struct device; =20 -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) { } --=20 2.50.1