aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2015-06-15 07:32:39 -0500
committerGary S. Robertson <gary.robertson@linaro.org>2015-06-15 07:32:39 -0500
commitb57ffdabee89d9af03d470803acf5f220722963f (patch)
tree14eb53a4449f8950733c4fe8c33882cef6d9a454 /arch/x86/include
parent6cf74712ced25affec76636c39d4d625b82b218a (diff)
parent0c94ab754b26e23ecdd6ddb1607c7a3e3f0f27fc (diff)
Merge tag 'lsk-v3.14-15.05' into linux-linaro-lng-v3.14
LSK 15.05 v3.14
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/mwait.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/include/asm/mwait.h b/arch/x86/include/asm/mwait.h
index 1da25a5f96f9..3ba047cbcf5b 100644
--- a/arch/x86/include/asm/mwait.h
+++ b/arch/x86/include/asm/mwait.h
@@ -30,6 +30,14 @@ static inline void __mwait(unsigned long eax, unsigned long ecx)
:: "a" (eax), "c" (ecx));
}
+static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
+{
+ trace_hardirqs_on();
+ /* "mwait %eax, %ecx;" */
+ asm volatile("sti; .byte 0x0f, 0x01, 0xc9;"
+ :: "a" (eax), "c" (ecx));
+}
+
/*
* This uses new MONITOR/MWAIT instructions on P4 processors with PNI,
* which can obviate IPI to trigger checking of need_resched.