From 4cfc6ee150224def48efa44d561b15c408b419bd Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Fri, 7 Jun 2019 12:11:12 -0700 Subject: [PATCH] qcacld-3.0: Add debug assert on page fault wake ups During dynamic request voting(DRV) suspend PCIe link is in L1SS sleep state such that target can do page faults without waking up APPS and hence add debug assert on page fault wake ups if target triggered a page fault wake up during DRV wow suspend. Change-Id: I130a9a568b7007366fe582bd2e231c9fca324368 CRs-Fixed: 2467471 --- core/wma/src/wma_features.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 084bbd439d8c..ad0e6d6b4ff2 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -2834,6 +2834,13 @@ static int wma_wake_event_piggybacked( return errno; } +static void wma_debug_assert_page_fault_wakeup(uint32_t reason) +{ + /* During DRV if page fault wake up then assert */ + if ((WOW_REASON_PAGE_FAULT == reason) && (qdf_is_drv_connected())) + QDF_DEBUG_PANIC("Unexpected page fault wake up detected during DRV wow"); +} + static void wma_wake_event_log_reason(t_wma_handle *wma, WOW_EVENT_INFO_fixed_param *wake_info) { @@ -2847,6 +2854,7 @@ static void wma_wake_event_log_reason(t_wma_handle *wma, wake_info->wake_reason, wake_info->vdev_id, wma_vdev_type_str(vdev->type)); + wma_debug_assert_page_fault_wakeup(wake_info->wake_reason); } else if (!wmi_get_runtime_pm_inprogress(wma->wmi_handle)) { WMA_LOGA("Non-WLAN triggered wakeup: %s (%d)", wma_wow_wake_reason_str(wake_info->wake_reason),