From patchwork Thu May 23 17:52:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 13672146 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 5076CC25B7C for ; Thu, 23 May 2024 17:52:53 +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=9tFThiG8v69Xu6GIzE5XdNBWSi4bJozAHNrI5rziZjM=; b=0DAdeBjs3J76yx cQ9NUoiIGUj5SST82v6yxTJmZimWMrY1iXkmb2ttjQqtgOi1Fw2VgM9PLV9zI3QrljCF0bDdEo6Ep sHQHzMyW5+uLR/EnUfWzspBEIudEMbgRjrxN3AqhWHxSQXe9dQtFCVYCv1M65QXDixE7xR+fCcMU4 2qAj7uTfpszvB3zwEpNbTsG2b1PT2gB1QXDF+H89shOioPuWP+DzJYe1o4UMoFwoiJ/ZAP+nwXfZd 2NwEwko10wYjEzVL4j/KOlRoA/Ggpiu09qShPVIydieVXKXVx5GlR1Y0b1a/FqzkKyN4z+B6tvPrW WcOdTjSBGRsu3A+b2XtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sACcJ-00000006wO3-0J8r; Thu, 23 May 2024 17:52:39 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sACcC-00000006wMz-1gco for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 17:52:36 +0000 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2bf5ba9b1ceso63217a91.0 for ; Thu, 23 May 2024 10:52:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716486750; x=1717091550; 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=G6bfu+bhhkfLjZgMfcumMPy+A+KJDQ31ZI+nlFrepqo=; b=jh3/e4Zo1PQt+YrBOksNSbPiov4f7fTI7/E2HuaoNRzkzRySESa4Z998nrSR9sO+5u fPl+467z/10a+VErwF+tLFkRBopGRpvtY494412vRjKWOmGH46baBaNaewvJLQVq3ElC allKqFAWvG54NU7UkX35euozeBxmsfz7bUClyqXtC14Sns/aTrlMmqcmaT8EtpWA2Yq8 2Sm7DyGOiQzqGvFkH/skt87+1nfcF40DIeP7XZJnSFfoxOgsYXzXgpen3DIcCM6YaoD1 SwvQ+ci4J6aYlh9VGTRR+AURJFR/4BUgL2PqHPhRsQNzRwSlBp9n7004rfIlhdIZTAxM 9cqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716486750; x=1717091550; 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=G6bfu+bhhkfLjZgMfcumMPy+A+KJDQ31ZI+nlFrepqo=; b=N9jnadOpDDcfPaXDxY0aG//YSF9BCYGrlPe2m7de0QoxPXPUbz0CG1x/bf73ihqUMX O1i+r/n7ht/lw2+KJzUjxnWrJ6zSoSeEwbiT6dJbi+csqD219Orpebd7no2fuomT1NTN 5Qf1KVMhGyu2VN0KAUE1GRQQyTJcZoDAbxpLfbyvhDKlxIfaSLckCp/yvNWutnNZav10 OrK5MxT+xGP+xdeUXLL4Tz/DScmcYF20ujTWbBT7tzbLlxD18FnWS48RbV+XrRl8XlFx xE5YTFzv6tVV16gcK7WSD1erKyquWdG9v0/esfkoVbmIq63ghVVZB6qpA9MRZgdpvn5E iX3Q== X-Forwarded-Encrypted: i=1; AJvYcCUbl/rstGd0hL/53zGN6Hy+k71YI2RlTfoYWL3u7tLnr33CXfXSPr+wF7Jt7/7B8JMVhR+yzqIZBehVVHpIxODM9l965BGdsTxgt7Sxnt9+26ShvaQ= X-Gm-Message-State: AOJu0YzmFseORTxsp9uuwbk1x8bOv28IEnmDQGvBKNxIiJ72wKBnLi71 LpdOXgKGRtmip4o6wEkwrWIRWOfKVaTxWx1PMyP1QC+uf+WvvKiP X-Google-Smtp-Source: AGHT+IHvfjzUer2CoBJAM367aQfyuIiKPe9JX5y3lgO0SB5+ywdrrZbwTN4dupnWt0YKqTjVHdV00w== X-Received: by 2002:a17:90a:1788:b0:2ae:6e16:da91 with SMTP id 98e67ed59e1d1-2bd9f461d5fmr5924366a91.29.1716486749999; Thu, 23 May 2024 10:52:29 -0700 (PDT) Received: from localhost ([2a00:79e1:2e00:1301:e1c5:6354:b45d:8ffc]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2bdda058d7asm1825463a91.55.2024.05.23.10.52.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 10:52:29 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Will Deacon , Rob Clark , Boris Brezillon , iommu@lists.linux.dev (open list:IOMMU SUBSYSTEM), Jason Gunthorpe , Joao Martins , Kevin Tian , 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), Lu Baolu , Marijn Suijten , "Rafael J. Wysocki" , Robin Murphy , Sean Paul Subject: [PATCH v4 0/2] io-pgtable-arm + drm/msm: Extend iova fault debugging Date: Thu, 23 May 2024 10:52:20 -0700 Message-ID: <20240523175227.117984-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-20240523_105232_469309_E32F3144 X-CRM114-Status: GOOD ( 10.51 ) 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. v4: Actually wire up the callback 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 | 51 ++++++++++++++++++++----- include/linux/io-pgtable.h | 4 ++ 7 files changed, 108 insertions(+), 10 deletions(-)