aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/espfix_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/espfix_64.c')
-rw-r--r--arch/x86/kernel/espfix_64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/espfix_64.c b/arch/x86/kernel/espfix_64.c
index 9c4e7ba6870c..7d7715dde901 100644
--- a/arch/x86/kernel/espfix_64.c
+++ b/arch/x86/kernel/espfix_64.c
@@ -155,14 +155,14 @@ void init_espfix_ap(int cpu)
155 page = cpu/ESPFIX_STACKS_PER_PAGE; 155 page = cpu/ESPFIX_STACKS_PER_PAGE;
156 156
157 /* Did another CPU already set this up? */ 157 /* Did another CPU already set this up? */
158 stack_page = ACCESS_ONCE(espfix_pages[page]); 158 stack_page = READ_ONCE(espfix_pages[page]);
159 if (likely(stack_page)) 159 if (likely(stack_page))
160 goto done; 160 goto done;
161 161
162 mutex_lock(&espfix_init_mutex); 162 mutex_lock(&espfix_init_mutex);
163 163
164 /* Did we race on the lock? */ 164 /* Did we race on the lock? */
165 stack_page = ACCESS_ONCE(espfix_pages[page]); 165 stack_page = READ_ONCE(espfix_pages[page]);
166 if (stack_page) 166 if (stack_page)
167 goto unlock_done; 167 goto unlock_done;
168 168
@@ -200,7 +200,7 @@ void init_espfix_ap(int cpu)
200 set_pte(&pte_p[n*PTE_STRIDE], pte); 200 set_pte(&pte_p[n*PTE_STRIDE], pte);
201 201
202 /* Job is done for this CPU and any CPU which shares this page */ 202 /* Job is done for this CPU and any CPU which shares this page */
203 ACCESS_ONCE(espfix_pages[page]) = stack_page; 203 WRITE_ONCE(espfix_pages[page], stack_page);
204 204
205unlock_done: 205unlock_done:
206 mutex_unlock(&espfix_init_mutex); 206 mutex_unlock(&espfix_init_mutex);