Skip to content

Commit 3aedb7f

Browse files
Frederic WeisbeckerKAGA-KOKO
authored andcommitted
tick/sched: Remove useless oneshot ifdeffery
tick-sched.c is only built when CONFIG_TICK_ONESHOT=y, which is selected only if CONFIG_NO_HZ_COMMON=y or CONFIG_HIGH_RES_TIMERS=y. Therefore the related ifdeferry in this file is needless and can be removed. Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 37263ba commit 3aedb7f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

kernel/time/tick-sched.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ struct tick_sched *tick_get_tick_sched(int cpu)
4343
return &per_cpu(tick_cpu_sched, cpu);
4444
}
4545

46-
#if defined(CONFIG_NO_HZ_COMMON) || defined(CONFIG_HIGH_RES_TIMERS)
4746
/*
4847
* The time when the last jiffy update happened. Write access must hold
4948
* jiffies_lock and jiffies_seq. tick_nohz_next_event() needs to get a
@@ -289,7 +288,6 @@ static enum hrtimer_restart tick_nohz_handler(struct hrtimer *timer)
289288

290289
return HRTIMER_RESTART;
291290
}
292-
#endif
293291

294292
#ifdef CONFIG_NO_HZ_FULL
295293
cpumask_var_t tick_nohz_full_mask;
@@ -635,7 +633,7 @@ void __init tick_nohz_init(void)
635633
pr_info("NO_HZ: Full dynticks CPUs: %*pbl.\n",
636634
cpumask_pr_args(tick_nohz_full_mask));
637635
}
638-
#endif
636+
#endif /* #ifdef CONFIG_NO_HZ_FULL */
639637

640638
/*
641639
* NOHZ - aka dynamic tick functionality
@@ -1540,7 +1538,6 @@ void tick_irq_enter(void)
15401538
tick_nohz_irq_enter();
15411539
}
15421540

1543-
#if defined CONFIG_NO_HZ_COMMON || defined CONFIG_HIGH_RES_TIMERS
15441541
static int sched_skew_tick;
15451542

15461543
static int __init skew_tick(char *str)
@@ -1605,7 +1602,6 @@ void tick_cancel_sched_timer(int cpu)
16051602
ts->idle_calls = idle_calls;
16061603
ts->idle_sleeps = idle_sleeps;
16071604
}
1608-
#endif /* CONFIG_NO_HZ_COMMON || CONFIG_HIGH_RES_TIMERS */
16091605

16101606
/*
16111607
* Async notification about clocksource changes

0 commit comments

Comments
 (0)