From fc72f686839f4c3b4bc03b0b96f45ca7fcd2cec4 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 11 Jun 2018 09:11:13 +0200 Subject: [PATCH] Update setparam-ref.c --- kernel/setparam-ref.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/setparam-ref.c b/kernel/setparam-ref.c index 2bb54b406..f654de110 100644 --- a/kernel/setparam-ref.c +++ b/kernel/setparam-ref.c @@ -662,6 +662,10 @@ static __inline__ int get_l2_size(void){ l2 = BITMASK(ecx, 16, 0xffff); #ifndef ARCH_X86 + if (l2 <= 0) { + fprintf (stderr,"OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k\n"); + return 256; + } return l2; #else