Andi Kleen<andi@xxxxxxxxxxxxxx> writes:But there's a memory clobber, that should be sufficient to indicate *regs is modified.
Jim<jim876@xxxxxxxxx> writes:The asm fails to mention that it modifies *regs.
After upgrading my Dell laptop, both OS+kernel the i8k interface was givingThe compiler really should not optimize the asm away, because
nonsensical output. As it turned out it's not the kernel but compiler
upgrade which broke this.
Guys at Archlinux have found the underlying cause (but don't seem to have
submitted a patch yet):
https://bbs.archlinux.org/viewtopic.php?pid=780692#p780692
gcc seems to optimize the assembly statements away.
And indeed, applying this patch makes the i8k interface work again,
i.e. replacing the asm(..) construct by asm volatile(..)
it has both input and output arguments which are later used.
"asm volatile" normally just means "don't move significantly"