hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/kernel/time/jiffies.c
....@@ -74,7 +74,8 @@
7474 .max_cycles = 10,
7575 };
7676
77
-__cacheline_aligned_in_smp DEFINE_SEQLOCK(jiffies_lock);
77
+__cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(jiffies_lock);
78
+__cacheline_aligned_in_smp seqcount_t jiffies_seq;
7879
7980 #if (BITS_PER_LONG < 64)
8081 u64 get_jiffies_64(void)
....@@ -83,9 +84,9 @@
8384 u64 ret;
8485
8586 do {
86
- seq = read_seqbegin(&jiffies_lock);
87
+ seq = read_seqcount_begin(&jiffies_seq);
8788 ret = jiffies_64;
88
- } while (read_seqretry(&jiffies_lock, seq));
89
+ } while (read_seqcount_retry(&jiffies_seq, seq));
8990 return ret;
9091 }
9192 EXPORT_SYMBOL(get_jiffies_64);