i8k: Avoid lahf in 64-bit code
commit500c1e95d2e4a846025091c8cabee761578fc6cc
authorLuca Tettamanti <kronos.it@gmail.com>
Wed, 25 May 2011 18:43:31 +0000 (25 20:43 +0200)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:54:53 +0000 (1 13:54 -0700)
treea324a8025a3f54fc60b8a9b738ec8fe79c3f8c0b
parent5b67e307f5e085be7594117b77e61432c13c9c96
i8k: Avoid lahf in 64-bit code

commit bc1f419c76a2d6450413ce4349f4e4a07be011d5 upstream.

i8k uses lahf to read the flag register in 64-bit code; early x86-64
CPUs, however, lack this instruction and we get an invalid opcode
exception at runtime.
Use pushf to load the flag register into the stack instead.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Reported-by: Jeff Rickman <jrickman@myamigos.us>
Tested-by: Jeff Rickman <jrickman@myamigos.us>
Tested-by: Harry G McGavran Jr <w5pny@arrl.net>
Cc: Massimo Dal Zotto <dz@debian.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/char/i8k.c