aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/idle/mrst_s0i3_asm.S
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-12-07 00:04:20 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2010-12-14 10:48:41 -0800
commit20211a44505789bd027a85b08253866c8c3fdbbb (patch)
tree9a29ef682693438c91fc96481e77e1ae93710563 /drivers/idle/mrst_s0i3_asm.S
parentcc76afb3c3a2bf99f7e5f5744d1111a6db7f333d (diff)
downloadmrst-s0i3-test-20211a44505789bd027a85b08253866c8c3fdbbb.tar.gz
mrst-s0i3-test-20211a44505789bd027a85b08253866c8c3fdbbb.tar.xz
mrst-s0i3-test-20211a44505789bd027a85b08253866c8c3fdbbb.zip
s0i3: delay the PM_CMD write until immediately before MWAIT
PM_CMD has a timeout, make sure it doesn't get triggered by WBINVD.
Diffstat (limited to 'drivers/idle/mrst_s0i3_asm.S')
-rw-r--r--drivers/idle/mrst_s0i3_asm.S7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/idle/mrst_s0i3_asm.S b/drivers/idle/mrst_s0i3_asm.S
index 10872fa4a3c..4561a53c347 100644
--- a/drivers/idle/mrst_s0i3_asm.S
+++ b/drivers/idle/mrst_s0i3_asm.S
@@ -37,7 +37,9 @@ ENTRY(mrst_s0i3_entry)
pushl %ebp
pushl %ebx
- movl %esp, %esi
+ movl %esp, %ebp
+ movl %eax, %esi /* Command code to write to PM_CMD */
+ movl %edx, %edi /* Linear address of the PM_CMD register */
sldt %eax
pushl %eax
@@ -89,13 +91,14 @@ ENTRY(mrst_s0i3_entry)
movl $MRST_C6_HINTS_EAX, %eax
movl $MRST_C6_HINTS_ECX, %ecx
+ movl %esi, (%edi)
sti
mwait
/* If MWAIT wakes us up, assume something happened... */
cli
/* jmp simulate_resume */
- movl %esi, %esp
+ movl %ebp, %esp
xorl %eax, %eax /* Not really S0i3 */
popl %ebx