diff --git a/arch/arm64/configs/vendor/pixel_experience-a52q_defconfig b/arch/arm64/configs/vendor/pixel_experience-a52q_defconfig index f1a5cd786422..c9c2861326d4 100755 --- a/arch/arm64/configs/vendor/pixel_experience-a52q_defconfig +++ b/arch/arm64/configs/vendor/pixel_experience-a52q_defconfig @@ -2128,7 +2128,6 @@ CONFIG_INPUT_LEDS=y CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_EVBUG is not set # CONFIG_INPUT_KEYRESET is not set -CONFIG_SEC_DEBUG_TSP_LOG=y CONFIG_INPUT_TOUCHSCREEN_SEC_CMD=y CONFIG_INPUT_TOUCHSCREEN_TCLMV2=y CONFIG_INPUT_SEC_SECURE_TOUCH=y @@ -5636,7 +5635,6 @@ CONFIG_SAMSUNG_PRODUCT_SHIP=y # CONFIG_SAMSUNG_USER_TRIAL is not set CONFIG_SEC_BSP=y CONFIG_DRV_SAMSUNG=y -CONFIG_SEC_DEBUG=y CONFIG_SEC_PARAM=y # CONFIG_SEC_MPARAM is not set CONFIG_SEC_PARAM_SIZE=0xA00000 @@ -5659,38 +5657,28 @@ CONFIG_SEC_LOG_LAST_KMSG=y CONFIG_SEC_LOG_STORE_LAST_KMSG=y CONFIG_SEC_LOG_STORE_LPM_KMSG=y # CONFIG_SEC_STORE_POWER_ONOFF_HISTORY is not set -CONFIG_SEC_DEBUG_SCHED_LOG=y # CONFIG_SEC_DEBUG_SCHED_LOG_PER_CPU is not set # CONFIG_SEC_DEBUG_SCHED_LOG_IRQ_V2 is not set # CONFIG_SEC_DEBUG_MSG_LOG is not set # CONFIG_SEC_DEBUG_DCVS_LOG is not set # CONFIG_SEC_DEBUG_POWER_LOG is not set # CONFIG_SEC_DEBUG_FUELGAUGE_LOG is not set -CONFIG_SEC_DEBUG_SUMMARY=y # CONFIG_SEC_DEBUG_SUMMARY_DRIVER is not set # CONFIG_SEC_DEBUG_LOW_LOG is not set # CONFIG_SEC_DEBUG_FORCE_ERROR is not set -CONFIG_SEC_USER_RESET_DEBUG=y # CONFIG_SEC_USER_RESET_DEBUG_TEST is not set -CONFIG_SEC_PERIPHERAL_SECURE_CHK=y -CONFIG_SEC_SSR_DEBUG_LEVEL_CHK=y # CONFIG_SEC_DEBUG_PWDT is not set -CONFIG_SEC_DEBUG_DUMP_TASK_STACK=y # CONFIG_SEC_DEBUG_MDM_FILE_INFO is not set # CONFIG_SEC_DEBUG_DOUBLE_FREE is not set # CONFIG_SEC_FILE_LEAK_DEBUG is not set -CONFIG_KERNEL_MODE_NEON_DEBUG=y # CONFIG_SEC_SLUB_DEBUG is not set # CONFIG_SEC_CP_SEPARATE_DEBUG is not set -CONFIG_SEC_DEBUG_MODULE_INFO=y -CONFIG_SEC_BOOTSTAT=y # CONFIG_SEC_NOEYEINFO is not set CONFIG_SEC_QPNP_PON_SPARE_BITS=7 # CONFIG_ARGOS is not set CONFIG_SEC_MISC=y CONFIG_SEC_SMEM=y CONFIG_SEC_SMEM_VENDOR1_VERSION=5 -CONFIG_SEC_DEBUG_APPS_CLK_LOGGING=y # # Samsung Vbus Notifier drivers @@ -6336,7 +6324,6 @@ CONFIG_DEBUG_ALIGN_RODATA=y # PowerManagement Feature # CONFIG_SEC_PM=y -CONFIG_SEC_PM_DEBUG=y # # Security options diff --git a/arch/arm64/configs/vendor/pixel_experience-a72q_defconfig b/arch/arm64/configs/vendor/pixel_experience-a72q_defconfig index b2d990e6af8b..8a74fbbc1d0d 100644 --- a/arch/arm64/configs/vendor/pixel_experience-a72q_defconfig +++ b/arch/arm64/configs/vendor/pixel_experience-a72q_defconfig @@ -2125,7 +2125,6 @@ CONFIG_INPUT_LEDS=y CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_EVBUG is not set # CONFIG_INPUT_KEYRESET is not set -CONFIG_SEC_DEBUG_TSP_LOG=y CONFIG_INPUT_TOUCHSCREEN_SEC_CMD=y CONFIG_INPUT_TOUCHSCREEN_TCLMV2=y CONFIG_INPUT_SEC_SECURE_TOUCH=y @@ -5633,7 +5632,6 @@ CONFIG_SAMSUNG_PRODUCT_SHIP=y # CONFIG_SAMSUNG_USER_TRIAL is not set CONFIG_SEC_BSP=y CONFIG_DRV_SAMSUNG=y -CONFIG_SEC_DEBUG=y CONFIG_SEC_PARAM=y # CONFIG_SEC_MPARAM is not set CONFIG_SEC_PARAM_SIZE=0xA00000 @@ -5656,38 +5654,28 @@ CONFIG_SEC_LOG_LAST_KMSG=y CONFIG_SEC_LOG_STORE_LAST_KMSG=y CONFIG_SEC_LOG_STORE_LPM_KMSG=y # CONFIG_SEC_STORE_POWER_ONOFF_HISTORY is not set -CONFIG_SEC_DEBUG_SCHED_LOG=y # CONFIG_SEC_DEBUG_SCHED_LOG_PER_CPU is not set # CONFIG_SEC_DEBUG_SCHED_LOG_IRQ_V2 is not set # CONFIG_SEC_DEBUG_MSG_LOG is not set # CONFIG_SEC_DEBUG_DCVS_LOG is not set # CONFIG_SEC_DEBUG_POWER_LOG is not set # CONFIG_SEC_DEBUG_FUELGAUGE_LOG is not set -CONFIG_SEC_DEBUG_SUMMARY=y # CONFIG_SEC_DEBUG_SUMMARY_DRIVER is not set # CONFIG_SEC_DEBUG_LOW_LOG is not set # CONFIG_SEC_DEBUG_FORCE_ERROR is not set -CONFIG_SEC_USER_RESET_DEBUG=y # CONFIG_SEC_USER_RESET_DEBUG_TEST is not set -CONFIG_SEC_PERIPHERAL_SECURE_CHK=y -CONFIG_SEC_SSR_DEBUG_LEVEL_CHK=y # CONFIG_SEC_DEBUG_PWDT is not set -CONFIG_SEC_DEBUG_DUMP_TASK_STACK=y # CONFIG_SEC_DEBUG_MDM_FILE_INFO is not set # CONFIG_SEC_DEBUG_DOUBLE_FREE is not set # CONFIG_SEC_FILE_LEAK_DEBUG is not set -CONFIG_KERNEL_MODE_NEON_DEBUG=y # CONFIG_SEC_SLUB_DEBUG is not set # CONFIG_SEC_CP_SEPARATE_DEBUG is not set -CONFIG_SEC_DEBUG_MODULE_INFO=y -CONFIG_SEC_BOOTSTAT=y # CONFIG_SEC_NOEYEINFO is not set CONFIG_SEC_QPNP_PON_SPARE_BITS=7 # CONFIG_ARGOS is not set CONFIG_SEC_MISC=y CONFIG_SEC_SMEM=y CONFIG_SEC_SMEM_VENDOR1_VERSION=5 -CONFIG_SEC_DEBUG_APPS_CLK_LOGGING=y # # Samsung Vbus Notifier drivers @@ -6333,7 +6321,6 @@ CONFIG_DEBUG_ALIGN_RODATA=y # PowerManagement Feature # CONFIG_SEC_PM=y -CONFIG_SEC_PM_DEBUG=y # # Security options diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index d05a5359eb1a..3d067d50c474 100755 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -318,8 +318,10 @@ void die(const char *str, struct pt_regs *regs, int err) oops_enter(); +#ifdef CONFIG_SEC_DEBUG sec_debug_sched_msg("!!die!!"); sec_debug_summary_save_die_info(str, regs); +#endif console_verbose(); bust_spinlocks(1); diff --git a/drivers/cpuidle/lpm-levels.c b/drivers/cpuidle/lpm-levels.c index d30d90160e34..f784464f5807 100755 --- a/drivers/cpuidle/lpm-levels.c +++ b/drivers/cpuidle/lpm-levels.c @@ -1745,6 +1745,8 @@ static int lpm_suspend_prepare(void) #ifdef CONFIG_SEC_PM regulator_showall_enabled(); +#endif +#ifdef CONFIG_SEC_PM_DEBUG sec_clock_debug_print_enabled(); #endif @@ -1765,7 +1767,7 @@ static void lpm_suspend_wake(void) suspend_in_progress = false; lpm_stats_suspend_exit(); -#ifdef CONFIG_SEC_PM +#ifdef CONFIG_SEC_PM_DEBUG sec_debug_print_sleep_time(); #endif } diff --git a/drivers/gpu/drm/msm/msm_smmu.c b/drivers/gpu/drm/msm/msm_smmu.c index 50c2117d9a1c..bb51229651e6 100755 --- a/drivers/gpu/drm/msm/msm_smmu.c +++ b/drivers/gpu/drm/msm/msm_smmu.c @@ -273,11 +273,11 @@ static int msm_smmu_map_dma_buf(struct msm_mmu *mmu, struct sg_table *sgt, dir, attrs, client->secure); } -#if defined(CONFIG_DISPLAY_SAMSUNG) - if (sec_debug_is_enabled() && sgt && sgt->sgl) +#if defined(CONFIG_DISPLAY_SAMSUNG) && defined(CONFIG_SEC_DEBUG) + if (sgt && sgt->sgl) ss_smmu_debug_map(SMMU_RT_DISPLAY_DEBUG, 0, NULL, sgt); -#elif defined(CONFIG_DISPLAY_SAMSUNG_LEGO) - if (sec_debug_is_enabled() && sgt && sgt->sgl) +#elif defined(CONFIG_DISPLAY_SAMSUNG_LEGO) && defined(CONFIG_SEC_DEBUG) + if (sgt && sgt->sgl) ss_smmu_debug_map(SMMU_RT_DISPLAY_DEBUG, sgt); #endif @@ -304,11 +304,11 @@ static void msm_smmu_unmap_dma_buf(struct msm_mmu *mmu, struct sg_table *sgt, dir, client->secure); } -#if defined(CONFIG_DISPLAY_SAMSUNG) - if (sec_debug_is_enabled() && sgt && sgt->sgl) +#if defined(CONFIG_DISPLAY_SAMSUNG) && defined(CONFIG_SEC_DEBUG) + if (sgt && sgt->sgl) ss_smmu_debug_unmap(SMMU_RT_DISPLAY_DEBUG, sgt); -#elif defined(CONFIG_DISPLAY_SAMSUNG_LEGO) - if (sec_debug_is_enabled() && sgt && sgt->sgl) +#elif defined(CONFIG_DISPLAY_SAMSUNG_LEGO) && defined(CONFIG_SEC_DEBUG) + if (sgt && sgt->sgl) ss_smmu_debug_unmap(SMMU_RT_DISPLAY_DEBUG, sgt); #endif diff --git a/drivers/gpu/drm/msm/samsung/ss_dsi_panel_debug.c b/drivers/gpu/drm/msm/samsung/ss_dsi_panel_debug.c index 090dad3a9a8f..3bcb1756b02c 100755 --- a/drivers/gpu/drm/msm/samsung/ss_dsi_panel_debug.c +++ b/drivers/gpu/drm/msm/samsung/ss_dsi_panel_debug.c @@ -925,10 +925,12 @@ int ss_smmu_debug_init(struct samsung_display_driver_data *vdd) int ret = 0; /* This debug is available by sde_debug enabled condition */ +#if defined(CONFIG_SEC_DEBUG) if (!sec_debug_is_enabled()) { LCD_ERR("sec_debug_is_enabled : %d\n", sec_debug_is_enabled()); goto init_fail; } +#endif /* Create KMEM_CACHE slab */ if (IS_ERR_OR_NULL(vdd->ss_debug_smmu_cache)) { diff --git a/drivers/gpu/drm/msm/sde/sde_kms.c b/drivers/gpu/drm/msm/sde/sde_kms.c index 019dfc6d28ed..3313462000d9 100755 --- a/drivers/gpu/drm/msm/sde/sde_kms.c +++ b/drivers/gpu/drm/msm/sde/sde_kms.c @@ -868,7 +868,7 @@ static int _sde_kms_release_splash_buffer(unsigned int mem_addr, #if defined(CONFIG_DISPLAY_SAMSUNG_LEGO) SDE_INFO("release splash buffer: addr: %x, size: %x, sec_debug: %d\n", - mem_addr, splash_buffer_size, sec_debug_is_enabled()); + mem_addr, splash_buffer_size); #endif return ret; diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c index 73b8fbeaa4ae..2ef817ae3c0a 100755 --- a/drivers/gpu/drm/msm/sde/sde_plane.c +++ b/drivers/gpu/drm/msm/sde/sde_plane.c @@ -921,7 +921,7 @@ int sde_plane_wait_input_fence(struct drm_plane *plane, uint32_t wait_ms) psde->is_error = true; sde_kms_timeline_status(plane->dev); -#if defined(CONFIG_DISPLAY_SAMSUNG) || defined(CONFIG_DISPLAY_SAMSUNG_LEGO) +#if defined(CONFIG_DISPLAY_SAMSUNG) && (CONFIG_SEC_DEBUG) || defined(CONFIG_DISPLAY_SAMSUNG_LEGO) && (CONFIG_SEC_DEBUG) { struct dma_fence *tout_fence = input_fence; diff --git a/drivers/input/sec_cmd.c b/drivers/input/sec_cmd.c index 762166309c26..c0fcf6092a7f 100755 --- a/drivers/input/sec_cmd.c +++ b/drivers/input/sec_cmd.c @@ -336,7 +336,9 @@ static void sec_cmd_store_function(struct sec_cmd_data *data) (unsigned long)t, nanosec_rem / 1000); +#if IS_ENABLED(CONFIG_SEC_DEBUG_TSP_LOG) sec_debug_tsp_command_history(tbuf); +#endif } } @@ -383,9 +385,11 @@ static ssize_t sec_cmd_store(struct device *dev, struct device_attribute *devatt nanosec_rem / 1000); snprintf(task_info, 40, "\n[%d:%s]", current->pid, current->comm); +#if IS_ENABLED(CONFIG_SEC_DEBUG_TSP_LOG) sec_debug_tsp_command_history(task_info); sec_debug_tsp_command_history(cmd.cmd); sec_debug_tsp_command_history(tbuf); +#endif } break; diff --git a/drivers/input/sec_tsp_dumpkey.c b/drivers/input/sec_tsp_dumpkey.c index 3ba365aa7c28..a2af9752449d 100755 --- a/drivers/input/sec_tsp_dumpkey.c +++ b/drivers/input/sec_tsp_dumpkey.c @@ -241,10 +241,12 @@ static struct notifier_block nb_gpio_keys = { static int __init sec_tsp_dumpkey_init(void) { +#ifdef CONFIG_SEC_DEBUG /* only work for debug level is low */ // if (unlikely(!sec_debug_is_enabled())) sec_kn_register_notifier(&nb_gpio_keys, used_keys, ARRAY_SIZE(used_keys)); +#endif return 0; } diff --git a/drivers/input/touchscreen/stm/fts5cu56a/fts_sec.c b/drivers/input/touchscreen/stm/fts5cu56a/fts_sec.c index 2797ad487738..b6d836bb6bed 100755 --- a/drivers/input/touchscreen/stm/fts5cu56a/fts_sec.c +++ b/drivers/input/touchscreen/stm/fts5cu56a/fts_sec.c @@ -886,7 +886,9 @@ static ssize_t get_lp_dump(struct device *dev, struct device_attribute *attr, ch snprintf(ibuff, sizeof(ibuff), "%03d: %04x%04x%04x%04x%04x\n", i + (info->sponge_dump_event * dump_area), edata[0], edata[1], edata[2], edata[3], edata[4]); +#ifdef CONFIG_SEC_DEBUG sec_tsp_sponge_log(ibuff); +#endif } } diff --git a/drivers/input/touchscreen/stm/fts5cu56a/fts_ts.c b/drivers/input/touchscreen/stm/fts5cu56a/fts_ts.c index f700fd5f7c27..f8a69b1d416b 100755 --- a/drivers/input/touchscreen/stm/fts5cu56a/fts_ts.c +++ b/drivers/input/touchscreen/stm/fts5cu56a/fts_ts.c @@ -3846,7 +3846,9 @@ static void fts_sponge_dump_flush(struct fts_ts_info *info, int dump_area) snprintf(buff, sizeof(buff), "%03d: %04x%04x%04x%04x%04x\n", i + (info->sponge_dump_event * dump_area), edata[0], edata[1], edata[2], edata[3], edata[4]); +#ifdef CONFIG_SEC_DEBUG sec_tsp_sponge_log(buff); +#endif } } diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 1e435803777d..469c30060802 100755 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1742,7 +1742,9 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev) dev_err(smmu->dev, "Took an address size fault. Refusing to recover.\n"); +#ifdef CONFIG_SEC_DEBUG sec_debug_save_smmu_info_asf_fatal(); +#endif BUG(); } @@ -1807,7 +1809,9 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev) dev_err(smmu->dev, "Unhandled arm-smmu context fault!\n"); +#ifdef CONFIG_SEC_DEBUG sec_debug_save_smmu_info_fatal(); +#endif // BUG(); panic("%s SMMU Fault - SID=0x%x", arm_smmu_get_devname(smmu_domain, frsynra), frsynra); } diff --git a/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c b/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c index d26eddd7f1c0..eae79a45afb4 100755 --- a/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c +++ b/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c @@ -392,12 +392,10 @@ int sde_smmu_map_dma_buf(struct dma_buf *dma_buf, *iova = table->sgl->dma_address; *size = table->sgl->dma_length; -#if defined(CONFIG_DISPLAY_SAMSUNG) - if (sec_debug_is_enabled()) - ss_smmu_debug_map(SMMU_NRT_ROTATOR_DEBUG, domain, NULL, table); -#elif defined(CONFIG_DISPLAY_SAMSUNG_LEGO) - if (sec_debug_is_enabled()) - ss_smmu_debug_map(SMMU_NRT_ROTATOR_DEBUG, table); +#if defined(CONFIG_DISPLAY_SAMSUNG) && defined(CONFIG_SEC_DEBUG) + ss_smmu_debug_map(SMMU_NRT_ROTATOR_DEBUG, domain, NULL, table); +#elif defined(CONFIG_DISPLAY_SAMSUNG_LEGO) && defined(CONFIG_SEC_DEBUG) + ss_smmu_debug_map(SMMU_NRT_ROTATOR_DEBUG, table); #endif return 0; } @@ -412,12 +410,12 @@ void sde_smmu_unmap_dma_buf(struct sg_table *table, int domain, return; } +#ifdef CONFIG_SEC_DEBUG #if defined(CONFIG_DISPLAY_SAMSUNG) - if (sec_debug_is_enabled()) - ss_smmu_debug_unmap(SMMU_NRT_ROTATOR_DEBUG, table); + ss_smmu_debug_unmap(SMMU_NRT_ROTATOR_DEBUG, table); #elif defined(CONFIG_DISPLAY_SAMSUNG_LEGO) - if (sec_debug_is_enabled()) - ss_smmu_debug_unmap(SMMU_NRT_ROTATOR_DEBUG, table); + ss_smmu_debug_unmap(SMMU_NRT_ROTATOR_DEBUG, table); +#endif #endif dma_unmap_sg(sde_smmu->dev, table->sgl, table->nents, diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 805a11ef64fa..3956bb01fba9 100755 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -45,7 +45,7 @@ #include #endif -#ifdef CONFIG_SEC_PM_DEBUG +#ifdef CONFIG_SEC_PM #include #endif diff --git a/drivers/power/reset/msm-poweroff.c b/drivers/power/reset/msm-poweroff.c index 2ab3c6d26954..f8a07c66e0db 100755 --- a/drivers/power/reset/msm-poweroff.c +++ b/drivers/power/reset/msm-poweroff.c @@ -382,10 +382,12 @@ static void msm_restart_prepare(const char *cmd) qpnp_pon_set_restart_reason( PON_RESTART_REASON_KEYS_CLEAR); __raw_writel(0x7766550a, restart_reason); +#ifdef CONFIG_SEC_DEBUG } else if (!strncmp(cmd, "cross_fail", 10)) { qpnp_pon_set_restart_reason( PON_RESTART_REASON_CROSS_FAIL); __raw_writel(0x7766550c, restart_reason); +#endif #ifdef CONFIG_SEC_PERIPHERAL_SECURE_CHK } else if (!strcmp(cmd, "peripheral_hw_reset")) { qpnp_pon_set_restart_reason( @@ -400,11 +402,7 @@ static void msm_restart_prepare(const char *cmd) if (!ret) __raw_writel(0x6f656d00 | (code & 0xff), restart_reason); -#ifndef CONFIG_SEC_DEBUG - } else if (!strncmp(cmd, "edl", 3)) { - enable_emergency_dload_mode(); -#endif -#if defined(CONFIG_SEC_ABC) +#if defined(CONFIG_SEC_ABC) && defined(CONFIG_SEC_DEBUG) } else if (!strncmp(cmd, "user_dram_test", 14) && sec_abc_get_enabled()) { qpnp_pon_set_restart_reason(PON_RESTART_REASON_USER_DRAM_TEST); #endif diff --git a/drivers/samsung/debug/sec_crashkey.c b/drivers/samsung/debug/sec_crashkey.c index 30c22bc6cd8f..604f0ee4efd9 100755 --- a/drivers/samsung/debug/sec_crashkey.c +++ b/drivers/samsung/debug/sec_crashkey.c @@ -256,10 +256,11 @@ static int __init sec_crashkey_init(void) { int err; - if (!sec_debug_is_enabled()) +#ifndef CONFIG_SEC_DEBUG key_event_state = &crashkey_user_state; - else +else key_event_state = &crashkey_state; +#endif __sec_crashkey_parse_dt_replace_keymap(); diff --git a/drivers/soc/qcom/subsystem_restart.c b/drivers/soc/qcom/subsystem_restart.c index bb41ebedd349..c4a17b8d0ce9 100755 --- a/drivers/soc/qcom/subsystem_restart.c +++ b/drivers/soc/qcom/subsystem_restart.c @@ -568,8 +568,9 @@ static void notif_timeout_handler(unsigned long data) default: SSR_NOTIF_TIMEOUT_WARN(unknown_err_msg); } - +#ifdef CONFIG_SEC_DEBUG_SUMMARY sec_debug_summary_set_timeout_subsys(timeout_data->source_name, timeout_data->dest_name); +#endif } static void _setup_timeout(struct subsys_desc *source_ss, @@ -1187,12 +1188,14 @@ static void subsystem_restart_wq_func(struct work_struct *work) track->p_state = SUBSYS_RESTARTING; spin_unlock_irqrestore(&track->s_lock, flags); - if (sec_debug_is_enabled()) { +#ifdef CONFIG_SEC_DEBUG + { /* Collect ram dumps for all subsystems in order here */ pr_info("%s: collect ssr ramdump..\n", __func__); for_each_subsys_device(list, count, NULL, subsystem_ramdump); pr_info("%s: ..done\n", __func__); } +#endif for_each_subsys_device(list, count, NULL, subsystem_free_memory); notify_each_subsys_device(list, count, SUBSYS_BEFORE_POWERUP, NULL); @@ -1304,6 +1307,7 @@ int subsystem_restart_dev(struct subsys_device *dev) send_early_notifications(dev->early_notify); +#ifdef CONFIG_SEC_DEBUG if ((sec_debug_summary_is_modem_separate_debug_ssr() == SEC_DEBUG_MODEM_SEPARATE_EN) && strcmp(name, "slpi") @@ -1311,13 +1315,15 @@ int subsystem_restart_dev(struct subsys_device *dev) pr_info("SSR separated by cp magic!!\n"); ssr_enable = sec_debug_is_enabled_for_ssr(); } else +#endif pr_info("SSR by only ap debug level!!\n"); - if (!sec_debug_is_enabled() || (!ssr_enable)) +#ifdef CONFIG_SEC_DEBUG + if (!ssr_enable) dev->restart_level = RESET_SUBSYS_COUPLED; - else +#else dev->restart_level = RESET_SOC; - +#endif if (!strncmp(name, "modem", 5)) { if (silent_ssr) /* qcrtr ioctl force silent ssr */ dev->restart_level = RESET_SUBSYS_COUPLED; diff --git a/init/main.c b/init/main.c index 0d4649c4a949..965d12862f9b 100755 --- a/init/main.c +++ b/init/main.c @@ -1100,7 +1100,7 @@ int __init_or_module do_one_initcall(initcall_t fn) if (initcall_debug) ret = do_one_initcall_debug(fn); -#ifdef CONFIG_SEC_BSP +#if defined(CONFIG_SEC_BSP) && (CONFIG_SEC_BOOTSTAT) else if (initcall_sec_debug) ret = do_one_initcall_sec_debug(fn); #endif diff --git a/kernel/panic.c b/kernel/panic.c index 630340979479..3f8e64ee91f7 100755 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -151,8 +151,10 @@ void panic(const char *fmt, ...) #endif trace_kernel_panic(0); +#ifdef CONFIG_SEC_DEBUG /*To prevent watchdog reset during panic handling. */ emerg_pet_watchdog(); +#endif /* * Disable local interrupts. This will prevent panic_smp_self_stop @@ -184,9 +186,11 @@ void panic(const char *fmt, ...) if (old_cpu != PANIC_CPU_INVALID && old_cpu != this_cpu) panic_smp_self_stop(); +#ifdef CONFIG_SEC_DEBUG sec_debug_sched_msg("!!panic!!"); sec_debug_sched_msg("!!panic!!"); +#endif console_verbose(); bust_spinlocks(1); diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 1aee3ba2b523..9c7b6dcf5a4f 100755 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1564,7 +1564,7 @@ static void __timekeeping_inject_sleeptime(struct timekeeper *tk, tk_debug_account_sleep_time(delta); } -#if IS_ENABLED(CONFIG_SEC_PM) +#ifdef CONFIG_SEC_PM_DEBUG void sec_debug_print_sleep_time(void) { pr_info("PM: Timekeeping suspended for %lld.%03lu seconds\n", diff --git a/lib/bug.c b/lib/bug.c index 9dea23e4483c..519a7b1c9d06 100755 --- a/lib/bug.c +++ b/lib/bug.c @@ -192,7 +192,9 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs) return BUG_TRAP_TYPE_WARN; } +#ifdef CONFIG_SEC_DEBUG sec_debug_store_bug_string(file, line); +#endif printk(KERN_DEFAULT "------------[ cut here ]------------\n");