mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel.h: add comments for system_states
@ 2024-11-29  4:57 Randy Dunlap
  2024-12-10 18:55 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2024-11-29  4:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Rafael J. Wysocki, Pavel Machek, Len Brown,
	linux-pm, James E.J. Bottomley

Provide some basic comments about the system_states and what they imply.
Also convert the comments to kernel-doc format.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <len.brown@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
---
 include/linux/kernel.h |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

--- linux-next-20241125.orig/include/linux/kernel.h
+++ linux-next-20241125/include/linux/kernel.h
@@ -176,9 +176,19 @@ extern int root_mountflags;
 
 extern bool early_boot_irqs_disabled;
 
-/*
- * Values used for system_state. Ordering of the states must not be changed
+/**
+ * enum system_states - Values used for system_state.
+ * Ordering of the states must not be changed
  * as code checks for <, <=, >, >= STATE.
+ *
+ * @SYSTEM_BOOTING:	%0, no init needed
+ * @SYSTEM_SCHEDULING:	system is ready for scheduling; OK to use RCU
+ * @SYSTEM_FREEING_INITMEM: system is freeing all of initmem; almost running
+ * @SYSTEM_RUNNING:	system is up and running
+ * @SYSTEM_HALT:	system entered clean system halt state
+ * @SYSTEM_POWER_OFF:	system entered shutdown/clean power off state
+ * @SYSTEM_RESTART:	system entered emergency power off or normal restart
+ * @SYSTEM_SUSPEND:	system entered suspend or hibernate state
  */
 extern enum system_states {
 	SYSTEM_BOOTING,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel.h: add comments for system_states
  2024-11-29  4:57 [PATCH] kernel.h: add comments for system_states Randy Dunlap
@ 2024-12-10 18:55 ` Rafael J. Wysocki
  2025-05-02  1:28   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2024-12-10 18:55 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Rafael J. Wysocki, Pavel Machek, Len Brown,
	linux-pm, James E.J. Bottomley

On Fri, Nov 29, 2024 at 5:57 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Provide some basic comments about the system_states and what they imply.
> Also convert the comments to kernel-doc format.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Len Brown <len.brown@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>

Fine by me.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  include/linux/kernel.h |   14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> --- linux-next-20241125.orig/include/linux/kernel.h
> +++ linux-next-20241125/include/linux/kernel.h
> @@ -176,9 +176,19 @@ extern int root_mountflags;
>
>  extern bool early_boot_irqs_disabled;
>
> -/*
> - * Values used for system_state. Ordering of the states must not be changed
> +/**
> + * enum system_states - Values used for system_state.
> + * Ordering of the states must not be changed
>   * as code checks for <, <=, >, >= STATE.
> + *
> + * @SYSTEM_BOOTING:    %0, no init needed
> + * @SYSTEM_SCHEDULING: system is ready for scheduling; OK to use RCU
> + * @SYSTEM_FREEING_INITMEM: system is freeing all of initmem; almost running
> + * @SYSTEM_RUNNING:    system is up and running
> + * @SYSTEM_HALT:       system entered clean system halt state
> + * @SYSTEM_POWER_OFF:  system entered shutdown/clean power off state
> + * @SYSTEM_RESTART:    system entered emergency power off or normal restart
> + * @SYSTEM_SUSPEND:    system entered suspend or hibernate state
>   */
>  extern enum system_states {
>         SYSTEM_BOOTING,
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel.h: add comments for system_states
  2024-12-10 18:55 ` Rafael J. Wysocki
@ 2025-05-02  1:28   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2025-05-02  1:28 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-kernel, Pavel Machek, Len Brown, linux-pm, James E.J. Bottomley



On 12/10/24 10:55 AM, Rafael J. Wysocki wrote:
> On Fri, Nov 29, 2024 at 5:57 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> Provide some basic comments about the system_states and what they imply.
>> Also convert the comments to kernel-doc format.
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> Cc: Pavel Machek <pavel@ucw.cz>
>> Cc: Len Brown <len.brown@intel.com>
>> Cc: linux-pm@vger.kernel.org
>> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
> 
> Fine by me.
> 
> Acked-by: Rafael J. Wysocki <rafael@kernel.org>
> 

Please merge...
Thanks.

>> ---
>>  include/linux/kernel.h |   14 ++++++++++++--
>>  1 file changed, 12 insertions(+), 2 deletions(-)
>>
>> --- linux-next-20241125.orig/include/linux/kernel.h
>> +++ linux-next-20241125/include/linux/kernel.h
>> @@ -176,9 +176,19 @@ extern int root_mountflags;
>>
>>  extern bool early_boot_irqs_disabled;
>>
>> -/*
>> - * Values used for system_state. Ordering of the states must not be changed
>> +/**
>> + * enum system_states - Values used for system_state.
>> + * Ordering of the states must not be changed
>>   * as code checks for <, <=, >, >= STATE.
>> + *
>> + * @SYSTEM_BOOTING:    %0, no init needed
>> + * @SYSTEM_SCHEDULING: system is ready for scheduling; OK to use RCU
>> + * @SYSTEM_FREEING_INITMEM: system is freeing all of initmem; almost running
>> + * @SYSTEM_RUNNING:    system is up and running
>> + * @SYSTEM_HALT:       system entered clean system halt state
>> + * @SYSTEM_POWER_OFF:  system entered shutdown/clean power off state
>> + * @SYSTEM_RESTART:    system entered emergency power off or normal restart
>> + * @SYSTEM_SUSPEND:    system entered suspend or hibernate state
>>   */
>>  extern enum system_states {
>>         SYSTEM_BOOTING,
>>

-- 
~Randy


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-02  1:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-29  4:57 [PATCH] kernel.h: add comments for system_states Randy Dunlap
2024-12-10 18:55 ` Rafael J. Wysocki
2025-05-02  1:28   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®