diff mbox series

[v2,17/19] libpdbg: Drop thread procedures from chipop target

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

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (8b4611b5d8e7e2279fe4aa80c892fcfe10aa398d)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Amitay Isaacs April 7, 2020, 6:16 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 b11b188..69ea9c7 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);
@@ -421,10 +379,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);