Commit 1786bf00 authored by Avi Kivity's avatar Avi Kivity Committed by Ingo Molnar
Browse files

core: Clean up user return notifers use of per_cpu

Instead of using per_cpu(..., raw_smp_processor_id()), use
Signed-off-by: default avatarAvi Kivity <>
LKML-Reference: <>
Signed-off-by: default avatarIngo Molnar <>
parent 8e7cac79
......@@ -6,8 +6,6 @@
static DEFINE_PER_CPU(struct hlist_head, return_notifier_list);
#define URN_LIST_HEAD per_cpu(return_notifier_list, raw_smp_processor_id())
* Request a notification when the current cpu returns to userspace. Must be
* called in atomic context. The notifier will also be called in atomic
......@@ -16,7 +14,7 @@ static DEFINE_PER_CPU(struct hlist_head, return_notifier_list);
void user_return_notifier_register(struct user_return_notifier *urn)
set_tsk_thread_flag(current, TIF_USER_RETURN_NOTIFY);
hlist_add_head(&urn->link, &URN_LIST_HEAD);
hlist_add_head(&urn->link, &__get_cpu_var(return_notifier_list));
......@@ -27,7 +25,7 @@ EXPORT_SYMBOL_GPL(user_return_notifier_register);
void user_return_notifier_unregister(struct user_return_notifier *urn)
if (hlist_empty(&URN_LIST_HEAD))
if (hlist_empty(&__get_cpu_var(return_notifier_list)))
clear_tsk_thread_flag(current, TIF_USER_RETURN_NOTIFY);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment