Merge pull request #961 from en-sc/en-sc/coreid-target-riscv

target/riscv: clarify usage of `coreid`
This commit is contained in:
Tim Newsome 2023-11-13 09:45:58 -08:00 committed by GitHub
commit 6de536bbb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -2114,11 +2114,11 @@ static int examine(struct target *target)
if (set_group(target, &info->haltgroup_supported, target->smp, HALT_GROUP) != ERROR_OK) if (set_group(target, &info->haltgroup_supported, target->smp, HALT_GROUP) != ERROR_OK)
return ERROR_FAIL; return ERROR_FAIL;
if (info->haltgroup_supported) if (info->haltgroup_supported)
LOG_TARGET_INFO(target, "Core %d made part of halt group %d.", target->coreid, LOG_TARGET_INFO(target, "Core %d made part of halt group %d.", info->index,
target->smp); target->smp);
else else
LOG_TARGET_INFO(target, "Core %d could not be made part of halt group %d.", LOG_TARGET_INFO(target, "Core %d could not be made part of halt group %d.",
target->coreid, target->smp); info->index, target->smp);
} }
/* Some regression suites rely on seeing 'Examined RISC-V core' to know /* Some regression suites rely on seeing 'Examined RISC-V core' to know
@ -4742,7 +4742,7 @@ static int select_prepped_harts(struct target *target)
struct riscv_info *info = riscv_info(t); struct riscv_info *info = riscv_info(t);
riscv013_info_t *info_013 = get_info(t); riscv013_info_t *info_013 = get_info(t);
unsigned int index = info_013->index; unsigned int index = info_013->index;
LOG_TARGET_DEBUG(target, "index=%d, coreid=%d, prepped=%d", index, t->coreid, info->prepped); LOG_TARGET_DEBUG(target, "index=%d, prepped=%d", index, info->prepped);
if (info->prepped) { if (info->prepped) {
info_013->selected = true; info_013->selected = true;
hawindow[index / 32] |= 1 << (index % 32); hawindow[index / 32] |= 1 << (index % 32);
@ -4913,7 +4913,7 @@ static enum riscv_halt_reason riscv013_halt_reason(struct target *target)
* already set when we connected. Force enumeration now, which has the * already set when we connected. Force enumeration now, which has the
* side effect of clearing any triggers we did not set. */ * side effect of clearing any triggers we did not set. */
riscv_enumerate_triggers(target); riscv_enumerate_triggers(target);
LOG_TARGET_DEBUG(target, "Coreid: [%d] halted because of trigger", target->coreid); LOG_TARGET_DEBUG(target, "halted because of trigger");
return RISCV_HALT_TRIGGER; return RISCV_HALT_TRIGGER;
case CSR_DCSR_CAUSE_STEP: case CSR_DCSR_CAUSE_STEP:
return RISCV_HALT_SINGLESTEP; return RISCV_HALT_SINGLESTEP;

View File

@ -1961,7 +1961,7 @@ int riscv_halt(struct target *target)
static int riscv_assert_reset(struct target *target) static int riscv_assert_reset(struct target *target)
{ {
LOG_TARGET_DEBUG(target, "coreid: [%d]", target->coreid); LOG_TARGET_DEBUG(target, "");
struct target_type *tt = get_target_type(target); struct target_type *tt = get_target_type(target);
if (!tt) if (!tt)
return ERROR_FAIL; return ERROR_FAIL;
@ -1971,7 +1971,7 @@ static int riscv_assert_reset(struct target *target)
static int riscv_deassert_reset(struct target *target) static int riscv_deassert_reset(struct target *target)
{ {
LOG_TARGET_DEBUG(target, "coreid: [%d]", target->coreid); LOG_TARGET_DEBUG(target, "");
struct target_type *tt = get_target_type(target); struct target_type *tt = get_target_type(target);
if (!tt) if (!tt)
return ERROR_FAIL; return ERROR_FAIL;