@@ -591,6 +591,8 @@ static int dmi_op_timeout(struct target *target, uint32_t *data_in,
591591 return ERROR_FAIL ;
592592 }
593593
594+ keep_alive ();
595+
594596 time_t start = time (NULL );
595597 /* This first loop performs the request. Note that if for some reason this
596598 * stays busy, it is actually due to the previous access. */
@@ -1307,8 +1309,6 @@ static int register_write_direct(struct target *target, unsigned number,
13071309 LOG_DEBUG ("{%d} %s <- 0x%" PRIx64 , riscv_current_hartid (target ),
13081310 gdb_regno_name (number ), value );
13091311
1310- keep_alive ();
1311-
13121312 int result = register_write_abstract (target , number , value ,
13131313 register_size (target , number ));
13141314 if (result == ERROR_OK || !has_sufficient_progbuf (target , 2 ) ||
@@ -2730,6 +2730,7 @@ static int read_memory_bus_v1(struct target *target, target_addr_t address,
27302730 next_read );
27312731 return ERROR_FAIL ;
27322732 }
2733+ keep_alive ();
27332734 dmi_status_t status = dmi_scan (target , NULL , & value ,
27342735 DMI_OP_READ , sbdata [j ], 0 , false);
27352736 if (status == DMI_STATUS_BUSY )
@@ -2745,7 +2746,6 @@ static int read_memory_bus_v1(struct target *target, target_addr_t address,
27452746 }
27462747 next_read = address + i * size + j * 4 ;
27472748 }
2748- keep_alive ();
27492749 }
27502750
27512751 uint32_t sbcs_read = 0 ;
@@ -3507,7 +3507,6 @@ static int read_memory_progbuf(struct target *target, target_addr_t address,
35073507 uint8_t * buffer_i = buffer ;
35083508
35093509 for (uint32_t i = 0 ; i < count ; i ++ , address_i += increment , buffer_i += size ) {
3510- keep_alive ();
35113510 /* TODO: This is much slower than it needs to be because we end up
35123511 * writing the address to read for every word we read. */
35133512 result = read_memory_progbuf_inner (target , address_i , size , count_i , buffer_i , increment );
0 commit comments