[PATCH for_v31 6/6] x86/sgx: Drop the message that fires when there are too many EPC sections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Terminate the section loop with '<' instead of '<=' and drop the
associated pr_warn in sgx_page_cache_init().  Per Boris, there's no
point in warning the user if they can't do anything about it.

Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
---
 arch/x86/kernel/cpu/sgx/main.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
index ba5486a1ef6f4..c51a3ad7fcce0 100644
--- a/arch/x86/kernel/cpu/sgx/main.c
+++ b/arch/x86/kernel/cpu/sgx/main.c
@@ -692,7 +692,7 @@ static bool __init sgx_page_cache_init(void)
 	u64 pa, size;
 	int i;
 
-	for (i = 0; i <= ARRAY_SIZE(sgx_epc_sections); i++) {
+	for (i = 0; i < ARRAY_SIZE(sgx_epc_sections); i++) {
 		cpuid_count(SGX_CPUID, i + SGX_CPUID_FIRST_VARIABLE_SUB_LEAF,
 			    &eax, &ebx, &ecx, &edx);
 
@@ -705,11 +705,6 @@ static bool __init sgx_page_cache_init(void)
 			break;
 		}
 
-		if (i == ARRAY_SIZE(sgx_epc_sections)) {
-			pr_warn("No free slot for an EPC section\n");
-			break;
-		}
-
 		pa = sgx_calc_section_metric(eax, ebx);
 		size = sgx_calc_section_metric(ecx, edx);
 
-- 
2.26.0




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux