[RFC PATCH 12/12] include/hw: expand cpu_reset function docs

Alex Bennée posted 12 patches 1 month ago
Maintainers: Thomas Huth <huth@tuxfamily.org>, Laurent Vivier <laurent@vivier.eu>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Peter Maydell <peter.maydell@linaro.org>, Aurelien Jarno <aurelien@aurel32.net>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aleksandar Rikalo <arikalo@gmail.com>, Yoshinori Sato <yoshinori.sato@nifty.com>, Bastian Koppelmann <kbastian@rumtueddeln.de>
[RFC PATCH 12/12] include/hw: expand cpu_reset function docs
Posted by Alex Bennée 1 month ago
Add a hint to the developer that this should only be called from a
reset chain.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/hw/core/cpu.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index f6f17df9e64..9f938e00492 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -811,6 +811,9 @@ void cpu_list_remove(CPUState *cpu);
 /**
  * cpu_reset:
  * @cpu: The CPU whose state is to be reset.
+ *
+ * You should refrain from calling this during CPU realization and
+ * make sure this is called from the reset logic instead.
  */
 void cpu_reset(CPUState *cpu);
 
-- 
2.47.3


Re: [RFC PATCH 12/12] include/hw: expand cpu_reset function docs
Posted by Richard Henderson 4 weeks ago
On 1/9/26 01:34, Alex Bennée wrote:
> Add a hint to the developer that this should only be called from a
> reset chain.
> 
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> ---
>   include/hw/core/cpu.h | 3 +++
>   1 file changed, 3 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~