Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=03491c92932b8d2dab1bb298e0122ff6d39680af
Commit:     03491c92932b8d2dab1bb298e0122ff6d39680af
Parent:     98d8256739f2c6c636fa2da359f5949c739ae839
Author:     Thomas Gleixner <[EMAIL PROTECTED]>
AuthorDate: Wed May 23 13:58:19 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed May 23 20:14:15 2007 -0700

    i386: fix early usage of atomic_add_return and local_add_return on real i386
    
    The check (boot_cpu_data.x86 == 3) in atomic_add_return() and
    local_add_return() fails, when those operations are used before
    boot_cpu_data is filled in.
    
    Change the check to (boot_cpu_data.x86 <= 3) to fix this.
    
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/asm-i386/atomic.h |    2 +-
 include/asm-i386/local.h  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h
index 0baa2f8..437aac8 100644
--- a/include/asm-i386/atomic.h
+++ b/include/asm-i386/atomic.h
@@ -182,7 +182,7 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)
        int __i;
 #ifdef CONFIG_M386
        unsigned long flags;
-       if(unlikely(boot_cpu_data.x86==3))
+       if(unlikely(boot_cpu_data.x86 <= 3))
                goto no_xadd;
 #endif
        /* Modern 486+ processor */
diff --git a/include/asm-i386/local.h b/include/asm-i386/local.h
index e13d3e9..6e85975 100644
--- a/include/asm-i386/local.h
+++ b/include/asm-i386/local.h
@@ -135,7 +135,7 @@ static __inline__ long local_add_return(long i, local_t *l)
        long __i;
 #ifdef CONFIG_M386
        unsigned long flags;
-       if(unlikely(boot_cpu_data.x86==3))
+       if(unlikely(boot_cpu_data.x86 <= 3))
                goto no_xadd;
 #endif
        /* Modern 486+ processor */
-
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