Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b4e81db authored by Jim Bos's avatar Jim Bos Committed by Linus Torvalds
Browse files

i8k: Tell gcc that *regs gets clobbered



More recent GCC caused the i8k driver to stop working, on Slackware
compiler was upgraded from gcc-4.4.4 to gcc-4.5.1 after which it didn't
work anymore, meaning the driver didn't load or gave total nonsensical
output.

As it turned out the asm(..) statement forgot to mention it modifies the
*regs variable.

Credits to Andi Kleen and Andreas Schwab for providing the fix.

Signed-off-by: default avatarJim Bos <jim876@xs4all.nl>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ed3aada1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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)
		:    "a"(regs)
		:    "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
#else
@@ -167,7 +167,8 @@ static int i8k_smm(struct smm_regs *regs)
	    "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