target/riscv: Remove unused riscv013_on_halt function
The riscv013_on_halt function was being called but its implementation was empty, providing no additional functionality. Removed the function declaration, calls to it, and its implementation since it is not required. Change-Id: I425ea890deadeec945f0a47af247f3f99172e801 Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
parent
2d4c53b338
commit
2a64da39b0
|
@ -44,7 +44,6 @@ static int riscv013_halt_prep(struct target *target);
|
|||
static int riscv013_halt_go(struct target *target);
|
||||
static int riscv013_resume_go(struct target *target);
|
||||
static int riscv013_step_current_hart(struct target *target);
|
||||
static int riscv013_on_halt(struct target *target);
|
||||
static int riscv013_on_step(struct target *target);
|
||||
static int riscv013_resume_prep(struct target *target);
|
||||
static enum riscv_halt_reason riscv013_halt_reason(struct target *target);
|
||||
|
@ -2476,7 +2475,6 @@ static int init_target(struct command_context *cmd_ctx,
|
|||
generic_info->get_hart_state = &riscv013_get_hart_state;
|
||||
generic_info->resume_go = &riscv013_resume_go;
|
||||
generic_info->step_current_hart = &riscv013_step_current_hart;
|
||||
generic_info->on_halt = &riscv013_on_halt;
|
||||
generic_info->resume_prep = &riscv013_resume_prep;
|
||||
generic_info->halt_prep = &riscv013_halt_prep;
|
||||
generic_info->halt_go = &riscv013_halt_go;
|
||||
|
@ -4502,11 +4500,6 @@ static int riscv013_on_step(struct target *target)
|
|||
return riscv013_on_step_or_resume(target, true);
|
||||
}
|
||||
|
||||
static int riscv013_on_halt(struct target *target)
|
||||
{
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static enum riscv_halt_reason riscv013_halt_reason(struct target *target)
|
||||
{
|
||||
riscv_reg_t dcsr;
|
||||
|
|
|
@ -2752,8 +2752,6 @@ static int riscv_poll_hart(struct target *target, enum riscv_next_action *next_a
|
|||
}
|
||||
}
|
||||
|
||||
r->on_halt(target);
|
||||
|
||||
/* We shouldn't do the callbacks yet. What if
|
||||
* there are multiple harts that halted at the
|
||||
* same time? We need to set debug reason on each
|
||||
|
@ -4538,7 +4536,6 @@ static int riscv_step_rtos_hart(struct target *target)
|
|||
r->on_step(target);
|
||||
if (r->step_current_hart(target) != ERROR_OK)
|
||||
return ERROR_FAIL;
|
||||
r->on_halt(target);
|
||||
if (target->state != TARGET_HALTED) {
|
||||
LOG_ERROR("Hart was not halted after single step!");
|
||||
return ERROR_FAIL;
|
||||
|
|
|
@ -193,7 +193,6 @@ struct riscv_info {
|
|||
* was resumed. */
|
||||
int (*resume_go)(struct target *target);
|
||||
int (*step_current_hart)(struct target *target);
|
||||
int (*on_halt)(struct target *target);
|
||||
/* Get this target as ready as possible to resume, without actually
|
||||
* resuming. */
|
||||
int (*resume_prep)(struct target *target);
|
||||
|
|
Loading…
Reference in New Issue