Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bfd074e05bdb69652d24ebc60b126899174ca788
Commit:     bfd074e05bdb69652d24ebc60b126899174ca788
Parent:     53fd13cff04ce27ff3e8d3eb7e5ad4f56b580f2f
Author:     Glauber de Oliveira Costa <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:32:11 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:32:11 2008 +0100

    replace x86_read/write_per_cpu with a common function.
    
    x86_read_per_cpu() and its writeish sister are not present in x86_64. So in
    this patch, we replace them with __get_cpu_var(), which is present in both
    
    Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/paravirt.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index 864be04..c20b4f8 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -238,18 +238,18 @@ static DEFINE_PER_CPU(enum paravirt_lazy_mode, 
paravirt_lazy_mode) = PARAVIRT_LA
 
 static inline void enter_lazy(enum paravirt_lazy_mode mode)
 {
-       BUG_ON(x86_read_percpu(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE);
+       BUG_ON(__get_cpu_var(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE);
        BUG_ON(preemptible());
 
-       x86_write_percpu(paravirt_lazy_mode, mode);
+       __get_cpu_var(paravirt_lazy_mode) = mode;
 }
 
 void paravirt_leave_lazy(enum paravirt_lazy_mode mode)
 {
-       BUG_ON(x86_read_percpu(paravirt_lazy_mode) != mode);
+       BUG_ON(__get_cpu_var(paravirt_lazy_mode) != mode);
        BUG_ON(preemptible());
 
-       x86_write_percpu(paravirt_lazy_mode, PARAVIRT_LAZY_NONE);
+       __get_cpu_var(paravirt_lazy_mode) = PARAVIRT_LAZY_NONE;
 }
 
 void paravirt_enter_lazy_mmu(void)
@@ -274,7 +274,7 @@ void paravirt_leave_lazy_cpu(void)
 
 enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
 {
-       return x86_read_percpu(paravirt_lazy_mode);
+       return __get_cpu_var(paravirt_lazy_mode);
 }
 
 struct pv_info pv_info = {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to