Thread (21 messages) 21 messages, 4 authors, 2020-05-14

Re: [PATCH RFC 1/8] dmaengine: Actions: get rid of bit fields from dma descriptor

From: Manivannan Sadhasivam <hidden>
Date: 2020-05-11 11:21:54
Also in: dmaengine

On Mon, May 11, 2020 at 04:15:57PM +0530, Amit Tomer wrote:
Hi

Thanks for the reply.
quoted
I'm in favor of getting rid of bitfields due to its not so defined way of
working (and forgive me for using it in first place) but I don't quite like
the current approach.
Because , its less readable the way we are writing to those different fields ?
But this can be made more verbose by adding some comments around .
I don't like the way the hw linked lists are accessed (using an array with
enums).
quoted
Rather I'd like to have custom bitmasks (S900/S700/S500?) for writing to those
fields.
I think S900 and S500 are same as pointed out by Cristian. and I didn't get by
creating custom bitmasks for it ?

Did you mean function like:

lli->hw[OWL_DMADESC_FLEN]= llc_hw_FLEN(len, FCNT_VALUE, FCNT_SHIFT);
I meant to keep using old struct for accessing the linked list and replacing
bitfields with masks as below:

struct owl_dma_lli_hw {
	...
        u32     flen;
        u32     fcnt;
	...
};

hw->flen = len & OWL_S900_DMA_FLEN_MASK;
hw->fcnt = 1 & OWL_S900_DMA_FCNT_MASK;

Then you can use different masks for S700/S900 based on the compatible.

Thanks,
Mani
Thanks
-Amit
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help