Message ID | 20200421041655.82856-17-amitay@ozlabs.org |
---|---|
State | Superseded |
Headers | show |
Series | Add sbefifo backend | expand |
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 |
Reviewed-by: Alistair Popple <alistair@popple.id.au> On Tuesday, 21 April 2020 2:16:52 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> > --- > libpdbg/hwunit.h | 4 ---- > libpdbg/sbefifo.c | 46 ---------------------------------------------- > 2 files changed, 50 deletions(-) > > diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h > index f5a7dff..c30c048 100644 > --- a/libpdbg/hwunit.h > +++ b/libpdbg/hwunit.h > @@ -76,10 +76,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 935a891..3b2a786 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 struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) > { > struct pdbg_target *target; > @@ -441,10 +399,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);
diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index f5a7dff..c30c048 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -76,10 +76,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 935a891..3b2a786 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 struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) { struct pdbg_target *target; @@ -441,10 +399,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);
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> --- libpdbg/hwunit.h | 4 ---- libpdbg/sbefifo.c | 46 ---------------------------------------------- 2 files changed, 50 deletions(-)