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

Commit e42320ce authored by Matt Wagantall's avatar Matt Wagantall Committed by Runmin Wang
Browse files

arm64: Dump memory surrounding PC, LR and SP registers only



Due to the verbosity of printing, dumping memory regions for all
register when many CPUs are online may contribute to flooded kernel
logs. Spinlock lockups due to the printing have also been seen to
result, compounding the problem due to additional prints.

Change-Id: I7440b2d77f03fd34f36816f549588fa89322ce5f
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
Signed-off-by: default avatarAbhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: default avatarKyle Yan <kyan@codeaurora.org>
parent 7e7c6637
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -219,18 +219,12 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
static void show_extra_register_data(struct pt_regs *regs, int nbytes)
{
	mm_segment_t fs;
	unsigned int i;

	fs = get_fs();
	set_fs(KERNEL_DS);
	show_data(regs->pc - nbytes, nbytes * 2, "PC");
	show_data(regs->regs[30] - nbytes, nbytes * 2, "LR");
	show_data(regs->sp - nbytes, nbytes * 2, "SP");
	for (i = 0; i < 30; i++) {
		char name[4];
		snprintf(name, sizeof(name), "X%u", i);
		show_data(regs->regs[i] - nbytes, nbytes * 2, name);
	}
	set_fs(fs);
}