Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp752253imw; Wed, 13 Jul 2022 07:23:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ugNFKeSKJP1950uPVyfUsoFNttvSNzS6gQij7In77D2dJ5bIPP0oJ+hC9mC/dT8qIjT4p3 X-Received: by 2002:a17:906:106:b0:715:7cdf:400f with SMTP id 6-20020a170906010600b007157cdf400fmr3836986eje.1.1657722194355; Wed, 13 Jul 2022 07:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657722194; cv=none; d=google.com; s=arc-20160816; b=0OUQLwGCECDcUXGDjU2bWGy4o2hxBRpmwdR9O0XzcoseNHQdmc6P/UTN4ZaSJ+goUP 2wl5SaF03RKpj5yNV2btfCpEhYcsNwk2cjcW8bLfhj1fuHL896u5q4TQC9waKcf/9Feo XK5xkKnxru2IHC+VWVWV3wGcB5ApZ8iVDleUfvhpJ4RlzQ4EdarjCmlnqiVzZRUFf817 4CZX6GJfQgfWhM8P1sTuFYbgl4rRwFAlZiNHTJwS4WdBufijur0c/29bnvLYKbSa617y 2HDhYnUK3lNuXJBlZcra89RFOHL7xOVZGGyiqXDDnemUCpoM8G7mwqqYg7AT4CfRuFWl n7NA== 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=PGcV0udwGjSruZ22N9l9PLf+/uHhdyNzh4czvTCR/yA=; b=Arjy83+NzmyVs8tjMxO0E5bKYzDN4C49Sq/rE9Ged83RiYO051FIwwOc7hW12mIwOB HWbNhUnZ3MkvfaF7gUZ8hjZH4AlnraBkGClIYd19uGep7dSA4aoJcAiDPSp4rALW8KVZ eBoux5eBJGLcMGDecWIeeT6H9Pm0yGtkWo8kEqA/uQIyO60TXy/oPgWIGsEAJm0YH3B3 kqcmTlttdj4uMgZAOw8VVLc7rDgCvmx80cv+/IsA1kz/HWB8vrfR97kthzi3mHG1mBbr h3xDBSX+HA9KlyBw2HXu4iIIX6KeekkQCzU90O85yRopBrJgfSGqwyJpS2xG2aUzsUCZ 6sbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zCTXM9N+; 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 hd32-20020a17090796a000b0071208433c4bsi26620312ejc.54.2022.07.13.07.22.49; Wed, 13 Jul 2022 07:23:14 -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=zCTXM9N+; 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 S236481AbiGMOPB (ORCPT + 99 others); Wed, 13 Jul 2022 10:15:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229978AbiGMOPA (ORCPT ); Wed, 13 Jul 2022 10:15:00 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BBA0255BB for ; Wed, 13 Jul 2022 07:14:59 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id bx13so13655922ljb.1 for ; Wed, 13 Jul 2022 07:14:58 -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=PGcV0udwGjSruZ22N9l9PLf+/uHhdyNzh4czvTCR/yA=; b=zCTXM9N+lWM7M4yu4edy1tV1WT6siuoQVV6e1kZX7hZCPivLfKVDwNmZtMUzVTGTpk Ef/AqPA3Cez2+uOeq9HV/f45tl55LY3/Lm6rh//1MmfnE/laT91v1pxoExx7UEnUDxCn k+YUuX3kPsjFkja4s3YHSyZTONf48zrSpsqopdXI6QpK4QNe2dvl0s1rizEh9vWkXkxq lZrrKtazdbhBNmmNGYg9KXcMYXNveeSxUh+6khWPFBJhyJjhsUPhsNKbhjX+X4GDpXmE bKl01T2O+MbqurfsuoXEoHQI8RzhgK8jlETIuCE/jnpt5a0WPd/D2VtgyjbibRTLuymr MrXA== 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=PGcV0udwGjSruZ22N9l9PLf+/uHhdyNzh4czvTCR/yA=; b=uUAJouYcTq1LFC2OJ7jzLf8tTtIivFozzrSVuzeMqzprRG63vwfcaP+lMLmOHaI3ka jDxdRKBW/3zXKOmlXmaqXY1AvMa5gTl5b6lA/0JIuXx35AzMv1tWScJQY7XUuJjdQ8Ho B+++6A5Vw0y1XMyLF06cjmowWBsqxNm+b5Idra+xsZw8HLCC4X1YYc3jwF1qMlEVnuTh ufcwaOPYg3HP2SiJ0AD7sflqPZKpXClhaZ8J1dY542W3Y/dXPSayOWS7wrn/PNxGq96w JNl8DvXDIwwbMaTNeoXkLy7atOKKUsMxts8Pl0FXsZ/7zTKqv/4munO2S9ahqX6MDauS pUAA== X-Gm-Message-State: AJIora+oNsqyRzOcgDWCZb2z+R6AA5SgnGBcmqHT2IU0G0aAcUcGxyxo dbgofTZZdYgwWh6T/rV4nogTYC6ixTeaxtFou+0wTg== X-Received: by 2002:a2e:bd11:0:b0:25d:4f94:ac79 with SMTP id n17-20020a2ebd11000000b0025d4f94ac79mr1943417ljq.4.1657721697308; Wed, 13 Jul 2022 07:14:57 -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: Wed, 13 Jul 2022 17:14:46 +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=ham 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. > Hey David, Can you please try out the [1] branch again? I've added support for Exynos7885 there, using the info provided by Janghyuck Kim: apparently Exynos7885 has EMU registers, but those have some other offsets than on Exynos850: #define MMU_EMU_PRELOAD 0x8040 #define MMU_EMU_SHOT 0x8044 I wonder if my changes to [1] do the trick. [1] https://github.com/joe-skb7/linux/tree/e850-96-mainline-iommu > Best regards, > David