From: Vinod Koul <vkoul@kernel.org>
To: Akhil R <akhilrajeev@nvidia.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Krishna Yarlagadda <kyarlagadda@nvidia.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
Rajesh Gumasta <rgumasta@nvidia.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
Pavan Kunapuli <pkunapuli@nvidia.com>
Subject: Re: [PATCH v20 2/2] dmaengine: tegra: Add tegra gpcdma driver
Date: Thu, 24 Feb 2022 10:08:57 +0530 [thread overview]
Message-ID: <YhcL4fBYEWo7kpIS@matsya> (raw)
In-Reply-To: <DM5PR12MB1850C245826D8229E63141A0C03D9@DM5PR12MB1850.namprd12.prod.outlook.com>
On 24-02-22, 04:23, Akhil R wrote:
> > On Wed, Feb 23, 2022 at 03:49:09AM +0000, Akhil R wrote:
> > > I am getting notification for the below warning also.
> > >
> > > >> drivers/dma/tegra186-gpc-dma.c:898:53: warning: shift count >= width of
> > type [-Wshift-count-overflow]
> > > FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >>
> > 32));
> > > https://lore.kernel.org/all/202202230559.bLOEMEUh-lkp@intel.com/
> > >
> > > I suppose, this is because it is compiled against a different ARCH other than
> > arm64.
> > > For arm64, the dma_addr_t is 64 bytes, and this warning does not occur.
> > > Could this be ignored for now? If not, could you suggest a fix, if possible?
> >
> > I am not really familiar with the DMA API and dma_addr_t so I am not
> > sure about a proper fix.
> >
> > You could cast dest to u64 to guarantee it is a type that can be shifted
> > by 32 but that might not be right for CONFIG_PHYS_ADDR_T_64BIT=n. If the
> > driver is not expected to run without CONFIG_PHYS_ADDR_T_64BIT, then
> > this is probably fine.
> >
> > You could mark this driver 'depends on PHYS_ADDR_T_64BIT' if it cannot
> > run with CONFIG_ARCH_TEGRA=y + CONFIG_PHYS_ADDR_T_64BIT=n but I do
> > not
> > see any other drivers that do that, which might mean that is not a
> > proper fix.
> >
> > Please do not ignore the warning, as it will show up with ARCH=arm
> > allmodconfig, which has -Werror enabled.
> I see some drivers using 'depends on ARM64'. I guess probably we could
> use that to avoid this warning. The driver is only supported for arm64 Tegra
> systems as of now.
dma_addr_t can be different on different arch so yes this 'can'
overflow, but since this driver would never be used on non ARM64, make
sense to put depends.
--
~Vinod
next prev parent reply other threads:[~2022-02-24 4:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 15:39 [PATCH v20 0/2] Add NVIDIA Tegra GPC-DMA driver Akhil R
2022-02-21 15:39 ` [PATCH v20 1/2] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2022-02-21 15:39 ` [PATCH v20 2/2] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2022-02-22 4:59 ` kernel test robot
2022-02-22 15:31 ` Nathan Chancellor
2022-02-23 3:49 ` Akhil R
2022-02-23 18:43 ` Nathan Chancellor
2022-02-24 4:23 ` Akhil R
2022-02-24 4:38 ` Vinod Koul [this message]
2022-02-22 21:38 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YhcL4fBYEWo7kpIS@matsya \
--to=vkoul@kernel.org \
--cc=akhilrajeev@nvidia.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=kyarlagadda@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=pkunapuli@nvidia.com \
--cc=rgumasta@nvidia.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.