diff mbox series

[1/8] libpdbg: Rename get_thread_status to p8_thread_state

Message ID 20201009040001.310868-2-amitay@ozlabs.org
State Accepted
Headers show
Series Fix thread status for sbefifo thread driver | expand

Commit Message

Amitay Isaacs Oct. 9, 2020, 3:59 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/p8chip.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Joel Stanley Oct. 9, 2020, 12:46 p.m. UTC | #1
On Fri, 9 Oct 2020 at 04:00, Amitay Isaacs <amitay@ozlabs.org> wrote:
>
> Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>

Reviewed-by: Joel Stanley <joel@jms.id.au>


> ---
>  libpdbg/p8chip.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c
> index 4179557..d7664b8 100644
> --- a/libpdbg/p8chip.c
> +++ b/libpdbg/p8chip.c
> @@ -172,7 +172,7 @@ static void deassert_special_wakeup(struct core *chip)
>         pib_write(&chip->target, PMSPCWKUPFSP_REG, 0);
>  }
>
> -static struct thread_state get_thread_status(struct thread *thread)
> +static struct thread_state p8_thread_state(struct thread *thread)
>  {
>         uint64_t val, mode_reg;
>         struct thread_state thread_status;
> @@ -302,7 +302,7 @@ static int p8_thread_stop(struct thread *thread)
>         } while (!(val & RAS_STATUS_INST_COMPLETE) &&
>                  !(val & RAS_STATUS_TS_QUIESCE));
>
> -       thread->status = get_thread_status(thread);
> +       thread->status = p8_thread_state(thread);
>
>         return 0;
>  }
> @@ -312,7 +312,7 @@ static int p8_thread_start(struct thread *thread)
>         /* Activate thread */
>         CHECK_ERR(pib_write(&thread->target, DIRECT_CONTROLS_REG, DIRECT_CONTROL_SP_START));
>
> -       thread->status = get_thread_status(thread);
> +       thread->status = p8_thread_state(thread);
>
>         return 0;
>  }
> @@ -462,7 +462,7 @@ static int p8_ram_destroy(struct thread *thread)
>                 pdbg_target_require_parent("core", &thread->target));
>         uint64_t val, ram_mode;
>
> -       if (!(get_thread_status(thread).active)) {
> +       if (!(p8_thread_state(thread).active)) {
>                 /* Mark the RAM thread active so GPRs stick */
>                 CHECK_ERR(pib_read(&chip->target, THREAD_ACTIVE_REG, &val));
>                 val |= PPC_BIT(8) >> thread->id;
> @@ -559,7 +559,7 @@ static int p8_thread_sreset(struct thread *thread)
>
>         if (!(thread->status.active)) {
>                 CHECK_ERR(pib_write(&thread->target, DIRECT_CONTROLS_REG, DIRECT_CONTROL_SP_SRESET));
> -               thread->status = get_thread_status(thread);
> +               thread->status = p8_thread_state(thread);
>
>                 return 0;
>         }
> @@ -590,7 +590,7 @@ static int p8_thread_probe(struct pdbg_target *target)
>         struct thread *thread = target_to_thread(target);
>
>         thread->id = (pdbg_target_address(target, NULL) >> 4) & 0xf;
> -       thread->status = get_thread_status(thread);
> +       thread->status = p8_thread_state(thread);
>
>         return 0;
>  }
> --
> 2.26.2
>
> --
> Pdbg mailing list
> Pdbg@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/pdbg
diff mbox series

Patch

diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c
index 4179557..d7664b8 100644
--- a/libpdbg/p8chip.c
+++ b/libpdbg/p8chip.c
@@ -172,7 +172,7 @@  static void deassert_special_wakeup(struct core *chip)
 	pib_write(&chip->target, PMSPCWKUPFSP_REG, 0);
 }
 
-static struct thread_state get_thread_status(struct thread *thread)
+static struct thread_state p8_thread_state(struct thread *thread)
 {
 	uint64_t val, mode_reg;
 	struct thread_state thread_status;
@@ -302,7 +302,7 @@  static int p8_thread_stop(struct thread *thread)
 	} while (!(val & RAS_STATUS_INST_COMPLETE) &&
 		 !(val & RAS_STATUS_TS_QUIESCE));
 
-	thread->status = get_thread_status(thread);
+	thread->status = p8_thread_state(thread);
 
 	return 0;
 }
@@ -312,7 +312,7 @@  static int p8_thread_start(struct thread *thread)
 	/* Activate thread */
 	CHECK_ERR(pib_write(&thread->target, DIRECT_CONTROLS_REG, DIRECT_CONTROL_SP_START));
 
-	thread->status = get_thread_status(thread);
+	thread->status = p8_thread_state(thread);
 
 	return 0;
 }
@@ -462,7 +462,7 @@  static int p8_ram_destroy(struct thread *thread)
 		pdbg_target_require_parent("core", &thread->target));
 	uint64_t val, ram_mode;
 
-	if (!(get_thread_status(thread).active)) {
+	if (!(p8_thread_state(thread).active)) {
 		/* Mark the RAM thread active so GPRs stick */
 		CHECK_ERR(pib_read(&chip->target, THREAD_ACTIVE_REG, &val));
 		val |= PPC_BIT(8) >> thread->id;
@@ -559,7 +559,7 @@  static int p8_thread_sreset(struct thread *thread)
 
 	if (!(thread->status.active)) {
 		CHECK_ERR(pib_write(&thread->target, DIRECT_CONTROLS_REG, DIRECT_CONTROL_SP_SRESET));
-		thread->status = get_thread_status(thread);
+		thread->status = p8_thread_state(thread);
 
 		return 0;
 	}
@@ -590,7 +590,7 @@  static int p8_thread_probe(struct pdbg_target *target)
 	struct thread *thread = target_to_thread(target);
 
 	thread->id = (pdbg_target_address(target, NULL) >> 4) & 0xf;
-	thread->status = get_thread_status(thread);
+	thread->status = p8_thread_state(thread);
 
 	return 0;
 }