diff mbox series

[6/8] libpdbg: Implement state method for sbefifo thread

Message ID 20201009040001.310868-7-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
Currently only p9 is supported for sbefifo thread.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/sbefifo.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Joel Stanley Oct. 9, 2020, 12:47 p.m. UTC | #1
On Fri, 9 Oct 2020 at 04:01, Amitay Isaacs <amitay@ozlabs.org> wrote:
>
> Currently only p9 is supported for sbefifo thread.
>
> Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>

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


> ---
>  libpdbg/sbefifo.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
> index 9d68853..8c9f467 100644
> --- a/libpdbg/sbefifo.c
> +++ b/libpdbg/sbefifo.c
> @@ -25,6 +25,7 @@
>  #include "hwunit.h"
>  #include "debug.h"
>  #include "sprs.h"
> +#include "chip.h"
>
>  static int sbefifo_op_getmem(struct mem *sbefifo_mem,
>                              uint64_t addr, uint8_t *data, uint64_t size,
> @@ -320,6 +321,11 @@ static int sbefifo_thread_op(struct thread *thread, uint32_t oper)
>                                     mode);
>  }
>
> +static struct thread_state sbefifo_thread_state(struct thread *thread)
> +{
> +       return p9_thread_state(thread);
> +}
> +
>  static int sbefifo_thread_start(struct thread *thread)
>  {
>         return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START);
> @@ -714,6 +720,7 @@ static struct thread sbefifo_thread = {
>                 .probe = sbefifo_thread_probe,
>                 .release = sbefifo_thread_release,
>         },
> +       .state = sbefifo_thread_state,
>         .start = sbefifo_thread_start,
>         .stop = sbefifo_thread_stop,
>         .step = sbefifo_thread_step,
> --
> 2.26.2
>
> --
> Pdbg mailing list
> Pdbg@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/pdbg
diff mbox series

Patch

diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
index 9d68853..8c9f467 100644
--- a/libpdbg/sbefifo.c
+++ b/libpdbg/sbefifo.c
@@ -25,6 +25,7 @@ 
 #include "hwunit.h"
 #include "debug.h"
 #include "sprs.h"
+#include "chip.h"
 
 static int sbefifo_op_getmem(struct mem *sbefifo_mem,
 			     uint64_t addr, uint8_t *data, uint64_t size,
@@ -320,6 +321,11 @@  static int sbefifo_thread_op(struct thread *thread, uint32_t oper)
 				    mode);
 }
 
+static struct thread_state sbefifo_thread_state(struct thread *thread)
+{
+	return p9_thread_state(thread);
+}
+
 static int sbefifo_thread_start(struct thread *thread)
 {
 	return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START);
@@ -714,6 +720,7 @@  static struct thread sbefifo_thread = {
 		.probe = sbefifo_thread_probe,
 		.release = sbefifo_thread_release,
 	},
+	.state = sbefifo_thread_state,
 	.start = sbefifo_thread_start,
 	.stop = sbefifo_thread_stop,
 	.step = sbefifo_thread_step,