From: kbuild test robot <lkp@intel.com>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: kbuild-all@01.org, Thierry Reding <thierry.reding@gmail.com>,
dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] drm/tegra: gem: Correct iommu_map_sg() error checking
Date: Wed, 20 Dec 2017 14:19:57 +0800 [thread overview]
Message-ID: <201712201439.d368uYwk%fengguang.wu@intel.com> (raw)
In-Reply-To: <ba3717f3c177bfa461a817b6db5d826bd71c142d.1513530929.git.digetx@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5790 bytes --]
Hi Dmitry,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tegra/for-next]
[also build test WARNING on v4.15-rc4 next-20171220]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Dmitry-Osipenko/drm-tegra-gem-Correct-iommu_map_sg-error-checking/20171220-123700
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64
All warnings (new ones prefixed by >>):
drivers/gpu/drm/tegra/gem.c: In function 'tegra_bo_iommu_map':
>> drivers/gpu/drm/tegra/gem.c:131:58: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'int' [-Wformat=]
dev_err(tegra->drm->dev, "out of I/O virtual memory: %zd\n",
~~^
%d
vim +131 drivers/gpu/drm/tegra/gem.c
de2ba664c drivers/gpu/host1x/drm/gem.c Arto Merilainen 2013-03-22 113
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 114 static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo)
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 115 {
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 116 int prot = IOMMU_READ | IOMMU_WRITE;
e1ad592fa drivers/gpu/drm/tegra/gem.c Dmitry Osipenko 2017-12-17 117 int err;
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 118
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 119 if (bo->mm)
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 120 return -EBUSY;
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 121
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 122 bo->mm = kzalloc(sizeof(*bo->mm), GFP_KERNEL);
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 123 if (!bo->mm)
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 124 return -ENOMEM;
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 125
347ad49d3 drivers/gpu/drm/tegra/gem.c Thierry Reding 2017-03-09 126 mutex_lock(&tegra->mm_lock);
347ad49d3 drivers/gpu/drm/tegra/gem.c Thierry Reding 2017-03-09 127
4e64e5539 drivers/gpu/drm/tegra/gem.c Chris Wilson 2017-02-02 128 err = drm_mm_insert_node_generic(&tegra->mm,
4e64e5539 drivers/gpu/drm/tegra/gem.c Chris Wilson 2017-02-02 129 bo->mm, bo->gem.size, PAGE_SIZE, 0, 0);
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 130 if (err < 0) {
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 @131 dev_err(tegra->drm->dev, "out of I/O virtual memory: %zd\n",
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 132 err);
347ad49d3 drivers/gpu/drm/tegra/gem.c Thierry Reding 2017-03-09 133 goto unlock;
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 134 }
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 135
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 136 bo->paddr = bo->mm->start;
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 137
e1ad592fa drivers/gpu/drm/tegra/gem.c Dmitry Osipenko 2017-12-17 138 bo->size = iommu_map_sg(tegra->domain, bo->paddr, bo->sgt->sgl,
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 139 bo->sgt->nents, prot);
e1ad592fa drivers/gpu/drm/tegra/gem.c Dmitry Osipenko 2017-12-17 140 if (!bo->size) {
e1ad592fa drivers/gpu/drm/tegra/gem.c Dmitry Osipenko 2017-12-17 141 dev_err(tegra->drm->dev, "failed to map buffer\n");
e1ad592fa drivers/gpu/drm/tegra/gem.c Dmitry Osipenko 2017-12-17 142 err = -ENOMEM;
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 143 goto remove;
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 144 }
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 145
347ad49d3 drivers/gpu/drm/tegra/gem.c Thierry Reding 2017-03-09 146 mutex_unlock(&tegra->mm_lock);
347ad49d3 drivers/gpu/drm/tegra/gem.c Thierry Reding 2017-03-09 147
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 148 return 0;
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 149
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 150 remove:
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 151 drm_mm_remove_node(bo->mm);
347ad49d3 drivers/gpu/drm/tegra/gem.c Thierry Reding 2017-03-09 152 unlock:
347ad49d3 drivers/gpu/drm/tegra/gem.c Thierry Reding 2017-03-09 153 mutex_unlock(&tegra->mm_lock);
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 154 kfree(bo->mm);
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 155 return err;
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 156 }
df06b759f drivers/gpu/drm/tegra/gem.c Thierry Reding 2014-06-26 157
:::::: The code at line 131 was first introduced by commit
:::::: df06b759f2cf4690fa9991edb1504ba39932b2bb drm/tegra: Add IOMMU support
:::::: TO: Thierry Reding <treding@nvidia.com>
:::::: CC: Thierry Reding <treding@nvidia.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58535 bytes --]
next prev parent reply other threads:[~2017-12-20 6:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-17 17:25 [PATCH v1] drm/tegra: Correct timeout in tegra_syncpt_wait Dmitry Osipenko
2017-12-17 17:25 ` [PATCH v1] drm/tegra: gem: Correct iommu_map_sg() error checking Dmitry Osipenko
2017-12-20 6:19 ` kbuild test robot [this message]
2017-12-17 17:25 ` [PATCH v1] drm/tegra: Restore opaque formats on Tegra20/30 Dmitry Osipenko
2017-12-17 17:25 ` [PATCH v1] drm/tegra: Trade overlay plane for cursor on older Tegra's Dmitry Osipenko
2017-12-17 17:25 ` [PATCH v2] drm/tegra: dc: Link DC1 to DC0 on Tegra20 Dmitry Osipenko
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=201712201439.d368uYwk%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=digetx@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.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 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®