From nobody Sun Feb 8 18:15:52 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F6B2C7113C for ; Thu, 17 Aug 2023 23:44:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356209AbjHQXn7 (ORCPT ); Thu, 17 Aug 2023 19:43:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356179AbjHQXnq (ORCPT ); Thu, 17 Aug 2023 19:43:46 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 353C835AD; Thu, 17 Aug 2023 16:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692315825; x=1723851825; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3Ob8sW4YHs3EqU16SooLNCExdJFjFUDxQH9Yoq8P0Gg=; b=hZ/scBG5aSIg24UOYe9jvRlz3qxq3rDN2Gtoi6vzqdERSqnghmjd5UwZ S2NsvlzXoDWfPTOaeWyEiirk6C43W5wIZCziM0L61wmfTqMHKYI1ACKuS qep/jlOGAoD7npBybbpooOBGRHEtY5HTHAldnf+1xgSuyzvVsJrfnKZaN KXExwlCo0/k+QXF4l2klRiXsABVeHezWAmD53CNmo5kf3UFg8xBb2BrGg FKPqOFZnrL0LWIQX8BN0GPSY54frFE4K7AFZMFe/CVLkMAENZefvkqL7c ye3o3CLm9pGTUuAQ66A1lPNq9q45bkDIhy7KoYfNly1fCl/4HmgcA/QMq g==; X-IronPort-AV: E=McAfee;i="6600,9927,10805"; a="352552001" X-IronPort-AV: E=Sophos;i="6.01,181,1684825200"; d="scan'208";a="352552001" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2023 16:43:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10805"; a="849051784" X-IronPort-AV: E=Sophos;i="6.01,181,1684825200"; d="scan'208";a="849051784" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmsmga002.fm.intel.com with ESMTP; 17 Aug 2023 16:43:34 -0700 From: Lu Baolu To: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian , Jean-Philippe Brucker , Nicolin Chen Cc: Yi Liu , Jacob Pan , iommu@lists.linux.dev, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Lu Baolu , Jason Gunthorpe Subject: [PATCH v3 03/11] iommu: Remove unrecoverable fault data Date: Fri, 18 Aug 2023 07:40:39 +0800 Message-Id: <20230817234047.195194-4-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230817234047.195194-1-baolu.lu@linux.intel.com> References: <20230817234047.195194-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The unrecoverable fault data is not used anywhere. Remove it to avoid dead code. Suggested-by: Kevin Tian Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe --- include/linux/iommu.h | 70 +------------------------------------------ 1 file changed, 1 insertion(+), 69 deletions(-) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 10f17e1b6c91..e65ba78f3d38 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -48,69 +48,9 @@ struct iommu_dma_cookie; =20 /* Generic fault types, can be expanded IRQ remapping fault */ enum iommu_fault_type { - IOMMU_FAULT_DMA_UNRECOV =3D 1, /* unrecoverable fault */ IOMMU_FAULT_PAGE_REQ, /* page request fault */ }; =20 -enum iommu_fault_reason { - IOMMU_FAULT_REASON_UNKNOWN =3D 0, - - /* Could not access the PASID table (fetch caused external abort) */ - IOMMU_FAULT_REASON_PASID_FETCH, - - /* PASID entry is invalid or has configuration errors */ - IOMMU_FAULT_REASON_BAD_PASID_ENTRY, - - /* - * PASID is out of range (e.g. exceeds the maximum PASID - * supported by the IOMMU) or disabled. - */ - IOMMU_FAULT_REASON_PASID_INVALID, - - /* - * An external abort occurred fetching (or updating) a translation - * table descriptor - */ - IOMMU_FAULT_REASON_WALK_EABT, - - /* - * Could not access the page table entry (Bad address), - * actual translation fault - */ - IOMMU_FAULT_REASON_PTE_FETCH, - - /* Protection flag check failed */ - IOMMU_FAULT_REASON_PERMISSION, - - /* access flag check failed */ - IOMMU_FAULT_REASON_ACCESS, - - /* Output address of a translation stage caused Address Size fault */ - IOMMU_FAULT_REASON_OOR_ADDRESS, -}; - -/** - * struct iommu_fault_unrecoverable - Unrecoverable fault data - * @reason: reason of the fault, from &enum iommu_fault_reason - * @flags: parameters of this fault (IOMMU_FAULT_UNRECOV_* values) - * @pasid: Process Address Space ID - * @perm: requested permission access using by the incoming transaction - * (IOMMU_FAULT_PERM_* values) - * @addr: offending page address - * @fetch_addr: address that caused a fetch abort, if any - */ -struct iommu_fault_unrecoverable { - __u32 reason; -#define IOMMU_FAULT_UNRECOV_PASID_VALID (1 << 0) -#define IOMMU_FAULT_UNRECOV_ADDR_VALID (1 << 1) -#define IOMMU_FAULT_UNRECOV_FETCH_ADDR_VALID (1 << 2) - __u32 flags; - __u32 pasid; - __u32 perm; - __u64 addr; - __u64 fetch_addr; -}; - /** * struct iommu_fault_page_request - Page Request data * @flags: encodes whether the corresponding fields are valid and whether = this @@ -140,19 +80,11 @@ struct iommu_fault_page_request { /** * struct iommu_fault - Generic fault data * @type: fault type from &enum iommu_fault_type - * @padding: reserved for future use (should be zero) - * @event: fault event, when @type is %IOMMU_FAULT_DMA_UNRECOV * @prm: Page Request message, when @type is %IOMMU_FAULT_PAGE_REQ - * @padding2: sets the fault size to allow for future extensions */ struct iommu_fault { __u32 type; - __u32 padding; - union { - struct iommu_fault_unrecoverable event; - struct iommu_fault_page_request prm; - __u8 padding2[56]; - }; + struct iommu_fault_page_request prm; }; =20 /** --=20 2.34.1