Date: Wed, 12 Oct 2016 18:25:29 +0000 (UTC) From: Pawel Pekala <pawel@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r423878 - in head/sysutils/cpuid: . files Message-ID: <201610121825.u9CIPT6V015667@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pawel Date: Wed Oct 12 18:25:29 2016 New Revision: 423878 URL: https://svnweb.freebsd.org/changeset/ports/423878 Log: - Update to verion 20160814 - Take maintainership PR: 213377 Submitted by: Piotr Kubaj Modified: head/sysutils/cpuid/Makefile head/sysutils/cpuid/distinfo head/sysutils/cpuid/files/patch-cpuid.c Modified: head/sysutils/cpuid/Makefile ============================================================================== --- head/sysutils/cpuid/Makefile Wed Oct 12 18:18:24 2016 (r423877) +++ head/sysutils/cpuid/Makefile Wed Oct 12 18:25:29 2016 (r423878) @@ -2,13 +2,13 @@ # $FreeBSD$ PORTNAME= cpuid -PORTVERSION= 20140123 +PORTVERSION= 20160814 CATEGORIES= sysutils MASTER_SITES= http://www.etallen.com/cpuid/ PKGNAMESUFFIX= ${CPUID_SUFFIX} DISTNAME= ${PORTNAME}-${PORTVERSION}.src -MAINTAINER= ports@FreeBSD.org +MAINTAINER= pkubaj@anongoth.pl COMMENT= Tool to dump x86 CPUID information about the CPU(s) LICENSE= GPLv2 @@ -17,7 +17,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= only works with x86 CPUs -USES= gmake +USES= gmake perl5 +USE_PERL5= build ALL_TARGET= default WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} Modified: head/sysutils/cpuid/distinfo ============================================================================== --- head/sysutils/cpuid/distinfo Wed Oct 12 18:18:24 2016 (r423877) +++ head/sysutils/cpuid/distinfo Wed Oct 12 18:25:29 2016 (r423878) @@ -1,2 +1,3 @@ -SHA256 (cpuid-20140123.src.tar.gz) = b85aba5696d382f0dba8dc246bd42d09767089d6181a9cd0633d626f079d79ff -SIZE (cpuid-20140123.src.tar.gz) = 67882 +TIMESTAMP = 1476108297 +SHA256 (cpuid-20160814.src.tar.gz) = fd4e2b2d88f417ae32f47a92d29351de395a36578fde8aedc228e2e131f38ecd +SIZE (cpuid-20160814.src.tar.gz) = 77160 Modified: head/sysutils/cpuid/files/patch-cpuid.c ============================================================================== --- head/sysutils/cpuid/files/patch-cpuid.c Wed Oct 12 18:18:24 2016 (r423877) +++ head/sysutils/cpuid/files/patch-cpuid.c Wed Oct 12 18:25:29 2016 (r423878) @@ -1,41 +1,43 @@ ---- cpuid.c.orig 2014-01-24 01:26:27 UTC +--- cpuid.c.orig 2016-08-15 03:54:53 UTC +++ cpuid.c -@@ -17,6 +17,8 @@ - ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ +@@ -23,6 +23,8 @@ + #define USE_KERNEL_SCHED_SETAFFINITY + #endif +#define CPUID_MAJOR 0 + #define _GNU_SOURCE #include <stdio.h> #include <sys/types.h> -@@ -26,11 +28,14 @@ - #include <unistd.h> - #include <stdlib.h> +@@ -34,6 +36,8 @@ #include <string.h> --#include <linux/major.h> -+//#include <linux/major.h> #include <regex.h> #include <getopt.h> - #include <sys/syscall.h> - +#include <pthread.h> +#include <pthread_np.h> -+ - typedef int boolean; - #define TRUE 1 - #define FALSE 0 -@@ -5877,7 +5882,8 @@ real_setup(unsigned int cpu, - = (1 << cpu % (sizeof(unsigned int)*8)); + #ifdef USE_CPUID_MODULE + #include <linux/major.h> +@@ -6420,11 +6424,16 @@ real_setup(unsigned int cpu, + int status; + status = syscall(__NR_sched_setaffinity, 0, sizeof(mask), &mask); + #else +- cpu_set_t cpuset; ++ cpuset_t cpuset; + CPU_ZERO(&cpuset); + CPU_SET(cpu, &cpuset); int status; -- status = syscall(__NR_sched_setaffinity, 0, sizeof(mask), &mask); -+ //status = syscall(__NR_sched_setaffinity, 0, sizeof(mask), &mask); -+ status = pthread_setaffinity_np(0, sizeof(mask), &mask); +- status = sched_setaffinity(0, sizeof(cpu_set_t), &cpuset); ++#if defined(__FreeBSD__) ++ status = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, ++ -1, sizeof(cpuset_t), &cpuset); ++#else ++ status = sched_setaffinity(0, sizeof(cpuset_t), &cpuset); ++#endif + #endif if (status == -1) { if (cpu > 0) { - if (errno == EINVAL) return -1; -@@ -5987,11 +5993,14 @@ static int real_get (int cpuid +@@ -6539,11 +6548,14 @@ static int real_get (int cpuid : "a" (reg), "c" (ecx)); } else { @@ -53,7 +55,7 @@ if (result == -1) { if (quiet) { return FALSE; -@@ -6432,7 +6441,8 @@ main(int argc, +@@ -7050,7 +7062,8 @@ main(int argc, }; boolean opt_one_cpu = FALSE; @@ -63,7 +65,7 @@ boolean opt_kernel = FALSE; boolean opt_raw = FALSE; boolean opt_debug = FALSE; -@@ -6508,7 +6518,8 @@ main(int argc, +@@ -7134,7 +7147,8 @@ main(int argc, } // Default to -i. So use inst unless -k is specified.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610121825.u9CIPT6V015667>