Re: [PATCH] dmaengine: update dma_slave_caps src/dstn_addr_widths size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Donnerstag, 12. Oktober 2017 16:17:45 CEST Vinod Koul wrote:
> The src/dstn_addr_widths in dma_slave_caps are 32bits which doesn't
> allow us to describe widths of larger size as src/dstn_addr_widths
> are expressed as BIT().
> 
> So extend the size of this to 64bits.
> 
> Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx>
> ---
>  include/linux/dmaengine.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index 8319101170fc..6803614dbf7c 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -420,8 +420,8 @@ enum dma_residue_granularity {
>   * resubmitted multiple times
>   */
>  struct dma_slave_caps {
> -	u32 src_addr_widths;
> -	u32 dst_addr_widths;
> +	u64 src_addr_widths;
> +	u64 dst_addr_widths;

You are aware this still overflows for BIT(DMA_SLAVE_BUSWIDTH_64_BYTES), i.e. 
BIT(64)?

DMA_SLAVE_BUSWIDTH_64_BYTES is defined here:
http://elixir.free-electrons.com/linux/v4.14-rc4/source/include/linux/
dmaengine.h#L313

Probably change it to DECLARE_BITMAP(src_addr_widths, 
DMA_SLAVE_BUSWIDTH_MAX_BYTES), with DMA_SLAVE_BUSWIDTH_MAX_BYTES = 
DMA_SLAVE_BUSWIDTH_64_BYTES?

Kind regards,

Stefan
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux