Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 1 | Some ARM cpus does not report the cache size or say it is -1 |
| 2 | |
| 3 | https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866306 |
| 4 | |
| 5 | Upstream-status: Pending |
| 6 | |
| 7 | Index: 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 | } |