Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d832036b authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "defconfig: sdxlemur: Enable configs for minidump"

parents dfcaefd7 9e798cb6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -342,6 +342,8 @@ CONFIG_QCOM_EUD=y
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE=y
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE_DEFAULT=y
CONFIG_POWER_RESET_QCOM_REBOOT_REASON=y
CONFIG_POWER_RESET_MSM=y
CONFIG_QCOM_MINIDUMP=y
CONFIG_ENABLE_SFE=y
# CONFIG_ENABLE_VMALLOC_SAVING is not set
# CONFIG_SLUB_DEBUG is not set
+6 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/cache.h>
@@ -191,9 +191,11 @@ static void __init register_kernel_sections(void)
	struct md_region ksec_entry;
	char *data_name = "KDATABSS";
	char *rodata_name = "KROAIDATA";
#ifdef CONFIG_SMP
	const size_t static_size = __per_cpu_end - __per_cpu_start;
	void __percpu *base = (void __percpu *)__per_cpu_start;
	unsigned int cpu;
#endif

	strlcpy(ksec_entry.name, data_name, sizeof(ksec_entry.name));
	ksec_entry.virt_addr = (uintptr_t)_sdata;
@@ -209,6 +211,7 @@ static void __init register_kernel_sections(void)
	if (msm_minidump_add_region(&ksec_entry) < 0)
		pr_err("Failed to add rodata section in Minidump\n");

#ifdef CONFIG_SMP
	/* Add percpu static sections */
	for_each_possible_cpu(cpu) {
		void *start = per_cpu_ptr(base, cpu);
@@ -222,6 +225,7 @@ static void __init register_kernel_sections(void)
		if (msm_minidump_add_region(&ksec_entry) < 0)
			pr_err("Failed to add percpu sections in Minidump\n");
	}
#endif
}

static inline bool in_stack_range(
@@ -264,7 +268,7 @@ void dump_stack_minidump(u64 sp)

	is_vmap_stack = IS_ENABLED(CONFIG_VMAP_STACK);

	if (sp < KIMAGE_VADDR || sp > -256UL)
	if (sp < MODULES_END || sp > -256UL)
		sp = current_stack_pointer;

	/*