!sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time

The 32-bit system clock has a limited range (~497 days) and the
configuration knob is no longer worth the complexity given that
practically every modern target already enables it.  Make 64-bit
time_t/clock_t/sclock_t/nuttx_time_t the only supported flavor.

Specifically:
  - Drop the SYSTEM_TIME64 Kconfig option and its dependent
    PERF_OVERFLOW_CORRECTION/HRTIMER guards in sched/Kconfig.
  - Remove every #ifdef CONFIG_SYSTEM_TIME64 branch in headers
    (include/{sys/types.h,limits.h,inttypes.h,nuttx/clock.h,
    nuttx/fs/hostfs.h}) and core code paths
    (sched/clock/clock.h, drivers/power/pm/pm_procfs.c,
    drivers/rpmsg/rpmsg_ping.c, fs/procfs/fs_procfsuptime.c,
    libs/libc/wqueue/work_usrthread.c,
    arch/avr/src/avrdx/avrdx_timerisr_tickless_alarm.c).
  - Strip CONFIG_SYSTEM_TIME64=y from every board defconfig.
  - Update Documentation/guides/rust.rst accordingly.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2026-05-03 15:54:17 +08:00 committed by Xiang Xiao
parent 1b3af76bf3
commit c6654b1106
187 changed files with 147 additions and 338 deletions

View file

@ -167,20 +167,6 @@ config SYSTEMTICK_HOOK
endif # !SCHED_TICKLESS
config SYSTEM_TIME64
bool "64-bit system clock"
default n
---help---
The system timer is incremented at the rate determined by
USEC_PER_TICK, typically at 100Hz. The count at any given time is
then the "uptime" in units of system timer ticks. By default, the
system time is 32-bits wide. Those defaults provide a range of about
497 days which is probably a sufficient range for "uptime".
However, if the system timer rate is significantly higher than 100Hz
and/or if a very long "uptime" is required, then this option can be
selected to support a 64-bit wide timer.
config ARCH_HAVE_ADJTIME
bool
default n
@ -272,7 +258,7 @@ config PREALLOC_TIMERS
config PERF_OVERFLOW_CORRECTION
bool "Compensate perf count overflow"
depends on SYSTEM_TIME64 && (ALARM_ARCH || TIMER_ARCH || ARCH_PERF_EVENTS)
depends on ALARM_ARCH || TIMER_ARCH || ARCH_PERF_EVENTS
default n
---help---
If this option is enabled, then the perf event will be enabled
@ -2088,7 +2074,6 @@ config CUSTOM_SEMAPHORE_MAXVALUE
config HRTIMER
bool "High resolution timer support"
depends on SYSTEM_TIME64
default n
---help---
Enable to support high resolution timer