mirror of https://gitee.com/openkylin/linux.git
x86: build fix for !CONFIG_SMP
Move reset_lazy_tlbstate into tlb_32.c, and define noop versions of play_dead() in process_{32,64}.c when !CONFIG_SMP. Signed-off-by: Alex Nixon <alex.nixon@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
5ab6d815dc
commit
913da64b54
|
@ -714,10 +714,3 @@ void __cpuinit cpu_init(void)
|
||||||
mxcsr_feature_mask_init();
|
mxcsr_feature_mask_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset_lazy_tlbstate(void)
|
|
||||||
{
|
|
||||||
int cpu = raw_smp_processor_id();
|
|
||||||
|
|
||||||
per_cpu(cpu_tlbstate, cpu).state = 0;
|
|
||||||
per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
|
|
||||||
}
|
|
||||||
|
|
|
@ -72,6 +72,13 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
|
||||||
return ((unsigned long *)tsk->thread.sp)[3];
|
return ((unsigned long *)tsk->thread.sp)[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
|
static inline void play_dead(void)
|
||||||
|
{
|
||||||
|
BUG();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The idle thread. There's no useful work to be
|
* The idle thread. There's no useful work to be
|
||||||
* done, so just try to conserve power and have a
|
* done, so just try to conserve power and have a
|
||||||
|
|
|
@ -85,6 +85,13 @@ void exit_idle(void)
|
||||||
__exit_idle();
|
__exit_idle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
|
static inline void play_dead(void)
|
||||||
|
{
|
||||||
|
BUG();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The idle thread. There's no useful work to be
|
* The idle thread. There's no useful work to be
|
||||||
* done, so just try to conserve power and have a
|
* done, so just try to conserve power and have a
|
||||||
|
|
|
@ -241,3 +241,11 @@ void flush_tlb_all(void)
|
||||||
on_each_cpu(do_flush_tlb_all, NULL, 1);
|
on_each_cpu(do_flush_tlb_all, NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reset_lazy_tlbstate(void)
|
||||||
|
{
|
||||||
|
int cpu = raw_smp_processor_id();
|
||||||
|
|
||||||
|
per_cpu(cpu_tlbstate, cpu).state = 0;
|
||||||
|
per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -222,14 +222,5 @@ static inline int hard_smp_processor_id(void)
|
||||||
|
|
||||||
#endif /* CONFIG_X86_LOCAL_APIC */
|
#endif /* CONFIG_X86_LOCAL_APIC */
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
|
||||||
#ifdef CONFIG_X86_32
|
|
||||||
extern void reset_lazy_tlbstate(void);
|
|
||||||
#else
|
|
||||||
static inline void reset_lazy_tlbstate(void)
|
|
||||||
{ }
|
|
||||||
#endif /* CONFIG_X86_32 */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -119,6 +119,10 @@ static inline void native_flush_tlb_others(const cpumask_t *cpumask,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void reset_lazy_tlbstate(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#else /* SMP */
|
#else /* SMP */
|
||||||
|
|
||||||
#include <asm/smp.h>
|
#include <asm/smp.h>
|
||||||
|
@ -151,6 +155,12 @@ struct tlb_state {
|
||||||
char __cacheline_padding[L1_CACHE_BYTES-8];
|
char __cacheline_padding[L1_CACHE_BYTES-8];
|
||||||
};
|
};
|
||||||
DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate);
|
DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate);
|
||||||
|
|
||||||
|
void reset_lazy_tlbstate(void);
|
||||||
|
#else
|
||||||
|
static inline void reset_lazy_tlbstate(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SMP */
|
#endif /* SMP */
|
||||||
|
|
Loading…
Reference in New Issue