i8k: Avoid lahf in 64-bit code
authorLuca Tettamanti <kronos.it@gmail.com>
Wed, 25 May 2011 18:43:31 +0000 (20:43 +0200)
committerSteve Conklin <sconklin@canonical.com>
Fri, 15 Jul 2011 17:21:09 +0000 (12:21 -0500)
commit43a38e2218410b026f8368605a230449d18dae43
tree527e28363017d7bf5abf50e8cfbeac38ef17b1cc
parent2d0ac03c3f4a858f633242b489f7e3847a75219b
i8k: Avoid lahf in 64-bit code

BugLink: http://bugs.launchpad.net/bugs/793702

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: Tim Gardner <tim.gardner@canonical.com>
drivers/char/i8k.c