From: kbuild test robot <lkp@intel.com>
To: Yong Wu <yong.wu@mediatek.com>
Cc: kbuild-all@01.org, Joerg Roedel <joro@8bytes.org>,
Thierry Reding <treding@nvidia.com>,
Mark Rutland <mark.rutland@arm.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Robin Murphy <robin.murphy@arm.com>,
Will Deacon <will.deacon@arm.com>,
Daniel Kurtz <djkurtz@google.com>, Tomasz Figa <tfiga@google.com>,
Lucas Stach <l.stach@pengutronix.de>,
Rob Herring <robh+dt@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-mediatek@lists.infradead.org,
Sasha Hauer <kernel@pengutronix.de>,
srv_heupstream@mediatek.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org, pebolle@tiscali.nl,
arnd@arndb.de, mitchelh@codeaurora.org, p.zabel@pengutronix.de,
yingjoe.chen@mediatek.com, Yong Wu <yong.wu@mediatek.com>
Subject: Re: [PATCH v6 4/5] iommu/mediatek: Add mt8173 IOMMU driver
Date: Tue, 8 Dec 2015 18:32:57 +0800 [thread overview]
Message-ID: <201512081824.Uccd3ovL%fengguang.wu@intel.com> (raw)
In-Reply-To: <1449568153-15643-5-git-send-email-yong.wu@mediatek.com>
[-- Attachment #1: Type: text/plain, Size: 7078 bytes --]
Hi Yong,
[auto build test ERROR on tegra/for-next]
[also build test ERROR on v4.4-rc4 next-20151208]
url: https://github.com/0day-ci/linux/commits/Yong-Wu/MT8173-IOMMU-SUPPORT/20151208-175252
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux for-next
config: x86_64-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
drivers/iommu/dma-iommu.c: In function '__iommu_dma_alloc_pages':
>> drivers/iommu/dma-iommu.c:198:11: error: implicit declaration of function 'vzalloc' [-Werror=implicit-function-declaration]
pages = vzalloc(array_size);
^
>> drivers/iommu/dma-iommu.c:198:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
pages = vzalloc(array_size);
^
cc1: some warnings being treated as errors
--
>> drivers/iommu/mtk_iommu.c:176:19: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.tlb_add_flush = mtk_iommu_tlb_add_flush_nosync,
^
drivers/iommu/mtk_iommu.c:176:19: note: (near initialization for 'mtk_iommu_gather_ops.tlb_add_flush')
drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_domain_finalise':
>> drivers/iommu/mtk_iommu.c:239:4: error: 'IO_PGTABLE_QUIRK_NO_PERMS' undeclared (first use in this function)
IO_PGTABLE_QUIRK_NO_PERMS |
^
drivers/iommu/mtk_iommu.c:239:4: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/iommu/mtk_iommu.c:240:4: error: 'IO_PGTABLE_QUIRK_TLBI_ON_MAP' undeclared (first use in this function)
IO_PGTABLE_QUIRK_TLBI_ON_MAP,
^
>> drivers/iommu/mtk_iommu.c:248:34: error: 'ARM_V7S' undeclared (first use in this function)
dom->iop = alloc_io_pgtable_ops(ARM_V7S, &dom->cfg, data);
^
In file included from arch/x86/include/asm/realmode.h:5:0,
from arch/x86/include/asm/acpi.h:33,
from arch/x86/include/asm/fixmap.h:19,
from arch/x86/include/asm/apic.h:12,
from arch/x86/include/asm/smp.h:12,
from arch/x86/include/asm/mmzone_64.h:10,
from arch/x86/include/asm/mmzone.h:4,
from include/linux/mmzone.h:856,
from include/linux/topology.h:32,
from include/linux/of.h:24,
from include/linux/iommu.h:24,
from include/linux/dma-iommu.h:23,
from drivers/iommu/mtk_iommu.c:16:
>> drivers/iommu/mtk_iommu.c:257:35: error: 'struct io_pgtable_cfg' has no member named 'arm_v7s_cfg'
writel_relaxed(data->m4u_dom->cfg.arm_v7s_cfg.ttbr[0],
^
arch/x86/include/asm/io.h:81:39: note: in definition of macro 'writel_relaxed'
#define writel_relaxed(v, a) __writel(v, a)
^
drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_resume':
drivers/iommu/mtk_iommu.c:702:35: error: 'struct io_pgtable_cfg' has no member named 'arm_v7s_cfg'
writel_relaxed(data->m4u_dom->cfg.arm_v7s_cfg.ttbr[0],
^
arch/x86/include/asm/io.h:81:39: note: in definition of macro 'writel_relaxed'
#define writel_relaxed(v, a) __writel(v, a)
^
vim +/IO_PGTABLE_QUIRK_NO_PERMS +239 drivers/iommu/mtk_iommu.c
170 /* Clear the CPE status */
171 writel_relaxed(0, data->base + REG_MMU_CPE_DONE);
172 }
173
174 static const struct iommu_gather_ops mtk_iommu_gather_ops = {
175 .tlb_flush_all = mtk_iommu_tlb_flush_all,
> 176 .tlb_add_flush = mtk_iommu_tlb_add_flush_nosync,
177 .tlb_sync = mtk_iommu_tlb_sync,
178 };
179
180 static irqreturn_t mtk_iommu_isr(int irq, void *dev_id)
181 {
182 struct mtk_iommu_data *data = dev_id;
183 struct mtk_iommu_domain *dom = data->m4u_dom;
184 u32 int_state, regval, fault_iova, fault_pa;
185 unsigned int fault_larb, fault_port;
186 bool layer, write;
187
188 /* Read error info from registers */
189 int_state = readl_relaxed(data->base + REG_MMU_FAULT_ST1);
190 fault_iova = readl_relaxed(data->base + REG_MMU_FAULT_VA);
191 layer = fault_iova & F_MMU_FAULT_VA_LAYER_BIT;
192 write = fault_iova & F_MMU_FAULT_VA_WRITE_BIT;
193 fault_iova &= F_MMU_FAULT_VA_MSK;
194 fault_pa = readl_relaxed(data->base + REG_MMU_INVLD_PA);
195 regval = readl_relaxed(data->base + REG_MMU_INT_ID);
196 fault_larb = F_MMU0_INT_ID_LARB_ID(regval);
197 fault_port = F_MMU0_INT_ID_PORT_ID(regval);
198
199 if (report_iommu_fault(&dom->domain, data->dev, fault_iova,
200 write ? IOMMU_FAULT_WRITE : IOMMU_FAULT_READ)) {
201 dev_err_ratelimited(
202 data->dev,
203 "fault type=0x%x iova=0x%x pa=0x%x larb=%d port=%d layer=%d %s\n",
204 int_state, fault_iova, fault_pa, fault_larb, fault_port,
205 layer, write ? "write" : "read");
206 }
207
208 /* Interrupt clear */
209 regval = readl_relaxed(data->base + REG_MMU_INT_CONTROL0);
210 regval |= F_INT_CLR_BIT;
211 writel_relaxed(regval, data->base + REG_MMU_INT_CONTROL0);
212
213 mtk_iommu_tlb_flush_all(data);
214
215 return IRQ_HANDLED;
216 }
217
218 static void mtk_iommu_config(struct mtk_iommu_data *data,
219 struct device *dev, bool enable)
220 {
221 struct mtk_iommu_client_priv *head, *cur, *next;
222
223 head = dev->archdata.iommu;
224 list_for_each_entry_safe(cur, next, &head->client, client) {
225 mtk_smi_config_port(
226 data->larbdev[MTK_M4U_TO_LARB(cur->mtk_m4u_id)],
227 MTK_M4U_TO_PORT(cur->mtk_m4u_id), enable);
228 }
229 }
230
231 static int mtk_iommu_domain_finalise(struct mtk_iommu_data *data)
232 {
233 struct mtk_iommu_domain *dom = data->m4u_dom;
234
235 spin_lock_init(&dom->pgtlock);
236
237 dom->cfg = (struct io_pgtable_cfg) {
238 .quirks = IO_PGTABLE_QUIRK_ARM_NS |
> 239 IO_PGTABLE_QUIRK_NO_PERMS |
> 240 IO_PGTABLE_QUIRK_TLBI_ON_MAP,
241 .pgsize_bitmap = mtk_iommu_ops.pgsize_bitmap,
242 .ias = 32,
243 .oas = 32,
244 .tlb = &mtk_iommu_gather_ops,
245 .iommu_dev = data->dev,
246 };
247
> 248 dom->iop = alloc_io_pgtable_ops(ARM_V7S, &dom->cfg, data);
249 if (!dom->iop) {
250 dev_err(data->dev, "Failed to alloc io pgtable\n");
251 return -EINVAL;
252 }
253
254 /* Update our support page sizes bitmap */
255 mtk_iommu_ops.pgsize_bitmap = dom->cfg.pgsize_bitmap;
256
> 257 writel_relaxed(data->m4u_dom->cfg.arm_v7s_cfg.ttbr[0],
258 data->base + REG_MMU_PT_BASE_ADDR);
259 return 0;
260 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 51073 bytes --]
next prev parent reply other threads:[~2015-12-08 10:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 9:49 [PATCH v6 0/5] MT8173 IOMMU SUPPORT Yong Wu
2015-12-08 9:49 ` [PATCH v6 1/5] dt-bindings: iommu: Add binding for mediatek IOMMU Yong Wu
2015-12-09 3:33 ` Rob Herring
2015-12-09 6:55 ` Yong Wu
2015-12-08 9:49 ` [PATCH v6 2/5] dt-bindings: mediatek: Add smi dts binding Yong Wu
2015-12-09 3:35 ` Rob Herring
2015-12-08 9:49 ` [PATCH v6 3/5] memory: mediatek: Add SMI driver Yong Wu
2015-12-11 7:22 ` Yong Wu
2015-12-14 18:18 ` Matthias Brugger
2015-12-15 2:38 ` Yong Wu
2015-12-15 5:45 ` Daniel Kurtz
2015-12-16 6:00 ` Yong Wu
2015-12-08 9:49 ` [PATCH v6 4/5] iommu/mediatek: Add mt8173 IOMMU driver Yong Wu
2015-12-08 10:32 ` kbuild test robot [this message]
2015-12-14 14:16 ` Joerg Roedel
2015-12-15 3:28 ` Yong Wu
2015-12-15 12:37 ` Robin Murphy
2015-12-16 5:59 ` Yong Wu
2015-12-16 12:48 ` Robin Murphy
2015-12-17 3:12 ` Yong Wu
2015-12-16 15:15 ` Joerg Roedel
2015-12-14 18:19 ` Matthias Brugger
2015-12-15 2:40 ` Yong Wu
2015-12-08 9:49 ` [PATCH v6 5/5] dts: mt8173: Add iommu/smi nodes for mt8173 Yong Wu
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=201512081824.Uccd3ovL%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=djkurtz@google.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=kbuild-all@01.org \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=mitchelh@codeaurora.org \
--cc=p.zabel@pengutronix.de \
--cc=pebolle@tiscali.nl \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=srv_heupstream@mediatek.com \
--cc=tfiga@google.com \
--cc=treding@nvidia.com \
--cc=will.deacon@arm.com \
--cc=yingjoe.chen@mediatek.com \
--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
all inboxes | Powered by JetHome®