diff options
Diffstat (limited to 'kernel/time/hrtimer.c')
| -rw-r--r-- | kernel/time/hrtimer.c | 15 | 
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index d89da1c7e005..95b6a708b040 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -135,7 +135,11 @@ static const int hrtimer_clock_to_base_table[MAX_CLOCKS] = {   * timer->base->cpu_base   */  static struct hrtimer_cpu_base migration_cpu_base = { -	.clock_base = { { .cpu_base = &migration_cpu_base, }, }, +	.clock_base = { { +		.cpu_base = &migration_cpu_base, +		.seq      = SEQCNT_RAW_SPINLOCK_ZERO(migration_cpu_base.seq, +						     &migration_cpu_base.lock), +	}, },  };  #define migration_base	migration_cpu_base.clock_base[0] @@ -373,7 +377,7 @@ static bool hrtimer_fixup_activate(void *addr, enum debug_obj_state state)  	switch (state) {  	case ODEBUG_STATE_ACTIVE:  		WARN_ON(1); -		/* fall through */ +		fallthrough;  	default:  		return false;  	} @@ -1998,8 +2002,11 @@ int hrtimers_prepare_cpu(unsigned int cpu)  	int i;  	for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) { -		cpu_base->clock_base[i].cpu_base = cpu_base; -		timerqueue_init_head(&cpu_base->clock_base[i].active); +		struct hrtimer_clock_base *clock_b = &cpu_base->clock_base[i]; + +		clock_b->cpu_base = cpu_base; +		seqcount_raw_spinlock_init(&clock_b->seq, &cpu_base->lock); +		timerqueue_init_head(&clock_b->active);  	}  	cpu_base->cpu = cpu;  |