Use the new api and associate the seqcounter to the jiffies_lock enabling lockdep support - although for this particular case the write-side locking and non-preemptibility are quite obvious.
Unified · Split
| @@ -59,7 +59,8 @@ static struct clocksource clocksource_jiffies = { · 58 unmodified lines | ||
| 59 | 59 | }; |
| 60 | 60 | |
| 61 | 61 | __cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(jiffies_lock); |
| 62 | −__cacheline_aligned_in_smp seqcount_t jiffies_seq; | |
| 62 | +__cacheline_aligned_in_smp seqcount_raw_spinlock_t jiffies_seq = | |
| 63 | + SEQCNT_RAW_SPINLOCK_ZERO(jiffies_seq, &jiffies_lock); | |
| 63 | 64 | |
| 64 | 65 | #if (BITS_PER_LONG < 64) |
| 65 | 66 | u64 get_jiffies_64(void) |
| @@ -26,7 +26,7 @@ extern void do_timer(unsigned long ticks); · 25 unmodified lines | ||
| 26 | 26 | extern void update_wall_time(void); |
| 27 | 27 | |
| 28 | 28 | extern raw_spinlock_t jiffies_lock; |
| 29 | −extern seqcount_t jiffies_seq; | |
| 29 | +extern seqcount_raw_spinlock_t jiffies_seq; | |
| 30 | 30 | |
| 31 | 31 | #define CS_NAME_LEN 32 |
| 32 | 32 | |