[Pdbg] [PATCH v2 4/4] sbefifo: Always use ADU for memory access

Amitay Isaacs amitay at ozlabs.org
Mon Sep 23 15:21:53 AEST 2019


On Mon, 2019-09-23 at 11:48 +1000, Alistair Popple wrote:
> Hi Amitay,
> 
> Are patches 1-4 different from what you posted previously? I'd
> already taken 
> the sbefifo ones so hoping I can just ignore these.
> 
> - Alistair

I didn't realize those patches were still sitting in the directory when
I sent the system device tree patches.  Those are the same versions
that have been merged.

Amitay.

> 
> On Friday, 20 September 2019 3:16:33 PM AEST Amitay Isaacs wrote:
> > Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> > ---
> >  libpdbg/sbefifo.c | 14 ++++++--------
> >  1 file changed, 6 insertions(+), 8 deletions(-)
> > 
> > diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
> > index 638e28c..030e6e9 100644
> > --- a/libpdbg/sbefifo.c
> > +++ b/libpdbg/sbefifo.c
> > @@ -49,7 +49,7 @@ static int sbefifo_op_getmem(struct mem
> > *sbefifo_mem,
> >  	uint16_t flags;
> >  	int rc;
> >  
> > -	align = ci ? 8 : 128;
> > +	align = 8;
> >  
> >  	if (block_size && block_size != 8) {
> >  		PR_ERROR("sbefifo: Only 8 byte block sizes are
> > supported\n");
> > @@ -70,10 +70,9 @@ static int sbefifo_op_getmem(struct mem
> > *sbefifo_mem,
> >  	PR_NOTICE("sbefifo: getmem addr=0x%016" PRIx64 ", len=%u\n",
> >  		  start_addr, len);
> >  
> > +	flags = SBEFIFO_MEMORY_FLAG_PROC;
> >  	if (ci)
> > -		flags = SBEFIFO_MEMORY_FLAG_PROC |
> > SBEFIFO_MEMORY_FLAG_CI;
> > -	else
> > -		flags = SBEFIFO_MEMORY_FLAG_PBA;
> > +		flags |= SBEFIFO_MEMORY_FLAG_CI;
> >  
> >  	rc = sbefifo_mem_get(sbefifo->sf_ctx, start_addr, len, flags,
> > &out);
> >  
> > @@ -97,7 +96,7 @@ static int sbefifo_op_putmem(struct mem
> > *sbefifo_mem,
> >  	uint16_t flags;
> >  	int rc;
> >  
> > -	align = ci ? 8 : 128;
> > +	align = 8;
> >  
> >  	if (block_size && block_size != 8) {
> >  		PR_ERROR("sbefifo: Only 8 byte block sizes are
> > supported\n");
> > @@ -123,10 +122,9 @@ static int sbefifo_op_putmem(struct mem
> > *sbefifo_mem,
> >  
> >  	PR_NOTICE("sbefifo: putmem addr=0x%016"PRIx64", len=%u\n",
> > addr, len);
> >  
> > +	flags = SBEFIFO_MEMORY_FLAG_PROC;
> >  	if (ci)
> > -		flags = SBEFIFO_MEMORY_FLAG_PROC |
> > SBEFIFO_MEMORY_FLAG_CI;
> > -	else
> > -		flags = SBEFIFO_MEMORY_FLAG_PBA;
> > +		flags |= SBEFIFO_MEMORY_FLAG_CI;
> >  
> >  	rc = sbefifo_mem_put(sbefifo->sf_ctx, addr, data, len, flags);
> >  
> > 
> 
> 
> 

Amitay.
-- 

Prefer a loss to a dishonest gain; the one brings pain at the moment, the
other for all time. - Chilton



More information about the Pdbg mailing list