sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget(/translations/zh_CN/core-api/cpu_hotplugmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/zh_TW/core-api/cpu_hotplugmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/it_IT/core-api/cpu_hotplugmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ja_JP/core-api/cpu_hotplugmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ko_KR/core-api/cpu_hotplugmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/pt_BR/core-api/cpu_hotplugmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/sp_SP/core-api/cpu_hotplugmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hCPU hotplug in the Kernelh]hCPU hotplug in the Kernel}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhB/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug.rsthKubh field_list)}(hhh](hfield)}(hhh](h field_name)}(hDateh]hDate}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(hSeptember, 2021h]h paragraph)}(hhh]hSeptember, 2021}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hAuthorh]hAuthor}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhKubh)}(hSebastian Andrzej Siewior , Rusty Russell , Srivatsa Vaddagiri , Ashok Raj , Joel Schopp , Thomas Gleixner h]h)}(hSebastian Andrzej Siewior , Rusty Russell , Srivatsa Vaddagiri , Ashok Raj , Joel Schopp , Thomas Gleixner h](hSebastian Andrzej Siewior <}(hjhhhNhNubh reference)}(hbigeasy@linutronix.deh]hbigeasy@linutronix.de}(hj%hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:bigeasy@linutronix.deuh1j#hjubh>, Rusty Russell <}(hjhhhNhNubj$)}(hrusty@rustcorp.com.auh]hrusty@rustcorp.com.au}(hj9hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:rusty@rustcorp.com.auuh1j#hjubh>, Srivatsa Vaddagiri <}(hjhhhNhNubj$)}(hvatsa@in.ibm.comh]hvatsa@in.ibm.com}(hjMhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:vatsa@in.ibm.comuh1j#hjubh>, Ashok Raj <}(hjhhhNhNubj$)}(hashok.raj@intel.comh]hashok.raj@intel.com}(hjahhhNhNubah}(h]h ]h"]h$]h&]refurimailto:ashok.raj@intel.comuh1j#hjubh>, Joel Schopp <}(hjhhhNhNubj$)}(hjschopp@austin.ibm.comh]hjschopp@austin.ibm.com}(hjuhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:jschopp@austin.ibm.comuh1j#hjubh>, Thomas Gleixner <}(hjhhhNhNubj$)}(htglx@kernel.orgh]htglx@kernel.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:tglx@kernel.orguh1j#hjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Introductionh]h Introduction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXModern advances in system architectures have introduced advanced error reporting and correction capabilities in processors. There are couple OEMS that support NUMA hardware which are hot pluggable as well, where physical node insertion and removal require support for CPU hotplug.h]hXModern advances in system architectures have introduced advanced error reporting and correction capabilities in processors. There are couple OEMS that support NUMA hardware which are hot pluggable as well, where physical node insertion and removal require support for CPU hotplug.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hSuch advances require CPUs available to a kernel to be removed either for provisioning reasons, or for RAS purposes to keep an offending CPU off system execution path. Hence the need for CPU hotplug support in the Linux kernel.h]hSuch advances require CPUs available to a kernel to be removed either for provisioning reasons, or for RAS purposes to keep an offending CPU off system execution path. Hence the need for CPU hotplug support in the Linux kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hA more novel use of CPU-hotplug support is its use today in suspend resume support for SMP. Dual-core and HT support makes even a laptop run SMP kernels which didn't support these methods.h]hA more novel use of CPU-hotplug support is its use today in suspend resume support for SMP. Dual-core and HT support makes even a laptop run SMP kernels which didn’t support these methods.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hCommand Line Switchesh]hCommand Line Switches}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK ubhdefinition_list)}(hhh](hdefinition_list_item)}(h``maxcpus=n`` Restrict boot time CPUs to *n*. Say if you have four CPUs, using ``maxcpus=2`` will only boot two. You can choose to bring the other CPUs later online. h](hterm)}(h ``maxcpus=n``h]hliteral)}(hjh]h maxcpus=n}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK$hjubh definition)}(hhh]h)}(hRestrict boot time CPUs to *n*. Say if you have four CPUs, using ``maxcpus=2`` will only boot two. You can choose to bring the other CPUs later online.h](hRestrict boot time CPUs to }(hj4hhhNhNubhemphasis)}(h*n*h]hn}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j<hj4ubh#. Say if you have four CPUs, using }(hj4hhhNhNubj)}(h ``maxcpus=2``h]h maxcpus=2}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubhI will only boot two. You can choose to bring the other CPUs later online.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK"hj1ubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhhhK$hj ubj)}(h``nr_cpus=n`` Restrict the total amount of CPUs the kernel will support. If the number supplied here is lower than the number of physically available CPUs, then those CPUs can not be brought online later. h](j)}(h ``nr_cpus=n``h]j)}(hjzh]h nr_cpus=n}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1jhhhK)hjtubj0)}(hhh]h)}(hRestrict the total amount of CPUs the kernel will support. If the number supplied here is lower than the number of physically available CPUs, then those CPUs can not be brought online later.h]hRestrict the total amount of CPUs the kernel will support. If the number supplied here is lower than the number of physically available CPUs, then those CPUs can not be brought online later.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1j/hjtubeh}(h]h ]h"]h$]h&]uh1jhhhK)hj hhubj)}(h``possible_cpus=n`` This option sets ``possible_cpus`` bits in ``cpu_possible_mask``. This option is limited to the X86 and S390 architecture. h](j)}(h``possible_cpus=n``h]j)}(hjh]hpossible_cpus=n}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK.hjubj0)}(hhh](h)}(hAThis option sets ``possible_cpus`` bits in ``cpu_possible_mask``.h](hThis option sets }(hjhhhNhNubj)}(h``possible_cpus``h]h possible_cpus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh bits in }(hjhhhNhNubj)}(h``cpu_possible_mask``h]hcpu_possible_mask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK,hjubh)}(h8This option is limited to the X86 and S390 architecture.h]h8This option is limited to the X86 and S390 architecture.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubeh}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhhhK.hj hhubeh}(h]h ]h"]h$]h&]uh1j hjhhhhhNubeh}(h]command-line-switchesah ]h"]command line switchesah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hCPU mapsh]hCPU maps}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hhhhhK1ubj )}(hhh](j)}(hX``cpu_possible_mask`` Bitmap of possible CPUs that can ever be available in the system. This is used to allocate some boot time memory for per_cpu variables that aren't designed to grow/shrink as CPUs are made available or removed. Once set during boot time discovery phase, the map is static, i.e no bits are added or removed anytime. Trimming it accurately for your system needs upfront can save some boot time memory. h](j)}(h``cpu_possible_mask``h]j)}(hj>h]hcpu_possible_mask}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1jhhhK9hj8ubj0)}(hhh]h)}(hXBitmap of possible CPUs that can ever be available in the system. This is used to allocate some boot time memory for per_cpu variables that aren't designed to grow/shrink as CPUs are made available or removed. Once set during boot time discovery phase, the map is static, i.e no bits are added or removed anytime. Trimming it accurately for your system needs upfront can save some boot time memory.h]hXBitmap of possible CPUs that can ever be available in the system. This is used to allocate some boot time memory for per_cpu variables that aren’t designed to grow/shrink as CPUs are made available or removed. Once set during boot time discovery phase, the map is static, i.e no bits are added or removed anytime. Trimming it accurately for your system needs upfront can save some boot time memory.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjSubah}(h]h ]h"]h$]h&]uh1j/hj8ubeh}(h]h ]h"]h$]h&]uh1jhhhK9hj5ubj)}(hXH``cpu_online_mask`` Bitmap of all CPUs currently online. Its set in ``__cpu_up()`` after a CPU is available for kernel scheduling and ready to receive interrupts from devices. Its cleared when a CPU is brought down using ``__cpu_disable()``, before which all OS services including interrupts are migrated to another target CPU. h](j)}(h``cpu_online_mask``h]j)}(hjvh]hcpu_online_mask}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1jhhhK@hjpubj0)}(hhh]h)}(hX3Bitmap of all CPUs currently online. Its set in ``__cpu_up()`` after a CPU is available for kernel scheduling and ready to receive interrupts from devices. Its cleared when a CPU is brought down using ``__cpu_disable()``, before which all OS services including interrupts are migrated to another target CPU.h](h0Bitmap of all CPUs currently online. Its set in }(hjhhhNhNubj)}(h``__cpu_up()``h]h __cpu_up()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh after a CPU is available for kernel scheduling and ready to receive interrupts from devices. Its cleared when a CPU is brought down using }(hjhhhNhNubj)}(h``__cpu_disable()``h]h__cpu_disable()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhW, before which all OS services including interrupts are migrated to another target CPU.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK /sys/devices/system/cpu/cpu4/online smpboot: CPU 4 is now offlineh]hM$ echo 0 > /sys/devices/system/cpu/cpu4/online smpboot: CPU 4 is now offline}hj!sbah}(h]h ]h"]h$]h&]jjuh1jhhhKmhjvhhubh)}(hOnce the CPU is shutdown, it will be removed from */proc/interrupts*, */proc/cpuinfo* and should also not be shown visible by the *top* command. To bring CPU4 back online::h](h2Once the CPU is shutdown, it will be removed from }(hj/hhhNhNubj=)}(h*/proc/interrupts*h]h/proc/interrupts}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j<hj/ubh, }(hj/hhhNhNubj=)}(h*/proc/cpuinfo*h]h /proc/cpuinfo}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j<hj/ubh- and should also not be shown visible by the }(hj/hhhNhNubj=)}(h*top*h]htop}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j<hj/ubh$ command. To bring CPU4 back online:}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKphjvhhubj)}(h[$ echo 1 > /sys/devices/system/cpu/cpu4/online smpboot: Booting Node 0 Processor 4 APIC 0x1h]h[$ echo 1 > /sys/devices/system/cpu/cpu4/online smpboot: Booting Node 0 Processor 4 APIC 0x1}hjssbah}(h]h ]h"]h$]h&]jjuh1jhhhKthjvhhubh)}(hoThe CPU is usable again. This should work on all CPUs, but CPU0 is often special and excluded from CPU hotplug.h]hoThe CPU is usable again. This should work on all CPUs, but CPU0 is often special and excluded from CPU hotplug.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjvhhubeh}(h]using-cpu-hotplugah ]h"]using cpu hotplugah$]h&]uh1hhhhhhhhKSubh)}(hhh](h)}(hThe CPU hotplug coordinationh]hThe CPU hotplug coordination}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK{ubh)}(hhh](h)}(hThe offline caseh]hThe offline case}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK~ubh)}(hOnce a CPU has been logically shutdown the teardown callbacks of registered hotplug states will be invoked, starting with ``CPUHP_ONLINE`` and terminating at state ``CPUHP_OFFLINE``. This includes:h](hzOnce a CPU has been logically shutdown the teardown callbacks of registered hotplug states will be invoked, starting with }(hjhhhNhNubj)}(h``CPUHP_ONLINE``h]h CPUHP_ONLINE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and terminating at state }(hjhhhNhNubj)}(h``CPUHP_OFFLINE``h]h CPUHP_OFFLINE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. This includes:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh bullet_list)}(hhh](h list_item)}(h]If tasks are frozen due to a suspend operation then *cpuhp_tasks_frozen* will be set to true.h]h)}(h]If tasks are frozen due to a suspend operation then *cpuhp_tasks_frozen* will be set to true.h](h4If tasks are frozen due to a suspend operation then }(hjhhhNhNubj=)}(h*cpuhp_tasks_frozen*h]hcpuhp_tasks_frozen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j<hjubh will be set to true.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hAll processes are migrated away from this outgoing CPU to new CPUs. The new CPU is chosen from each process' current cpuset, which may be a subset of all online CPUs.h]h)}(hAll processes are migrated away from this outgoing CPU to new CPUs. The new CPU is chosen from each process' current cpuset, which may be a subset of all online CPUs.h]hAll processes are migrated away from this outgoing CPU to new CPUs. The new CPU is chosen from each process’ current cpuset, which may be a subset of all online CPUs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h=All interrupts targeted to this CPU are migrated to a new CPUh]h)}(hj6h]h=All interrupts targeted to this CPU are migrated to a new CPU}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj4ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h%timers are also migrated to a new CPUh]h)}(hjMh]h%timers are also migrated to a new CPU}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjKubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h}Once all services are migrated, kernel calls an arch specific routine ``__cpu_disable()`` to perform arch specific cleanup. h]h)}(h{Once all services are migrated, kernel calls an arch specific routine ``__cpu_disable()`` to perform arch specific cleanup.h](hFOnce all services are migrated, kernel calls an arch specific routine }(hjfhhhNhNubj)}(h``__cpu_disable()``h]h__cpu_disable()}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubh" to perform arch specific cleanup.}(hjfhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjbubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhKhjhhubeh}(h]the-offline-caseah ]h"]the offline caseah$]h&]uh1hhjhhhhhK~ubeh}(h]the-cpu-hotplug-coordinationah ]h"]the cpu hotplug coordinationah$]h&]uh1hhhhhhhhK{ubh)}(hhh](h)}(hThe CPU hotplug APIh]hThe CPU hotplug API}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hCPU hotplug state machineh]hCPU hotplug state machine}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hCPU hotplug uses a trivial state machine with a linear state space from CPUHP_OFFLINE to CPUHP_ONLINE. Each state has a startup and a teardown callback.h]hCPU hotplug uses a trivial state machine with a linear state space from CPUHP_OFFLINE to CPUHP_ONLINE. Each state has a startup and a teardown callback.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hWhen a CPU is onlined, the startup callbacks are invoked sequentially until the state CPUHP_ONLINE is reached. They can also be invoked when the callbacks of a state are set up or an instance is added to a multi-instance state.h]hWhen a CPU is onlined, the startup callbacks are invoked sequentially until the state CPUHP_ONLINE is reached. They can also be invoked when the callbacks of a state are set up or an instance is added to a multi-instance state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hWhen a CPU is offlined the teardown callbacks are invoked in the reverse order sequentially until the state CPUHP_OFFLINE is reached. They can also be invoked when the callbacks of a state are removed or an instance is removed from a multi-instance state.h]hWhen a CPU is offlined the teardown callbacks are invoked in the reverse order sequentially until the state CPUHP_OFFLINE is reached. They can also be invoked when the callbacks of a state are removed or an instance is removed from a multi-instance state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hIf a usage site requires only a callback in one direction of the hotplug operations (CPU online or CPU offline) then the other not-required callback can be set to NULL when the state is set up.h]hIf a usage site requires only a callback in one direction of the hotplug operations (CPU online or CPU offline) then the other not-required callback can be set to NULL when the state is set up.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h/The state space is divided into three sections:h]h/The state space is divided into three sections:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j)}(hXThe PREPARE section The PREPARE section covers the state space from CPUHP_OFFLINE to CPUHP_BRINGUP_CPU. The startup callbacks in this section are invoked before the CPU is started during a CPU online operation. The teardown callbacks are invoked after the CPU has become dysfunctional during a CPU offline operation. The callbacks are invoked on a control CPU as they can't obviously run on the hotplugged CPU which is either not yet started or has become dysfunctional already. The startup callbacks are used to setup resources which are required to bring a CPU successfully online. The teardown callbacks are used to free resources or to move pending work to an online CPU after the hotplugged CPU became dysfunctional. The startup callbacks are allowed to fail. If a callback fails, the CPU online operation is aborted and the CPU is brought down to the previous state (usually CPUHP_OFFLINE) again. The teardown callbacks in this section are not allowed to fail. h](h)}(hThe PREPARE sectionh]hThe PREPARE section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hSThe PREPARE section covers the state space from CPUHP_OFFLINE to CPUHP_BRINGUP_CPU.h]hSThe PREPARE section covers the state space from CPUHP_OFFLINE to CPUHP_BRINGUP_CPU.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThe startup callbacks in this section are invoked before the CPU is started during a CPU online operation. The teardown callbacks are invoked after the CPU has become dysfunctional during a CPU offline operation.h]hThe startup callbacks in this section are invoked before the CPU is started during a CPU online operation. The teardown callbacks are invoked after the CPU has become dysfunctional during a CPU offline operation.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThe callbacks are invoked on a control CPU as they can't obviously run on the hotplugged CPU which is either not yet started or has become dysfunctional already.h]hThe callbacks are invoked on a control CPU as they can’t obviously run on the hotplugged CPU which is either not yet started or has become dysfunctional already.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThe startup callbacks are used to setup resources which are required to bring a CPU successfully online. The teardown callbacks are used to free resources or to move pending work to an online CPU after the hotplugged CPU became dysfunctional.h]hThe startup callbacks are used to setup resources which are required to bring a CPU successfully online. The teardown callbacks are used to free resources or to move pending work to an online CPU after the hotplugged CPU became dysfunctional.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThe startup callbacks are allowed to fail. If a callback fails, the CPU online operation is aborted and the CPU is brought down to the previous state (usually CPUHP_OFFLINE) again.h]hThe startup callbacks are allowed to fail. If a callback fails, the CPU online operation is aborted and the CPU is brought down to the previous state (usually CPUHP_OFFLINE) again.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h?The teardown callbacks in this section are not allowed to fail.h]h?The teardown callbacks in this section are not allowed to fail.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(hXKThe STARTING section The STARTING section covers the state space between CPUHP_BRINGUP_CPU + 1 and CPUHP_AP_ONLINE. The startup callbacks in this section are invoked on the hotplugged CPU with interrupts disabled during a CPU online operation in the early CPU setup code. The teardown callbacks are invoked with interrupts disabled on the hotplugged CPU during a CPU offline operation shortly before the CPU is completely shut down. The callbacks in this section are not allowed to fail. The callbacks are used for low level hardware initialization/shutdown and for core subsystems. h](h)}(hThe STARTING sectionh]hThe STARTING section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubh)}(h^The STARTING section covers the state space between CPUHP_BRINGUP_CPU + 1 and CPUHP_AP_ONLINE.h]h^The STARTING section covers the state space between CPUHP_BRINGUP_CPU + 1 and CPUHP_AP_ONLINE.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubh)}(hX<The startup callbacks in this section are invoked on the hotplugged CPU with interrupts disabled during a CPU online operation in the early CPU setup code. The teardown callbacks are invoked with interrupts disabled on the hotplugged CPU during a CPU offline operation shortly before the CPU is completely shut down.h]hX<The startup callbacks in this section are invoked on the hotplugged CPU with interrupts disabled during a CPU online operation in the early CPU setup code. The teardown callbacks are invoked with interrupts disabled on the hotplugged CPU during a CPU offline operation shortly before the CPU is completely shut down.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubh)}(h6The callbacks in this section are not allowed to fail.h]h6The callbacks in this section are not allowed to fail.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubh)}(h^The callbacks are used for low level hardware initialization/shutdown and for core subsystems.h]h^The callbacks are used for low level hardware initialization/shutdown and for core subsystems.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubeh}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(hXmThe ONLINE section The ONLINE section covers the state space between CPUHP_AP_ONLINE + 1 and CPUHP_ONLINE. The startup callbacks in this section are invoked on the hotplugged CPU during a CPU online operation. The teardown callbacks are invoked on the hotplugged CPU during a CPU offline operation. The callbacks are invoked in the context of the per CPU hotplug thread, which is pinned on the hotplugged CPU. The callbacks are invoked with interrupts and preemption enabled. The callbacks are allowed to fail. When a callback fails the hotplug operation is aborted and the CPU is brought back to the previous state. h](h)}(hThe ONLINE sectionh]hThe ONLINE section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hWThe ONLINE section covers the state space between CPUHP_AP_ONLINE + 1 and CPUHP_ONLINE.h]hWThe ONLINE section covers the state space between CPUHP_AP_ONLINE + 1 and CPUHP_ONLINE.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThe startup callbacks in this section are invoked on the hotplugged CPU during a CPU online operation. The teardown callbacks are invoked on the hotplugged CPU during a CPU offline operation.h]hThe startup callbacks in this section are invoked on the hotplugged CPU during a CPU online operation. The teardown callbacks are invoked on the hotplugged CPU during a CPU offline operation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThe callbacks are invoked in the context of the per CPU hotplug thread, which is pinned on the hotplugged CPU. The callbacks are invoked with interrupts and preemption enabled.h]hThe callbacks are invoked in the context of the per CPU hotplug thread, which is pinned on the hotplugged CPU. The callbacks are invoked with interrupts and preemption enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThe callbacks are allowed to fail. When a callback fails the hotplug operation is aborted and the CPU is brought back to the previous state.h]hThe callbacks are allowed to fail. When a callback fails the hotplug operation is aborted and the CPU is brought back to the previous state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubeh}(h]cpu-hotplug-state-machineah ]h"]cpu hotplug state machineah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hCPU online/offline operationsh]hCPU online/offline operations}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhKubh)}(h/A successful online operation looks like this::h]h.A successful online operation looks like this:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj)hhubj)}(hX[CPUHP_OFFLINE] [CPUHP_OFFLINE + 1]->startup() -> success [CPUHP_OFFLINE + 2]->startup() -> success [CPUHP_OFFLINE + 3] -> skipped because startup == NULL ... [CPUHP_BRINGUP_CPU]->startup() -> success === End of PREPARE section [CPUHP_BRINGUP_CPU + 1]->startup() -> success ... [CPUHP_AP_ONLINE]->startup() -> success === End of STARTUP section [CPUHP_AP_ONLINE + 1]->startup() -> success ... [CPUHP_ONLINE - 1]->startup() -> success [CPUHP_ONLINE]h]hX[CPUHP_OFFLINE] [CPUHP_OFFLINE + 1]->startup() -> success [CPUHP_OFFLINE + 2]->startup() -> success [CPUHP_OFFLINE + 3] -> skipped because startup == NULL ... [CPUHP_BRINGUP_CPU]->startup() -> success === End of PREPARE section [CPUHP_BRINGUP_CPU + 1]->startup() -> success ... [CPUHP_AP_ONLINE]->startup() -> success === End of STARTUP section [CPUHP_AP_ONLINE + 1]->startup() -> success ... [CPUHP_ONLINE - 1]->startup() -> success [CPUHP_ONLINE]}hjHsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj)hhubh)}(h0A successful offline operation looks like this::h]h/A successful offline operation looks like this:}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj)hhubj)}(hX[CPUHP_ONLINE] [CPUHP_ONLINE - 1]->teardown() -> success ... [CPUHP_AP_ONLINE + 1]->teardown() -> success === Start of STARTUP section [CPUHP_AP_ONLINE]->teardown() -> success ... [CPUHP_BRINGUP_ONLINE - 1]->teardown() ... === Start of PREPARE section [CPUHP_BRINGUP_CPU]->teardown() [CPUHP_OFFLINE + 3]->teardown() [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL [CPUHP_OFFLINE + 1]->teardown() [CPUHP_OFFLINE]h]hX[CPUHP_ONLINE] [CPUHP_ONLINE - 1]->teardown() -> success ... [CPUHP_AP_ONLINE + 1]->teardown() -> success === Start of STARTUP section [CPUHP_AP_ONLINE]->teardown() -> success ... [CPUHP_BRINGUP_ONLINE - 1]->teardown() ... === Start of PREPARE section [CPUHP_BRINGUP_CPU]->teardown() [CPUHP_OFFLINE + 3]->teardown() [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL [CPUHP_OFFLINE + 1]->teardown() [CPUHP_OFFLINE]}hjdsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj)hhubh)}(h+A failed online operation looks like this::h]h*A failed online operation looks like this:}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubj)}(hXt[CPUHP_OFFLINE] [CPUHP_OFFLINE + 1]->startup() -> success [CPUHP_OFFLINE + 2]->startup() -> success [CPUHP_OFFLINE + 3] -> skipped because startup == NULL ... [CPUHP_BRINGUP_CPU]->startup() -> success === End of PREPARE section [CPUHP_BRINGUP_CPU + 1]->startup() -> success ... [CPUHP_AP_ONLINE]->startup() -> success === End of STARTUP section [CPUHP_AP_ONLINE + 1]->startup() -> success --- [CPUHP_AP_ONLINE + N]->startup() -> fail [CPUHP_AP_ONLINE + (N - 1)]->teardown() ... [CPUHP_AP_ONLINE + 1]->teardown() === Start of STARTUP section [CPUHP_AP_ONLINE]->teardown() ... [CPUHP_BRINGUP_ONLINE - 1]->teardown() ... === Start of PREPARE section [CPUHP_BRINGUP_CPU]->teardown() [CPUHP_OFFLINE + 3]->teardown() [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL [CPUHP_OFFLINE + 1]->teardown() [CPUHP_OFFLINE]h]hXt[CPUHP_OFFLINE] [CPUHP_OFFLINE + 1]->startup() -> success [CPUHP_OFFLINE + 2]->startup() -> success [CPUHP_OFFLINE + 3] -> skipped because startup == NULL ... [CPUHP_BRINGUP_CPU]->startup() -> success === End of PREPARE section [CPUHP_BRINGUP_CPU + 1]->startup() -> success ... [CPUHP_AP_ONLINE]->startup() -> success === End of STARTUP section [CPUHP_AP_ONLINE + 1]->startup() -> success --- [CPUHP_AP_ONLINE + N]->startup() -> fail [CPUHP_AP_ONLINE + (N - 1)]->teardown() ... [CPUHP_AP_ONLINE + 1]->teardown() === Start of STARTUP section [CPUHP_AP_ONLINE]->teardown() ... [CPUHP_BRINGUP_ONLINE - 1]->teardown() ... === Start of PREPARE section [CPUHP_BRINGUP_CPU]->teardown() [CPUHP_OFFLINE + 3]->teardown() [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL [CPUHP_OFFLINE + 1]->teardown() [CPUHP_OFFLINE]}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM hj)hhubh)}(h,A failed offline operation looks like this::h]h+A failed offline operation looks like this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj)hhubj)}(h[CPUHP_ONLINE] [CPUHP_ONLINE - 1]->teardown() -> success ... [CPUHP_ONLINE - N]->teardown() -> fail [CPUHP_ONLINE - (N - 1)]->startup() ... [CPUHP_ONLINE - 1]->startup() [CPUHP_ONLINE]h]h[CPUHP_ONLINE] [CPUHP_ONLINE - 1]->teardown() -> success ... [CPUHP_ONLINE - N]->teardown() -> fail [CPUHP_ONLINE - (N - 1)]->startup() ... [CPUHP_ONLINE - 1]->startup() [CPUHP_ONLINE]}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM)hj)hhubh)}(hRecursive failures cannot be handled sensibly. Look at the following example of a recursive fail due to a failed offline operation: ::h]hRecursive failures cannot be handled sensibly. Look at the following example of a recursive fail due to a failed offline operation:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hj)hhubj)}(h[CPUHP_ONLINE] [CPUHP_ONLINE - 1]->teardown() -> success ... [CPUHP_ONLINE - N]->teardown() -> fail [CPUHP_ONLINE - (N - 1)]->startup() -> success [CPUHP_ONLINE - (N - 2)]->startup() -> failh]h[CPUHP_ONLINE] [CPUHP_ONLINE - 1]->teardown() -> success ... [CPUHP_ONLINE - N]->teardown() -> fail [CPUHP_ONLINE - (N - 1)]->startup() -> success [CPUHP_ONLINE - (N - 2)]->startup() -> fail}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM5hj)hhubh)}(hThe CPU hotplug state machine stops right here and does not try to go back down again because that would likely result in an endless loop::h]hThe CPU hotplug state machine stops right here and does not try to go back down again because that would likely result in an endless loop:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hj)hhubj)}(hX[CPUHP_ONLINE - (N - 1)]->teardown() -> success [CPUHP_ONLINE - N]->teardown() -> fail [CPUHP_ONLINE - (N - 1)]->startup() -> success [CPUHP_ONLINE - (N - 2)]->startup() -> fail [CPUHP_ONLINE - (N - 1)]->teardown() -> success [CPUHP_ONLINE - N]->teardown() -> failh]hX[CPUHP_ONLINE - (N - 1)]->teardown() -> success [CPUHP_ONLINE - N]->teardown() -> fail [CPUHP_ONLINE - (N - 1)]->startup() -> success [CPUHP_ONLINE - (N - 2)]->startup() -> fail [CPUHP_ONLINE - (N - 1)]->teardown() -> success [CPUHP_ONLINE - N]->teardown() -> fail}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM?hj)hhubh)}(h>Lather, rinse and repeat. In this case the CPU left in state::h]h=Lather, rinse and repeat. In this case the CPU left in state:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj)hhubj)}(h[CPUHP_ONLINE - (N - 1)]h]h[CPUHP_ONLINE - (N - 1)]}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMHhj)hhubh)}(hpwhich at least lets the system make progress and gives the user a chance to debug or even resolve the situation.h]hpwhich at least lets the system make progress and gives the user a chance to debug or even resolve the situation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhj)hhubeh}(h]cpu-online-offline-operationsah ]h"]cpu online/offline operationsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hAllocating a stateh]hAllocating a state}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMNubh)}(h3There are two ways to allocate a CPU hotplug state:h]h3There are two ways to allocate a CPU hotplug state:}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj hhubj)}(hhh](j)}(hXHStatic allocation Static allocation has to be used when the subsystem or driver has ordering requirements versus other CPU hotplug states. E.g. the PERF core startup callback has to be invoked before the PERF driver startup callbacks during a CPU online operation. During a CPU offline operation the driver teardown callbacks have to be invoked before the core teardown callback. The statically allocated states are described by constants in the cpuhp_state enum which can be found in include/linux/cpuhotplug.h. Insert the state into the enum at the proper place so the ordering requirements are fulfilled. The state constant has to be used for state setup and removal. Static allocation is also required when the state callbacks are not set up at runtime and are part of the initializer of the CPU hotplug state array in kernel/cpu.c. h](h)}(hStatic allocationh]hStatic allocation}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj6 ubh)}(hXStatic allocation has to be used when the subsystem or driver has ordering requirements versus other CPU hotplug states. E.g. the PERF core startup callback has to be invoked before the PERF driver startup callbacks during a CPU online operation. During a CPU offline operation the driver teardown callbacks have to be invoked before the core teardown callback. The statically allocated states are described by constants in the cpuhp_state enum which can be found in include/linux/cpuhotplug.h.h]hXStatic allocation has to be used when the subsystem or driver has ordering requirements versus other CPU hotplug states. E.g. the PERF core startup callback has to be invoked before the PERF driver startup callbacks during a CPU online operation. During a CPU offline operation the driver teardown callbacks have to be invoked before the core teardown callback. The statically allocated states are described by constants in the cpuhp_state enum which can be found in include/linux/cpuhotplug.h.}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj6 ubh)}(hInsert the state into the enum at the proper place so the ordering requirements are fulfilled. The state constant has to be used for state setup and removal.h]hInsert the state into the enum at the proper place so the ordering requirements are fulfilled. The state constant has to be used for state setup and removal.}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hj6 ubh)}(hStatic allocation is also required when the state callbacks are not set up at runtime and are part of the initializer of the CPU hotplug state array in kernel/cpu.c.h]hStatic allocation is also required when the state callbacks are not set up at runtime and are part of the initializer of the CPU hotplug state array in kernel/cpu.c.}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM`hj6 ubeh}(h]h ]h"]h$]h&]uh1jhj3 hhhhhNubj)}(hXDynamic allocation When there are no ordering requirements for the state callbacks then dynamic allocation is the preferred method. The state number is allocated by the setup function and returned to the caller on success. Only the PREPARE and ONLINE sections provide a dynamic allocation range. The STARTING section does not as most of the callbacks in that section have explicit ordering requirements. h](h)}(hDynamic allocationh]hDynamic allocation}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjx ubh)}(hWhen there are no ordering requirements for the state callbacks then dynamic allocation is the preferred method. The state number is allocated by the setup function and returned to the caller on success.h]hWhen there are no ordering requirements for the state callbacks then dynamic allocation is the preferred method. The state number is allocated by the setup function and returned to the caller on success.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjx ubh)}(hOnly the PREPARE and ONLINE sections provide a dynamic allocation range. The STARTING section does not as most of the callbacks in that section have explicit ordering requirements.h]hOnly the PREPARE and ONLINE sections provide a dynamic allocation range. The STARTING section does not as most of the callbacks in that section have explicit ordering requirements.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjx ubeh}(h]h ]h"]h$]h&]uh1jhj3 hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhMRhj hhubeh}(h]allocating-a-stateah ]h"]allocating a stateah$]h&]uh1hhjhhhhhMNubh)}(hhh](h)}(hSetup of a CPU hotplug stateh]hSetup of a CPU hotplug state}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMoubh)}(h@The core code provides the following functions to setup a state:h]h@The core code provides the following functions to setup a state:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhj hhubj)}(hhh](j)}(h1cpuhp_setup_state(state, name, startup, teardown)h]h)}(hj h]h1cpuhp_setup_state(state, name, startup, teardown)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h9cpuhp_setup_state_nocalls(state, name, startup, teardown)h]h)}(hj h]h9cpuhp_setup_state_nocalls(state, name, startup, teardown)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj; ubah}(h]h ]h"]h$]h&]uh1j hj! ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh](j )}(hhh]h)}(hdyingh]hdying}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ ubah}(h]h ]h"]h$]h&]uh1j hjX ubj )}(hhh]h)}(hJFor states in the STARTING section which do not provide a startup callbackh]hJFor states in the STARTING section which do not provide a startup callback}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjr ubah}(h]h ]h"]h$]h&]uh1j hjX ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh](j )}(hhh]h)}(honlineh]honline}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh]h)}(h For states in the ONLINE sectionh]h For states in the ONLINE section}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh](j )}(hhh]h)}(hofflineh]hoffline}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh]h)}(hHFor states in the ONLINE section which do not provide a startup callbackh]hHFor states in the ONLINE section which do not provide a startup callback}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]colsKuh1j hj ubah}(h]h ]h"]h$]h&]uh1j hj hhhhhNubh)}(hAs the @name argument is only used for sysfs and instrumentation other mode descriptors can be used as well if they describe the nature of the state better than the common ones.h]hAs the @name argument is only used for sysfs and instrumentation other mode descriptors can be used as well if they describe the nature of the state better than the common ones.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hdExamples for @name arguments: "perf/online", "perf/x86:prepare", "RCU/tree:dying", "sched/waitempty"h]htExamples for @name arguments: “perf/online”, “perf/x86:prepare”, “RCU/tree:dying”, “sched/waitempty”}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hThe @startup argument is a function pointer to the callback which should be invoked during a CPU online operation. If the usage site does not require a startup callback set the pointer to NULL.h]hThe @startup argument is a function pointer to the callback which should be invoked during a CPU online operation. If the usage site does not require a startup callback set the pointer to NULL.}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hThe @teardown argument is a function pointer to the callback which should be invoked during a CPU offline operation. If the usage site does not require a teardown callback set the pointer to NULL.h]hThe @teardown argument is a function pointer to the callback which should be invoked during a CPU offline operation. If the usage site does not require a teardown callback set the pointer to NULL.}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hHThe functions differ in the way how the installed callbacks are treated:h]hHThe functions differ in the way how the installed callbacks are treated:}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh block_quote)}(hX* cpuhp_setup_state_nocalls(), cpuhp_setup_state_nocalls_cpuslocked() and cpuhp_setup_state_multi() only install the callbacks * cpuhp_setup_state() and cpuhp_setup_state_cpuslocked() install the callbacks and invoke the @startup callback (if not NULL) for all online CPUs which have currently a state greater than the newly installed state. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread. If a callback fails for CPU N then the teardown callback for CPU 0 .. N-1 is invoked to rollback the operation. The state setup fails, the callbacks for the state are not installed and in case of dynamic allocation the allocated state is freed. h]j)}(hhh](j)}(h}cpuhp_setup_state_nocalls(), cpuhp_setup_state_nocalls_cpuslocked() and cpuhp_setup_state_multi() only install the callbacks h]h)}(h|cpuhp_setup_state_nocalls(), cpuhp_setup_state_nocalls_cpuslocked() and cpuhp_setup_state_multi() only install the callbacksh]h|cpuhp_setup_state_nocalls(), cpuhp_setup_state_nocalls_cpuslocked() and cpuhp_setup_state_multi() only install the callbacks}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ ubah}(h]h ]h"]h$]h&]uh1jhj\ ubj)}(hXcpuhp_setup_state() and cpuhp_setup_state_cpuslocked() install the callbacks and invoke the @startup callback (if not NULL) for all online CPUs which have currently a state greater than the newly installed state. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread. If a callback fails for CPU N then the teardown callback for CPU 0 .. N-1 is invoked to rollback the operation. The state setup fails, the callbacks for the state are not installed and in case of dynamic allocation the allocated state is freed. h](h)}(hXcpuhp_setup_state() and cpuhp_setup_state_cpuslocked() install the callbacks and invoke the @startup callback (if not NULL) for all online CPUs which have currently a state greater than the newly installed state. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread.h]hXcpuhp_setup_state() and cpuhp_setup_state_cpuslocked() install the callbacks and invoke the @startup callback (if not NULL) for all online CPUs which have currently a state greater than the newly installed state. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU’s hotplug thread.}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjw ubh)}(hIf a callback fails for CPU N then the teardown callback for CPU 0 .. N-1 is invoked to rollback the operation. The state setup fails, the callbacks for the state are not installed and in case of dynamic allocation the allocated state is freed.h]hIf a callback fails for CPU N then the teardown callback for CPU 0 .. N-1 is invoked to rollback the operation. The state setup fails, the callbacks for the state are not installed and in case of dynamic allocation the allocated state is freed.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjw ubeh}(h]h ]h"]h$]h&]uh1jhj\ ubeh}(h]h ]h"]h$]h&]jjuh1jhhhMhjX ubah}(h]h ]h"]h$]h&]uh1jV hhhMhj hhubh)}(hXThe state setup and the callback invocations are serialized against CPU hotplug operations. If the setup function has to be called from a CPU hotplug read locked region, then the _cpuslocked() variants have to be used. These functions cannot be used from within CPU hotplug callbacks.h]hXThe state setup and the callback invocations are serialized against CPU hotplug operations. If the setup function has to be called from a CPU hotplug read locked region, then the _cpuslocked() variants have to be used. These functions cannot be used from within CPU hotplug callbacks.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj )}(hhh]j)}(hXThe function return values: ======== =================================================================== 0 Statically allocated state was successfully set up >0 Dynamically allocated state was successfully set up. The returned number is the state number which was allocated. If the state callbacks have to be removed later, e.g. module removal, then this number has to be saved by the caller and used as @state argument for the state remove function. For multi-instance states the dynamically allocated state number is also required as @state argument for the instance add/remove operations. <0 Operation failed ======== =================================================================== h](j)}(hThe function return values:h]hThe function return values:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj0)}(hhh]j )}(hhh]j )}(hhh](j )}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j hj ubj )}(hhh]h}(h]h ]h"]h$]h&]colwidthKCuh1j hj ubj )}(hhh](j )}(hhh](j )}(hhh]h)}(h0h]h0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh]h)}(h2Statically allocated state was successfully set uph]h2Statically allocated state was successfully set up}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh](j )}(hhh]h)}(h>0h]h>0}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj& ubah}(h]h ]h"]h$]h&]uh1j hj# ubj )}(hhh](h)}(h4Dynamically allocated state was successfully set up.h]h4Dynamically allocated state was successfully set up.}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj= ubh)}(hXyThe returned number is the state number which was allocated. If the state callbacks have to be removed later, e.g. module removal, then this number has to be saved by the caller and used as @state argument for the state remove function. For multi-instance states the dynamically allocated state number is also required as @state argument for the instance add/remove operations.h]hXyThe returned number is the state number which was allocated. If the state callbacks have to be removed later, e.g. module removal, then this number has to be saved by the caller and used as @state argument for the state remove function. For multi-instance states the dynamically allocated state number is also required as @state argument for the instance add/remove operations.}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj= ubeh}(h]h ]h"]h$]h&]uh1j hj# ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh](j )}(hhh]h)}(h<0h]h<0}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjk ubah}(h]h ]h"]h$]h&]uh1j hjh ubj )}(hhh]h)}(hOperation failedh]hOperation failed}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hjh ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]colsKuh1j hj ubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1j/hj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj hhhhhNubeh}(h]setup-of-a-cpu-hotplug-stateah ]h"]setup of a cpu hotplug stateah$]h&]uh1hhjhhhhhMoubh)}(hhh](h)}(hRemoval of a CPU hotplug stateh]hRemoval of a CPU hotplug state}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hJTo remove a previously set up state, the following functions are provided:h]hJTo remove a previously set up state, the following functions are provided:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hhh](j)}(hcpuhp_remove_state(state)h]h)}(hj h]hcpuhp_remove_state(state)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h!cpuhp_remove_state_nocalls(state)h]h)}(hjh]h!cpuhp_remove_state_nocalls(state)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h,cpuhp_remove_state_nocalls_cpuslocked(state)h]h)}(hjh]h,cpuhp_remove_state_nocalls_cpuslocked(state)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h cpuhp_remove_multi_state(state) h]h)}(hcpuhp_remove_multi_state(state)h]hcpuhp_remove_multi_state(state)}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhMhj hhubh)}(hXThe @state argument is either a statically allocated state or the state number which was allocated in the dynamic range by cpuhp_setup_state*(). If the state is in the dynamic range, then the state number is freed and available for dynamic allocation again.h]hXThe @state argument is either a statically allocated state or the state number which was allocated in the dynamic range by cpuhp_setup_state*(). If the state is in the dynamic range, then the state number is freed and available for dynamic allocation again.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hHThe functions differ in the way how the installed callbacks are treated:h]hHThe functions differ in the way how the installed callbacks are treated:}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubjW )}(hX?* cpuhp_remove_state_nocalls(), cpuhp_remove_state_nocalls_cpuslocked() and cpuhp_remove_multi_state() only remove the callbacks. * cpuhp_remove_state() removes the callbacks and invokes the teardown callback (if not NULL) for all online CPUs which have currently a state greater than the removed state. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread. In order to complete the removal, the teardown callback should not fail. h]j)}(hhh](j)}(hcpuhp_remove_state_nocalls(), cpuhp_remove_state_nocalls_cpuslocked() and cpuhp_remove_multi_state() only remove the callbacks. h]h)}(hcpuhp_remove_state_nocalls(), cpuhp_remove_state_nocalls_cpuslocked() and cpuhp_remove_multi_state() only remove the callbacks.h]hcpuhp_remove_state_nocalls(), cpuhp_remove_state_nocalls_cpuslocked() and cpuhp_remove_multi_state() only remove the callbacks.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjtubah}(h]h ]h"]h$]h&]uh1jhjqubj)}(hXcpuhp_remove_state() removes the callbacks and invokes the teardown callback (if not NULL) for all online CPUs which have currently a state greater than the removed state. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread. In order to complete the removal, the teardown callback should not fail. h](h)}(hXacpuhp_remove_state() removes the callbacks and invokes the teardown callback (if not NULL) for all online CPUs which have currently a state greater than the removed state. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread.h]hXccpuhp_remove_state() removes the callbacks and invokes the teardown callback (if not NULL) for all online CPUs which have currently a state greater than the removed state. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU’s hotplug thread.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hHIn order to complete the removal, the teardown callback should not fail.h]hHIn order to complete the removal, the teardown callback should not fail.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]jjuh1jhhhMhjmubah}(h]h ]h"]h$]h&]uh1jV hhhMhj hhubh)}(hXThe state removal and the callback invocations are serialized against CPU hotplug operations. If the remove function has to be called from a CPU hotplug read locked region, then the _cpuslocked() variants have to be used. These functions cannot be used from within CPU hotplug callbacks.h]hXThe state removal and the callback invocations are serialized against CPU hotplug operations. If the remove function has to be called from a CPU hotplug read locked region, then the _cpuslocked() variants have to be used. These functions cannot be used from within CPU hotplug callbacks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hWIf a multi-instance state is removed then the caller has to remove all instances first.h]hWIf a multi-instance state is removed then the caller has to remove all instances first.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]removal-of-a-cpu-hotplug-stateah ]h"]removal of a cpu hotplug stateah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h(Multi-Instance state instance managementh]h(Multi-Instance state instance management}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hMOnce the multi-instance state is set up, instances can be added to the state:h]hMOnce the multi-instance state is set up, instances can be added to the state:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjW )}(hX* cpuhp_state_add_instance(state, node) * cpuhp_state_add_instance_nocalls(state, node) h]j)}(hhh](j)}(h%cpuhp_state_add_instance(state, node)h]h)}(hj h]h%cpuhp_state_add_instance(state, node)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h.cpuhp_state_add_instance_nocalls(state, node) h]h)}(h-cpuhp_state_add_instance_nocalls(state, node)h]h-cpuhp_state_add_instance_nocalls(state, node)}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1jV hhhMhjhhubh)}(hThe @state argument is either a statically allocated state or the state number which was allocated in the dynamic range by cpuhp_setup_state_multi().h]hThe @state argument is either a statically allocated state or the state number which was allocated in the dynamic range by cpuhp_setup_state_multi().}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe @node argument is a pointer to an hlist_node which is embedded in the instance's data structure. The pointer is handed to the multi-instance state callbacks and can be used by the callback to retrieve the instance via container_of().h]hThe @node argument is a pointer to an hlist_node which is embedded in the instance’s data structure. The pointer is handed to the multi-instance state callbacks and can be used by the callback to retrieve the instance via container_of().}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hHThe functions differ in the way how the installed callbacks are treated:h]hHThe functions differ in the way how the installed callbacks are treated:}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjW )}(hX* cpuhp_state_add_instance_nocalls() and only adds the instance to the multi-instance state's node list. * cpuhp_state_add_instance() adds the instance and invokes the startup callback (if not NULL) associated with @state for all online CPUs which have currently a state greater than @state. The callback is only invoked for the to be added instance. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread. If a callback fails for CPU N then the teardown callback for CPU 0 .. N-1 is invoked to rollback the operation, the function fails and the instance is not added to the node list of the multi-instance state. h]j)}(hhh](j)}(hgcpuhp_state_add_instance_nocalls() and only adds the instance to the multi-instance state's node list. h]h)}(hfcpuhp_state_add_instance_nocalls() and only adds the instance to the multi-instance state's node list.h]hhcpuhp_state_add_instance_nocalls() and only adds the instance to the multi-instance state’s node list.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjtubah}(h]h ]h"]h$]h&]uh1jhjqubj)}(hXzcpuhp_state_add_instance() adds the instance and invokes the startup callback (if not NULL) associated with @state for all online CPUs which have currently a state greater than @state. The callback is only invoked for the to be added instance. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread. If a callback fails for CPU N then the teardown callback for CPU 0 .. N-1 is invoked to rollback the operation, the function fails and the instance is not added to the node list of the multi-instance state. h](h)}(hXcpuhp_state_add_instance() adds the instance and invokes the startup callback (if not NULL) associated with @state for all online CPUs which have currently a state greater than @state. The callback is only invoked for the to be added instance. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread.h]hXcpuhp_state_add_instance() adds the instance and invokes the startup callback (if not NULL) associated with @state for all online CPUs which have currently a state greater than @state. The callback is only invoked for the to be added instance. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU’s hotplug thread.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubh)}(hIf a callback fails for CPU N then the teardown callback for CPU 0 .. N-1 is invoked to rollback the operation, the function fails and the instance is not added to the node list of the multi-instance state.h]hIf a callback fails for CPU N then the teardown callback for CPU 0 .. N-1 is invoked to rollback the operation, the function fails and the instance is not added to the node list of the multi-instance state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]jjuh1jhhhM hjmubah}(h]h ]h"]h$]h&]uh1jV hhhM hjhhubh)}(hOTo remove an instance from the state's node list these functions are available:h]hQTo remove an instance from the state’s node list these functions are available:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjW )}(h^* cpuhp_state_remove_instance(state, node) * cpuhp_state_remove_instance_nocalls(state, node) h]j)}(hhh](j)}(h(cpuhp_state_remove_instance(state, node)h]h)}(hjh]h(cpuhp_state_remove_instance(state, node)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h1cpuhp_state_remove_instance_nocalls(state, node) h]h)}(h0cpuhp_state_remove_instance_nocalls(state, node)h]h0cpuhp_state_remove_instance_nocalls(state, node)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1jV hhhMhjhhubh)}(hQThe arguments are the same as for the cpuhp_state_add_instance*() variants above.h]hQThe arguments are the same as for the cpuhp_state_add_instance*() variants above.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hHThe functions differ in the way how the installed callbacks are treated:h]hHThe functions differ in the way how the installed callbacks are treated:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubjW )}(hXp* cpuhp_state_remove_instance_nocalls() only removes the instance from the state's node list. * cpuhp_state_remove_instance() removes the instance and invokes the teardown callback (if not NULL) associated with @state for all online CPUs which have currently a state greater than @state. The callback is only invoked for the to be removed instance. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread. In order to complete the removal, the teardown callback should not fail. h]j)}(hhh](j)}(h\cpuhp_state_remove_instance_nocalls() only removes the instance from the state's node list. h]h)}(h[cpuhp_state_remove_instance_nocalls() only removes the instance from the state's node list.h]h]cpuhp_state_remove_instance_nocalls() only removes the instance from the state’s node list.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hj1ubah}(h]h ]h"]h$]h&]uh1jhj.ubj)}(hXcpuhp_state_remove_instance() removes the instance and invokes the teardown callback (if not NULL) associated with @state for all online CPUs which have currently a state greater than @state. The callback is only invoked for the to be removed instance. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread. In order to complete the removal, the teardown callback should not fail. h](h)}(hXcpuhp_state_remove_instance() removes the instance and invokes the teardown callback (if not NULL) associated with @state for all online CPUs which have currently a state greater than @state. The callback is only invoked for the to be removed instance. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU's hotplug thread.h]hXcpuhp_state_remove_instance() removes the instance and invokes the teardown callback (if not NULL) associated with @state for all online CPUs which have currently a state greater than @state. The callback is only invoked for the to be removed instance. Depending on the state section the callback is either invoked on the current CPU (PREPARE section) or on each online CPU (ONLINE section) in the context of the CPU’s hotplug thread.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjIubh)}(hHIn order to complete the removal, the teardown callback should not fail.h]hHIn order to complete the removal, the teardown callback should not fail.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hjIubeh}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]jjuh1jhhhM$hj*ubah}(h]h ]h"]h$]h&]uh1jV hhhM$hjhhubh)}(hThe node list add/remove operations and the callback invocations are serialized against CPU hotplug operations. These functions cannot be used from within CPU hotplug callbacks and CPU hotplug read locked regions.h]hThe node list add/remove operations and the callback invocations are serialized against CPU hotplug operations. These functions cannot be used from within CPU hotplug callbacks and CPU hotplug read locked regions.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hjhhubeh}(h](multi-instance-state-instance-managementah ]h"](multi-instance state instance managementah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hExamplesh]hExamples}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM6ubh)}(h|Setup and teardown a statically allocated state in the STARTING section for notifications on online and offline operations::h]h{Setup and teardown a statically allocated state in the STARTING section for notifications on online and offline operations:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjhhubj)}(hret = cpuhp_setup_state(CPUHP_SUBSYS_STARTING, "subsys:starting", subsys_cpu_starting, subsys_cpu_dying); if (ret < 0) return ret; .... cpuhp_remove_state(CPUHP_SUBSYS_STARTING);h]hret = cpuhp_setup_state(CPUHP_SUBSYS_STARTING, "subsys:starting", subsys_cpu_starting, subsys_cpu_dying); if (ret < 0) return ret; .... cpuhp_remove_state(CPUHP_SUBSYS_STARTING);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM;hjhhubh)}(hpSetup and teardown a dynamically allocated state in the ONLINE section for notifications on offline operations::h]hoSetup and teardown a dynamically allocated state in the ONLINE section for notifications on offline operations:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjhhubj)}(hstate = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "subsys:offline", NULL, subsys_cpu_offline); if (state < 0) return state; .... cpuhp_remove_state(state);h]hstate = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "subsys:offline", NULL, subsys_cpu_offline); if (state < 0) return state; .... cpuhp_remove_state(state);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMDhjhhubh)}(hSetup and teardown a dynamically allocated state in the ONLINE section for notifications on online operations without invoking the callbacks::h]hSetup and teardown a dynamically allocated state in the ONLINE section for notifications on online operations without invoking the callbacks:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhjhhubj)}(hstate = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, NULL); if (state < 0) return state; .... cpuhp_remove_state_nocalls(state);h]hstate = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, NULL); if (state < 0) return state; .... cpuhp_remove_state_nocalls(state);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMMhjhhubh)}(hSetup, use and teardown a dynamically allocated multi-instance state in the ONLINE section for notifications on online and offline operation::h]hSetup, use and teardown a dynamically allocated multi-instance state in the ONLINE section for notifications on online and offline operation:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjhhubj)}(hXstate = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, subsys_cpu_offline); if (state < 0) return state; .... ret = cpuhp_state_add_instance(state, &inst1->node); if (ret) return ret; .... ret = cpuhp_state_add_instance(state, &inst2->node); if (ret) return ret; .... cpuhp_remove_instance(state, &inst1->node); .... cpuhp_remove_instance(state, &inst2->node); .... cpuhp_remove_multi_state(state);h]hXstate = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, subsys_cpu_offline); if (state < 0) return state; .... ret = cpuhp_state_add_instance(state, &inst1->node); if (ret) return ret; .... ret = cpuhp_state_add_instance(state, &inst2->node); if (ret) return ret; .... cpuhp_remove_instance(state, &inst1->node); .... cpuhp_remove_instance(state, &inst2->node); .... cpuhp_remove_multi_state(state);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMVhjhhubeh}(h]examplesah ]h"]examplesah$]h&]uh1hhjhhhhhM6ubeh}(h]the-cpu-hotplug-apiah ]h"]the cpu hotplug apiah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hTesting of hotplug statesh]hTesting of hotplug states}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hhhhhMjubh)}(hXcOne way to verify whether a custom state is working as expected or not is to shutdown a CPU and then put it online again. It is also possible to put the CPU to certain state (for instance *CPUHP_AP_ONLINE*) and then go back to *CPUHP_ONLINE*. This would simulate an error one state after *CPUHP_AP_ONLINE* which would lead to rollback to the online state.h](hOne way to verify whether a custom state is working as expected or not is to shutdown a CPU and then put it online again. It is also possible to put the CPU to certain state (for instance }(hj3hhhNhNubj=)}(h*CPUHP_AP_ONLINE*h]hCPUHP_AP_ONLINE}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j<hj3ubh) and then go back to }(hj3hhhNhNubj=)}(h*CPUHP_ONLINE*h]h CPUHP_ONLINE}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j<hj3ubh/. This would simulate an error one state after }(hj3hhhNhNubj=)}(h*CPUHP_AP_ONLINE*h]hCPUHP_AP_ONLINE}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j<hj3ubh2 which would lead to rollback to the online state.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMlhj"hhubh)}(hUAll registered states are enumerated in ``/sys/devices/system/cpu/hotplug/states`` ::h](h(All registered states are enumerated in }(hjwhhhNhNubj)}(h*``/sys/devices/system/cpu/hotplug/states``h]h&/sys/devices/system/cpu/hotplug/states}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]uh1hhhhMrhj"hhubj)}(hX$ tail /sys/devices/system/cpu/hotplug/states 138: mm/vmscan:online 139: mm/vmstat:online 140: lib/percpu_cnt:online 141: acpi/cpu-drv:online 142: base/cacheinfo:online 143: virtio/net:online 144: x86/mce:online 145: printk:online 168: sched:active 169: onlineh]hX$ tail /sys/devices/system/cpu/hotplug/states 138: mm/vmscan:online 139: mm/vmstat:online 140: lib/percpu_cnt:online 141: acpi/cpu-drv:online 142: base/cacheinfo:online 143: virtio/net:online 144: x86/mce:online 145: printk:online 168: sched:active 169: online}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMthj"hhubh)}(hJTo rollback CPU4 to ``lib/percpu_cnt:online`` and back online just issue::h](hTo rollback CPU4 to }(hjhhhNhNubj)}(h``lib/percpu_cnt:online``h]hlib/percpu_cnt:online}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and back online just issue:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubj)}(h$ cat /sys/devices/system/cpu/cpu4/hotplug/state 169 $ echo 140 > /sys/devices/system/cpu/cpu4/hotplug/target $ cat /sys/devices/system/cpu/cpu4/hotplug/state 140h]h$ cat /sys/devices/system/cpu/cpu4/hotplug/state 169 $ echo 140 > /sys/devices/system/cpu/cpu4/hotplug/target $ cat /sys/devices/system/cpu/cpu4/hotplug/state 140}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj"hhubh)}(hlIt is important to note that the teardown callback of state 140 have been invoked. And now get back online::h]hkIt is important to note that the teardown callback of state 140 have been invoked. And now get back online:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubj)}(hm$ echo 169 > /sys/devices/system/cpu/cpu4/hotplug/target $ cat /sys/devices/system/cpu/cpu4/hotplug/state 169h]hm$ echo 169 > /sys/devices/system/cpu/cpu4/hotplug/target $ cat /sys/devices/system/cpu/cpu4/hotplug/state 169}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj"hhubh)}(hBWith trace events enabled, the individual steps are visible, too::h]hAWith trace events enabled, the individual steps are visible, too:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubj)}(hX# TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | bash-394 [001] 22.976: cpuhp_enter: cpu: 0004 target: 140 step: 169 (cpuhp_kick_ap_work) cpuhp/4-31 [004] 22.977: cpuhp_enter: cpu: 0004 target: 140 step: 168 (sched_cpu_deactivate) cpuhp/4-31 [004] 22.990: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0 cpuhp/4-31 [004] 22.991: cpuhp_enter: cpu: 0004 target: 140 step: 144 (mce_cpu_pre_down) cpuhp/4-31 [004] 22.992: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0 cpuhp/4-31 [004] 22.993: cpuhp_multi_enter: cpu: 0004 target: 140 step: 143 (virtnet_cpu_down_prep) cpuhp/4-31 [004] 22.994: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0 cpuhp/4-31 [004] 22.995: cpuhp_enter: cpu: 0004 target: 140 step: 142 (cacheinfo_cpu_pre_down) cpuhp/4-31 [004] 22.996: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0 bash-394 [001] 22.997: cpuhp_exit: cpu: 0004 state: 140 step: 169 ret: 0 bash-394 [005] 95.540: cpuhp_enter: cpu: 0004 target: 169 step: 140 (cpuhp_kick_ap_work) cpuhp/4-31 [004] 95.541: cpuhp_enter: cpu: 0004 target: 169 step: 141 (acpi_soft_cpu_online) cpuhp/4-31 [004] 95.542: cpuhp_exit: cpu: 0004 state: 141 step: 141 ret: 0 cpuhp/4-31 [004] 95.543: cpuhp_enter: cpu: 0004 target: 169 step: 142 (cacheinfo_cpu_online) cpuhp/4-31 [004] 95.544: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0 cpuhp/4-31 [004] 95.545: cpuhp_multi_enter: cpu: 0004 target: 169 step: 143 (virtnet_cpu_online) cpuhp/4-31 [004] 95.546: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0 cpuhp/4-31 [004] 95.547: cpuhp_enter: cpu: 0004 target: 169 step: 144 (mce_cpu_online) cpuhp/4-31 [004] 95.548: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0 cpuhp/4-31 [004] 95.549: cpuhp_enter: cpu: 0004 target: 169 step: 145 (console_cpu_notify) cpuhp/4-31 [004] 95.550: cpuhp_exit: cpu: 0004 state: 145 step: 145 ret: 0 cpuhp/4-31 [004] 95.551: cpuhp_enter: cpu: 0004 target: 169 step: 168 (sched_cpu_activate) cpuhp/4-31 [004] 95.552: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0 bash-394 [005] 95.553: cpuhp_exit: cpu: 0004 state: 169 step: 140 ret: 0h]hX# TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | bash-394 [001] 22.976: cpuhp_enter: cpu: 0004 target: 140 step: 169 (cpuhp_kick_ap_work) cpuhp/4-31 [004] 22.977: cpuhp_enter: cpu: 0004 target: 140 step: 168 (sched_cpu_deactivate) cpuhp/4-31 [004] 22.990: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0 cpuhp/4-31 [004] 22.991: cpuhp_enter: cpu: 0004 target: 140 step: 144 (mce_cpu_pre_down) cpuhp/4-31 [004] 22.992: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0 cpuhp/4-31 [004] 22.993: cpuhp_multi_enter: cpu: 0004 target: 140 step: 143 (virtnet_cpu_down_prep) cpuhp/4-31 [004] 22.994: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0 cpuhp/4-31 [004] 22.995: cpuhp_enter: cpu: 0004 target: 140 step: 142 (cacheinfo_cpu_pre_down) cpuhp/4-31 [004] 22.996: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0 bash-394 [001] 22.997: cpuhp_exit: cpu: 0004 state: 140 step: 169 ret: 0 bash-394 [005] 95.540: cpuhp_enter: cpu: 0004 target: 169 step: 140 (cpuhp_kick_ap_work) cpuhp/4-31 [004] 95.541: cpuhp_enter: cpu: 0004 target: 169 step: 141 (acpi_soft_cpu_online) cpuhp/4-31 [004] 95.542: cpuhp_exit: cpu: 0004 state: 141 step: 141 ret: 0 cpuhp/4-31 [004] 95.543: cpuhp_enter: cpu: 0004 target: 169 step: 142 (cacheinfo_cpu_online) cpuhp/4-31 [004] 95.544: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0 cpuhp/4-31 [004] 95.545: cpuhp_multi_enter: cpu: 0004 target: 169 step: 143 (virtnet_cpu_online) cpuhp/4-31 [004] 95.546: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0 cpuhp/4-31 [004] 95.547: cpuhp_enter: cpu: 0004 target: 169 step: 144 (mce_cpu_online) cpuhp/4-31 [004] 95.548: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0 cpuhp/4-31 [004] 95.549: cpuhp_enter: cpu: 0004 target: 169 step: 145 (console_cpu_notify) cpuhp/4-31 [004] 95.550: cpuhp_exit: cpu: 0004 state: 145 step: 145 ret: 0 cpuhp/4-31 [004] 95.551: cpuhp_enter: cpu: 0004 target: 169 step: 168 (sched_cpu_activate) cpuhp/4-31 [004] 95.552: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0 bash-394 [005] 95.553: cpuhp_exit: cpu: 0004 state: 169 step: 140 ret: 0}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj"hhubh)}(hAs it an be seen, CPU4 went down until timestamp 22.996 and then back up until 95.552. All invoked callbacks including their return codes are visible in the trace.h]hAs it an be seen, CPU4 went down until timestamp 22.996 and then back up until 95.552. All invoked callbacks including their return codes are visible in the trace.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubeh}(h]testing-of-hotplug-statesah ]h"]testing of hotplug statesah$]h&]uh1hhhhhhhhMjubh)}(hhh](h)}(hArchitecture's requirementsh]hArchitecture’s requirements}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h8The following functions and configurations are required:h]h8The following functions and configurations are required:}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj )}(hhh](j)}(hA``CONFIG_HOTPLUG_CPU`` This entry needs to be enabled in Kconfig h](j)}(h``CONFIG_HOTPLUG_CPU``h]j)}(hjEh]hCONFIG_HOTPLUG_CPU}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1jhhhMhj?ubj0)}(hhh]h)}(h)This entry needs to be enabled in Kconfigh]h)This entry needs to be enabled in Kconfig}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubah}(h]h ]h"]h$]h&]uh1j/hj?ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj<ubj)}(h0``__cpu_up()`` Arch interface to bring up a CPU h](j)}(h``__cpu_up()``h]j)}(hj}h]h __cpu_up()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1jhhhMhjwubj0)}(hhh]h)}(h Arch interface to bring up a CPUh]h Arch interface to bring up a CPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j/hjwubeh}(h]h ]h"]h$]h&]uh1jhhhMhj<hhubj)}(h``__cpu_disable()`` Arch interface to shutdown a CPU, no more interrupts can be handled by the kernel after the routine returns. This includes the shutdown of the timer. h](j)}(h``__cpu_disable()``h]j)}(hjh]h__cpu_disable()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj0)}(hhh]h)}(hArch interface to shutdown a CPU, no more interrupts can be handled by the kernel after the routine returns. This includes the shutdown of the timer.h]hArch interface to shutdown a CPU, no more interrupts can be handled by the kernel after the routine returns. This includes the shutdown of the timer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhhhMhj<hhubj)}(hXm``__cpu_die()`` This actually supposed to ensure death of the CPU. Actually look at some example code in other arch that implement CPU hotplug. The processor is taken down from the ``idle()`` loop for that specific architecture. ``__cpu_die()`` typically waits for some per_cpu state to be set, to ensure the processor dead routine is called to be sure positively. h](j)}(h``__cpu_die()``h]j)}(hjh]h __cpu_die()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj0)}(hhh]h)}(hX\This actually supposed to ensure death of the CPU. Actually look at some example code in other arch that implement CPU hotplug. The processor is taken down from the ``idle()`` loop for that specific architecture. ``__cpu_die()`` typically waits for some per_cpu state to be set, to ensure the processor dead routine is called to be sure positively.h](hThis actually supposed to ensure death of the CPU. Actually look at some example code in other arch that implement CPU hotplug. The processor is taken down from the }(hjhhhNhNubj)}(h ``idle()``h]hidle()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh& loop for that specific architecture. }(hjhhhNhNubj)}(h``__cpu_die()``h]h __cpu_die()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhx typically waits for some per_cpu state to be set, to ensure the processor dead routine is called to be sure positively.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhhhMhj<hhubeh}(h]h ]h"]h$]h&]uh1j hjhhhhhNubeh}(h]architecture-s-requirementsah ]h"]architecture's requirementsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hUser Space Notificationh]hUser Space Notification}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhhhhhMubh)}(hRAfter CPU successfully onlined or offline udev events are sent. A udev rule like::h]hQAfter CPU successfully onlined or offline udev events are sent. A udev rule like:}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubj)}(hhSUBSYSTEM=="cpu", DRIVERS=="processor", DEVPATH=="/devices/system/cpu/*", RUN+="the_hotplug_receiver.sh"h]hhSUBSYSTEM=="cpu", DRIVERS=="processor", DEVPATH=="/devices/system/cpu/*", RUN+="the_hotplug_receiver.sh"}hjpsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjQhhubh)}(h(will receive all events. A script like::h]h'will receive all events. A script like:}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubj)}(h#!/bin/sh if [ "${ACTION}" = "offline" ] then echo "CPU ${DEVPATH##*/} offline" elif [ "${ACTION}" = "online" ] then echo "CPU ${DEVPATH##*/} online" fih]h#!/bin/sh if [ "${ACTION}" = "offline" ] then echo "CPU ${DEVPATH##*/} offline" elif [ "${ACTION}" = "online" ] then echo "CPU ${DEVPATH##*/} online" fi}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjQhhubh)}(hcan process the event further.h]hcan process the event further.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(hX,When changes to the CPUs in the system occur, the sysfs file /sys/devices/system/cpu/crash_hotplug contains '1' if the kernel updates the kdump capture kernel list of CPUs itself (via elfcorehdr and other relevant kexec segment), or '0' if userspace must update the kdump capture kernel list of CPUs.h]hX4When changes to the CPUs in the system occur, the sysfs file /sys/devices/system/cpu/crash_hotplug contains ‘1’ if the kernel updates the kdump capture kernel list of CPUs itself (via elfcorehdr and other relevant kexec segment), or ‘0’ if userspace must update the kdump capture kernel list of CPUs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(hOThe availability depends on the CONFIG_HOTPLUG_CPU kernel configuration option.h]hOThe availability depends on the CONFIG_HOTPLUG_CPU kernel configuration option.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(hTo skip userspace processing of CPU hot un/plug events for kdump (i.e. the unload-then-reload to obtain a current list of CPUs), this sysfs file can be used in a udev rule as follows:h]hTo skip userspace processing of CPU hot un/plug events for kdump (i.e. the unload-then-reload to obtain a current list of CPUs), this sysfs file can be used in a udev rule as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubjW )}(hESUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end" h]h)}(hDSUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end"h]hPSUBSYSTEM==”cpu”, ATTRS{crash_hotplug}==”1”, GOTO=”kdump_reload_end”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jV hhhMhjQhhubh)}(hFor a CPU hot un/plug event, if the architecture supports kernel updates of the elfcorehdr (which contains the list of CPUs) and other relevant kexec segments, then the rule skips the unload-then-reload of the kdump capture kernel.h]hFor a CPU hot un/plug event, if the architecture supports kernel updates of the elfcorehdr (which contains the list of CPUs) and other relevant kexec segments, then the rule skips the unload-then-reload of the kdump capture kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubeh}(h]user-space-notificationah ]h"]user space notificationah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h&Kernel Inline Documentations Referenceh]h&Kernel Inline Documentations Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlecpuhp_setup_state (C function)c.cpuhp_setup_statehNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hint cpuhp_setup_state (enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h]hdesc_signature_line)}(hint cpuhp_setup_state(enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h](hdesc_sig_keyword_type)}(hinth]hint}(hj5hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j3hj/hhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMubhdesc_sig_space)}(h h]h }(hjGhhhNhNubah}(h]h ]wah"]h$]h&]uh1jEhj/hhhjDhMubh desc_name)}(hcpuhp_setup_stateh]h desc_sig_name)}(hcpuhp_setup_stateh]hcpuhp_setup_state}(hj^hhhNhNubah}(h]h ]nah"]h$]h&]uh1j\hjXubah}(h]h ](sig-namedescnameeh"]h$]h&]jjuh1jVhj/hhhjDhMubhdesc_parameterlist)}(ho(enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h](hdesc_parameter)}(henum cpuhp_state stateh](hdesc_sig_keyword)}(henumh]henum}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhj}ubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj}ubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jj`sbc.cpuhp_setup_stateasbuh1hhj}ubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj}ubj])}(hstateh]hstate}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj}ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjwubj|)}(hconst char *nameh](j)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj4)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubhdesc_sig_punctuation)}(hjh]h*}(hj-hhhNhNubah}(h]h ]pah"]h$]h&]uh1j+hjubj])}(hnameh]hname}(hj;hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjwubj|)}(h int (*startup)(unsigned int cpu)h](j4)}(hinth]hint}(hjThhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjPubjF)}(h h]h }(hjbhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPubj,)}(h(h]h(}(hjphhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjPubj,)}(hjh]h*}(hj~hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjPubj])}(hstartuph]hstartup}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjPubj,)}(h)h]h)}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjPubj,)}(hjrh]h(}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjPubj4)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjPubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPubj4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjPubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPubj])}(hcpuh]hcpu}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjPubj,)}(hjh]h)}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjPubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjwubj|)}(h!int (*teardown)(unsigned int cpu)h](j4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj,)}(hjrh]h(}(hj.hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj,)}(hjh]h*}(hj;hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj])}(hteardownh]hteardown}(hjHhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubj,)}(hjh]h)}(hjVhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj,)}(hjrh]h(}(hjchhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj4)}(hunsignedh]hunsigned}(hjphhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hj~hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj])}(hcpuh]hcpu}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubj,)}(hjh]h)}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjwubeh}(h]h ]h"]h$]h&]jjuh1juhj/hhhjDhMubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1j-sphinx_line_type declaratorhj)hhhjDhMubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j'hjDhMhj$hhubh desc_content)}(hhh]h)}(hCSetup hotplug state callbacks with calling the **startup** callbackh](h/Setup hotplug state callbacks with calling the }(hjhhhNhNubhstrong)}(h **startup**h]hstartup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh callback}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jhj$hhhjDhMubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1j"hhhjhNhNubh container)}(hX**Parameters** ``enum cpuhp_state state`` The state for which the calls are installed ``const char *name`` Name of the callback (will be used in debug output) ``int (*startup)(unsigned int cpu)`` startup callback function or NULL if not required ``int (*teardown)(unsigned int cpu)`` teardown callback function or NULL if not required **Description** Installs the callback functions and invokes the **startup** callback on the online cpus which have already reached the **state**.h](h)}(h**Parameters**h]j)}(hj'h]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj!ubj )}(hhh](j)}(hG``enum cpuhp_state state`` The state for which the calls are installed h](j)}(h``enum cpuhp_state state``h]j)}(hjFh]henum cpuhp_state state}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj@ubj0)}(hhh]h)}(h+The state for which the calls are installedh]h+The state for which the calls are installed}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj\ubah}(h]h ]h"]h$]h&]uh1j/hj@ubeh}(h]h ]h"]h$]h&]uh1jhj[hMhj=ubj)}(hI``const char *name`` Name of the callback (will be used in debug output) h](j)}(h``const char *name``h]j)}(hjh]hconst char *name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjyubj0)}(hhh]h)}(h3Name of the callback (will be used in debug output)h]h3Name of the callback (will be used in debug output)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j/hjyubeh}(h]h ]h"]h$]h&]uh1jhjhMhj=ubj)}(hW``int (*startup)(unsigned int cpu)`` startup callback function or NULL if not required h](j)}(h$``int (*startup)(unsigned int cpu)``h]j)}(hjh]h int (*startup)(unsigned int cpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjubj0)}(hhh]h)}(h1startup callback function or NULL if not requiredh]h1startup callback function or NULL if not required}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj=ubj)}(hY``int (*teardown)(unsigned int cpu)`` teardown callback function or NULL if not required h](j)}(h%``int (*teardown)(unsigned int cpu)``h]j)}(hjh]h!int (*teardown)(unsigned int cpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM hjubj0)}(hhh]h)}(h2teardown callback function or NULL if not requiredh]h2teardown callback function or NULL if not required}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhjhM hj=ubeh}(h]h ]h"]h$]h&]uh1j hj!ubh)}(h**Description**h]j)}(hj,h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM hj!ubh)}(hInstalls the callback functions and invokes the **startup** callback on the online cpus which have already reached the **state**.h](h0Installs the callback functions and invokes the }(hjBhhhNhNubj)}(h **startup**h]hstartup}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh< callback on the online cpus which have already reached the }(hjBhhhNhNubj)}(h **state**h]hstate}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM hj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)cpuhp_setup_state_cpuslocked (C function)c.cpuhp_setup_state_cpuslockedhNtauh1jhjhhhNhNubj#)}(hhh](j()}(hint cpuhp_setup_state_cpuslocked (enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h]j.)}(hint cpuhp_setup_state_cpuslocked(enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h](j4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhMubjW)}(hcpuhp_setup_state_cpuslockedh]j])}(hcpuhp_setup_state_cpuslockedh]hcpuhp_setup_state_cpuslocked}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhjhhhjhMubjv)}(ho(enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h](j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.cpuhp_setup_state_cpuslockedasbuh1hhjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj])}(hstateh]hstate}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjubj|)}(hconst char *nameh](j)}(hjh]hconst}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubjF)}(h h]h }(hjDhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj3ubj4)}(hcharh]hchar}(hjRhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj3ubjF)}(h h]h }(hj`hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj3ubj,)}(hjh]h*}(hjnhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hj3ubj])}(hnameh]hname}(hj{hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjubj|)}(h int (*startup)(unsigned int cpu)h](j4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj,)}(hjrh]h(}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj,)}(hjh]h*}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj])}(hstartuph]hstartup}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubj,)}(hjh]h)}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj,)}(hjrh]h(}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj4)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj])}(hcpuh]hcpu}(hj*hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubj,)}(hjh]h)}(hj8hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjubj|)}(h!int (*teardown)(unsigned int cpu)h](j4)}(hinth]hint}(hjPhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjLubjF)}(h h]h }(hj^hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLubj,)}(hjrh]h(}(hjlhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjLubj,)}(hjh]h*}(hjyhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjLubj])}(hteardownh]hteardown}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjLubj,)}(hjh]h)}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjLubj,)}(hjrh]h(}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjLubj4)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjLubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLubj4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjLubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLubj])}(hcpuh]hcpu}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjLubj,)}(hjh]h)}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjLubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjubeh}(h]h ]h"]h$]h&]jjuh1juhjhhhjhMubeh}(h]h ]h"]h$]h&]jjjuh1j-jjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhMhjhhubj)}(hhh]h)}(hcSetup hotplug state callbacks with calling **startup** callback from a cpus_read_lock() held regionh](h+Setup hotplug state callbacks with calling }(hjhhhNhNubj)}(h **startup**h]hstartup}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh- callback from a cpus_read_lock() held region}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjGjjGjjjuh1j"hhhjhNhNubj )}(hX**Parameters** ``enum cpuhp_state state`` The state for which the calls are installed ``const char *name`` Name of the callback (will be used in debug output) ``int (*startup)(unsigned int cpu)`` startup callback function or NULL if not required ``int (*teardown)(unsigned int cpu)`` teardown callback function or NULL if not required **Description** Same as cpuhp_setup_state() except that it must be invoked from within a cpus_read_lock() held region.h](h)}(h**Parameters**h]j)}(hjQh]h Parameters}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjKubj )}(hhh](j)}(hG``enum cpuhp_state state`` The state for which the calls are installed h](j)}(h``enum cpuhp_state state``h]j)}(hjph]henum cpuhp_state state}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjjubj0)}(hhh]h)}(h+The state for which the calls are installedh]h+The state for which the calls are installed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j/hjjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjgubj)}(hI``const char *name`` Name of the callback (will be used in debug output) h](j)}(h``const char *name``h]j)}(hjh]hconst char *name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjubj0)}(hhh]h)}(h3Name of the callback (will be used in debug output)h]h3Name of the callback (will be used in debug output)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjgubj)}(hW``int (*startup)(unsigned int cpu)`` startup callback function or NULL if not required h](j)}(h$``int (*startup)(unsigned int cpu)``h]j)}(hjh]h int (*startup)(unsigned int cpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjubj0)}(hhh]h)}(h1startup callback function or NULL if not requiredh]h1startup callback function or NULL if not required}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjgubj)}(hY``int (*teardown)(unsigned int cpu)`` teardown callback function or NULL if not required h](j)}(h%``int (*teardown)(unsigned int cpu)``h]j)}(hjh]h!int (*teardown)(unsigned int cpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjubj0)}(hhh]h)}(h2teardown callback function or NULL if not requiredh]h2teardown callback function or NULL if not required}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj1ubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhj0hMhjgubeh}(h]h ]h"]h$]h&]uh1j hjKubh)}(h**Description**h]j)}(hjVh]h Description}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjKubh)}(hfSame as cpuhp_setup_state() except that it must be invoked from within a cpus_read_lock() held region.h]hfSame as cpuhp_setup_state() except that it must be invoked from within a cpus_read_lock() held region.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjKubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&cpuhp_setup_state_nocalls (C function)c.cpuhp_setup_state_nocallshNtauh1jhjhhhNhNubj#)}(hhh](j()}(hint cpuhp_setup_state_nocalls (enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h]j.)}(hint cpuhp_setup_state_nocalls(enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h](j4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM,ubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhM,ubjW)}(hcpuhp_setup_state_nocallsh]j])}(hcpuhp_setup_state_nocallsh]hcpuhp_setup_state_nocalls}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhjhhhjhM,ubjv)}(ho(enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h](j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.cpuhp_setup_state_nocallsasbuh1hhjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj])}(hstateh]hstate}(hj$hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjubj|)}(hconst char *nameh](j)}(hjh]hconst}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubjF)}(h h]h }(hjJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj9ubj4)}(hcharh]hchar}(hjXhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj9ubjF)}(h h]h }(hjfhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj9ubj,)}(hjh]h*}(hjthhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hj9ubj])}(hnameh]hname}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj9ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjubj|)}(h int (*startup)(unsigned int cpu)h](j4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj,)}(hjrh]h(}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj,)}(hjh]h*}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj])}(hstartuph]hstartup}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubj,)}(hjh]h)}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj,)}(hjrh]h(}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubj4)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjF)}(h h]h }(hj"hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubj])}(hcpuh]hcpu}(hj0hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjubj,)}(hjh]h)}(hj>hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjubj|)}(h!int (*teardown)(unsigned int cpu)h](j4)}(hinth]hint}(hjVhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjRubjF)}(h h]h }(hjdhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjRubj,)}(hjrh]h(}(hjrhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjRubj,)}(hjh]h*}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjRubj])}(hteardownh]hteardown}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjRubj,)}(hjh]h)}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjRubj,)}(hjrh]h(}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjRubj4)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjRubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjRubj4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjRubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjRubj])}(hcpuh]hcpu}(hjhhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjRubj,)}(hjh]h)}(hjhhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjRubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjubeh}(h]h ]h"]h$]h&]jjuh1juhjhhhjhM,ubeh}(h]h ]h"]h$]h&]jjjuh1j-jjhjhhhjhM,ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhM,hjhhubj)}(hhh]h)}(hFSetup hotplug state callbacks without calling the **startup** callbackh](h2Setup hotplug state callbacks without calling the }(hj#hhhNhNubj)}(h **startup**h]hstartup}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh callback}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM,hj hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM,ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjMjjMjjjuh1j"hhhjhNhNubj )}(hX**Parameters** ``enum cpuhp_state state`` The state for which the calls are installed ``const char *name`` Name of the callback. ``int (*startup)(unsigned int cpu)`` startup callback function or NULL if not required ``int (*teardown)(unsigned int cpu)`` teardown callback function or NULL if not required **Description** Same as cpuhp_setup_state() except that the **startup** callback is not invoked during installation. NOP if SMP=n or HOTPLUG_CPU=n.h](h)}(h**Parameters**h]j)}(hjWh]h Parameters}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM0hjQubj )}(hhh](j)}(hG``enum cpuhp_state state`` The state for which the calls are installed h](j)}(h``enum cpuhp_state state``h]j)}(hjvh]henum cpuhp_state state}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM.hjpubj0)}(hhh]h)}(h+The state for which the calls are installedh]h+The state for which the calls are installed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM.hjubah}(h]h ]h"]h$]h&]uh1j/hjpubeh}(h]h ]h"]h$]h&]uh1jhjhM.hjmubj)}(h+``const char *name`` Name of the callback. h](j)}(h``const char *name``h]j)}(hjh]hconst char *name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM/hjubj0)}(hhh]h)}(hName of the callback.h]hName of the callback.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM/hjubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhjhM/hjmubj)}(hW``int (*startup)(unsigned int cpu)`` startup callback function or NULL if not required h](j)}(h$``int (*startup)(unsigned int cpu)``h]j)}(hjh]h int (*startup)(unsigned int cpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM0hjubj0)}(hhh]h)}(h1startup callback function or NULL if not requiredh]h1startup callback function or NULL if not required}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM0hjubah}(h]h ]h"]h$]h&]uh1j/hjubeh}(h]h ]h"]h$]h&]uh1jhjhM0hjmubj)}(hY``int (*teardown)(unsigned int cpu)`` teardown callback function or NULL if not required h](j)}(h%``int (*teardown)(unsigned int cpu)``h]j)}(hj! h]h!int (*teardown)(unsigned int cpu)}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM1hj ubj0)}(hhh]h)}(h2teardown callback function or NULL if not requiredh]h2teardown callback function or NULL if not required}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6 hM1hj7 ubah}(h]h ]h"]h$]h&]uh1j/hj ubeh}(h]h ]h"]h$]h&]uh1jhj6 hM1hjmubeh}(h]h ]h"]h$]h&]uh1j hjQubh)}(h**Description**h]j)}(hj\ h]h Description}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM3hjQubh)}(hSame as cpuhp_setup_state() except that the **startup** callback is not invoked during installation. NOP if SMP=n or HOTPLUG_CPU=n.h](h,Same as cpuhp_setup_state() except that the }(hjr hhhNhNubj)}(h **startup**h]hstartup}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr ubhL callback is not invoked during installation. NOP if SMP=n or HOTPLUG_CPU=n.}(hjr hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM2hjQubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j1cpuhp_setup_state_nocalls_cpuslocked (C function)&c.cpuhp_setup_state_nocalls_cpuslockedhNtauh1jhjhhhNhNubj#)}(hhh](j()}(hint cpuhp_setup_state_nocalls_cpuslocked (enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h]j.)}(hint cpuhp_setup_state_nocalls_cpuslocked(enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h](j4)}(hinth]hint}(hj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj hhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM@ubjF)}(h h]h }(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj hhhj hM@ubjW)}(h$cpuhp_setup_state_nocalls_cpuslockedh]j])}(h$cpuhp_setup_state_nocalls_cpuslockedh]h$cpuhp_setup_state_nocalls_cpuslocked}(hj hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj ubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhj hhhj hM@ubjv)}(ho(enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu))h](j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjF)}(h h]h }(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hj!hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj !ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj!modnameN classnameNjj)}j]j)}jj sb&c.cpuhp_setup_state_nocalls_cpuslockedasbuh1hhj ubjF)}(h h]h }(hj.!hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubj])}(hstateh]hstate}(hj``int (*teardown)(unsigned int cpu, struct hlist_node *node)``h]j)}(hj/)h]h:int (*teardown)(unsigned int cpu, struct hlist_node *node)}(hj1)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-)ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMZhj))ubj0)}(hhh]h)}(h2teardown callback function or NULL if not requiredh]h2teardown callback function or NULL if not required}(hjH)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD)hMZhjE)ubah}(h]h ]h"]h$]h&]uh1j/hj))ubeh}(h]h ]h"]h$]h&]uh1jhjD)hMZhj{(ubeh}(h]h ]h"]h$]h&]uh1j hj_(ubh)}(h**Description**h]j)}(hjj)h]h Description}(hjl)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh)ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM\hj_(ubh)}(hXSets the internal multi_instance flag and prepares a state to work as a multi instance callback. No callbacks are invoked at this point. The callbacks are invoked once an instance for this state are registered via cpuhp_state_add_instance() or cpuhp_state_add_instance_nocalls()h]hXSets the internal multi_instance flag and prepares a state to work as a multi instance callback. No callbacks are invoked at this point. The callbacks are invoked once an instance for this state are registered via cpuhp_state_add_instance() or cpuhp_state_add_instance_nocalls()}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhM[hj_(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%cpuhp_state_add_instance (C function)c.cpuhp_state_add_instancehNtauh1jhjhhhNhNubj#)}(hhh](j()}(hNint cpuhp_state_add_instance (enum cpuhp_state state, struct hlist_node *node)h]j.)}(hMint cpuhp_state_add_instance(enum cpuhp_state state, struct hlist_node *node)h](j4)}(hinth]hint}(hj)hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj)hhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMsubjF)}(h h]h }(hj)hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj)hhhj)hMsubjW)}(hcpuhp_state_add_instanceh]j])}(hcpuhp_state_add_instanceh]hcpuhp_state_add_instance}(hj)hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj)ubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhj)hhhj)hMsubjv)}(h1(enum cpuhp_state state, struct hlist_node *node)h](j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubjF)}(h h]h }(hj)hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj)ubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hj *hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj*ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj *modnameN classnameNjj)}j]j)}jj)sbc.cpuhp_state_add_instanceasbuh1hhj)ubjF)}(h h]h }(hj**hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj)ubj])}(hstateh]hstate}(hj8*hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj)ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hj)ubj|)}(hstruct hlist_node *nodeh](j)}(hjz&h]hstruct}(hjQ*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM*ubjF)}(h h]h }(hj^*hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjM*ubh)}(hhh]j])}(h hlist_nodeh]h hlist_node}(hjo*hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjl*ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjq*modnameN classnameNjj)}j]j&*c.cpuhp_state_add_instanceasbuh1hhjM*ubjF)}(h h]h }(hj*hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjM*ubj,)}(hjh]h*}(hj*hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hjM*ubj])}(hnodeh]hnode}(hj*hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjM*ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hj)ubeh}(h]h ]h"]h$]h&]jjuh1juhj)hhhj)hMsubeh}(h]h ]h"]h$]h&]jjjuh1j-jjhj)hhhj)hMsubah}(h]j)ah ](jjeh"]h$]h&]jj)jhuh1j'hj)hMshj)hhubj)}(hhh]h)}(h8Add an instance for a state and invoke startup callback.h]h8Add an instance for a state and invoke startup callback.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMshj*hhubah}(h]h ]h"]h$]h&]uh1jhj)hhhj)hMsubeh}(h]h ](jfunctioneh"]h$]h&]jjjj*jj*jjjuh1j"hhhjhNhNubj )}(hX**Parameters** ``enum cpuhp_state state`` The state for which the instance is installed ``struct hlist_node *node`` The node for this individual state. **Description** Installs the instance for the **state** and invokes the registered startup callback on the online cpus which have already reached the **state**. The **state** must have been earlier marked as multi-instance by cpuhp_setup_state_multi().h](h)}(h**Parameters**h]j)}(hj*h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMwhj*ubj )}(hhh](j)}(hI``enum cpuhp_state state`` The state for which the instance is installed h](j)}(h``enum cpuhp_state state``h]j)}(hj+h]henum cpuhp_state state}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMuhj +ubj0)}(hhh]h)}(h-The state for which the instance is installedh]h-The state for which the instance is installed}(hj,+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(+hMuhj)+ubah}(h]h ]h"]h$]h&]uh1j/hj +ubeh}(h]h ]h"]h$]h&]uh1jhj(+hMuhj +ubj)}(h@``struct hlist_node *node`` The node for this individual state. h](j)}(h``struct hlist_node *node``h]j)}(hjL+h]hstruct hlist_node *node}(hjN+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ+ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMvhjF+ubj0)}(hhh]h)}(h#The node for this individual state.h]h#The node for this individual state.}(hje+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhja+hMvhjb+ubah}(h]h ]h"]h$]h&]uh1j/hjF+ubeh}(h]h ]h"]h$]h&]uh1jhja+hMvhj +ubeh}(h]h ]h"]h$]h&]uh1j hj*ubh)}(h**Description**h]j)}(hj+h]h Description}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMxhj*ubh)}(hInstalls the instance for the **state** and invokes the registered startup callback on the online cpus which have already reached the **state**. The **state** must have been earlier marked as multi-instance by cpuhp_setup_state_multi().h](hInstalls the instance for the }(hj+hhhNhNubj)}(h **state**h]hstate}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh_ and invokes the registered startup callback on the online cpus which have already reached the }(hj+hhhNhNubj)}(h **state**h]hstate}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh. The }(hj+hhhNhNubj)}(h **state**h]hstate}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubhN must have been earlier marked as multi-instance by cpuhp_setup_state_multi().}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMwhj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j-cpuhp_state_add_instance_nocalls (C function)"c.cpuhp_state_add_instance_nocallshNtauh1jhjhhhNhNubj#)}(hhh](j()}(hVint cpuhp_state_add_instance_nocalls (enum cpuhp_state state, struct hlist_node *node)h]j.)}(hUint cpuhp_state_add_instance_nocalls(enum cpuhp_state state, struct hlist_node *node)h](j4)}(hinth]hint}(hj,hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj+hhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMubjF)}(h h]h }(hj,hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj+hhhj,hMubjW)}(h cpuhp_state_add_instance_nocallsh]j])}(h cpuhp_state_add_instance_nocallsh]h cpuhp_state_add_instance_nocalls}(hj#,hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj,ubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhj+hhhj,hMubjv)}(h1(enum cpuhp_state state, struct hlist_node *node)h](j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hj?,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;,ubjF)}(h h]h }(hjL,hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj;,ubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hj],hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjZ,ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj_,modnameN classnameNjj)}j]j)}jj%,sb"c.cpuhp_state_add_instance_nocallsasbuh1hhj;,ubjF)}(h h]h }(hj},hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj;,ubj])}(hstateh]hstate}(hj,hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj;,ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hj7,ubj|)}(hstruct hlist_node *nodeh](j)}(hjz&h]hstruct}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubjF)}(h h]h }(hj,hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj,ubh)}(hhh]j])}(h hlist_nodeh]h hlist_node}(hj,hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj,ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj,modnameN classnameNjj)}j]jy,"c.cpuhp_state_add_instance_nocallsasbuh1hhj,ubjF)}(h h]h }(hj,hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj,ubj,)}(hjh]h*}(hj,hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hj,ubj])}(hnodeh]hnode}(hj,hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj,ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hj7,ubeh}(h]h ]h"]h$]h&]jjuh1juhj+hhhj,hMubeh}(h]h ]h"]h$]h&]jjjuh1j-jjhj+hhhj,hMubah}(h]j+ah ](jjeh"]h$]h&]jj)jhuh1j'hj,hMhj+hhubj)}(hhh]h)}(hBAdd an instance for a state without invoking the startup callback.h]hBAdd an instance for a state without invoking the startup callback.}(hj%-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj"-hhubah}(h]h ]h"]h$]h&]uh1jhj+hhhj,hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj=-jj=-jjjuh1j"hhhjhNhNubj )}(hXQ**Parameters** ``enum cpuhp_state state`` The state for which the instance is installed ``struct hlist_node *node`` The node for this individual state. **Description** Installs the instance for the **state**. The **state** must have been earlier marked as multi-instance by cpuhp_setup_state_multi. NOP if SMP=n or HOTPLUG_CPU=n.h](h)}(h**Parameters**h]j)}(hjG-h]h Parameters}(hjI-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE-ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjA-ubj )}(hhh](j)}(hI``enum cpuhp_state state`` The state for which the instance is installed h](j)}(h``enum cpuhp_state state``h]j)}(hjf-h]henum cpuhp_state state}(hjh-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd-ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj`-ubj0)}(hhh]h)}(h-The state for which the instance is installedh]h-The state for which the instance is installed}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{-hMhj|-ubah}(h]h ]h"]h$]h&]uh1j/hj`-ubeh}(h]h ]h"]h$]h&]uh1jhj{-hMhj]-ubj)}(h@``struct hlist_node *node`` The node for this individual state. h](j)}(h``struct hlist_node *node``h]j)}(hj-h]hstruct hlist_node *node}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj-ubj0)}(hhh]h)}(h#The node for this individual state.h]h#The node for this individual state.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hMhj-ubah}(h]h ]h"]h$]h&]uh1j/hj-ubeh}(h]h ]h"]h$]h&]uh1jhj-hMhj]-ubeh}(h]h ]h"]h$]h&]uh1j hjA-ubh)}(h**Description**h]j)}(hj-h]h Description}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjA-ubh)}(hInstalls the instance for the **state**. The **state** must have been earlier marked as multi-instance by cpuhp_setup_state_multi. NOP if SMP=n or HOTPLUG_CPU=n.h](hInstalls the instance for the }(hj-hhhNhNubj)}(h **state**h]hstate}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh. The }(hj-hhhNhNubj)}(h **state**h]hstate}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubhk must have been earlier marked as multi-instance by cpuhp_setup_state_multi. NOP if SMP=n or HOTPLUG_CPU=n.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjA-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j8cpuhp_state_add_instance_nocalls_cpuslocked (C function)-c.cpuhp_state_add_instance_nocalls_cpuslockedhNtauh1jhjhhhNhNubj#)}(hhh](j()}(haint cpuhp_state_add_instance_nocalls_cpuslocked (enum cpuhp_state state, struct hlist_node *node)h]j.)}(h`int cpuhp_state_add_instance_nocalls_cpuslocked(enum cpuhp_state state, struct hlist_node *node)h](j4)}(hinth]hint}(hjC.hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj?.hhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMubjF)}(h h]h }(hjR.hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj?.hhhjQ.hMubjW)}(h+cpuhp_state_add_instance_nocalls_cpuslockedh]j])}(h+cpuhp_state_add_instance_nocalls_cpuslockedh]h+cpuhp_state_add_instance_nocalls_cpuslocked}(hjd.hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj`.ubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhj?.hhhjQ.hMubjv)}(h1(enum cpuhp_state state, struct hlist_node *node)h](j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|.ubjF)}(h h]h }(hj.hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj|.ubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hj.hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj.ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj.modnameN classnameNjj)}j]j)}jjf.sb-c.cpuhp_state_add_instance_nocalls_cpuslockedasbuh1hhj|.ubjF)}(h h]h }(hj.hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj|.ubj])}(hstateh]hstate}(hj.hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj|.ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjx.ubj|)}(hstruct hlist_node *nodeh](j)}(hjz&h]hstruct}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubjF)}(h h]h }(hj.hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj.ubh)}(hhh]j])}(h hlist_nodeh]h hlist_node}(hj/hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj/modnameN classnameNjj)}j]j.-c.cpuhp_state_add_instance_nocalls_cpuslockedasbuh1hhj.ubjF)}(h h]h }(hj!/hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj.ubj,)}(hjh]h*}(hj//hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hj.ubj])}(hnodeh]hnode}(hj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjC2modnameN classnameNjj)}j]j)}jj 2sbc.cpuhp_remove_state_nocallsasbuh1hhj2ubjF)}(h h]h }(hja2hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj2ubj])}(hstateh]hstate}(hjo2hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj2ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hj2ubah}(h]h ]h"]h$]h&]jjuh1juhj1hhhj1hMubeh}(h]h ]h"]h$]h&]jjjuh1j-jjhj1hhhj1hMubah}(h]j1ah ](jjeh"]h$]h&]jj)jhuh1j'hj1hMhj1hhubj)}(hhh]h)}(hERemove hotplug state callbacks without invoking the teardown callbackh]hERemove hotplug state callbacks without invoking the teardown callback}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj2hhubah}(h]h ]h"]h$]h&]uh1jhj1hhhj1hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj2jj2jjjuh1j"hhhjhNhNubj )}(hV**Parameters** ``enum cpuhp_state state`` The state for which the calls are removedh](h)}(h**Parameters**h]j)}(hj2h]h Parameters}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj2ubj )}(hhh]j)}(hD``enum cpuhp_state state`` The state for which the calls are removedh](j)}(h``enum cpuhp_state state``h]j)}(hj2h]hafenum cpuhp_state state}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj2ubj0)}(hhh]h)}(h)The state for which the calls are removedh]h)The state for which the calls are removed}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj2ubah}(h]h ]h"]h$]h&]uh1j/hj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1j hj2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j2cpuhp_remove_state_nocalls_cpuslocked (C function)'c.cpuhp_remove_state_nocalls_cpuslockedhNtauh1jhjhhhNhNubj#)}(hhh](j()}(hCvoid cpuhp_remove_state_nocalls_cpuslocked (enum cpuhp_state state)h]j.)}(hBvoid cpuhp_remove_state_nocalls_cpuslocked(enum cpuhp_state state)h](j4)}(hvoidh]hvoid}(hj43hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj03hhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMubjF)}(h h]h }(hjC3hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj03hhhjB3hMubjW)}(h%cpuhp_remove_state_nocalls_cpuslockedh]j])}(h%cpuhp_remove_state_nocalls_cpuslockedh]h%cpuhp_remove_state_nocalls_cpuslocked}(hjU3hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjQ3ubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhj03hhhjB3hMubjv)}(h(enum cpuhp_state state)h]j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hjq3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjm3ubjF)}(h h]h }(hj~3hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjm3ubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hj3hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj3ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj3modnameN classnameNjj)}j]j)}jjW3sb'c.cpuhp_remove_state_nocalls_cpuslockedasbuh1hhjm3ubjF)}(h h]h }(hj3hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjm3ubj])}(hstateh]hstate}(hj3hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjm3ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hji3ubah}(h]h ]h"]h$]h&]jjuh1juhj03hhhjB3hMubeh}(h]h ]h"]h$]h&]jjjuh1j-jjhj,3hhhjB3hMubah}(h]j'3ah ](jjeh"]h$]h&]jj)jhuh1j'hjB3hMhj)3hhubj)}(hhh]h)}(h]Remove hotplug state callbacks without invoking teardown from a cpus_read_lock() held region.h]h]Remove hotplug state callbacks without invoking teardown from a cpus_read_lock() held region.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj3hhubah}(h]h ]h"]h$]h&]uh1jhj)3hhhjB3hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj3jj3jjjuh1j"hhhjhNhNubj )}(h**Parameters** ``enum cpuhp_state state`` The state for which the calls are removed **Description** Same as cpuhp_remove_state nocalls() except that it must be invoked from within a cpus_read_lock() held region.h](h)}(h**Parameters**h]j)}(hj 4h]h Parameters}(hj 4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj4ubj )}(hhh]j)}(hE``enum cpuhp_state state`` The state for which the calls are removed h](j)}(h``enum cpuhp_state state``h]j)}(hj(4h]henum cpuhp_state state}(hj*4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&4ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj"4ubj0)}(hhh]h)}(h)The state for which the calls are removedh]h)The state for which the calls are removed}(hjA4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=4hMhj>4ubah}(h]h ]h"]h$]h&]uh1j/hj"4ubeh}(h]h ]h"]h$]h&]uh1jhj=4hMhj4ubah}(h]h ]h"]h$]h&]uh1j hj4ubh)}(h**Description**h]j)}(hjc4h]h Description}(hje4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja4ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj4ubh)}(hoSame as cpuhp_remove_state nocalls() except that it must be invoked from within a cpus_read_lock() held region.h]hoSame as cpuhp_remove_state nocalls() except that it must be invoked from within a cpus_read_lock() held region.}(hjy4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj4ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%cpuhp_remove_multi_state (C function)c.cpuhp_remove_multi_statehNtauh1jhjhhhNhNubj#)}(hhh](j()}(h6void cpuhp_remove_multi_state (enum cpuhp_state state)h]j.)}(h5void cpuhp_remove_multi_state(enum cpuhp_state state)h](j4)}(hvoidh]hvoid}(hj4hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj4hhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMubjF)}(h h]h }(hj4hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj4hhhj4hMubjW)}(hcpuhp_remove_multi_stateh]j])}(hcpuhp_remove_multi_stateh]hcpuhp_remove_multi_state}(hj4hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj4ubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhj4hhhj4hMubjv)}(h(enum cpuhp_state state)h]j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubjF)}(h h]h }(hj4hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj4ubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hj5hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj5ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj5modnameN classnameNjj)}j]j)}jj4sbc.cpuhp_remove_multi_stateasbuh1hhj4ubjF)}(h h]h }(hj#5hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj4ubj])}(hstateh]hstate}(hj15hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hj4ubah}(h]h ]h"]h$]h&]jjuh1juhj4hhhj4hMubeh}(h]h ]h"]h$]h&]jjjuh1j-jjhj4hhhj4hMubah}(h]j4ah ](jjeh"]h$]h&]jj)jhuh1j'hj4hMhj4hhubj)}(hhh]h)}(h#Remove hotplug multi state callbackh]h#Remove hotplug multi state callback}(hj[5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjX5hhubah}(h]h ]h"]h$]h&]uh1jhj4hhhj4hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjs5jjs5jjjuh1j"hhhjhNhNubj )}(hX**Parameters** ``enum cpuhp_state state`` The state for which the calls are removed **Description** Removes the callback functions from a multi state. This is the reverse of cpuhp_setup_state_multi(). All instances should have been removed before invoking this function.h](h)}(h**Parameters**h]j)}(hj}5h]h Parameters}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{5ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjw5ubj )}(hhh]j)}(hE``enum cpuhp_state state`` The state for which the calls are removed h](j)}(h``enum cpuhp_state state``h]j)}(hj5h]henum cpuhp_state state}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj5ubj0)}(hhh]h)}(h)The state for which the calls are removedh]h)The state for which the calls are removed}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1j/hj5ubeh}(h]h ]h"]h$]h&]uh1jhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1j hjw5ubh)}(h**Description**h]j)}(hj5h]h Description}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjw5ubh)}(hRemoves the callback functions from a multi state. This is the reverse of cpuhp_setup_state_multi(). All instances should have been removed before invoking this function.h]hRemoves the callback functions from a multi state. This is the reverse of cpuhp_setup_state_multi(). All instances should have been removed before invoking this function.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjw5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(cpuhp_state_remove_instance (C function)c.cpuhp_state_remove_instancehNtauh1jhjhhhNhNubj#)}(hhh](j()}(hQint cpuhp_state_remove_instance (enum cpuhp_state state, struct hlist_node *node)h]j.)}(hPint cpuhp_state_remove_instance(enum cpuhp_state state, struct hlist_node *node)h](j4)}(hinth]hint}(hj6hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj6hhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMubjF)}(h h]h }(hj+6hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj6hhhj*6hMubjW)}(hcpuhp_state_remove_instanceh]j])}(hcpuhp_state_remove_instanceh]hcpuhp_state_remove_instance}(hj=6hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj96ubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhj6hhhj*6hMubjv)}(h1(enum cpuhp_state state, struct hlist_node *node)h](j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hjY6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU6ubjF)}(h h]h }(hjf6hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjU6ubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hjw6hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjt6ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjy6modnameN classnameNjj)}j]j)}jj?6sbc.cpuhp_state_remove_instanceasbuh1hhjU6ubjF)}(h h]h }(hj6hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjU6ubj])}(hstateh]hstate}(hj6hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjU6ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjQ6ubj|)}(hstruct hlist_node *nodeh](j)}(hjz&h]hstruct}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubjF)}(h h]h }(hj6hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj6ubh)}(hhh]j])}(h hlist_nodeh]h hlist_node}(hj6hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj6ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj6modnameN classnameNjj)}j]j6c.cpuhp_state_remove_instanceasbuh1hhj6ubjF)}(h h]h }(hj6hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj6ubj,)}(hjh]h*}(hj7hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hj6ubj])}(hnodeh]hnode}(hj7hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hjQ6ubeh}(h]h ]h"]h$]h&]jjuh1juhj6hhhj*6hMubeh}(h]h ]h"]h$]h&]jjjuh1j-jjhj6hhhj*6hMubah}(h]j6ah ](jjeh"]h$]h&]jj)jhuh1j'hj*6hMhj6hhubj)}(hhh]h)}(hCRemove hotplug instance from state and invoke the teardown callbackh]hCRemove hotplug instance from state and invoke the teardown callback}(hj?7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj<7hhubah}(h]h ]h"]h$]h&]uh1jhj6hhhj*6hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjW7jjW7jjjuh1j"hhhjhNhNubj )}(hX**Parameters** ``enum cpuhp_state state`` The state from which the instance is removed ``struct hlist_node *node`` The node for this individual state. **Description** Removes the instance and invokes the teardown callback on the online cpus which have already reached **state**.h](h)}(h**Parameters**h]j)}(hja7h]h Parameters}(hjc7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_7ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj[7ubj )}(hhh](j)}(hH``enum cpuhp_state state`` The state from which the instance is removed h](j)}(h``enum cpuhp_state state``h]j)}(hj7h]henum cpuhp_state state}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~7ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjz7ubj0)}(hhh]h)}(h,The state from which the instance is removedh]h,The state from which the instance is removed}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMhj7ubah}(h]h ]h"]h$]h&]uh1j/hjz7ubeh}(h]h ]h"]h$]h&]uh1jhj7hMhjw7ubj)}(h@``struct hlist_node *node`` The node for this individual state. h](j)}(h``struct hlist_node *node``h]j)}(hj7h]hstruct hlist_node *node}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj7ubj0)}(hhh]h)}(h#The node for this individual state.h]h#The node for this individual state.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMhj7ubah}(h]h ]h"]h$]h&]uh1j/hj7ubeh}(h]h ]h"]h$]h&]uh1jhj7hMhjw7ubeh}(h]h ]h"]h$]h&]uh1j hj[7ubh)}(h**Description**h]j)}(hj7h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj[7ubh)}(hoRemoves the instance and invokes the teardown callback on the online cpus which have already reached **state**.h](heRemoves the instance and invokes the teardown callback on the online cpus which have already reached }(hj 8hhhNhNubj)}(h **state**h]hstate}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 8ubh.}(hj 8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj[7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j0cpuhp_state_remove_instance_nocalls (C function)%c.cpuhp_state_remove_instance_nocallshNtauh1jhjhhhNhNubj#)}(hhh](j()}(hYint cpuhp_state_remove_instance_nocalls (enum cpuhp_state state, struct hlist_node *node)h]j.)}(hXint cpuhp_state_remove_instance_nocalls(enum cpuhp_state state, struct hlist_node *node)h](j4)}(hinth]hint}(hjK8hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjG8hhh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMubjF)}(h h]h }(hjZ8hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjG8hhhjY8hMubjW)}(h#cpuhp_state_remove_instance_nocallsh]j])}(h#cpuhp_state_remove_instance_nocallsh]h#cpuhp_state_remove_instance_nocalls}(hjl8hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hjh8ubah}(h]h ](jpjqeh"]h$]h&]jjuh1jVhjG8hhhjY8hMubjv)}(h1(enum cpuhp_state state, struct hlist_node *node)h](j|)}(henum cpuhp_state stateh](j)}(hjh]henum}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubjF)}(h h]h }(hj8hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj8ubh)}(hhh]j])}(h cpuhp_stateh]h cpuhp_state}(hj8hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj8modnameN classnameNjj)}j]j)}jjn8sb%c.cpuhp_state_remove_instance_nocallsasbuh1hhj8ubjF)}(h h]h }(hj8hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj8ubj])}(hstateh]hstate}(hj8hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hj8ubj|)}(hstruct hlist_node *nodeh](j)}(hjz&h]hstruct}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubjF)}(h h]h }(hj8hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj8ubh)}(hhh]j])}(h hlist_nodeh]h hlist_node}(hj 9hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj9ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj 9modnameN classnameNjj)}j]j8%c.cpuhp_state_remove_instance_nocallsasbuh1hhj8ubjF)}(h h]h }(hj)9hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj8ubj,)}(hjh]h*}(hj79hhhNhNubah}(h]h ]j7ah"]h$]h&]uh1j+hj8ubj])}(hnodeh]hnode}(hjD9hhhNhNubah}(h]h ]jiah"]h$]h&]uh1j\hj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1j{hj8ubeh}(h]h ]h"]h$]h&]jjuh1juhjG8hhhjY8hMubeh}(h]h ]h"]h$]h&]jjjuh1j-jjhjC8hhhjY8hMubah}(h]j>8ah ](jjeh"]h$]h&]jj)jhuh1j'hjY8hMhj@8hhubj)}(hhh]h)}(hIRemove hotplug instance from state without invoking the teardown callbackh]hIRemove hotplug instance from state without invoking the teardown callback}(hjn9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhjk9hhubah}(h]h ]h"]h$]h&]uh1jhj@8hhhjY8hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj9jj9jjjuh1j"hhhjhNhNubj )}(h**Parameters** ``enum cpuhp_state state`` The state from which the instance is removed ``struct hlist_node *node`` The node for this individual state. **Description** Removes the instance without invoking the teardown callback.h](h)}(h**Parameters**h]j)}(hj9h]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj9ubj )}(hhh](j)}(hH``enum cpuhp_state state`` The state from which the instance is removed h](j)}(h``enum cpuhp_state state``h]j)}(hj9h]henum cpuhp_state state}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj9ubj0)}(hhh]h)}(h,The state from which the instance is removedh]h,The state from which the instance is removed}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj9ubah}(h]h ]h"]h$]h&]uh1j/hj9ubeh}(h]h ]h"]h$]h&]uh1jhj9hMhj9ubj)}(h@``struct hlist_node *node`` The node for this individual state. h](j)}(h``struct hlist_node *node``h]j)}(hj9h]hstruct hlist_node *node}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj9ubj0)}(hhh]h)}(h#The node for this individual state.h]h#The node for this individual state.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj9ubah}(h]h ]h"]h$]h&]uh1j/hj9ubeh}(h]h ]h"]h$]h&]uh1jhj9hMhj9ubeh}(h]h ]h"]h$]h&]uh1j hj9ubh)}(h**Description**h]j)}(hj#:h]h Description}(hj%:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!:ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/cpu_hotplug:756: ./include/linux/cpuhotplug.hhMhj9ubh)}(h8jC8u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.