From patchwork Thu Oct 13 18:12:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 13006269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id EA66EC433FE for ; Thu, 13 Oct 2022 18:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=oR/JqO7oXji3kofDWxzF4B9vAQOC7u7ylObp2dh4Qlc=; b=jbPAydw3wemTdV pHFS0vkqOr82ir5SiOeQkLYoDbrmSSZ7IOsC9UG1EU4192t3OzRaxl85rC4Ng31kbY8YAYAQkt6Rh MMkbsMiOnroXmQ8A3GE4dEzbXTGoc1VzmMHXS0y6c4ZD6O4WcjKgOogKPW/ZP02fYl8ogFKZAsJry 6Nq7kz7vJVbWMNibDyshY5+zvgE7NZtofe0Lw4U/1SJxGT1MkcwyxxoXwdqgZ4t/II1JUWs8atMi+ Fb0OezkXeP4sXSfsE6bcXvcQa3pvULacWOj0mHXiumGGvnuvOXKKVJ5Yw4MwdlZ/NQAJPsIRL4UCY EXGWb/28jNMFkpgyqupg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oj2hX-00CdKe-0c; Thu, 13 Oct 2022 18:12:59 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oj2hT-00CdEl-74 for linux-arm-kernel@lists.infradead.org; Thu, 13 Oct 2022 18:12:56 +0000 Received: by mail-ej1-x633.google.com with SMTP id ot12so5719234ejb.1 for ; Thu, 13 Oct 2022 11:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=k+VQ8PIgKw2wXGL8CyxmdjJZoYsv8YucY3sAmtvnacY=; b=DDVWrlzPxXMsngCDo/QcByWaD1OiWqjlNo0qm2fhXYTe6IpxdiNpfJhoQ/XRHqkNH/ ZL8aGReXB//kbbUw2a2BpQbb+im3SQb+37YiU6sDPOFlAKSG3BIPbwgt2/nIyQlKaGJH uzCbiOq+YopE+Igm4SZFz95FNkQx2jKOZlrXdAdvRC52OhIFclBz7Ejq9Ry5EnUpU188 taWgVhbhdQTEtx7KNLnZl8GOg+grIzHwF57Bkk9JwW7l+lT8lr7kfOn2yr1YCDW00lvy A8vWb9Y58cJMm/F8YEXB5QEawLZN685VujBFaZC76ctrWAr/uUU0GHqJrTOrt1KkmLVW qJKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=k+VQ8PIgKw2wXGL8CyxmdjJZoYsv8YucY3sAmtvnacY=; b=7JDpGz/dsjTiGNlGAAph4nWMwB51v+8J5JmfRlxoUOEq94ORuehj1ZvEv5uHSSmVKV fv4MFSmepB/ITE1qasNEazdhOLP5owdMRi2KhuQb7Wu7s1Gu+/svtcg+72xrdPExPBwu Wu3yVQaNcmPn9qYcw4MSfa5wy5mgfrTlMXLu1EWwkn05neBxXvnVktXtk0yhuMefgA50 eExY+UW7Tq5OjON4p69ek/s0dCvCfHcqOpgbDBoo9gLbFtzNPejISNiuSIKFe2HUjwJW A44U5x7eMNoE7VkNrQ2cqZggkBcMmrxr8s7UbAcPIrtE6dUS1APQL9pch7qdP47Zn75Z RouA== X-Gm-Message-State: ACrzQf3Fa/FgXUELFWS0xj058rDYJEyeXyn966lkOmCcffdvsCpZ3SiN bqh8vJXO4DZ0BRwZ4zLI+7o= X-Google-Smtp-Source: AMsMyM4ZxITJcZD3wjZMo6kOHrArjKX1JG1U07gSpHUbk5BeHsXrfW0RJfdb/yh86Mr9nLWyjuqABw== X-Received: by 2002:a17:906:7308:b0:78e:191e:8389 with SMTP id di8-20020a170906730800b0078e191e8389mr759810ejc.170.1665684764848; Thu, 13 Oct 2022 11:12:44 -0700 (PDT) Received: from kista.localdomain (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id ku15-20020a170907788f00b0078b551d2fa3sm211109ejc.103.2022.10.13.11.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 11:12:44 -0700 (PDT) From: Jernej Skrabec To: maxime@cerno.tech, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, wens@csie.org, samuel@sholland.org Cc: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 0/5] iommu/sun50i: Fix various issues Date: Thu, 13 Oct 2022 20:12:15 +0200 Message-Id: <20221013181221.3247429-1-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221013_111255_301401_81006B00 X-CRM114-Status: UNSURE ( 8.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Testing IOMMU together with video decoder (Cedrus) exposed many bugs in sun50i-iommu driver. This series addresses all issues so video decoder works well with IOMMU. First two patches address recovery issues in interrupt when either page faults or permission errors were reported. Third patch fixes permission domain assignment. Fourth patch fixes dma sync size. Sometimes sync also touched some other buffers and kernel generated warning in dmesg. Fifth patch fixes issue with synching PDE and PTE tables. Without it, page faults were randomly generated even with valid iova addresses. Please take a look. Best regards, Jernej Jernej Skrabec (5): iommu/sun50i: Fix reset release iommu/sun50i: Consider all fault sources for reset iommu/sun50i: Fix R/W permission check iommu/sun50i: Fix flush size iommu/sun50i: Invalidate iova in map and unmap callback drivers/iommu/sun50i-iommu.c | 66 +++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-) --- 2.38.0