Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2810071imw; Sun, 10 Jul 2022 16:07:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sW0MugiIFuIIQCAtuFGhT+oY41ql+6+oIY09SpAlgOPHxhohhH72PpKSg5wuw3wO1ZPuvj X-Received: by 2002:a05:6402:378a:b0:431:6d8d:9023 with SMTP id et10-20020a056402378a00b004316d8d9023mr21138823edb.98.1657494472735; Sun, 10 Jul 2022 16:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657494472; cv=none; d=google.com; s=arc-20160816; b=hVlVVHQLsqP9UUBoqAP95RDNgmJxm6NhGZlHcpWJNPBKoRjdlDty24QGFErf6gD1UC +pm332YPEmqDne0dV3JJrg7CrILcYX9Wyyx2FFi/9k+/GR5YL0vjdT/9Bjo24rdWA/Mx s9HA+9ljygmDGwNu1jurwJOxHTSHndZdd+r/d10bxwyqcdNRNoGRgCCvZrZvvVT0lq2U Z5YG7000u4xTh6yMEEXE3QUnhyJbo2a7+0aw9gyjV+3D5hxW+oB9vBQ7TT0+0JROhTbh aDWec+GBFMD99kXBImTF3EcXC3u88lljfEL835DjzP1jQK2YPqVLBVWPCWO+roPJj+Qm bwYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=p3eF7/3YZ7rIKKStNQt75RnsLq+WT1feGCVcwXzz/uI=; b=QFbkZX7eXqdUBAsgCTOaQuBNiXIKOuL+67r2tcr5P6OJkDokiFHDydKYvRwAmdvbGf y5DrXZ/vwYwvXG6ZGEGZBEhkGjK7PnEMWCXimNeVi3lln0ZjxeBAISk5EN4dwVuB3W6d QKvdJUto+tT1AIHF4tYSyEgG9y4Z8huNIiY6z/LYd3RSd8h3H20seupvJdx0E2535Chj hruHtHH6wSx/fudpsd/WZrqXTUVAPBe+bQkX5CGEORlG+A/ONqTcj11zw6JF7qH4flys RnkMMXorsE88ksdE7h5Ja9UWz+4REaMwD3ttRZkJBK+5Ew4pauyGm86xkPM0XpKhCH2f uYCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D9u3/Pqo"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fb17-20020a1709073a1100b00718bdf7794esi2228970ejc.487.2022.07.10.16.07.27; Sun, 10 Jul 2022 16:07:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D9u3/Pqo"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbiGJXEr (ORCPT + 99 others); Sun, 10 Jul 2022 19:04:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbiGJXEq (ORCPT ); Sun, 10 Jul 2022 19:04:46 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 597FBF599 for ; Sun, 10 Jul 2022 16:04:44 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id bu42so6103652lfb.0 for ; Sun, 10 Jul 2022 16:04:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p3eF7/3YZ7rIKKStNQt75RnsLq+WT1feGCVcwXzz/uI=; b=D9u3/PqoDWsohZRxqIhl7zMDCtr1rR6HcbqK4ie4MGbL09YbSVqbv4KNPR/b30iI2/ yLYSbDvo+nSUOQpknGd63sOYc+XzftwHyynHqusAWPYWJHxHEGhnCgDxd8CtzT6I3Sjv ZSIFMjuS0Y9RJW+WKeRindRAk0/+0p+omOKH9ThPN2V75KU4BDCYIMECo7RJQea0Ie2v jvT8OWxgVZNm3MqRxYS781o2keDoD2SMSv5s4Z0RdwHSpDsilBZxFgzj/ii45EGMDTOS JYbZaSi45J1VyKhDkV5DqiB+lP51KKJLshTdDYaQtnOdp+GZgE1QKAVuAmjp8HXUeEMp JBYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p3eF7/3YZ7rIKKStNQt75RnsLq+WT1feGCVcwXzz/uI=; b=vx/cFahshPPPo/iqtxQmy++NNTdU+VYDP4hmppBUtJ/+9laOIBSOi5U2+dWXzC/GR5 cSdPyJaht/5kIQ7R9ZlH2KEnm1TL/Mv3YHsmOjQqYVQDjipARkVOPcLvAMSstPEWNE+v uYOG3Sj4byS4WPdQYzoIlgGKXffYXKjkN5yvIWMkhDST4u0AA9xQz6onmZ/MWijvoIhM L2o7ErfSoCLoncBSmfduxlLfI1vc0xb2Kg7q7wPc83uiLlb7yQ/91kSJycO5SRF5wrEu lznGjOg1HaBi3+kjtumW53CMuS0Ox+f7TvTRGgdIvlfkA7rYQIqJzxWD0+oqPS3epVNk TxPw== X-Gm-Message-State: AJIora/7N5aVOPEPnAumS71OJcRVQZKpDd8qV/tp7Xs8LiMCWKd/V1qg a2KfSzNlBj0x5IJSR3bp0fuqEAtM5VWhsJPHSo1DiQ== X-Received: by 2002:a05:6512:2252:b0:489:dede:1cb3 with SMTP id i18-20020a056512225200b00489dede1cb3mr941409lfu.503.1657494282616; Sun, 10 Jul 2022 16:04:42 -0700 (PDT) MIME-Version: 1.0 References: <20220702213724.3949-1-semen.protsenko@linaro.org> <67943ec4dcfe85d6d616a5507437d99f6c5638a2.camel@gmail.com> In-Reply-To: <67943ec4dcfe85d6d616a5507437d99f6c5638a2.camel@gmail.com> From: Sam Protsenko Date: Mon, 11 Jul 2022 02:04:31 +0300 Message-ID: Subject: Re: [PATCH 0/4] iommu/exynos: Add basic support for SysMMU v7 To: David Virag Cc: Marek Szyprowski , Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , Janghyuck Kim , Cho KyongHo , Daniel Mentz , Sumit Semwal , iommu@lists.linux-foundation.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 3 Jul 2022 at 13:47, David Virag wrote: > > On Sun, 2022-07-03 at 00:48 +0300, Sam Protsenko wrote: > [...] > > Hi Marek, > > > > As I understand, you have some board with SysMMU v7, which is not VM > > capable (judging from the patches you shared earlier). Could you > > please somehow verify if this series works fine for you? For example, > > this testing driver [1] can be helpful. > > > > Thanks! > > > > [1] > > https://github.com/joe-skb7/linux/commit/bbadd46fa525fe1fef2ccbdfff81f7d29caf0506 > > Hi Sam, > > Not Marek here, but I wanted to try this on my jackpotlte (Exynos > 7885). The driver reports it's DPU sysmmu as version 7.2, and manually > reading the capabilities registers it looks like it has the 2nd > capability register but not the VM capability. > > After applying your patches, adding your test driver (with SYSMMU_BASE > corrected to 7885 value), and adding the sysmmu to dt, I tried to cat > the test file that it creates in debugfs and I got an SError kernel > panic. > > I tried tracing where the SError happens and it looks like it's this > line: > /* Preload for emulation */ > iowrite32(rw | vpn, obj->reg_base + MMU_EMU_PRELOAD); > > Trying to read the EMU registers using devmem results in a "Bus error". > > Could these emulation registers be missing from my SysMMU? Do you have > any info on what version should have it? Or maybe some capability bit? > I'll try testing it with DECON/DPP later and see if it works that way. > I don't have any manuals for v7.2, so I can only assume. Yes, it looks to me very much like those EMU registers are missing in your SysMMU IP-core: I remember seeing some similar SError messages while trying to access some incorrect MMIO addresses. Good news is that once this patch series is fixed and accepted, you can *probably* base your work on top of it (as I only validated it with EMU registers for now). I mean you can add some real IP-core users of that IOMMU, like graphics (DPU), audio, camera, etc. Not sure though if it would be enough to just add some DTS nodes, or your SoC support has to be added to some drivers first. > Best regards, > David