From: Simon Glass <simon.glass@canonical.com> Add the system_states enum and system_state macro to linux/kernel.h where it belongs in Linux kernel organisation. U-Boot is single-threaded so system_state is always SYSTEM_RUNNING Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 6 +----- include/linux/kernel.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index b35559b8b18..9e3d59a3174 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1108,11 +1108,7 @@ static u64 __attribute__((unused)) __ext4_sectors[2]; #define sectors __ext4_sectors #define part_stat_read(p, f) ({ (void)(p); (void)(f); 0ULL; }) -/* System state - U-Boot is always running */ -#define system_state 0 -#define SYSTEM_HALT 1 -#define SYSTEM_POWER_OFF 2 -#define SYSTEM_RESTART 3 +/* system_state, SYSTEM_HALT, etc. are in linux/kernel.h */ /* Hex dump */ #define DUMP_PREFIX_ADDRESS 0 diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 9467edd65ab..d6cd54f20b9 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -296,4 +296,21 @@ */ #define find_closest(x, a, as) __find_closest(x, a, as, <=) +/* + * System state values - stub for U-Boot. + * U-Boot is always in running state. + */ +enum system_states { + SYSTEM_BOOTING, + SYSTEM_SCHEDULING, + SYSTEM_FREEING_INITMEM, + SYSTEM_RUNNING, + SYSTEM_HALT, + SYSTEM_POWER_OFF, + SYSTEM_RESTART, + SYSTEM_SUSPEND, +}; + +#define system_state SYSTEM_RUNNING + #endif -- 2.43.0