blob: 5b68f19661b827b8220b2163304cbee6e4434a53 [file] [log] [blame]
Brad Bishop15ae2502019-06-18 21:44:24 -04001Some ARM cpus does not report the cache size or say it is -1
2
3https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866306
4
5Upstream-status: Pending
6
7Index: haveged-1.9.2/src/havegetune.c
8===================================================================
9--- haveged-1.9.2.orig/src/havegetune.c
10+++ haveged-1.9.2/src/havegetune.c
11@@ -795,6 +795,9 @@ static int vfs_configInfoCache(
12 ctype = vfs_configFile(pAnchor, path, vfs_configType);
13 strcpy(path+plen, "size");
14 size = vfs_configFile(pAnchor, path, vfs_configInt);
15+ if (size == -1) {
16+ size = ctype == 'I' ? GENERIC_ICACHE : GENERIC_DCACHE;
17+ }
18 cfg_cacheAdd(pAnchor, SRC_VFS_INDEX, pArgs[1], level, ctype, size);
19 }
20 }