[PATCH v2 3/5] dmaengine: sun6i: Add 4 as a possible burst value

Jean-Francois Moine moinejf at free.fr
Fri Mar 18 09:54:57 PDT 2016


On Fri, 18 Mar 2016 16:09:46 +0100
Maxime Ripard <maxime.ripard at free-electrons.com> wrote:

> On Fri, Mar 11, 2016 at 05:28:58PM +0100, Jean-Francois Moine wrote:
	[snip]
> > Do you think that we should also check if the requested ports are
> > valid, i.e. have a list/bitmap of the possible input/output ports per
> > SoC, instead of just only the ID of the max port?
> 
> That would require having a map of the possible endpoints for a given
> device, which would be quite difficult to accomplish.
> 
> I don't think customer drivers have access to that anyway, only the
> provider driver is parsing the DT to retrieve the ID. And we already
> trust the DT for so many things it would be a bit pointless to check
> that.

The ports are already checked against 'nr_max_requests' which is the
index of the higher port. I think that this check exists because the
ports are given by the DMA clients.

If this check is needed, as 'nr_max_requests' is lower than 32, 2 maps
(in and out) on 32 bits would do the job.
If this check is not needed (because we trust the DTs), the actual
check (port <= nr_max_requests) could be removed.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/




More information about the linux-arm-kernel mailing list