Fix gcc 4.5.1 miscompiling drivers/char/i8k.c (again)
[pandora-kernel.git] / drivers / char / i8k.c
index f0863be..d72433f 100644 (file)
@@ -120,7 +120,7 @@ static int i8k_smm(struct smm_regs *regs)
        int eax = regs->eax;
 
 #if defined(CONFIG_X86_64)
-       asm("pushq %%rax\n\t"
+       asm volatile("pushq %%rax\n\t"
                "movl 0(%%rax),%%edx\n\t"
                "pushq %%rdx\n\t"
                "movl 4(%%rax),%%ebx\n\t"
@@ -142,11 +142,11 @@ static int i8k_smm(struct smm_regs *regs)
                "lahf\n\t"
                "shrl $8,%%eax\n\t"
                "andl $1,%%eax\n"
-               :"=a"(rc), "+m" (*regs)
+               :"=a"(rc)
                :    "a"(regs)
                :    "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
 #else
-       asm("pushl %%eax\n\t"
+       asm volatile("pushl %%eax\n\t"
            "movl 0(%%eax),%%edx\n\t"
            "push %%edx\n\t"
            "movl 4(%%eax),%%ebx\n\t"
@@ -168,7 +168,7 @@ static int i8k_smm(struct smm_regs *regs)
            "lahf\n\t"
            "shrl $8,%%eax\n\t"
            "andl $1,%%eax\n"
-           :"=a"(rc), "+m" (*regs)
+           :"=a"(rc)
            :    "a"(regs)
            :    "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
 #endif