From patchwork Wed May 22 21:50:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 13671120 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 97A9CC25B78 for ; Wed, 22 May 2024 21:50:51 +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=kUgh/PcM9wpGw/yQopPn1QA/N6ZuVCaXHsZdCavOgRc=; b=LHoFp6MQb3TVpd AUXm3N9xtmnCzibt5Dv0tJ01HwnSYqzaQGuV16NRIyYFnb1GhdJCNU/t+zeSDNDQdxrNj+6SDa3kJ Tjn9SWZS7OUcj5Oz76omFcinCqeg0h7Ypj+2tahRZmv2vPVpB1mXd5YGjsBkK/zH4VUALUS6MLjMt z7W1GGwJp7X2/9LcLVyVF7wAyOasmUl3Kw4f6XWf/USScsLbeSWXFn1h75eVOZHTYUyYu32IoIfN5 e0vNuTSCBzFNVGEDxqSaQQcIfxzB4hM/c50o59SLa/Vio19QRwAWvW6gsTIliF2EfGPBXvHCGYedC Xn4kYV+2VrCVqK14gMvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9tqy-00000004BkA-1QPe; Wed, 22 May 2024 21:50:32 +0000 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9tqu-00000004Bin-2jQs for linux-arm-kernel@lists.infradead.org; Wed, 22 May 2024 21:50:31 +0000 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-5b273b9f1deso3298831eaf.3 for ; Wed, 22 May 2024 14:50:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716414625; x=1717019425; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zBAoZG0al1m+JA3ktgdRMgrP5Z9mDaaNRS9hpWp/qPE=; b=OTNOEpKhz9SwkTB4aLDgFJ5H8rY97Ruj7E2Ro9mNpT8OjzAFRPz9SbSPZ9pKE+jAzY oEXpZSq1VGcW7sE9KsYCpGfsDu49tNw0R3D7E9i+tZfxs4v8194Wz39p54Sj/DAIKwgS L/UK3EzM42wBFqT+C8zMdDFitv793EVhWOKdPS7ooo/K2DoRhTjObdJwLU+UAPL0NsSv gk+Xsc+lcGF7luY3pLffjbNKkAhReSTkDlqPyNPGxDlXZvbUFLHyM9mV2d6HGcMAD/La T6z/lW6XkS0bxoorOhgTn+47Ysu6HAcOCITb+ryOcscCII2skFtuUICe+n/tceglb3HE 8dFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716414625; x=1717019425; 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=zBAoZG0al1m+JA3ktgdRMgrP5Z9mDaaNRS9hpWp/qPE=; b=tCYEfxg897Izz1JV3AgMCfHDbrun6ML+iQWjeaKwbkisSyVEp9Ac6UpMqfOJ2cf0NE znKZS7enSeziUqcEFRPf8nEhIT/5iJaSYnpSlVu+KNkRfXHoMv0jI9Tr2M9IwuU3e4m+ GhxPUxWR9CKD5PRqubK6KJeSfV8A/P1E/AE7PtIqFnHE2VjVp1q+HhsrYWwPGpMxZuHV sO30PGM07QCIL9dAdP74+2H5+8Ks2Mk0RL0NHuyqwhW6PMKng31EeJy9l7uNX50KFjYE xCozTeOem6CcsxyCD4+WZ2ACffkORxUIdYaReZ/pDR6ckq1/QaNERbWN1e4mFUo0X9aA tq8A== X-Forwarded-Encrypted: i=1; AJvYcCVvWhz6wByn8I8h5pbo+SIYvkozmpY0jQW+FGBfVOYGa8Xxb7uABR30Bb+nlOIvQ4pD0UWuIiPWJz3YSIDnNVbZ9go+xHpiUc0hj+dTi5KHR2gTh/w= X-Gm-Message-State: AOJu0Yx4BZ2tiMOFtkIFvjXMQcT/f0l5R8tyaE0+F+eJrR7K/p55aC7O pRfjqc6EAjHc5MkKMkVWq+4Yl0fr0p0u7f9rfZ1lRczaRQXunLaV X-Google-Smtp-Source: AGHT+IEJ5Jxw6Dx7ysWEw9SOQIKtcpP6HWnvE1UIWEcK7zpJ4dBNansEqpDAUp5l6zKniQsabf2Azw== X-Received: by 2002:a05:6359:704b:b0:18d:9e5f:aaec with SMTP id e5c5f4694b2df-1979213ec36mr296068055d.31.1716414624804; Wed, 22 May 2024 14:50:24 -0700 (PDT) Received: from localhost ([2a00:79e1:2e00:1301:e1c5:6354:b45d:8ffc]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f677a20c6bsm13037190b3a.129.2024.05.22.14.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 14:50:23 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Will Deacon , Rob Clark , Boris Brezillon , iommu@lists.linux.dev (open list:IOMMU SUBSYSTEM), Jason Gunthorpe , Joao Martins , Joerg Roedel , Konrad Dybcio , linux-arm-kernel@lists.infradead.org (moderated list:ARM SMMU DRIVERS), linux-kernel@vger.kernel.org (open list), linux-pm@vger.kernel.org (open list:POWER MANAGEMENT CORE), Marijn Suijten , "Rafael J. Wysocki" , Robin Murphy , Sean Paul Subject: [PATCH v3 0/2] io-pgtable-arm + drm/msm: Extend iova fault debugging Date: Wed, 22 May 2024 14:50:03 -0700 Message-ID: <20240522215014.26007-1-robdclark@gmail.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240522_145028_798305_FCA45ED2 X-CRM114-Status: GOOD ( 10.88 ) 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 From: Rob Clark This series extends io-pgtable-arm with a method to retrieve the page table entries traversed in the process of address translation, and then beefs up drm/msm gpu devcore dump to include this (and additional info) in the devcore dump. This is a respin of https://patchwork.freedesktop.org/series/94968/ (minus a patch that was already merged) v2: Fix an armv7/32b build error in the last patch v3: Incorperate Will Deacon's suggestion to make the interface callback based. Rob Clark (2): iommu/io-pgtable-arm: Add way to debug pgtable walk drm/msm: Extend gpu devcore dumps with pgtbl info drivers/gpu/drm/msm/adreno/adreno_gpu.c | 10 +++++ drivers/gpu/drm/msm/msm_gpu.c | 22 +++++++++++ drivers/gpu/drm/msm/msm_gpu.h | 8 ++++ drivers/gpu/drm/msm/msm_iommu.c | 18 +++++++++ drivers/gpu/drm/msm/msm_mmu.h | 5 ++- drivers/iommu/io-pgtable-arm.c | 50 ++++++++++++++++++++----- include/linux/io-pgtable.h | 4 ++ 7 files changed, 107 insertions(+), 10 deletions(-)