mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "soc: qcom: Add rodata section dump in minidump"
This commit is contained in:
commit
b60ed81b16
1 changed files with 8 additions and 0 deletions
|
|
@ -190,6 +190,7 @@ static void __init register_kernel_sections(void)
|
|||
{
|
||||
struct md_region ksec_entry;
|
||||
char *data_name = "KDATABSS";
|
||||
char *rodata_name = "KROAIDATA";
|
||||
const size_t static_size = __per_cpu_end - __per_cpu_start;
|
||||
void __percpu *base = (void __percpu *)__per_cpu_start;
|
||||
unsigned int cpu;
|
||||
|
|
@ -201,6 +202,13 @@ static void __init register_kernel_sections(void)
|
|||
if (msm_minidump_add_region(&ksec_entry) < 0)
|
||||
pr_err("Failed to add data section in Minidump\n");
|
||||
|
||||
strlcpy(ksec_entry.name, rodata_name, sizeof(ksec_entry.name));
|
||||
ksec_entry.virt_addr = (uintptr_t)__start_ro_after_init;
|
||||
ksec_entry.phys_addr = virt_to_phys(__start_ro_after_init);
|
||||
ksec_entry.size = roundup((__end_ro_after_init - __start_ro_after_init), 4);
|
||||
if (msm_minidump_add_region(&ksec_entry) < 0)
|
||||
pr_err("Failed to add rodata section in Minidump\n");
|
||||
|
||||
/* Add percpu static sections */
|
||||
for_each_possible_cpu(cpu) {
|
||||
void *start = per_cpu_ptr(base, cpu);
|
||||
|
|
|
|||
Loading…
Reference in a new issue