From 6fa7e8ccd2e4a482437c73ff74a99a75cc1801ba Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 11 Jun 2018 00:02:05 +0200 Subject: [PATCH] Return a somewhat sane default value for L2 cache size if cpuid returned something unexpected Fixes #1610, the KVM hypervisor on Google Chromebooks returning zero for CPUID 0x80000006, causing DYNAMIC_ARCH builds of OpenBLAS to hang --- kernel/setparam-ref.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/setparam-ref.c b/kernel/setparam-ref.c index 9030d7c6d..2bb54b406 100644 --- a/kernel/setparam-ref.c +++ b/kernel/setparam-ref.c @@ -647,7 +647,9 @@ static int get_l2_size_old(void){ return 6144; } } - return 0; +// return 0; +fprintf (stderr,"OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k\n"); +return 256; } #endif