From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8565BC74A35 for ; Thu, 11 Jul 2019 15:03:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59F142166E for ; Thu, 11 Jul 2019 15:03:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728855AbfGKPDL (ORCPT ); Thu, 11 Jul 2019 11:03:11 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:36491 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728024AbfGKPDK (ORCPT ); Thu, 11 Jul 2019 11:03:10 -0400 X-Originating-IP: 92.137.69.152 Received: from localhost (alyon-656-1-672-152.w92-137.abo.wanadoo.fr [92.137.69.152]) (Authenticated sender: gregory.clement@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B75B84000B; Thu, 11 Jul 2019 15:03:06 +0000 (UTC) From: Gregory CLEMENT To: Robin Murphy , Joerg Roedel , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Cc: Rob Herring , devicetree@vger.kernel.org, Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Antoine Tenart , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , Maxime Chevallier , Nadav Haklai Subject: [PATCH v2 0/4] Add system mmu support for Armada-806 Date: Thu, 11 Jul 2019 17:02:38 +0200 Message-Id: <20190711150242.25290-1-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, last year a first version of this series was submitted to add support for IOMMU for AP806, including workaround for accessing ARM SMMU 64bit registers[1]. For the record, AP-806 can't access SMMU registers with 64bit width, this patches split the readq/writeq for 32bit access, due to erratanum #582743. Based on the feedback from Robin Murphy, I also add code ensuring that we won't try to use AArch64 format with 32 bits acces. It was also discussed to not use compatible but propertu to support this workaround. I agree to make this change if needed, but for now I would like to have a feedback on the current code to know if it is acceptable if there is still potential issue. The series was tested on a vanilla v5.1 kernel, and without the series, an USB stick was not detected under QEMU whereas with this series it worked as expected. Greogry [1]: https://lkml.org/lkml/2018/10/15/373 Gregory CLEMENT (1): arm64: dts: marvell: armada-ap806: add smmu support Hanna Hawa (3): iommu/arm-smmu: Introduce wrapper for writeq/readq iommu/arm-smmu: Workaround for Marvell Armada-AP806 SoC erratum #582743 dt-bindings: iommu/arm,smmu: add compatible string for Marvell Documentation/arm64/silicon-errata.txt | 2 + .../devicetree/bindings/iommu/arm,smmu.txt | 1 + arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 17 +++++ drivers/iommu/arm-smmu.c | 74 ++++++++++++++++--- 4 files changed, 83 insertions(+), 11 deletions(-) -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CB3CC742A1 for ; Thu, 11 Jul 2019 19:48:12 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3325920863 for ; Thu, 11 Jul 2019 19:48:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3325920863 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C0CA954D9; Thu, 11 Jul 2019 19:47:54 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 77F5C50E0 for ; Thu, 11 Jul 2019 19:15:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mslow2.mail.gandi.net (mslow2.mail.gandi.net [217.70.178.242]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D7A0089F for ; Thu, 11 Jul 2019 19:15:42 +0000 (UTC) Received: from relay2-d.mail.gandi.net (unknown [217.70.183.194]) by mslow2.mail.gandi.net (Postfix) with ESMTP id D85FA3A2705 for ; Thu, 11 Jul 2019 15:03:13 +0000 (UTC) X-Originating-IP: 92.137.69.152 Received: from localhost (alyon-656-1-672-152.w92-137.abo.wanadoo.fr [92.137.69.152]) (Authenticated sender: gregory.clement@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B75B84000B; Thu, 11 Jul 2019 15:03:06 +0000 (UTC) From: Gregory CLEMENT To: Robin Murphy , Joerg Roedel , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Subject: [PATCH v2 0/4] Add system mmu support for Armada-806 Date: Thu, 11 Jul 2019 17:02:38 +0200 Message-Id: <20190711150242.25290-1-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 11 Jul 2019 19:37:36 +0000 Cc: devicetree@vger.kernel.org, Jason Cooper , Andrew Lunn , Antoine Tenart , Catalin Marinas , Gregory CLEMENT , Will Deacon , Maxime Chevallier , Nadav Haklai , Rob Herring , Thomas Petazzoni , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org Hello, last year a first version of this series was submitted to add support for IOMMU for AP806, including workaround for accessing ARM SMMU 64bit registers[1]. For the record, AP-806 can't access SMMU registers with 64bit width, this patches split the readq/writeq for 32bit access, due to erratanum #582743. Based on the feedback from Robin Murphy, I also add code ensuring that we won't try to use AArch64 format with 32 bits acces. It was also discussed to not use compatible but propertu to support this workaround. I agree to make this change if needed, but for now I would like to have a feedback on the current code to know if it is acceptable if there is still potential issue. The series was tested on a vanilla v5.1 kernel, and without the series, an USB stick was not detected under QEMU whereas with this series it worked as expected. Greogry [1]: https://lkml.org/lkml/2018/10/15/373 Gregory CLEMENT (1): arm64: dts: marvell: armada-ap806: add smmu support Hanna Hawa (3): iommu/arm-smmu: Introduce wrapper for writeq/readq iommu/arm-smmu: Workaround for Marvell Armada-AP806 SoC erratum #582743 dt-bindings: iommu/arm,smmu: add compatible string for Marvell Documentation/arm64/silicon-errata.txt | 2 + .../devicetree/bindings/iommu/arm,smmu.txt | 1 + arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 17 +++++ drivers/iommu/arm-smmu.c | 74 ++++++++++++++++--- 4 files changed, 83 insertions(+), 11 deletions(-) -- 2.20.1 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14BC8C74A35 for ; Thu, 11 Jul 2019 15:04:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DEEA4216B7 for ; Thu, 11 Jul 2019 15:04:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="K26OcEJh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="C/kX/eoZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEEA4216B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XIHjVjsl9FlgE9G4J6H5qu49EBX2MiRhNdIiMu84YoI=; b=K26OcEJhtyFODS qZxdUMdropL1rfpvNXb4HVpO9lTuQhD41I3OSd7whS7ZS4ED6+XHcjwdhTSLbpRNcEobNDqSCXaG7 0LtS9YyWj9Vs84MNcpiyfwkmFoT0IhUmDsJ3UCLyOTJlSeELUWRnYl6awmSSJ5T4cJonlBrzCOTgQ +OvEfdCRd4ZBZJwWCEtZssAjB+FwluBugjbYaimUvFmU/aARDOWd7jA5ADKRSnLVsR2fCb7UCE2iW 0FkE/s7hMLxmMNny1nczvK+4huvyV0B9s6k1NBfTPVwclZnKWtyLxpilJgkQUxU3CvIn63KWomwiH eBkJ/97OP753sg7spJRw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hlacC-0004Nz-Am; Thu, 11 Jul 2019 15:04:08 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hlac3-0004HU-44 for linux-arm-kernel@bombadil.infradead.org; Thu, 11 Jul 2019 15:03:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z+rdqGtrDP2gNH3YuGneigtYCKwONXwI1ZywEJuPT2Q=; b=C/kX/eoZlwmvlUn1YwOTcKFKhK z2ztisgabCR/vVP41mBx54R5e/FWPtOPPA7Wf7SPo9w+BpjQqBwuaHrn6cRnJQVAf0NqPnWAjLODQ 8BicirH0ItUi7shm6L6P698PEHI2VrUzBVuP6Xzgbds12jNWiOf8E6oPC7noKQxR9X5r3Mq60XoJQ 7/ebL4yCY/Kn4Kfvd2nUQ0BNCNj+i5A3xOsPkuEuUQfw2Y5XX8ZZaKIzVeOxzSYIdhQg3dbYf5fv1 5+xKMyfRkXcGWj2Q3bUd6LZM5ucpM+18tNnbVBOSRuVKaNEeCKPO3Bw1YnwG7fZnxuoMxaBq5wPBC sdMyOM6g==; Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by merlin.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hlac0-0004dM-8i for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2019 15:03:57 +0000 X-Originating-IP: 92.137.69.152 Received: from localhost (alyon-656-1-672-152.w92-137.abo.wanadoo.fr [92.137.69.152]) (Authenticated sender: gregory.clement@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B75B84000B; Thu, 11 Jul 2019 15:03:06 +0000 (UTC) From: Gregory CLEMENT To: Robin Murphy , Joerg Roedel , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Subject: [PATCH v2 0/4] Add system mmu support for Armada-806 Date: Thu, 11 Jul 2019 17:02:38 +0200 Message-Id: <20190711150242.25290-1-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Jason Cooper , Andrew Lunn , Antoine Tenart , Catalin Marinas , Gregory CLEMENT , Will Deacon , Maxime Chevallier , Nadav Haklai , Rob Herring , Thomas Petazzoni , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, last year a first version of this series was submitted to add support for IOMMU for AP806, including workaround for accessing ARM SMMU 64bit registers[1]. For the record, AP-806 can't access SMMU registers with 64bit width, this patches split the readq/writeq for 32bit access, due to erratanum #582743. Based on the feedback from Robin Murphy, I also add code ensuring that we won't try to use AArch64 format with 32 bits acces. It was also discussed to not use compatible but propertu to support this workaround. I agree to make this change if needed, but for now I would like to have a feedback on the current code to know if it is acceptable if there is still potential issue. The series was tested on a vanilla v5.1 kernel, and without the series, an USB stick was not detected under QEMU whereas with this series it worked as expected. Greogry [1]: https://lkml.org/lkml/2018/10/15/373 Gregory CLEMENT (1): arm64: dts: marvell: armada-ap806: add smmu support Hanna Hawa (3): iommu/arm-smmu: Introduce wrapper for writeq/readq iommu/arm-smmu: Workaround for Marvell Armada-AP806 SoC erratum #582743 dt-bindings: iommu/arm,smmu: add compatible string for Marvell Documentation/arm64/silicon-errata.txt | 2 + .../devicetree/bindings/iommu/arm,smmu.txt | 1 + arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 17 +++++ drivers/iommu/arm-smmu.c | 74 ++++++++++++++++--- 4 files changed, 83 insertions(+), 11 deletions(-) -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel