diff options
author | Luca Tettamanti <kronos.it@gmail.com> | 2011-05-25 20:43:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-03 09:32:34 +0900 |
commit | 17fdfc59e1cdf37689f5747ed527dbd5961b2010 (patch) | |
tree | 71c8527f66ec093203d9cffce7140793e0792599 | |
parent | 82ce79999abf4899b10481209db7f0af8057a561 (diff) | |
download | linux-stable-17fdfc59e1cdf37689f5747ed527dbd5961b2010.tar.gz linux-stable-17fdfc59e1cdf37689f5747ed527dbd5961b2010.tar.bz2 linux-stable-17fdfc59e1cdf37689f5747ed527dbd5961b2010.zip |
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>
-rw-r--r-- | drivers/char/i8k.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c index d72433f2d310..ee017166545e 100644 --- a/drivers/char/i8k.c +++ b/drivers/char/i8k.c @@ -139,8 +139,8 @@ static int i8k_smm(struct smm_regs *regs) "movl %%edi,20(%%rax)\n\t" "popq %%rdx\n\t" "movl %%edx,0(%%rax)\n\t" - "lahf\n\t" - "shrl $8,%%eax\n\t" + "pushfq\n\t" + "popq %%rax\n\t" "andl $1,%%eax\n" :"=a"(rc) : "a"(regs) |