On 11/09/2010 02:57 PM, Andreas Schwab wrote:
> Andi Kleen <a...@firstfloor.org> writes:
> 
>> @@ -142,7 +142,7 @@ static int i8k_smm(struct smm_regs *regs)
>>              "lahf\n\t"
>>              "shrl $8,%%eax\n\t"
>>              "andl $1,%%eax\n"
>> -            :"=a"(rc)
>> +            :"=a"(rc), "=m" (*regs)
> 
> I think this should be "+m".
> 
> Andreas.
> 

Just tested Andi's patch with Andreas' suggestion to make it +m,
i.e. like attached and can confirm it solves the issue.

Thanks guys,
   Jim Bos


--- i8k.c.ORIG  2010-08-02 17:20:46.000000000 +0200
+++ i8k.c       2010-11-09 17:31:29.000000000 +0100
@@ -141,7 +141,7 @@
                "lahf\n\t"
                "shrl $8,%%eax\n\t"
                "andl $1,%%eax\n"
-               :"=a"(rc)
+               :"=a"(rc), "+m" (*regs)
                :    "a"(regs)
                :    "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
 #else
@@ -166,7 +166,7 @@
            "movl %%edx,0(%%eax)\n\t"
            "lahf\n\t"
            "shrl $8,%%eax\n\t"
-           "andl $1,%%eax\n":"=a"(rc)
+           "andl $1,%%eax\n":"=a"(rc), "+m" (*regs)
            :    "a"(regs)
            :    "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
 #endif

Reply via email to