diff mbox series

[5/8] libpdbg: Expose p9_thread_state method

Message ID 20201009040001.310868-6-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
This will be used by sbefifo thread to update thread status.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/chip.h   | 2 ++
 libpdbg/p9chip.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Joel Stanley Oct. 9, 2020, 12:47 p.m. UTC | #1
On Fri, 9 Oct 2020 at 04:00, Amitay Isaacs <amitay@ozlabs.org> wrote:
>
> This will be used by sbefifo thread to update thread status.
>
> Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>

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


> ---
>  libpdbg/chip.h   | 2 ++
>  libpdbg/p9chip.c | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libpdbg/chip.h b/libpdbg/chip.h
> index 6856c64..11e8e8b 100644
> --- a/libpdbg/chip.h
> +++ b/libpdbg/chip.h
> @@ -43,4 +43,6 @@ int ram_putmsr(struct thread *thread, uint64_t value);
>  int ram_getcr(struct thread *thread, uint32_t *value);
>  int ram_putcr(struct thread *thread, uint32_t value);
>
> +struct thread_state p9_thread_state(struct thread *thread);
> +
>  #endif
> diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
> index 05cce7f..d8187ce 100644
> --- a/libpdbg/p9chip.c
> +++ b/libpdbg/p9chip.c
> @@ -90,7 +90,7 @@ static uint64_t thread_write(struct thread *thread, uint64_t addr, uint64_t data
>         return pib_write(chip, addr, data);
>  }
>
> -static struct thread_state p9_thread_state(struct thread *thread)
> +struct thread_state p9_thread_state(struct thread *thread)
>  {
>         uint64_t value;
>         struct thread_state thread_state;
> --
> 2.26.2
>
> --
> Pdbg mailing list
> Pdbg@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/pdbg
diff mbox series

Patch

diff --git a/libpdbg/chip.h b/libpdbg/chip.h
index 6856c64..11e8e8b 100644
--- a/libpdbg/chip.h
+++ b/libpdbg/chip.h
@@ -43,4 +43,6 @@  int ram_putmsr(struct thread *thread, uint64_t value);
 int ram_getcr(struct thread *thread, uint32_t *value);
 int ram_putcr(struct thread *thread, uint32_t value);
 
+struct thread_state p9_thread_state(struct thread *thread);
+
 #endif
diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
index 05cce7f..d8187ce 100644
--- a/libpdbg/p9chip.c
+++ b/libpdbg/p9chip.c
@@ -90,7 +90,7 @@  static uint64_t thread_write(struct thread *thread, uint64_t addr, uint64_t data
 	return pib_write(chip, addr, data);
 }
 
-static struct thread_state p9_thread_state(struct thread *thread)
+struct thread_state p9_thread_state(struct thread *thread)
 {
 	uint64_t value;
 	struct thread_state thread_state;