[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MWHPR21MB1593B68BFCFC1AF8F39345ECD72C9@MWHPR21MB1593.namprd21.prod.outlook.com>
Date: Mon, 7 Feb 2022 02:42:31 +0000
From: "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
To: Nathan Chancellor <nathan@...nel.org>
CC: KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
Tianyu Lan <Tianyu.Lan@...rosoft.com>,
Long Li <longli@...rosoft.com>,
"ndesaulniers@...gle.com" <ndesaulniers@...gle.com>,
"vt@...linux.org" <vt@...linux.org>,
"kuba@...nel.org" <kuba@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"llvm@...ts.linux.dev" <llvm@...ts.linux.dev>
Subject: RE: [PATCH 1/1] Drivers: hv: vmbus: Rework use of DMA_BIT_MASK(64)
From: Nathan Chancellor <nathan@...nel.org> Sent: Sunday, February 6, 2022 5:38 PM
>
> Hi Michael,
>
> On Sun, Feb 06, 2022 at 11:36:56AM -0800, Michael Kelley wrote:
> > Using DMA_BIT_MASK(64) as an initializer for a global variable
> > causes problems with Clang 12.0.1. The compiler doesn't understand
> > that value 64 is excluded from the shift at compile time, resulting
> > in a build error.
> >
> > While this is a compiler problem, avoid the issue by setting up
> > the dma_mask memory as part of struct hv_device, and initialize
> > it using dma_set_mask().
> >
> > Reported-by: Nathan Chancellor <nathan@...nel.org>
> > Reported-by: Vitaly Chikunov <vt@...linux.org>
> > Reported-by: Jakub Kicinski <kuba@...nel.org>
> > Fixes: 743b237c3a7b ("scsi: storvsc: Add Isolation VM support for storvsc driver")
> > Signed-off-by: Michael Kelley <mikelley@...rosoft.com>
>
> Thanks a lot for working around this. I am hoping that this will be
> fixed in clang soon, as it is high priority on our list of issues to
> fix. Once it has been fixed, we should be able to undo this workaround
> in one way or another.
FWIW, the new code is as good a solution as the old code. The new code
also follows some existing patterns, such as with struct platform_device.
As such, I don't think of this as a workaround that needs to be undone
in the future.
Michael
>
> I can confirm the warning is resolved, which will allow us to build
> ARCH=arm64 and ARCH=x86_64 allmodconfig with -Werror on mainline with
> clang once another fix [1] is merged.
>
> Reviewed-by: Nathan Chancellor <nathan@...nel.org>
> Tested-by: Nathan Chancellor <nathan@...nel.org>
>
Powered by blists - more mailing lists