From: John Garry <john.garry@huawei.com>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>,
"joro@8bytes.org" <joro@8bytes.org>
Cc: kernel test robot <lkp@intel.com>, <will@kernel.org>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
"trivial@kernel.org" <trivial@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linuxarm <linuxarm@huawei.com>, "maz@kernel.org" <maz@kernel.org>
Subject: Re: [PATCH 4/4] iommu/arm-smmu-v3: Remove cmpxchg() in arm_smmu_cmdq_issue_cmdlist()
Date: Tue, 23 Jun 2020 11:19:47 +0100 [thread overview]
Message-ID: <ee2d7a1e-3e22-f25a-ced9-82ccced28f8c@huawei.com> (raw)
In-Reply-To: <CADRDgG4=uD3Ni6r7D3kHdSo=ketaXKGririHfFvPYq4qz8KjfQ@mail.gmail.com>
On 23/06/2020 10:35, Rikard Falkeborn wrote:
>
> I'd say that GENMASK_INPUT_CHECK() should be able to handle a l=0 and
> h=unsigned value, so I doubt this warn.
>
> Using GENMASK((int)cmdq->q.llq.max_n_shift, 0) resolves it, but it
> looks
> like GENMASK_INPUT_CHECK() could be improved.
>
>
> Indeed it could, it is fixed in -next.
ok, thanks for the pointer, but I still see this on today's -next with
this patch:
make W=1 drivers/iommu/arm-smmu-v3.o
In file included from ./include/linux/bits.h:23:0,
from ./include/linux/ioport.h:15,
from ./include/linux/acpi.h:12,
from drivers/iommu/arm-smmu-v3.c:12:
drivers/iommu/arm-smmu-v3.c: In function ‘arm_smmu_cmdq_issue_cmdlist’:
./include/linux/bits.h:27:7: warning: comparison of unsigned expression
< 0 is always false [-Wtype-limits]
(l) > (h), 0)))
^
./include/linux/build_bug.h:16:62: note: in definition of macro
‘BUILD_BUG_ON_ZERO’
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
./include/linux/bits.h:40:3: note: in expansion of macro
‘GENMASK_INPUT_CHECK’
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~~~~~
drivers/iommu/arm-smmu-v3.c:1404:18: note: in expansion of macro ‘GENMASK’
u32 prod_mask = GENMASK(cmdq->q.llq.max_n_shift, 0);
That's gcc 7.5.0 .
Cheers,
John
next prev parent reply other threads:[~2020-06-23 10:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 17:28 [PATCH 0/4] iommu/arm-smmu-v3: Improve cmdq lock efficiency John Garry
2020-06-22 17:28 ` [PATCH 1/4] iommu/arm-smmu-v3: Fix trivial typo John Garry
2020-06-22 17:28 ` [PATCH 2/4] iommu/arm-smmu-v3: Calculate bits for prod and owner John Garry
2020-06-22 17:28 ` [PATCH 3/4] iommu/arm-smmu-v3: Always issue a CMD_SYNC per batch John Garry
2020-06-22 17:28 ` [PATCH 4/4] iommu/arm-smmu-v3: Remove cmpxchg() in arm_smmu_cmdq_issue_cmdlist() John Garry
2020-06-23 1:07 ` kernel test robot
2020-06-23 9:21 ` John Garry
[not found] ` <CADRDgG4=uD3Ni6r7D3kHdSo=ketaXKGririHfFvPYq4qz8KjfQ@mail.gmail.com>
2020-06-23 10:19 ` John Garry [this message]
[not found] ` <CADRDgG5pOstGK=fm8s3Be_v8+vc-EyRYmpiMsTCeK-rMk2ZRQQ@mail.gmail.com>
2020-06-26 10:05 ` John Garry
2020-06-23 16:22 ` Robin Murphy
2020-06-24 8:15 ` John Garry
2020-07-16 10:20 ` Will Deacon
2020-07-16 10:26 ` John Garry
2020-07-08 13:00 ` [PATCH 0/4] iommu/arm-smmu-v3: Improve cmdq lock efficiency John Garry
2020-07-16 10:19 ` Will Deacon
2020-07-16 10:22 ` Will Deacon
2020-07-16 10:28 ` Will Deacon
2020-07-16 10:56 ` John Garry
2020-07-16 11:22 ` Robin Murphy
2020-07-16 11:30 ` John Garry
2020-07-16 11:32 ` Will Deacon
2020-07-16 16:50 ` John Garry
2020-07-16 13:31 ` John Garry
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=ee2d7a1e-3e22-f25a-ced9-82ccced28f8c@huawei.com \
--to=john.garry@huawei.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lkp@intel.com \
--cc=maz@kernel.org \
--cc=rikard.falkeborn@gmail.com \
--cc=robin.murphy@arm.com \
--cc=trivial@kernel.org \
--cc=will@kernel.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
all inboxes | Powered by JetHome®