[PATCH 3/4] cpu/hotplug: Demystify the terms 'BP' and 'AP' in the code
From: Srivatsa S. Bhat (Microsoft)
Date: Fri Nov 27 2026 - 02:27:49 EST
The terms 'BP' and 'AP' appear throughout the CPU hotplug code and
documentation, but there is no mention of what these acronyms expand
to and what do they actually represent in the context of the CPU
hotplug state machine.
Provide some background in the code and the docs to demystify these
terms.
Signed-off-by: Srivatsa S. Bhat (Microsoft) <srivatsa@xxxxxxxxxxxxx>
---
Documentation/core-api/cpu_hotplug.rst | 20 ++++++++++++++++++++
include/linux/cpuhotplug.h | 5 +++++
2 files changed, 25 insertions(+)
diff --git a/Documentation/core-api/cpu_hotplug.rst b/Documentation/core-api/cpu_hotplug.rst
index 4e228fc00624..fe5385a8bd8e 100644
--- a/Documentation/core-api/cpu_hotplug.rst
+++ b/Documentation/core-api/cpu_hotplug.rst
@@ -143,6 +143,26 @@ at state ``CPUHP_OFFLINE``. This includes:
The CPU hotplug API
===================
+CPU roles in CPU hotplug operations
+-----------------------------------
+
+Any CPU hotplug operation involves at least 2 CPUs performing different roles: a
+control CPU that drives the online or offline operation, and a target CPU which
+is actually onlined or offlined as a result.
+
+The CPU which takes the role of a control CPU for a given hotplug operation is
+referred to as BP (Boot Processor), and the target CPU is referred to as AP
+(Application Processor) in the code.
+
+The terms BP and AP make the most literal sense when we consider the very first
+CPU online in the system, where the Boot Processor is already up and running the
+kernel in uniprocessor mode, and onlines the first secondary CPU (i.e.,
+Application Processor). After this step, for any subsequent CPU online or
+offline operation, any CPU can take the role of the control CPU and any CPU can
+be the target. Hence, the terms BP and AP lose their literal meaning but they
+are used as a shorthand in the code for what they represent (i.e., the control
+and the hotplugged CPUs respectively).
+
CPU hotplug state machine
-------------------------
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index f51303255bf0..52c42db50ec2 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -5,6 +5,11 @@
#include <linux/types.h>
/*
+ * CPU hotplug state machine:
+ *
+ * BP = "Boot Processor" or control CPU for the hotplug operation.
+ * AP = "Application Processor" or "hotplugged" (target) CPU.
+ *
* CPU-up CPU-down
*
* BP AP BP AP
--
2.43.0