aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/paravirt.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-02-18 03:18:50 -0500
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-03-30 02:36:04 -0400
commitab2f75f0b760d2b0c9a875b669a1b51dce02c85a (patch)
tree9cc6bc284c111adcbb69aac51a6ccc639b5a22e2 /arch/x86/kernel/paravirt.c
parent252a6bf2a3a7e7add56b17d48aecf3f3ef213103 (diff)
x86/paravirt: use percpu_ rather than __get_cpu_var
Impact: minor optimisation percpu_read/write is a slightly more direct way of getting to percpu data. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86/kernel/paravirt.c')
-rw-r--r--arch/x86/kernel/paravirt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index bf2e86eee80c..254e8aa8bfdb 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -246,16 +246,16 @@ static DEFINE_PER_CPU(enum paravirt_lazy_mode, paravirt_lazy_mode) = PARAVIRT_LA
246 246
247static inline void enter_lazy(enum paravirt_lazy_mode mode) 247static inline void enter_lazy(enum paravirt_lazy_mode mode)
248{ 248{
249 BUG_ON(__get_cpu_var(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE); 249 BUG_ON(percpu_read(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE);
250 250
251 __get_cpu_var(paravirt_lazy_mode) = mode; 251 percpu_write(paravirt_lazy_mode, mode);
252} 252}
253 253
254static void leave_lazy(enum paravirt_lazy_mode mode) 254static void leave_lazy(enum paravirt_lazy_mode mode)
255{ 255{
256 BUG_ON(__get_cpu_var(paravirt_lazy_mode) != mode); 256 BUG_ON(percpu_read(paravirt_lazy_mode) != mode);
257 257
258 __get_cpu_var(paravirt_lazy_mode) = PARAVIRT_LAZY_NONE; 258 percpu_write(paravirt_lazy_mode, PARAVIRT_LAZY_NONE);
259} 259}
260 260
261void paravirt_enter_lazy_mmu(void) 261void paravirt_enter_lazy_mmu(void)
@@ -294,7 +294,7 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
294 if (in_interrupt()) 294 if (in_interrupt())
295 return PARAVIRT_LAZY_NONE; 295 return PARAVIRT_LAZY_NONE;
296 296
297 return __get_cpu_var(paravirt_lazy_mode); 297 return percpu_read(paravirt_lazy_mode);
298} 298}
299 299
300void arch_flush_lazy_mmu_mode(void) 300void arch_flush_lazy_mmu_mode(void)