FreeBSD Bugzilla – Attachment 177443 Details for
Bug 214878
sysutils/x86info: Update to latest GitHub version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update to today github snapshot 2016-11-27
1.patch (text/plain), 21.60 KB, created by
Konstantin Belousov
on 2016-11-27 12:42:33 UTC
(
hide
)
Description:
Update to today github snapshot 2016-11-27
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2016-11-27 12:42:33 UTC
Size:
21.60 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 427213) >+++ Makefile (working copy) >@@ -2,13 +2,16 @@ > # $FreeBSD$ > > PORTNAME= x86info >-PORTVERSION= 1.30 >-PORTREVISION= 1 >+PORTVERSION= 1.31snap01 > CATEGORIES= sysutils >-MASTER_SITES= http://codemonkey.org.uk/projects/x86info/ >+MASTER_SITES= https://github.com/kernelslacker/x86info >+USE_GITHUB= yes >+GH_ACCOUNT= kernelslacker >+GH_PROJECT= x86info >+GH_TAGNAME= 636fbaa > > MAINTAINER= ports@FreeBSD.org >-COMMENT= x86 CPU identification utility >+COMMENT= x86 CPU identification and feature display utility > > LICENSE= GPLv2 > >@@ -21,15 +24,19 @@ > > PLIST_FILES= bin/lsmsr bin/x86info man/man8/lsmsr.8.gz man/man1/x86info.1.gz > >+do-build: >+ cd ${WRKSRC} && ${MAKE_CMD} >+ cd ${WRKSRC}/lsmsr && ${MAKE_CMD} >+ > do-install: > ${INSTALL_PROGRAM} ${WRKSRC}/x86info ${STAGEDIR}${PREFIX}/bin >- ${INSTALL_PROGRAM} ${WRKSRC}/lsmsr ${STAGEDIR}${PREFIX}/bin >+ ${INSTALL_PROGRAM} ${WRKSRC}/lsmsr/lsmsr ${STAGEDIR}${PREFIX}/bin > ${INSTALL_MAN} ${WRKSRC}/x86info.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 >- ${INSTALL_MAN} ${WRKSRC}/lsmsr.8 ${STAGEDIR}${MAN8PREFIX}/man/man8 >+ ${INSTALL_MAN} ${WRKSRC}/lsmsr/lsmsr.8 ${STAGEDIR}${MAN8PREFIX}/man/man8 > > post-patch: > @${REINPLACE_CMD} \ >- -e 's|python scripts/createheader.py|${PYTHON_CMD} scripts/createheader.py|' \ >- ${WRKSRC}/Makefile >+ -e 's|python createheader.py|${PYTHON_CMD} createheader.py|' \ >+ ${WRKSRC}/lsmsr/Makefile > > .include <bsd.port.mk> >Index: distinfo >=================================================================== >--- distinfo (revision 427213) >+++ distinfo (working copy) >@@ -1,2 +1,3 @@ >-SHA256 (x86info-1.30.tgz) = fe3009850e93a9c5fa38ed6bf74d72686043329fead8f1b2be4b5943d4fc9428 >-SIZE (x86info-1.30.tgz) = 95727 >+TIMESTAMP = 1480247467 >+SHA256 (kernelslacker-x86info-1.31snap01-636fbaa_GH0.tar.gz) = 86f832da6ffcb2097fb10d6bab279d15470357f2efbbf1afd647fa26cd056e8c >+SIZE (kernelslacker-x86info-1.31snap01-636fbaa_GH0.tar.gz) = 85199 >Index: files/patch-AMD_powernow.c >=================================================================== >--- files/patch-AMD_powernow.c (revision 427213) >+++ files/patch-AMD_powernow.c (nonexistent) >@@ -1,13 +0,0 @@ >---- AMD/powernow.c.orig 2011-09-15 15:43:33.000000000 -0700 >-+++ AMD/powernow.c 2011-09-15 15:43:40.000000000 -0700 >-@@ -9,8 +9,9 @@ >- #include <stdio.h> >- #include <unistd.h> >- #include <sys/types.h> >--#include <pci/pci.h> >- #include "../x86info.h" >-+#define PCI_HAVE_Uxx_TYPES >-+#include <pci/pci.h> >- #include "AMD.h" >- #include "powernow.h" >- > >Property changes on: files/patch-AMD_powernow.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-Intel_cachesize.c >=================================================================== >--- files/patch-Intel_cachesize.c (revision 427213) >+++ files/patch-Intel_cachesize.c (nonexistent) >@@ -1,10 +0,0 @@ >---- Intel/cachesize.c.orig 2008-08-09 22:04:12.000000000 +0400 >-+++ Intel/cachesize.c 2008-08-09 22:04:24.000000000 +0400 >-@@ -147,6 +147,7 @@ >- { >- {0xf0, 64, "64 byte prefetching."}, >- {0xf1, 64, "128 byte prefetching."}, >-+ { 0, 0, NULL } >- }; >- >- static unsigned char found_unknown=0; > >Property changes on: files/patch-Intel_cachesize.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-Intel_topology.c >=================================================================== >--- files/patch-Intel_topology.c (revision 427213) >+++ files/patch-Intel_topology.c (nonexistent) >@@ -1,18 +0,0 @@ >---- Intel/topology.c.orig 2011-09-15 15:36:57.000000000 -0700 >-+++ Intel/topology.c 2011-09-15 15:37:10.000000000 -0700 >-@@ -20,6 +20,7 @@ >- * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. >- */ >- >-+#ifndef __FreeBSD__ /* FreeBSD has fls() in strings.h */ >- static int fls(int x) >- { >- int r = 32; >-@@ -48,6 +49,7 @@ >- } >- return r; >- } >-+#endif >- >- static int get_count_order(unsigned int count) >- { > >Property changes on: files/patch-Intel_topology.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-Makefile >=================================================================== >--- files/patch-Makefile (revision 427213) >+++ files/patch-Makefile (working copy) >@@ -1,22 +1,21 @@ >---- Makefile.orig 2011-09-15 15:43:52.000000000 -0700 >-+++ Makefile 2011-09-15 15:44:01.000000000 -0700 >-@@ -1,8 +1,8 @@ >- VERSION=1.30 >+diff --git Makefile Makefile >+index 03bc20f..06109bb 100644 >+--- Makefile >++++ Makefile >+@@ -18,6 +18,7 @@ CFLAGS += -Wstrict-prototypes -Wmissing-prototypes >+ CFLAGS += -Wswitch-enum >+ CFLAGS += -Wundef >+ CFLAGS += -Wwrite-strings >++CFLAGS += `pkg-config --cflags libpci` > >--CFLAGS = -g -O2 -Werror -Wall -Wshadow -Wextra -Wmissing-declarations -Wdeclaration-after-statement -Wredundant-decls >-+CFLAGS += -Wall -Wshadow -Wextra -Wmissing-declarations -Wdeclaration-after-statement -Wredundant-decls `pkg-config --cflags libpci` >- LDFLAGS = -Wl,-z,relro,-z,now >--CC = gcc >-+CC ?= gcc >+ # gcc specific >+ ifneq ($(shell $(CC) -v 2>&1 | grep -c "clang"), 1) >+@@ -67,7 +68,7 @@ X86INFO_OBJS = $(sort $(patsubst %.c,%.o,$(wildcard *.c))) \ > >- SHELL = /bin/sh >+ x86info: $(X86INFO_OBJS) $(X86INFO_HEADERS) >+ $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) \ >+- $(LIBPCI) >++ `pkg-config --libs libpci` $(LIBPCI) > >-@@ -91,7 +91,7 @@ >- X86INFO_OBJS = $(X86INFO_SRC:%.c=%.o) >- >- x86info: $(X86INFO_OBJS) >-- $(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) -lpci >-+ $(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) `pkg-config --libs libpci` -lpci >- >- >- >+ DEPDIR= .deps >+ -include $(X86INFO_SRC:%.c=$(DEPDIR)/%.d) >Index: files/patch-apic.c >=================================================================== >--- files/patch-apic.c (revision 427213) >+++ files/patch-apic.c (nonexistent) >@@ -1,10 +0,0 @@ >---- apic.c.orig 2011-09-15 15:38:59.000000000 -0700 >-+++ apic.c 2011-09-15 15:39:09.000000000 -0700 >-@@ -8,6 +8,7 @@ >- */ >- >- #include <stdio.h> >-+#include <unistd.h> >- #include "apic.h" >- #include "x86info.h" >- > >Property changes on: files/patch-apic.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-cpuid.c >=================================================================== >--- files/patch-cpuid.c (revision 427213) >+++ files/patch-cpuid.c (nonexistent) >@@ -1,111 +0,0 @@ >---- cpuid.c.orig 2011-09-15 15:43:00.000000000 -0700 >-+++ cpuid.c 2011-09-15 15:43:08.000000000 -0700 >-@@ -23,8 +23,16 @@ >- #include <sched.h> >- >- #if defined(__FreeBSD__) >-+# include <sys/param.h> >-+# include <sys/cpuset.h> >- # include <sys/ioctl.h> >--# include <cpu.h> >-+# if __FreeBSD_version < 701102 >-+# define CPUDEV "/dev/cpu%d" >-+# include <cpu.h> >-+# else >-+# define CPUDEV "/dev/cpuctl%d" >-+# include <sys/cpuctl.h> >-+# endif >- #endif >- >- #include "x86info.h" >-@@ -45,7 +53,11 @@ >- unsigned int *eax, unsigned int *ebx, >- unsigned int *ecx, unsigned int *edx) >- { >-+#if defined(__FreeBSD__) >-+ cpuset_t set, tmp_set; >-+#else >- cpu_set_t set, tmp_set; >-+#endif >- unsigned int a = 0, b = 0, c = 0, d = 0; >- int ret; >- >-@@ -58,15 +70,25 @@ >- if (edx != NULL) >- d = *edx; >- >-+#if defined(__FreeBSD__) >-+ ret = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, >-+ -1, sizeof(set), &set); >-+#else >- ret = sched_getaffinity(getpid(), sizeof(set), &set); >-+#endif >- if (ret) >- return ret; >- >- /* man CPU_SET(3): To duplicate a CPU set, use memcpy(3) */ >-- memcpy(&tmp_set, &set, sizeof(cpu_set_t)); >-+ memcpy(&tmp_set, &set, sizeof(tmp_set)); >- CPU_ZERO(&set); >- CPU_SET(cpunr, &set); >-+#if defined(__FreeBSD__) >-+ ret = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, >-+ -1, sizeof(set), &set); >-+#else >- ret = sched_setaffinity(getpid(), sizeof(set), &set); >-+#endif >- if (ret) >- return ret; >- >-@@ -87,7 +109,12 @@ >- *edx = d; >- >- /* Restore initial sched affinity */ >-+#if defined(__FreeBSD__) >-+ ret = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, >-+ -1, sizeof(tmp_set), &tmp_set); >-+#else >- ret = sched_setaffinity(getpid(), sizeof(tmp_set), &tmp_set); >-+#endif >- if (ret) >- return ret; >- return 0; >-@@ -104,9 +131,12 @@ >- { >- static int nodriver=0; >- char cpuname[20]; >-- unsigned char buffer[16]; >- int fh; >-+#if __FreeBSD_version < 701102 >- cpu_cpuid_args_t args; >-+#else >-+ cpuctl_cpuid_args_t args; >-+#endif >- >- if (nodriver == 1) { >- if (native_cpuid(CPU_number, idx, eax,ebx,ecx,edx)) >-@@ -116,10 +146,14 @@ >- >- args.level = idx; >- /* Ok, use the /dev/CPU interface in preference to the _up code. */ >-- (void)snprintf(cpuname,18, "/dev/cpu%d", CPU_number); >-+ (void)snprintf(cpuname,18, CPUDEV, CPU_number); >- fh = open(cpuname, O_RDONLY); >- if (fh != -1) { >-+#if __FreeBSD_version < 701102 >- if (ioctl(fh, CPU_CPUID, &args) != 0) { >-+#else >-+ if (ioctl(fh, CPUCTL_CPUID, &args) != 0) { >-+#endif >- perror(cpuname); >- exit(EXIT_FAILURE); >- } >-@@ -134,8 +168,6 @@ >- } else { >- /* Something went wrong, just do UP and hope for the best. */ >- nodriver = 1; >-- if (nrCPUs != 1) >-- perror(cpuname); >- if (native_cpuid(CPU_number, idx, eax,ebx,ecx,edx)) >- printf("%s", NATIVE_CPUID_FAILED_MSG); >- > >Property changes on: files/patch-cpuid.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-lsmsr.c >=================================================================== >--- files/patch-lsmsr.c (revision 427213) >+++ files/patch-lsmsr.c (nonexistent) >@@ -1,82 +0,0 @@ >---- lsmsr.c.orig 2011-04-05 15:54:04.000000000 -0700 >-+++ lsmsr.c 2011-09-15 16:44:15.000000000 -0700 >-@@ -31,6 +31,18 @@ >- #include "AMD/fam11h.h" >- #include "generic_msr.h" >- >-+#if defined(__FreeBSD__) >-+# include <sys/param.h> >-+# include <sys/ioctl.h> >-+# if __FreeBSD_version < 701102 >-+# define CPUDEV "/dev/cpu%d" >-+# include <cpu.h> >-+# else >-+# define CPUDEV "/dev/cpuctl%d" >-+# include <sys/cpuctl.h> >-+# endif >-+#endif >-+ >- /* Todos: >- * - add (list and eventually write) support for write-only MSR >- * - add decoding support for bit fields >-@@ -116,6 +128,33 @@ >- fprintf(stdout, "%s version %s\n", g.prog, VERSION); >- } >- >-+#if defined(__FreeBSD__) >-+ >-+static int get_msr_val(unsigned int msr, unsigned long long *val) >-+{ >-+#if __FreeBSD_version < 701102 >-+ cpu_msr_args_t args; >-+#else >-+ cpuctl_msr_args_t args; >-+#endif >-+ >-+ args.msr = msr; >-+#if __FreeBSD_version < 701102 >-+ if (ioctl(g.fd, CPU_RDMSR, &args) != 0) { >-+#else >-+ if (ioctl(g.fd, CPUCTL_RDMSR, &args) != 0) { >-+#endif >-+ fflush(stdout); >-+ fprintf(stderr, >-+ "could not read MSR 0x%8.8x (%s): %s\n", >-+ msr, get_reg_name(msr, g.msr_table), strerror(errno)); >-+ return 0; >-+ } >-+ *val = args.data; >-+ >-+ return 0; >-+} >-+#else /* !__FreeBSD__ */ >- static int get_msr_val(unsigned int msr, unsigned long long *val) >- { >- off64_t off; >-@@ -141,11 +180,17 @@ >- return 0; >- } >- >-+#endif >-+ >- static int open_dev(int cpu) >- { >- char s[20]; >- >-+#ifdef __FreeBSD__ >-+ snprintf(s, sizeof(s), CPUDEV, cpu); >-+#else >- snprintf(s, sizeof(s), "/dev/cpu/%d/msr", cpu); >-+#endif >- g.fd = open(s, O_RDONLY); >- if (g.fd < 0) >- fprintf(stderr, "could not open device %s: %s\n", s, >-@@ -161,7 +206,7 @@ >- >- static int _show_msr(struct reg_spec *reg) >- { >-- unsigned long long val; >-+ unsigned long long val = 0; >- if (!g.list) >- if (get_msr_val(reg->address, &val)) >- return 1; > >Property changes on: files/patch-lsmsr.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-lsmsr_Makefile >=================================================================== >--- files/patch-lsmsr_Makefile (nonexistent) >+++ files/patch-lsmsr_Makefile (working copy) >@@ -0,0 +1,17 @@ >+diff --git lsmsr/Makefile lsmsr/Makefile >+index 1183f6e..b4d39ef 100644 >+--- lsmsr/Makefile >++++ lsmsr/Makefile >+@@ -14,12 +14,10 @@ CFLAGS += -Wdeclaration-after-statement >+ CFLAGS += -Wformat=2 >+ CFLAGS += -Wimplicit >+ CFLAGS += -Winit-self >+-CFLAGS += -Wlogical-op >+ CFLAGS += -Wmissing-declarations -Wredundant-decls >+ CFLAGS += -Wnested-externs >+ CFLAGS += -Wpacked >+ CFLAGS += -Wshadow >+-CFLAGS += -Wstrict-aliasing=3 >+ CFLAGS += -Wstrict-prototypes -Wmissing-prototypes >+ CFLAGS += -Wswitch-enum >+ CFLAGS += -Wundef > >Property changes on: files/patch-lsmsr_Makefile >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-lsmsr_lsmsr.c >=================================================================== >--- files/patch-lsmsr_lsmsr.c (nonexistent) >+++ files/patch-lsmsr_lsmsr.c (working copy) >@@ -0,0 +1,102 @@ >+diff --git lsmsr/lsmsr.c lsmsr/lsmsr.c >+index b39a9f4..da409b9 100644 >+--- lsmsr/lsmsr.c >++++ lsmsr/lsmsr.c >+@@ -34,6 +34,18 @@ >+ #include "AMD_fam15h.h" >+ #include "generic_msr.h" >+ >++#if defined(__FreeBSD__) >++# include <sys/param.h> >++# include <sys/ioctl.h> >++# if __FreeBSD_version < 701102 >++# define CPUDEV "/dev/cpu%d" >++# include <cpu.h> >++# else >++# define CPUDEV "/dev/cpuctl%d" >++# include <sys/cpuctl.h> >++# endif >++#endif >++ >+ /* Todos: >+ * - add (list and eventually write) support for write-only MSR >+ * - add decoding support for bit fields >+@@ -119,13 +131,40 @@ static void version(void) >+ fprintf(stdout, "%s version %s\n", g.prog, LSMSR_VERSION); >+ } >+ >++#if defined(__FreeBSD__) >++ >++static int get_msr_val(unsigned int msr, unsigned long long *val) >++{ >++#if __FreeBSD_version < 701102 >++ cpu_msr_args_t args; >++#else >++ cpuctl_msr_args_t args; >++#endif >++ >++ args.msr = msr; >++#if __FreeBSD_version < 701102 >++ if (ioctl(g.fd, CPU_RDMSR, &args) != 0) { >++#else >++ if (ioctl(g.fd, CPUCTL_RDMSR, &args) != 0) { >++#endif >++ fflush(stdout); >++ fprintf(stderr, >++ "could not read MSR 0x%8.8x (%s): %s\n", >++ msr, get_reg_name(msr, g.msr_table), strerror(errno)); >++ return 0; >++ } >++ *val = args.data; >++ >++ return 0; >++} >++#else /* !__FreeBSD__ */ >+ static int get_msr_val(unsigned int msr, unsigned long long *val) >+ { >+ off64_t off; >+ int err; >+ >+ *val = 0; >+- off = lseek64(g.fd, (off64_t) msr, SEEK_SET); >++ off = lseek(g.fd, (off64_t) msr, SEEK_SET); >+ if (off == (off_t) -1) { >+ perror("invalid MSR"); >+ return 1; >+@@ -144,11 +183,17 @@ static int get_msr_val(unsigned int msr, unsigned long long *val) >+ return 0; >+ } >+ >++#endif >++ >+ static int open_dev(int cpu) >+ { >+ char s[20]; >+ >++#ifdef __FreeBSD__ >++ snprintf(s, sizeof(s), CPUDEV, cpu); >++#else >+ snprintf(s, sizeof(s), "/dev/cpu/%d/msr", cpu); >++#endif >+ g.fd = open(s, O_RDONLY); >+ if (g.fd < 0) >+ fprintf(stderr, "could not open device %s: %s\n", s, >+@@ -317,6 +362,7 @@ static int set_msr_table(void) >+ } >+ >+ struct reg_spec unknown_msr = {0, "unknown", "(at your own risk)", NULL, NULL}; >++unsigned int nrCPUs = 1; >+ >+ #define OPT_MAX 32 >+ int main(int argc, char *argv[]) >+@@ -325,6 +371,10 @@ int main(int argc, char *argv[]) >+ int i, li, ret; >+ struct reg_spec *reg; >+ >++ nrCPUs = sysconf(_SC_NPROCESSORS_ONLN); >++ if (nrCPUs > 65535) >++ nrCPUs = 1; >++ >+ ret = 1; >+ if((g.prog = rindex(argv[0], '/'))) >+ ++g.prog; > >Property changes on: files/patch-lsmsr_lsmsr.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-mptable.c >=================================================================== >--- files/patch-mptable.c (revision 427213) >+++ files/patch-mptable.c (nonexistent) >@@ -1,12 +0,0 @@ >---- mptable.c.orig 2011-09-15 15:37:32.000000000 -0700 >-+++ mptable.c 2011-09-15 15:37:46.000000000 -0700 >-@@ -37,7 +37,9 @@ >- #include "mptable.h" >- #include "x86info.h" >- >-+#ifndef __FreeBSD__ >- typedef unsigned long vm_offset_t; >-+#endif >- >- /* EBDA is @ 40:0e in real-mode terms */ >- #define EBDA_POINTER 0x040e /* location of EBDA pointer */ > >Property changes on: files/patch-mptable.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-mtrr.c >=================================================================== >--- files/patch-mtrr.c (revision 427213) >+++ files/patch-mtrr.c (nonexistent) >@@ -1,21 +0,0 @@ >---- mtrr.c.orig 2011-09-15 15:38:23.000000000 -0700 >-+++ mtrr.c 2011-09-15 15:38:31.000000000 -0700 >-@@ -8,7 +8,9 @@ >- */ >- >- #include <stdio.h> >-+#ifdef __linux__ >- #include <asm/mtrr.h> >-+#endif >- #include "x86info.h" >- >- #define IA32_MTRRCAP_SMRR 0x800 >-@@ -25,7 +27,7 @@ >- >- static unsigned int max_phy_addr = 0; >- >--static char * mtrr_types[MTRR_NUM_TYPES] = >-+static char * mtrr_types[] = >- { >- "uncacheable", >- "write-combining", > >Property changes on: files/patch-mtrr.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-rdmsr.c >=================================================================== >--- files/patch-rdmsr.c (revision 427213) >+++ files/patch-rdmsr.c (nonexistent) >@@ -1,54 +0,0 @@ >---- rdmsr.c.orig 2011-09-15 15:39:28.000000000 -0700 >-+++ rdmsr.c 2011-09-15 15:39:37.000000000 -0700 >-@@ -18,8 +18,15 @@ >- #include "x86info.h" >- >- #if defined(__FreeBSD__) >-+# include <sys/param.h> >- # include <sys/ioctl.h> >--# include <cpu.h> >-+# if __FreeBSD_version < 701102 >-+# define CPUDEV "/dev/cpu%d" >-+# include <cpu.h> >-+# else >-+# define CPUDEV "/dev/cpuctl%d" >-+# include <sys/cpuctl.h> >-+# endif >- #endif >- >- #if defined(__FreeBSD__) >-@@ -27,16 +34,18 @@ >- int read_msr(int cpu, unsigned int idx, unsigned long long *val) >- { >- char cpuname[16]; >-- unsigned char buffer[8]; >-- unsigned long lo, hi; >- int fh; >- static int nodriver=0; >-+#if __FreeBSD_version < 701102 >- cpu_msr_args_t args; >-+#else >-+ cpuctl_msr_args_t args; >-+#endif >- >- if (nodriver==1) >- return 0; >- >-- (void)snprintf(cpuname, sizeof(cpuname), "/dev/cpu%d", cpu); >-+ (void)snprintf(cpuname, sizeof(cpuname), CPUDEV, cpu); >- >- fh = open(cpuname, O_RDONLY); >- if (fh==-1) { >-@@ -46,7 +55,11 @@ >- } >- >- args.msr = idx; >-- if (ioctl(fh, CPU_RDMSR, &args) != 0) { >-+#if __FreeBSD_version < 701102 >-+ if (ioctl(fh, CPU_RDMSR, &args) != 0) { >-+#else >-+ if (ioctl(fh, CPUCTL_RDMSR, &args) != 0) { >-+#endif >- if (close(fh) == -1) { >- perror("close"); >- exit(EXIT_FAILURE); > >Property changes on: files/patch-rdmsr.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-x86info.h >=================================================================== >--- files/patch-x86info.h (revision 427213) >+++ files/patch-x86info.h (nonexistent) >@@ -1,34 +0,0 @@ >---- x86info.h.orig 2011-09-15 15:37:57.000000000 -0700 >-+++ x86info.h 2011-09-15 15:38:09.000000000 -0700 >-@@ -220,6 +220,7 @@ >- >- #define _GNU_SOURCE >- #define __USE_GNU >-+#ifdef __linux__ >- #include <sched.h> >- #include <sys/types.h> >- #include <unistd.h> >-@@ -233,5 +234,23 @@ >- sched_setaffinity(getpid(), sizeof(set), &set); >- } >- } >-+#elif defined(__FreeBSD__) >-+#include <sys/types.h> >-+#include <sys/param.h> >-+#include <sys/cpuset.h> >-+static inline void bind_cpu(struct cpudata *cpu) >-+{ >-+ cpuset_t set; >- >-+ if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, >-+ sizeof(set), &set) == 0) { >-+ CPU_ZERO(&set); >-+ CPU_SET(cpu->number, &set); >-+ cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, >-+ sizeof(set), &set); >-+ } >-+} >-+#else >-+# error "bind_cpu() is not implemented for this platform!" >-+#endif >- #endif /* _X86INFO_H */ > >Property changes on: files/patch-x86info.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
vlad-fbsd
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 214878
: 177443