提交 90b92a6f 编写于 作者: S Scott Wood 提交者: Avi Kivity

KVM: PPC: e500: Eliminate preempt_disable in local_sid_destroy_all

The only place it makes sense to call this function already needs
to have preemption disabled.
Signed-off-by: NScott Wood <scottwood@freescale.com>
Signed-off-by: NAlexander Graf <agraf@suse.de>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 3bf3cdcc
...@@ -116,13 +116,11 @@ static inline int local_sid_lookup(struct id *entry) ...@@ -116,13 +116,11 @@ static inline int local_sid_lookup(struct id *entry)
return -1; return -1;
} }
/* Invalidate all id mappings on local core */ /* Invalidate all id mappings on local core -- call with preempt disabled */
static inline void local_sid_destroy_all(void) static inline void local_sid_destroy_all(void)
{ {
preempt_disable();
__get_cpu_var(pcpu_last_used_sid) = 0; __get_cpu_var(pcpu_last_used_sid) = 0;
memset(&__get_cpu_var(pcpu_sids), 0, sizeof(__get_cpu_var(pcpu_sids))); memset(&__get_cpu_var(pcpu_sids), 0, sizeof(__get_cpu_var(pcpu_sids)));
preempt_enable();
} }
static void *kvmppc_e500_id_table_alloc(struct kvmppc_vcpu_e500 *vcpu_e500) static void *kvmppc_e500_id_table_alloc(struct kvmppc_vcpu_e500 *vcpu_e500)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册