summaryrefslogtreecommitdiff
path: root/user/haveged/fix-cpu-cache-size-detection.patch
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2019-01-27 20:20:57 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2019-01-27 20:20:57 +0000
commit35cf1156baad094ddcf9ef26ad26e71fe5df1a97 (patch)
tree1658207d9ae5156b742148c50309b051e756eb9e /user/haveged/fix-cpu-cache-size-detection.patch
parentebeee0de334e0fe87934393f1be977aeb17805f3 (diff)
parent4b8e76cc12e2b73ff9ad920f7f4eb370f0ca3b33 (diff)
downloadpackages-35cf1156baad094ddcf9ef26ad26e71fe5df1a97.tar.gz
packages-35cf1156baad094ddcf9ef26ad26e71fe5df1a97.tar.bz2
packages-35cf1156baad094ddcf9ef26ad26e71fe5df1a97.tar.xz
packages-35cf1156baad094ddcf9ef26ad26e71fe5df1a97.zip
Merge branch 'haveged' into 'master'
user/haveged: new package APKBUILD, patch, and OpenRC script imported from Alpine. Builds and runs on `x86_64`. Note the OpenRC configuration file does not set any default options -- it may be desirable to set some default options there such as `-w 1024`, which I believe is common in other distributions. See merge request !149
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);
+ }
+ }