linux-sgx.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/sgx: Return 0 when !CONFIG_INTEL_SGX_DRIVER
@ 2019-07-14 14:32 Jarkko Sakkinen
  2019-07-15  9:29 ` Jarkko Sakkinen
  2019-07-15 13:59 ` Sean Christopherson
  0 siblings, 2 replies; 13+ messages in thread
From: Jarkko Sakkinen @ 2019-07-14 14:32 UTC (permalink / raw)
  To: linux-sgx; +Cc: sean.j.christopherson, Jarkko Sakkinen

When the config option is not enabled the initialization is always
succesful.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
---
This was the reason why I got the -ENODEV error with my BuildRoot image.
The config option was not enabled but took some time realize as I was
kind of getting an error code from the driver initialization. Finally
when I used ftrace with 'sgx*' I knew what was going on.
 arch/x86/kernel/cpu/sgx/driver/driver.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/sgx/driver/driver.h b/arch/x86/kernel/cpu/sgx/driver/driver.h
index da60839b133a..aafa64a4f481 100644
--- a/arch/x86/kernel/cpu/sgx/driver/driver.h
+++ b/arch/x86/kernel/cpu/sgx/driver/driver.h
@@ -37,7 +37,7 @@ int sgx_drv_init(void);
 #else
 static inline int sgx_drv_init(void)
 {
-	return -ENODEV;
+	return 0;
 }
 #endif
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-08-22 14:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-14 14:32 [PATCH] x86/sgx: Return 0 when !CONFIG_INTEL_SGX_DRIVER Jarkko Sakkinen
2019-07-15  9:29 ` Jarkko Sakkinen
2019-07-15 13:59 ` Sean Christopherson
2019-08-01 16:22   ` Jarkko Sakkinen
2019-08-01 16:29     ` Sean Christopherson
2019-08-02 19:33       ` Jarkko Sakkinen
2019-08-13  1:22         ` Sean Christopherson
2019-08-15 21:56           ` Jarkko Sakkinen
2019-08-21 17:24             ` Sean Christopherson
2019-08-22  0:29               ` Jarkko Sakkinen
2019-08-22  0:31                 ` Sean Christopherson
2019-08-22 14:42                   ` Jarkko Sakkinen
2019-08-22  1:26                 ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).