Merge branch 'topic/usb-audio' into for-linus
[pandora-kernel.git] / arch / x86 / include / asm / irqflags.h
index 2bdab21..c6ccbe7 100644 (file)
@@ -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");