diff mbox series

[for_v23,01/16] x86/vdso: sgx: Drop the pseudocode "documentation"

Message ID 20191008044613.12350-2-sean.j.christopherson@intel.com (mailing list archive)
State New, archived
Headers show
Series x86/vdso: sgx: Major vDSO cleanup | expand

Commit Message

Sean Christopherson Oct. 8, 2019, 4:45 a.m. UTC
Remove the pseudocode documentation of __vdso_sgx_enter_enclave().  The
assembly itself needs to be cleaned up to be easily understood without
pseudocode, and the extra documentation adds maintenance overhead.

Only the prototype is needed to coerce kernel-doc into parsing the
function comment, so that isn't lost either.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/entry/vdso/vsgx_enter_enclave.S | 25 +-----------------------
 1 file changed, 1 insertion(+), 24 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/entry/vdso/vsgx_enter_enclave.S b/arch/x86/entry/vdso/vsgx_enter_enclave.S
index 9331279b8fa6..96726000aa27 100644
--- a/arch/x86/entry/vdso/vsgx_enter_enclave.S
+++ b/arch/x86/entry/vdso/vsgx_enter_enclave.S
@@ -58,30 +58,7 @@  typedef int (*sgx_callback)(long rdi, long rsi, long rdx,
 			    long r9, void *tcs, long ursp);
 int __vdso_sgx_enter_enclave(int leaf, void *tcs,
 			     struct sgx_enclave_exinfo *exinfo,
-			     sgx_callback callback)
-{
-	while (leaf == EENTER || leaf == ERESUME) {
-		int rc;
-		try {
-			ENCLU[leaf];
-			rc = 0;
-			if (exinfo)
-				exinfo->leaf = EEXIT;
-		} catch (exception) {
-			rc = -EFAULT;
-			if (exinfo)
-				*exinfo = exception;
-		}
-
-		leaf = callback ? (*callback)(
-			rdi, rsi, rdx, exinfo, r8, r9, tcs, ursp) : rc;
-	}
-
-	if (leaf > 0)
-		return -EINVAL;
-
-	return leaf;
-}
+			     sgx_callback callback);
 #endif
 ENTRY(__vdso_sgx_enter_enclave)
 	/* Prolog */