diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/x86info/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/x86info/files')
-rw-r--r-- | sys-apps/x86info/files/1.21-pic.patch | 15 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-1.24-pic.patch | 33 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch | 13 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-modules.conf-rc | 8 |
4 files changed, 69 insertions, 0 deletions
diff --git a/sys-apps/x86info/files/1.21-pic.patch b/sys-apps/x86info/files/1.21-pic.patch new file mode 100644 index 000000000000..ddf24b293e14 --- /dev/null +++ b/sys-apps/x86info/files/1.21-pic.patch @@ -0,0 +1,15 @@ +diff -Nuar x86info-1.21.orig/bench/benchmarks.c x86info-1.21/bench/benchmarks.c +--- x86info-1.21.orig/bench/benchmarks.c 2007-11-26 17:53:58.278467889 -0800 ++++ x86info-1.21/bench/benchmarks.c 2007-11-26 17:54:32.014318066 -0800 +@@ -19,7 +19,10 @@ + #ifdef __linux__ + TIME(asm volatile("int $0x80" :"=a" (tmp) :"0" (__NR_getppid)), "int 0x80"); + #endif +- TIME(asm volatile("cpuid": : :"ax", "dx", "cx", "bx"), "cpuid"); ++ TIME(asm volatile("movl %%ebx,%%edi\n" ++ "cpuid\n" ++ "movl %%edi,%%ebx\n" ++ : : :"%eax", "%edx", "%ecx", "%edi"), "cpuid"); + + TIME(asm volatile("addl $1,0(%esp)"), "addl"); + TIME(asm volatile("lock ; addl $1,0(%esp)"), "locked add"); diff --git a/sys-apps/x86info/files/x86info-1.24-pic.patch b/sys-apps/x86info/files/x86info-1.24-pic.patch new file mode 100644 index 000000000000..5cbd3a586f8e --- /dev/null +++ b/sys-apps/x86info/files/x86info-1.24-pic.patch @@ -0,0 +1,33 @@ +http://bugs.gentoo.org/270388 + +--- cpuid.c ++++ cpuid.c +@@ -62,12 +62,28 @@ + sched_setaffinity(getpid(), sizeof(set), &set); + } + ++#ifdef __PIC__ ++ /* GCC on i386 bitches if you clobber ebx. So hide it behind ++ * gcc's back. */ ++ asm( ++ "movl %%ebx,%%edi\n" ++ "cpuid\n" ++ "movl %%ebx,%1\n" ++ "movl %%edi,%%ebx\n" ++ : "=a" (a), ++ "=m" (b), ++ "+c" (c), ++ "=d" (d) ++ : "0" ((unsigned int)idx) ++ : "edi"); ++#else + asm("cpuid" + : "=a" (a), + "=b" (b), + "+c" (c), + "=d" (d) + : "0" ((unsigned int)idx)); ++#endif + + if (eax!=NULL) + *eax = a; diff --git a/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch b/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch new file mode 100644 index 000000000000..54208cab0843 --- /dev/null +++ b/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch @@ -0,0 +1,13 @@ +diff -Nuar x86info-1.29.orig/Makefile x86info-1.29/Makefile +--- x86info-1.29.orig/Makefile 2011-04-05 22:54:04.000000000 +0000 ++++ x86info-1.29/Makefile 2011-05-15 18:19:42.204228978 +0000 +@@ -12,7 +12,8 @@ + LSMSR_TMP_HEADERS=AMD/k8.h AMD/fam10h.h AMD/fam11h.h generic_msr.h + + %.h: %.regs scripts/createheader.py +- python scripts/createheader.py $< `basename $< .regs` >$@ ++ python scripts/createheader.py $< `basename $< .regs` >$@.tmp ; \ ++ mv $@.tmp $@ + + LSMSR_SRC = \ + lsmsr.c \ diff --git a/sys-apps/x86info/files/x86info-modules.conf-rc b/sys-apps/x86info/files/x86info-modules.conf-rc new file mode 100644 index 000000000000..6a0e6b4fccd4 --- /dev/null +++ b/sys-apps/x86info/files/x86info-modules.conf-rc @@ -0,0 +1,8 @@ +# +# Aliases needed for x86info to probe data +# these are so the modules auto-load as needed +# +alias char-major-202 msr +alias char-major-203 cpuid +alias /dev/cpu/*/msr msr +alias /dev/cpu/*/cpuid cpuid |