From: Wei Liu <wei.liu@kernel.org>
To: "Michael Kelley (LINUX)" <mikelley@microsoft.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
KY Srinivasan <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
"wei.liu@kernel.org" <wei.liu@kernel.org>,
Tianyu Lan <Tianyu.Lan@microsoft.com>,
Long Li <longli@microsoft.com>,
"ndesaulniers@google.com" <ndesaulniers@google.com>,
"vt@altlinux.org" <vt@altlinux.org>,
"kuba@kernel.org" <kuba@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"llvm@lists.linux.dev" <llvm@lists.linux.dev>
Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Rework use of DMA_BIT_MASK(64)
Date: Mon, 7 Feb 2022 17:56:10 +0000 [thread overview]
Message-ID: <20220207175610.rrhgfuyvsfp7evcp@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <MWHPR21MB1593B68BFCFC1AF8F39345ECD72C9@MWHPR21MB1593.namprd21.prod.outlook.com>
On Mon, Feb 07, 2022 at 02:42:31AM +0000, Michael Kelley (LINUX) wrote:
> From: Nathan Chancellor <nathan@kernel.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@kernel.org>
> > > Reported-by: Vitaly Chikunov <vt@altlinux.org>
> > > Reported-by: Jakub Kicinski <kuba@kernel.org>
> > > Fixes: 743b237c3a7b ("scsi: storvsc: Add Isolation VM support for storvsc driver")
> > > Signed-off-by: Michael Kelley <mikelley@microsoft.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.
>
Yes indeed.
Patch applied to hyperv-fixes. Thanks.
prev parent reply other threads:[~2022-02-07 18:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-06 19:36 [PATCH 1/1] Drivers: hv: vmbus: Rework use of DMA_BIT_MASK(64) Michael Kelley
2022-02-07 1:37 ` Nathan Chancellor
2022-02-07 2:42 ` Michael Kelley (LINUX)
2022-02-07 17:56 ` Wei Liu [this message]
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=20220207175610.rrhgfuyvsfp7evcp@liuwe-devbox-debian-v2 \
--to=wei.liu@kernel.org \
--cc=Tianyu.Lan@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=longli@microsoft.com \
--cc=mikelley@microsoft.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=sthemmin@microsoft.com \
--cc=vt@altlinux.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox