summaryrefslogtreecommitdiff
path: root/user/haveged/fix-cpu-cache-size-detection.patch
diff options
context:
space:
mode:
authormultiplexd <multi@in-addr.xyz>2019-01-21 21:29:31 +0000
committermultiplexd <multi@in-addr.xyz>2019-01-26 12:40:27 +0000
commit4b8e76cc12e2b73ff9ad920f7f4eb370f0ca3b33 (patch)
tree476d8cb2fe5be45e33f53390d2b0b6a72714ae4c /user/haveged/fix-cpu-cache-size-detection.patch
parenta78b2f2c6a1712a9a6b3a41cf42ba8203d6182d3 (diff)
downloadpackages-4b8e76cc12e2b73ff9ad920f7f4eb370f0ca3b33.tar.gz
packages-4b8e76cc12e2b73ff9ad920f7f4eb370f0ca3b33.tar.bz2
packages-4b8e76cc12e2b73ff9ad920f7f4eb370f0ca3b33.tar.xz
packages-4b8e76cc12e2b73ff9ad920f7f4eb370f0ca3b33.zip
user/haveged: new package
Diffstat (limited to 'user/haveged/fix-cpu-cache-size-detection.patch')
-rw-r--r--user/haveged/fix-cpu-cache-size-detection.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/user/haveged/fix-cpu-cache-size-detection.patch b/user/haveged/fix-cpu-cache-size-detection.patch
new file mode 100644
index 000000000..07da2b46d
--- /dev/null
+++ b/user/haveged/fix-cpu-cache-size-detection.patch
@@ -0,0 +1,15 @@
+Some ARM cpus does not report the cache size or say it is -1
+
+diff --git a/src/havegetune.c b/src/havegetune.c
+index f1a99f2..de39c53 100644
+--- a/src/havegetune.c
++++ b/src/havegetune.c
+@@ -795,6 +795,8 @@ static int vfs_configInfoCache(
+ ctype = vfs_configFile(pAnchor, path, vfs_configType);
+ strcpy(path+plen, "size");
+ size = vfs_configFile(pAnchor, path, vfs_configInt);
++ if (size == -1)
++ size = ctype == 'I' ? GENERIC_ICACHE : GENERIC_DCACHE;
+ cfg_cacheAdd(pAnchor, SRC_VFS_INDEX, pArgs[1], level, ctype, size);
+ }
+ }