[PATCH v2 2/3] x86/sgx: Remove unused size and count definitions

From: Thorsten Blum

Date: Wed Jul 29 2026 - 09:30:04 EST


The definitions were added with commit 70d3b8ddcd20 ("x86/sgx: Add SGX
architectural data structures"), but have never been used. The SIGSTRUCT
reserved field sizes are also redundant because the structure uses
literal sizes instead. Remove them.

Acked-by: Kai Huang <kai.huang@xxxxxxxxx>
Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
arch/x86/include/asm/sgx.h | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/arch/x86/include/asm/sgx.h b/arch/x86/include/asm/sgx.h
index fe106c55a593..af5cd6ce9010 100644
--- a/arch/x86/include/asm/sgx.h
+++ b/arch/x86/include/asm/sgx.h
@@ -108,9 +108,6 @@ enum sgx_miscselect {

#define SGX_MISC_RESERVED_MASK GENMASK_ULL(63, 1)

-#define SGX_SSA_GPRS_SIZE 184
-#define SGX_SSA_MISC_EXINFO_SIZE 16
-
/**
* enum sgx_attribute - the attributes field in &struct sgx_secs
* @SGX_ATTR_INIT: Enclave can be entered (is initialized).
@@ -227,7 +224,6 @@ enum sgx_page_type {
SGX_PAGE_TYPE_TRIM,
};

-#define SGX_NR_PAGE_TYPES 5
#define SGX_PAGE_TYPE_MASK GENMASK(7, 0)

/**
@@ -288,11 +284,6 @@ struct sgx_pcmd {
u8 mac[16];
} __packed __aligned(128);

-#define SGX_SIGSTRUCT_RESERVED1_SIZE 84
-#define SGX_SIGSTRUCT_RESERVED2_SIZE 20
-#define SGX_SIGSTRUCT_RESERVED3_SIZE 32
-#define SGX_SIGSTRUCT_RESERVED4_SIZE 12
-
/**
* struct sgx_sigstruct_header - defines author of the enclave
* @header1: constant byte string