Skip to content
Snippets Groups Projects
Commit 59820c18 authored by Matthias Welwarsky's avatar Matthias Welwarsky Committed by Paul Fertser
Browse files

arm_dpm: avoid duplicating the register cache


This bug was already attempted to fix in an earlier patch but
merging the "defer-examine" feature caused a regression, which this patch
tries to fix again.

Change-Id: Ie1ad1516f0d7f130d44e003d6c29dcc1a02a82ca
Signed-off-by: default avatarMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Reviewed-on: http://openocd.zylin.com/3951


Tested-by: jenkins
Reviewed-by: default avatarPaul Fertser <fercerpav@gmail.com>
parent 1c4aa20b
Branches
Tags
No related merge requests found
......@@ -972,11 +972,14 @@ int arm_dpm_setup(struct arm_dpm *dpm)
arm->read_core_reg = arm_dpm_read_core_reg;
arm->write_core_reg = arm_dpm_write_core_reg;
/* avoid duplicating the register cache */
if (arm->core_cache == NULL) {
cache = arm_build_reg_cache(target, arm);
if (!cache)
return ERROR_FAIL;
*register_get_last_cache_p(&target->reg_cache) = cache;
}
/* coprocessor access setup */
arm->mrc = dpm_mrc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment