From c1034df950c0387b7dc83e84ce222fb5c63cdddd Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Wed, 7 Feb 2018 14:51:32 -0800 Subject: [PATCH] qcacld-3.0: Disable PANIC_ON_BUG for end user builds PANIC_ON_BUG is currently enabled for all WLAN builds. While a customer can, and should, disable PANIC_ON_BUG for end user builds, this can be easily overlooked. Disable PANIC_ON_BUG by default on pure performance builds, to avoid accidentally crashing end user devices. Customers can opt-in to PANIC_ON_BUG as needed for validation on performance builds. Change-Id: I79371206b20b978f4e61954c2f49bbb7b07ba95e CRs-Fixed: 2186099 --- Kbuild | 8 +++++++- core/hdd/src/wlan_hdd_main.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Kbuild b/Kbuild index aed385d25c83..8f68421ffc35 100644 --- a/Kbuild +++ b/Kbuild @@ -268,7 +268,13 @@ BUILD_DEBUG_VERSION := 1 BUILD_DIAG_VERSION := 1 #Do we panic on bug? default is to warn -PANIC_ON_BUG := 1 +ifeq ($(CONFIG_SLUB_DEBUG), y) + PANIC_ON_BUG := 1 +else ifeq ($(CONFIG_PERF_DEBUG), y) + PANIC_ON_BUG := 1 +else + PANIC_ON_BUG := 0 +endif #Enable OL debug and wmi unified functions CONFIG_ATH_PERF_PWR_OFFLOAD := 1 diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index e583c1a0d09f..2a21e4411e3e 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -158,6 +158,12 @@ #define MEMORY_DEBUG_STR "" #endif +#ifdef PANIC_ON_BUG +#define PANIC_ON_BUG_STR " +PANIC_ON_BUG" +#else +#define PANIC_ON_BUG_STR "" +#endif + int wlan_start_ret_val; static DECLARE_COMPLETION(wlan_start_comp); static unsigned int dev_num = 1; @@ -11767,7 +11773,7 @@ static int __hdd_module_init(void) pr_err("%s: Loading driver v%s (%s)\n", WLAN_MODULE_NAME, g_wlan_driver_version, - TIMER_MANAGER_STR MEMORY_DEBUG_STR); + TIMER_MANAGER_STR MEMORY_DEBUG_STR PANIC_ON_BUG_STR); ret = wlan_hdd_state_ctrl_param_create(); if (ret) {