Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Jim Bos <jim876@xs4all.nl>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jim Bos and committed by
Linus Torvalds
6b4e81db ed3aada1

+3 -2
+3 -2
drivers/char/i8k.c
··· 142 142 "lahf\n\t" 143 143 "shrl $8,%%eax\n\t" 144 144 "andl $1,%%eax\n" 145 - :"=a"(rc) 145 + :"=a"(rc), "+m" (*regs) 146 146 : "a"(regs) 147 147 : "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory"); 148 148 #else ··· 167 167 "movl %%edx,0(%%eax)\n\t" 168 168 "lahf\n\t" 169 169 "shrl $8,%%eax\n\t" 170 - "andl $1,%%eax\n":"=a"(rc) 170 + "andl $1,%%eax\n" 171 + :"=a"(rc), "+m" (*regs) 171 172 : "a"(regs) 172 173 : "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory"); 173 174 #endif