diff mbox series

[v3,22/25] libpdbg: Drop thread procedures from chipop target

Message ID 20200417070749.276754-23-amitay@ozlabs.org
State Superseded
Headers show
Series Add sbefifo backend | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (6ae2ba655ca5e24b403a33bf15dff7261d3e7052)
snowpatch_ozlabs/build-multiarch success Test build-multiarch on branch master

Commit Message

Amitay Isaacs April 17, 2020, 7:07 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/hwunit.h  |  4 ----
 libpdbg/sbefifo.c | 46 ----------------------------------------------
 2 files changed, 50 deletions(-)
diff mbox series

Patch

diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h
index 318a611..de929da 100644
--- a/libpdbg/hwunit.h
+++ b/libpdbg/hwunit.h
@@ -75,10 +75,6 @@  struct chipop {
 	int (*istep)(struct chipop *, uint32_t major, uint32_t minor);
 	int (*mpipl_enter)(struct chipop *);
 	int (*mpipl_continue)(struct chipop *);
-	int (*thread_start)(struct chipop *, uint32_t core_id, uint32_t thread_id);
-	int (*thread_stop)(struct chipop *, uint32_t core_id, uint32_t thread_id);
-	int (*thread_step)(struct chipop *, uint32_t core_id, uint32_t thread_id);
-	int (*thread_sreset)(struct chipop *, uint32_t core_id, uint32_t thread_id);
 };
 #define target_to_chipop(x) container_of(x, struct chipop, target)
 
diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
index 2d903e7..77a0f26 100644
--- a/libpdbg/sbefifo.c
+++ b/libpdbg/sbefifo.c
@@ -195,48 +195,6 @@  static int sbefifo_op_mpipl_enter(struct chipop *chipop)
 	return sbefifo_mpipl_enter(sctx);
 }
 
-static int sbefifo_op_control(struct chipop *chipop,
-			      uint32_t core_id, uint32_t thread_id,
-			      uint32_t oper)
-{
-	struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent);
-	struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo);
-	uint8_t mode = 0;
-
-	/* Enforce special-wakeup for thread stop and sreset */
-	if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP ||
-	    (oper & 0xf) == SBEFIFO_INSN_OP_SRESET)
-		mode = 0x2;
-
-	PR_NOTICE("sbefifo: control c:0x%x, t:0x%x, op:%u mode:%u\n", core_id, thread_id, oper, mode);
-
-	return sbefifo_control_insn(sctx, core_id & 0xff, thread_id & 0xff, oper & 0xff, mode);
-}
-
-static int sbefifo_op_thread_start(struct chipop *chipop,
-				   uint32_t core_id, uint32_t thread_id)
-{
-	return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_START);
-}
-
-static int sbefifo_op_thread_stop(struct chipop *chipop,
-				  uint32_t core_id, uint32_t thread_id)
-{
-	return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STOP);
-}
-
-static int sbefifo_op_thread_step(struct chipop *chipop,
-				  uint32_t core_id, uint32_t thread_id)
-{
-	return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STEP);
-}
-
-static int sbefifo_op_thread_sreset(struct chipop *chipop,
-				    uint32_t core_id, uint32_t thread_id)
-{
-	return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET);
-}
-
 static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val)
 {
 	struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent);
@@ -423,10 +381,6 @@  static struct chipop sbefifo_chipop = {
 	.istep = sbefifo_op_istep,
 	.mpipl_enter = sbefifo_op_mpipl_enter,
 	.mpipl_continue = sbefifo_op_mpipl_continue,
-	.thread_start = sbefifo_op_thread_start,
-	.thread_stop = sbefifo_op_thread_stop,
-	.thread_step = sbefifo_op_thread_step,
-	.thread_sreset = sbefifo_op_thread_sreset,
 };
 DECLARE_HW_UNIT(sbefifo_chipop);