Skip to content

Commit 0edeab6

Browse files
LuBaolujoergroedel
authored andcommitted
iommu: Remove unrecoverable fault data
The unrecoverable fault data is not used anywhere. Remove it to avoid dead code. Suggested-by: Kevin Tian <[email protected]> Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Tested-by: Yan Zhao <[email protected]> Tested-by: Longfang Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 66014df commit 0edeab6

File tree

1 file changed

+2
-70
lines changed

1 file changed

+2
-70
lines changed

include/linux/iommu.h

Lines changed: 2 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -50,67 +50,7 @@ struct iommu_dma_cookie;
5050

5151
/* Generic fault types, can be expanded IRQ remapping fault */
5252
enum iommu_fault_type {
53-
IOMMU_FAULT_DMA_UNRECOV = 1, /* unrecoverable fault */
54-
IOMMU_FAULT_PAGE_REQ, /* page request fault */
55-
};
56-
57-
enum iommu_fault_reason {
58-
IOMMU_FAULT_REASON_UNKNOWN = 0,
59-
60-
/* Could not access the PASID table (fetch caused external abort) */
61-
IOMMU_FAULT_REASON_PASID_FETCH,
62-
63-
/* PASID entry is invalid or has configuration errors */
64-
IOMMU_FAULT_REASON_BAD_PASID_ENTRY,
65-
66-
/*
67-
* PASID is out of range (e.g. exceeds the maximum PASID
68-
* supported by the IOMMU) or disabled.
69-
*/
70-
IOMMU_FAULT_REASON_PASID_INVALID,
71-
72-
/*
73-
* An external abort occurred fetching (or updating) a translation
74-
* table descriptor
75-
*/
76-
IOMMU_FAULT_REASON_WALK_EABT,
77-
78-
/*
79-
* Could not access the page table entry (Bad address),
80-
* actual translation fault
81-
*/
82-
IOMMU_FAULT_REASON_PTE_FETCH,
83-
84-
/* Protection flag check failed */
85-
IOMMU_FAULT_REASON_PERMISSION,
86-
87-
/* access flag check failed */
88-
IOMMU_FAULT_REASON_ACCESS,
89-
90-
/* Output address of a translation stage caused Address Size fault */
91-
IOMMU_FAULT_REASON_OOR_ADDRESS,
92-
};
93-
94-
/**
95-
* struct iommu_fault_unrecoverable - Unrecoverable fault data
96-
* @reason: reason of the fault, from &enum iommu_fault_reason
97-
* @flags: parameters of this fault (IOMMU_FAULT_UNRECOV_* values)
98-
* @pasid: Process Address Space ID
99-
* @perm: requested permission access using by the incoming transaction
100-
* (IOMMU_FAULT_PERM_* values)
101-
* @addr: offending page address
102-
* @fetch_addr: address that caused a fetch abort, if any
103-
*/
104-
struct iommu_fault_unrecoverable {
105-
__u32 reason;
106-
#define IOMMU_FAULT_UNRECOV_PASID_VALID (1 << 0)
107-
#define IOMMU_FAULT_UNRECOV_ADDR_VALID (1 << 1)
108-
#define IOMMU_FAULT_UNRECOV_FETCH_ADDR_VALID (1 << 2)
109-
__u32 flags;
110-
__u32 pasid;
111-
__u32 perm;
112-
__u64 addr;
113-
__u64 fetch_addr;
53+
IOMMU_FAULT_PAGE_REQ = 1, /* page request fault */
11454
};
11555

11656
/**
@@ -142,19 +82,11 @@ struct iommu_fault_page_request {
14282
/**
14383
* struct iommu_fault - Generic fault data
14484
* @type: fault type from &enum iommu_fault_type
145-
* @padding: reserved for future use (should be zero)
146-
* @event: fault event, when @type is %IOMMU_FAULT_DMA_UNRECOV
14785
* @prm: Page Request message, when @type is %IOMMU_FAULT_PAGE_REQ
148-
* @padding2: sets the fault size to allow for future extensions
14986
*/
15087
struct iommu_fault {
15188
__u32 type;
152-
__u32 padding;
153-
union {
154-
struct iommu_fault_unrecoverable event;
155-
struct iommu_fault_page_request prm;
156-
__u8 padding2[56];
157-
};
89+
struct iommu_fault_page_request prm;
15890
};
15991

16092
/**

0 commit comments

Comments
 (0)