aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/irqflags.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-08-15 13:00:02 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-08-15 13:00:02 +0900
commit4b6b987969b076298485697bfb0d0e35502642a3 (patch)
treea8f5ebd6a0b9efbe30272012d759669b0c5ddc13 /arch/x86/include/asm/irqflags.h
parentsh: Runtime PM pdev hwblk - Solution Engine 7724 (diff)
parentMerge branch 'sh/stable-updates' (diff)
downloadlinux-dev-4b6b987969b076298485697bfb0d0e35502642a3.tar.xz
linux-dev-4b6b987969b076298485697bfb0d0e35502642a3.zip
Merge branch 'master' into sh/hwblk
Diffstat (limited to 'arch/x86/include/asm/irqflags.h')
-rw-r--r--arch/x86/include/asm/irqflags.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
index 2bdab21f0898..c6ccbe7e81ad 100644
--- a/arch/x86/include/asm/irqflags.h
+++ b/arch/x86/include/asm/irqflags.h
@@ -12,9 +12,15 @@ static inline unsigned long native_save_fl(void)
{
unsigned long flags;
+ /*
+ * Note: this needs to be "=r" not "=rm", because we have the
+ * stack offset from what gcc expects at the time the "pop" is
+ * executed, and so a memory reference with respect to the stack
+ * would end up using the wrong address.
+ */
asm volatile("# __raw_save_flags\n\t"
"pushf ; pop %0"
- : "=g" (flags)
+ : "=r" (flags)
: /* no input */
: "memory");