From: kernel test robot <lkp@intel.com>
To: Yong Wu <yong.wu@mediatek.com>, Joerg Roedel <joro@8bytes.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>
Cc: kbuild-all@lists.01.org, srv_heupstream@mediatek.com,
Tomasz Figa <tfiga@google.com>, Evan Green <evgreen@chromium.org>,
clang-built-linux@googlegroups.com,
linux-mediatek@lists.infradead.org,
Krzysztof Kozlowski <krzk@kernel.org>
Subject: Re: [PATCH v4 20/24] iommu/mediatek: Support report iova 34bit translation fault in ISR
Date: Wed, 18 Nov 2020 12:32:01 +0800 [thread overview]
Message-ID: <202011181237.MPgvT9SY-lkp@intel.com> (raw)
In-Reply-To: <20201111123838.15682-21-yong.wu@mediatek.com>
[-- Attachment #1: Type: text/plain, Size: 4926 bytes --]
Hi Yong,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on iommu/next]
[also build test ERROR on robh/for-next linus/master v5.10-rc4 next-20201117]
[cannot apply to mediatek/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Yong-Wu/MT8192-IOMMU-support/20201111-204421
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: powerpc64-randconfig-r005-20201117 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ace9653c11c6308401dcda2e8b26bf97e6e66e30)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/2ac9ae3e1803f422950cdad221f033bb9ba9503d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yong-Wu/MT8192-IOMMU-support/20201111-204421
git checkout 2ac9ae3e1803f422950cdad221f033bb9ba9503d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/iommu/mtk_iommu.c:289:13: error: implicit declaration of function 'FIELD_GET' [-Werror,-Wimplicit-function-declaration]
va34_32 = FIELD_GET(F_MMU_INVAL_VA_34_32_MASK, fault_iova);
^
drivers/iommu/mtk_iommu.c:510:29: warning: result of comparison of constant 5368709120 with expression of type 'phys_addr_t' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
if (data->enable_4GB && pa >= MTK_IOMMU_4GB_MODE_REMAP_BASE)
~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +/FIELD_GET +289 drivers/iommu/mtk_iommu.c
265
266 static irqreturn_t mtk_iommu_isr(int irq, void *dev_id)
267 {
268 struct mtk_iommu_data *data = dev_id;
269 struct mtk_iommu_domain *dom = data->m4u_dom;
270 unsigned int fault_larb, fault_port, sub_comm = 0;
271 u32 int_state, regval, va34_32, pa34_32;
272 u64 fault_iova, fault_pa;
273 bool layer, write;
274
275 /* Read error info from registers */
276 int_state = readl_relaxed(data->base + REG_MMU_FAULT_ST1);
277 if (int_state & F_REG_MMU0_FAULT_MASK) {
278 regval = readl_relaxed(data->base + REG_MMU0_INT_ID);
279 fault_iova = readl_relaxed(data->base + REG_MMU0_FAULT_VA);
280 fault_pa = readl_relaxed(data->base + REG_MMU0_INVLD_PA);
281 } else {
282 regval = readl_relaxed(data->base + REG_MMU1_INT_ID);
283 fault_iova = readl_relaxed(data->base + REG_MMU1_FAULT_VA);
284 fault_pa = readl_relaxed(data->base + REG_MMU1_INVLD_PA);
285 }
286 layer = fault_iova & F_MMU_FAULT_VA_LAYER_BIT;
287 write = fault_iova & F_MMU_FAULT_VA_WRITE_BIT;
288 if (MTK_IOMMU_HAS_FLAG(data->plat_data, IOVA_34_EN)) {
> 289 va34_32 = FIELD_GET(F_MMU_INVAL_VA_34_32_MASK, fault_iova);
290 pa34_32 = FIELD_GET(F_MMU_INVAL_PA_34_32_MASK, fault_iova);
291 fault_iova = fault_iova & F_MMU_INVAL_VA_31_12_MASK;
292 fault_iova |= (u64)va34_32 << 32;
293 fault_pa |= (u64)pa34_32 << 32;
294 }
295
296 fault_port = F_MMU_INT_ID_PORT_ID(regval);
297 if (MTK_IOMMU_HAS_FLAG(data->plat_data, HAS_SUB_COMM)) {
298 fault_larb = F_MMU_INT_ID_COMM_ID(regval);
299 sub_comm = F_MMU_INT_ID_SUB_COMM_ID(regval);
300 } else {
301 fault_larb = F_MMU_INT_ID_LARB_ID(regval);
302 }
303 fault_larb = data->plat_data->larbid_remap[fault_larb][sub_comm];
304
305 if (report_iommu_fault(&dom->domain, data->dev, fault_iova,
306 write ? IOMMU_FAULT_WRITE : IOMMU_FAULT_READ)) {
307 dev_err_ratelimited(
308 data->dev,
309 "fault type=0x%x iova=0x%llx pa=0x%llx larb=%d port=%d layer=%d %s\n",
310 int_state, fault_iova, fault_pa, fault_larb, fault_port,
311 layer, write ? "write" : "read");
312 }
313
314 /* Interrupt clear */
315 regval = readl_relaxed(data->base + REG_MMU_INT_CONTROL0);
316 regval |= F_INT_CLR_BIT;
317 writel_relaxed(regval, data->base + REG_MMU_INT_CONTROL0);
318
319 mtk_iommu_tlb_flush_all(data);
320
321 return IRQ_HANDLED;
322 }
323
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45607 bytes --]
[-- Attachment #3: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2020-11-18 4:33 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 12:38 [PATCH v4 00/24] MT8192 IOMMU support Yong Wu
2020-11-11 12:38 ` [PATCH v4 01/24] dt-bindings: iommu: mediatek: Convert IOMMU to DT schema Yong Wu
2020-11-16 17:43 ` Rob Herring
2020-11-11 12:38 ` [PATCH v4 02/24] dt-bindings: memory: mediatek: Add a common larb-port header file Yong Wu
2020-11-11 21:30 ` Krzysztof Kozlowski
2020-11-11 12:38 ` [PATCH v4 03/24] dt-bindings: memory: mediatek: Extend LARB_NR_MAX to 32 Yong Wu
2020-11-11 21:30 ` Krzysztof Kozlowski
2020-11-11 12:38 ` [PATCH v4 04/24] dt-bindings: memory: mediatek: Add domain definition Yong Wu
2020-11-11 21:30 ` Krzysztof Kozlowski
2020-11-16 17:44 ` Rob Herring
2020-11-11 12:38 ` [PATCH v4 05/24] dt-bindings: mediatek: Add binding for mt8192 IOMMU Yong Wu
2020-11-11 21:33 ` Krzysztof Kozlowski
2020-11-12 2:41 ` Yong Wu
2020-11-11 12:38 ` [PATCH v4 06/24] iommu/mediatek: Use the common mtk-smi-larb-port.h Yong Wu
2020-11-11 21:33 ` Krzysztof Kozlowski
2020-11-11 12:38 ` [PATCH v4 07/24] iommu/io-pgtable-arm-v7s: Use ias to check the valid iova in unmap Yong Wu
2020-11-26 15:41 ` Robin Murphy
2020-11-11 12:38 ` [PATCH v4 08/24] iommu/io-pgtable-arm-v7s: Extend PA34 for MediaTek Yong Wu
2020-11-26 15:49 ` Robin Murphy
2020-11-11 12:38 ` [PATCH v4 09/24] iommu/io-pgtable-arm-v7s: Clear LVL_SHIFT/BITS macro instead of the formula Yong Wu
2020-11-26 16:03 ` Robin Murphy
2020-11-27 6:21 ` Yong Wu
2020-11-11 12:38 ` [PATCH v4 10/24] iommu/io-pgtable-arm-v7s: Add cfg as a param in some macros Yong Wu
2020-11-26 16:09 ` Robin Murphy
2020-11-11 12:38 ` [PATCH v4 11/24] iommu/io-pgtable-arm-v7s: Quad lvl1 pgtable for MediaTek Yong Wu
2020-11-26 16:15 ` Robin Murphy
2020-11-11 12:38 ` [PATCH v4 12/24] iommu/mediatek: Move hw_init into attach_device Yong Wu
2020-11-26 16:43 ` Robin Murphy
2020-11-27 6:23 ` Yong Wu
2020-11-11 12:38 ` [PATCH v4 13/24] iommu/mediatek: Add device link for smi-common and m4u Yong Wu
2020-11-12 1:10 ` Nicolas Boichat
2020-11-12 2:42 ` Yong Wu
2020-11-11 12:38 ` [PATCH v4 14/24] iommu/mediatek: Add pm runtime callback Yong Wu
2020-11-11 12:38 ` [PATCH v4 15/24] iommu/mediatek: Add power-domain operation Yong Wu
2020-11-11 12:38 ` [PATCH v4 16/24] iommu/mediatek: Add iova reserved function Yong Wu
2020-11-11 12:38 ` [PATCH v4 17/24] iommu/mediatek: Add single domain Yong Wu
2020-11-26 17:11 ` Robin Murphy
2020-11-27 6:21 ` Yong Wu
2020-11-11 12:38 ` [PATCH v4 18/24] iommu/mediatek: Support master use iova over 32bit Yong Wu
2020-11-11 21:34 ` Krzysztof Kozlowski
2020-11-11 12:38 ` [PATCH v4 19/24] iommu/mediatek: Support up to 34bit iova in tlb flush Yong Wu
2020-11-11 12:38 ` [PATCH v4 20/24] iommu/mediatek: Support report iova 34bit translation fault in ISR Yong Wu
2020-11-18 2:19 ` kernel test robot
2020-11-18 4:32 ` kernel test robot [this message]
2020-11-11 12:38 ` [PATCH v4 21/24] iommu/mediatek: Add support for multi domain Yong Wu
2020-11-11 12:38 ` [PATCH v4 22/24] iommu/mediatek: Adjust the structure Yong Wu
2020-11-11 12:38 ` [PATCH v4 23/24] iommu/mediatek: Add mt8192 support Yong Wu
2020-11-11 12:38 ` [PATCH v4 24/24] MAINTAINERS: Add entry for MediaTek IOMMU Yong Wu
2020-11-11 16:52 ` Chun-Kuang Hu
2020-11-25 12:23 ` [PATCH v4 00/24] MT8192 IOMMU support Will Deacon
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=202011181237.MPgvT9SY-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=evgreen@chromium.org \
--cc=joro@8bytes.org \
--cc=kbuild-all@lists.01.org \
--cc=krzk@kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=srv_heupstream@mediatek.com \
--cc=tfiga@google.com \
--cc=will@kernel.org \
--cc=yong.wu@mediatek.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;
as well as URLs for NNTP newsgroup(s).