Skip to content

Commit 33910a4

Browse files
committed
sched/alt: Fix build fail with CONFIG_SMP=n
Fix uniprocessor build issue torvalds#101
1 parent d4ca164 commit 33910a4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

kernel/sched/alt_core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4172,6 +4172,8 @@ void scheduler_tick(void)
41724172
wq_worker_tick(curr);
41734173
}
41744174

4175+
#ifdef CONFIG_SMP
4176+
41754177
static int active_balance_cpu_stop(void *data)
41764178
{
41774179
struct balance_arg *arg = data;
@@ -4264,6 +4266,8 @@ static DEFINE_PER_CPU(struct balance_callback, sg_balance_head) = {
42644266
};
42654267
#endif /* CONFIG_SCHED_SMT */
42664268

4269+
#endif /* CONFIG_SMP */
4270+
42674271
#ifdef CONFIG_NO_HZ_FULL
42684272

42694273
struct tick_work {
@@ -7667,7 +7671,9 @@ void __init sched_init(void)
76677671
{
76687672
int i;
76697673
struct rq *rq;
7674+
#ifdef CONFIG_SCHED_SMT
76707675
struct balance_arg balance_arg = {.cpumask = sched_sg_idle_mask, .active = 0};
7676+
#endif
76717677

76727678
printk(KERN_INFO "sched/alt: "ALT_SCHED_NAME" CPU Scheduler "ALT_SCHED_VERSION\
76737679
" by Alfred Chen.\n");

kernel/sched/alt_sched.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,6 @@ static inline int best_mask_cpu(int cpu, const cpumask_t *mask)
351351
return __best_mask_cpu(mask, per_cpu(sched_cpu_topo_masks, cpu));
352352
}
353353

354-
extern void flush_smp_call_function_queue(void);
355-
356-
#else /* !CONFIG_SMP */
357-
static inline void flush_smp_call_function_queue(void) { }
358354
#endif
359355

360356
#ifndef arch_scale_freq_tick

0 commit comments

Comments
 (0)