sched/clock: Remove CLOCK_MONOTONIC option from Kconfig

here is the reason:
1.clock_systime_timespec(core function) always exist regardless the setting
2.CLOCK_MONOTONIC is a foundamental clock type required by many places

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-02-15 13:53:18 +08:00
committed by Xiang Xiao
parent 7b00c8bdb8
commit f1ed349dd9
28 changed files with 35 additions and 170 deletions
+1 -1
View File
@@ -182,7 +182,7 @@
#define TICK2SEC(tick) (((tick)+(TICK_PER_SEC/2))/TICK_PER_SEC) /* Rounds */
#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_SYSTEM_TIME64) && \
defined(CONFIG_CLOCK_MONOTONIC) && !defined(CONFIG_SCHED_TICKLESS)
!defined(CONFIG_SCHED_TICKLESS)
/* Initial system timer ticks value close to maximum 32-bit value, to test
* 64-bit system-timer after going over 32-bit value. This is to make errors
* of casting 64-bit system-timer to 32-bit variables more visible.
-4
View File
@@ -204,11 +204,7 @@ static inline uint64_t touch_get_time(void)
{
struct timespec ts;
#ifdef CONFIG_CLOCK_MONOTONIC
clock_gettime(CLOCK_MONOTONIC, &ts);
#else
clock_gettime(CLOCK_REALTIME, &ts);
#endif
return 1000000ull * ts.tv_sec + ts.tv_nsec / 1000;
}
-5
View File
@@ -44,12 +44,7 @@ static inline uint64_t lirc_get_timestamp(void)
{
struct timespec ts;
#ifdef CONFIG_CLOCK_MONOTONIC
clock_gettime(CLOCK_MONOTONIC, &ts);
#else
clock_gettime(CLOCK_REALTIME, &ts);
#endif
return 1000000000ull * ts.tv_sec + ts.tv_nsec;
}
-5
View File
@@ -283,12 +283,7 @@ static inline uint64_t sensor_get_timestamp(void)
{
struct timespec ts;
#ifdef CONFIG_CLOCK_MONOTONIC
clock_gettime(CLOCK_MONOTONIC, &ts);
#else
clock_gettime(CLOCK_REALTIME, &ts);
#endif
return 1000000ull * ts.tv_sec + ts.tv_nsec / 1000;
}
+2 -6
View File
@@ -71,15 +71,11 @@
* system time-of-day clock.
*/
#ifdef CONFIG_CLOCK_MONOTONIC
# define CLOCK_MONOTONIC 1
#endif
#define CLOCK_MONOTONIC 1
/* Monotonic system-wide clock that includes time spent in suspension. */
#ifdef CONFIG_CLOCK_MONOTONIC
# define CLOCK_BOOTTIME 2
#endif
#define CLOCK_BOOTTIME 2
/* This is a flag that may be passed to the timer_settime() and
* clock_nanosleep() functions.