aboutsummaryrefslogtreecommitdiff
path: root/lang/intel-compute-runtime
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2020-07-23 21:29:59 +0000
committerJan Beich <jbeich@FreeBSD.org>2020-07-23 21:29:59 +0000
commit2080ffcadb00bee06761dd93443c0b74b48a7a9f (patch)
tree73c43108e262d2c935af6dba327ca988402e510b /lang/intel-compute-runtime
parent1743181565f621488427af44e9c55d9643100cd4 (diff)
downloadports-2080ffcadb00bee06761dd93443c0b74b48a7a9f.tar.gz
ports-2080ffcadb00bee06761dd93443c0b74b48a7a9f.zip
lang/intel-compute-runtime: update to 20.28.17293
Notes
Notes: svn path=/head/; revision=542966
Diffstat (limited to 'lang/intel-compute-runtime')
-rw-r--r--lang/intel-compute-runtime/Makefile3
-rw-r--r--lang/intel-compute-runtime/distinfo6
-rw-r--r--lang/intel-compute-runtime/files/patch-broadcast54
3 files changed, 58 insertions, 5 deletions
diff --git a/lang/intel-compute-runtime/Makefile b/lang/intel-compute-runtime/Makefile
index c762ca33b56a..66dd7ff3dcaf 100644
--- a/lang/intel-compute-runtime/Makefile
+++ b/lang/intel-compute-runtime/Makefile
@@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= compute-runtime
-DISTVERSION= 20.27.17231
-PORTREVISION= 1
+DISTVERSION= 20.28.17293
CATEGORIES= lang
PKGNAMEPREFIX= intel-
diff --git a/lang/intel-compute-runtime/distinfo b/lang/intel-compute-runtime/distinfo
index ac9ef5f6cda6..27f52d9c03c6 100644
--- a/lang/intel-compute-runtime/distinfo
+++ b/lang/intel-compute-runtime/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1593589565
-SHA256 (intel-compute-runtime-20.27.17231_GH0.tar.gz) = 962c1a95ce9ef22df60ea50cfc8ee915b7f7ee1363e703c0a3222760fe9f273e
-SIZE (intel-compute-runtime-20.27.17231_GH0.tar.gz) = 3244989
+TIMESTAMP = 1594209573
+SHA256 (intel-compute-runtime-20.28.17293_GH0.tar.gz) = f8e56b139cde0e9dba20522d16efef77c0586c466301cbd6992b92b939366bad
+SIZE (intel-compute-runtime-20.28.17293_GH0.tar.gz) = 3263475
diff --git a/lang/intel-compute-runtime/files/patch-broadcast b/lang/intel-compute-runtime/files/patch-broadcast
new file mode 100644
index 000000000000..92baf4026b5d
--- /dev/null
+++ b/lang/intel-compute-runtime/files/patch-broadcast
@@ -0,0 +1,54 @@
+Broadcast a signal to all threads on FreeBSD
+
+shared/source/page_fault_manager/linux/cpu_page_fault_manager_linux.cpp:90:33: error: use of undeclared identifier '__NR_gettid'
+ auto selfThreadId = syscall(__NR_gettid);
+ ^
+shared/source/page_fault_manager/linux/cpu_page_fault_manager_linux.cpp:113:13: error: use of undeclared identifier 'SYS_tkill'
+ syscall(SYS_tkill, threadId, SIGUSR1);
+ ^
+
+--- shared/source/page_fault_manager/linux/cpu_page_fault_manager_linux.cpp.orig 2020-07-08 11:59:33 UTC
++++ shared/source/page_fault_manager/linux/cpu_page_fault_manager_linux.cpp
+@@ -9,11 +9,15 @@
+
+ #include "shared/source/helpers/debug_helpers.h"
+
+-#include <dirent.h>
+ #include <sys/mman.h>
++#if defined(__linux__)
++#include <dirent.h>
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#elif defined(__FreeBSD__)
++#include <sys/thr.h>
++#endif
+
+ namespace NEO {
+ std::unique_ptr<PageFaultManager> PageFaultManager::create() {
+@@ -87,6 +91,7 @@ void PageFaultManagerLinux::callPreviousHandler(int si
+ is broadcasted to ensure that every thread received signal and is
+ stucked on PageFaultHandler's mutex before copy from GPU to CPU proceeds. */
+ void PageFaultManagerLinux::broadcastWaitSignal() {
++#if defined(__linux__)
+ auto selfThreadId = syscall(__NR_gettid);
+
+ auto procDir = opendir("/proc/self/task");
+@@ -107,10 +112,17 @@ void PageFaultManagerLinux::broadcastWaitSignal() {
+ }
+
+ closedir(procDir);
++#elif defined(__FreeBSD__)
++ sendSignalToThread(-1);
++#endif
+ }
+
+ void PageFaultManagerLinux::sendSignalToThread(int threadId) {
++#if defined(__linux__)
+ syscall(SYS_tkill, threadId, SIGUSR1);
++#elif defined(__FreeBSD__)
++ thr_kill(threadId, SIGUSR1);
++#endif
+ }
+
+ } // namespace NEO