summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>2015-06-18 23:47:43 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-25 17:21:50 +0000
commitddf77bbe785a5ae1c701ef70fb6e41a89168e341 (patch)
tree9b47d735af60c1a5a34224189885f72666539184 /include
parent331db691c418e607b9830ba96e6ca1b634c7cea4 (diff)
downloadchrome-ec-ddf77bbe785a5ae1c701ef70fb6e41a89168e341.tar.gz
Fix assertion crash in __wait_evt()
mutex_lock() is called from MEC1322_IRQ_ACPIEC0_IBF interrupt context, causing deadlock and assertion in __wait_evt(). In the interrupt context it now checks for mutex lock first. If the mutex is already locked,, it will disable ACPI interrupts and defer the memmap mutex lock. Added LPC interrupt disable/enable functions as needed. Increased deferred function count where needed. BRANCH=None BUG=chrome-os-partner:40820 TEST=Test for suspend-resume, cold, warm reboots and other general stability. Change-Id: I3dda0d4635a6b6281faf200c8c7b6fcba8877254 Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com> Reviewed-on: https://chromium-review.googlesource.com/280418 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org> Commit-Queue: Divya Jyothi <divya.jyothi@intel.com> Tested-by: Divya Jyothi <divya.jyothi@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/host_command.h5
-rw-r--r--include/lpc.h7
2 files changed, 12 insertions, 0 deletions
diff --git a/include/host_command.h b/include/host_command.h
index 2667cb9a27..0d1ff998f3 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -130,6 +130,11 @@ uint8_t *host_get_memmap(int offset);
*/
void host_lock_memmap(void);
+/*
+ * Returns status of host memmap lock.
+ */
+int host_memmap_is_locked(void);
+
/**
* Release the memmap write mutex. This function should be called once
* a multi-byte variable read from ACPI is done, and when updating multi-byte
diff --git a/include/lpc.h b/include/lpc.h
index c38f711bda..c90a54a71c 100644
--- a/include/lpc.h
+++ b/include/lpc.h
@@ -113,4 +113,11 @@ void lpc_clear_acpi_status_mask(uint8_t mask);
*/
int lpc_get_pltrst_asserted(void);
+
+/* Disable LPC ACPI interrupts */
+void lpc_disable_acpi_interrupts(void);
+
+/* Enable LPC ACPI interrupts */
+void lpc_enable_acpi_interrupts(void);
+
#endif /* __CROS_EC_LPC_H */