summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Rosen2016-08-15 12:12:14 -0400
committerIdo Rosen2016-08-15 12:12:14 -0400
commitf28930877bf5a673e978dd54229d91cf9e8c64e5 (patch)
treeb326a79f0e37089aed02b787e9a2682d14873073
parent8dafcb94c317d61f0649381d8f37c5b917e8e601 (diff)
downloadaur-f28930877bf5a673e978dd54229d91cf9e8c64e5.tar.gz
Updated openonload patch from Solarflare.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--openonload-201606-bug64486-63982-ilog2-no_KALLSYMS_ALL.patch (renamed from openonload-201606-bug64486-63982.patch)72
3 files changed, 64 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7441bd69c22..4a055975721 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Mon Aug 15 13:55:13 UTC 2016
+# Mon Aug 15 16:11:50 UTC 2016
pkgbase = openonload
pkgdesc = A high performance network stack from Solarflare.
pkgver = 201606
@@ -22,13 +22,13 @@ pkgbase = openonload
source = openonload.service
source = openonload-201310-cpp11-space-literal-fix.patch
source = openonload-201606-archlinux.patch
- source = openonload-201606-bug64486-63982.patch
+ source = openonload-201606-bug64486-63982-ilog2-no_KALLSYMS_ALL.patch
sha512sums = 23207e9c701ccf85cdc70229390dfdf5b351d362509a1fd8d8666231f1061fe4054a95dc1d4968ce8c43be490abaf405f252f07a07eec72771b015cf9ff01b16
sha512sums = ac464250f2fb96d13e8ae129bac80c03f8cca62e450fdd765f24ccd064e28e9942e4a16ebc693e75c71fc1eb86c3a1b08337b2e39c6c618e129d8ec87d872bdb
sha512sums = b7e4529e37c64f99c660ca9b58f388cdd8f0d2f250ba875eb210f4909bb1f1c985a065aae64c048ca6f824adc6e3176c6eae1f582c049631326db73e939edd7b
sha512sums = a1d23b60b699c04caee93eb18d855dbe2e65d2115f10eb3771d1a2f04eea8d3b8042550152a5f96140aca759db10c3fbebdde85dbebcf46505c15f2ba7934bdb
sha512sums = c368ce3ed7987d1b374f1e671eb21bc80af4b927e4db4a229712f334ee4843f5921fb64c7ac83df214a9cc37134f8a3360273e9ba9496ff56c329476d26d050a
- sha512sums = 11f9a82a438a8bb169df3c838b9fecaf1c2355082193d59defbf4bcf40cb35e7605678129778fac5dd82e49a8e271b0dfc6b28fc0b1ea6fbe3d1ccbbbd65efff
+ sha512sums = e38384d05987729e56ef293a8f25469ed22733e2513a02a91d1c70d6fd924884078fe27d10cea6b1b5a9b1a76f94906f633b3856730089f9cfde76ba381d1e36
pkgname = openonload
diff --git a/PKGBUILD b/PKGBUILD
index ff5d59cf3af..fc94d217087 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,14 +31,14 @@ source=("http://www.openonload.org/download/openonload-${pkgver//\./-}.tgz"
'openonload.service'
'openonload-201310-cpp11-space-literal-fix.patch'
'openonload-201606-archlinux.patch'
- 'openonload-201606-bug64486-63982.patch'
+ 'openonload-201606-bug64486-63982-ilog2-no_KALLSYMS_ALL.patch'
)
sha512sums=('23207e9c701ccf85cdc70229390dfdf5b351d362509a1fd8d8666231f1061fe4054a95dc1d4968ce8c43be490abaf405f252f07a07eec72771b015cf9ff01b16'
'ac464250f2fb96d13e8ae129bac80c03f8cca62e450fdd765f24ccd064e28e9942e4a16ebc693e75c71fc1eb86c3a1b08337b2e39c6c618e129d8ec87d872bdb'
'b7e4529e37c64f99c660ca9b58f388cdd8f0d2f250ba875eb210f4909bb1f1c985a065aae64c048ca6f824adc6e3176c6eae1f582c049631326db73e939edd7b'
'a1d23b60b699c04caee93eb18d855dbe2e65d2115f10eb3771d1a2f04eea8d3b8042550152a5f96140aca759db10c3fbebdde85dbebcf46505c15f2ba7934bdb'
'c368ce3ed7987d1b374f1e671eb21bc80af4b927e4db4a229712f334ee4843f5921fb64c7ac83df214a9cc37134f8a3360273e9ba9496ff56c329476d26d050a'
- '11f9a82a438a8bb169df3c838b9fecaf1c2355082193d59defbf4bcf40cb35e7605678129778fac5dd82e49a8e271b0dfc6b28fc0b1ea6fbe3d1ccbbbd65efff')
+ 'e38384d05987729e56ef293a8f25469ed22733e2513a02a91d1c70d6fd924884078fe27d10cea6b1b5a9b1a76f94906f633b3856730089f9cfde76ba381d1e36')
install="openonload.install"
@@ -53,7 +53,7 @@ prepare() {
patch -p1 < "${srcdir}/openonload-201310-cpp11-space-literal-fix.patch"
patch -p1 < "${srcdir}/openonload-201606-archlinux.patch"
- patch -p1 < "${srcdir}/openonload-201606-bug64486-63982.patch"
+ patch -p1 < "${srcdir}/openonload-201606-bug64486-63982-ilog2-no_KALLSYMS_ALL.patch"
}
build() {
diff --git a/openonload-201606-bug64486-63982.patch b/openonload-201606-bug64486-63982-ilog2-no_KALLSYMS_ALL.patch
index 93df45fbd0b..9015aab2748 100644
--- a/openonload-201606-bug64486-63982.patch
+++ b/openonload-201606-bug64486-63982-ilog2-no_KALLSYMS_ALL.patch
@@ -1,13 +1,54 @@
diff -ur openonload-201606/src/driver/linux_onload/x86_linux_trampoline.c openonload-201606_patched/src/driver/linux_onload/x86_linux_trampoline.c
--- openonload-201606/src/driver/linux_onload/x86_linux_trampoline.c 2016-06-30 11:42:18.000000000 +0100
-+++ openonload-201606_patched/src/driver/linux_onload/x86_linux_trampoline.c 2016-08-15 14:32:18.640463000 +0100
-@@ -367,29 +367,42 @@
++++ openonload-201606_patched/src/driver/linux_onload/x86_linux_trampoline.c 2016-08-15 16:24:49.526866000 +0100
+@@ -290,19 +290,22 @@
+ */
+ static void **find_syscall_table(void)
+ {
+- unsigned long *idtbase = NULL;
+- unsigned char *p, *end, idt[6];
++ unsigned char *p = NULL;
++ unsigned char *end;
+ void **result = NULL;
+
+ #ifdef ERFM_HAVE_NEW_KALLSYMS
+ /* Linux-4.4 & 4.5: */
+- idtbase = efrm_find_ksym("do_syscall_32_irqs_on");
++ p = efrm_find_ksym("do_syscall_32_irqs_on");
+ /* Linux-4.6: */
+- if( idtbase == NULL )
+- idtbase = efrm_find_ksym("do_int80_syscall_32");
++ if( p == NULL )
++ p = efrm_find_ksym("do_int80_syscall_32");
+ #endif
+
+- if( idtbase == NULL ) {
++ if( p == NULL ) {
++ unsigned long *idtbase;
++ unsigned char idt[6];
++
+ __asm__("sidt %0" : "=m"(idt));
+ idtbase = (unsigned long *)(idt[2] | (idt[3] << 8) | (idt[4] << 16)
+ | (idt[5] << 24));
+@@ -311,9 +314,6 @@
+ p = (unsigned char *)((idtbase[0x80*2] & 0xffff)
+ | (idtbase[0x80*2+1] & 0xffff0000));
+ }
+- else {
+- p = (void *)idtbase;
+- }
+ TRAMP_DEBUG("int 0x80 entry point at %p", p);
+ end = p + 1024 - 7;
+ while (p < end) {
+@@ -366,30 +366,45 @@
+ static void **find_ia32_syscall_table(void)
{
unsigned long result = 0;
- unsigned char *p, *pend;
+- unsigned char *p, *pend;
- unsigned int *idtbase;
-+ unsigned int *idtbase = NULL;
- unsigned char idt[10];
+- unsigned char idt[10];
++ unsigned char *p = NULL;
++ unsigned char *pend;
#ifdef ERFM_HAVE_NEW_KALLSYMS
- void *addr;
@@ -35,15 +76,18 @@ diff -ur openonload-201606/src/driver/linux_onload/x86_linux_trampoline.c openon
- p = (unsigned char *)result;
+ /* Linux-4.4 & 4.5: do_syscall_32_irqs_off is a function, so it does not
+ * require CONFIG_KALLSYMS_ALL=y. */
-+ idtbase = efrm_find_ksym("do_syscall_32_irqs_off");
++ p = efrm_find_ksym("do_syscall_32_irqs_off");
+ /* Linux-4.6: */
-+ if( idtbase == NULL )
-+ idtbase = efrm_find_ksym("do_int80_syscall_32");
++ if( p == NULL )
++ p = efrm_find_ksym("do_int80_syscall_32");
+#endif
+
-+ if( idtbase == NULL ) {
++ if( p == NULL ) {
+ /* linux<4.4: get ia32_sys_call_table variable from asm code at
+ * linux/arch/x86/entry/entry_64_compat.S. */
++ unsigned int *idtbase;
++ unsigned char idt[10];
++
+ __asm__("sidt %0" : "=m"(idt));
+ idtbase = *(unsigned int **)(&idt[2]);
+ TRAMP_DEBUG("idt base=%p, entry 0x80=%08x,%08x,%08x", idtbase,
@@ -53,26 +97,26 @@ diff -ur openonload-201606/src/driver/linux_onload/x86_linux_trampoline.c openon
+ p = (unsigned char *)result;
+ }
+ else {
-+ p = (void *)idtbase;
++ result = (unsigned long)p;
+ }
TRAMP_DEBUG("int 0x80 entry point at %p", p);
pend = p + 1024 - 7;
while (p < pend) {
diff -ur openonload-201606/src/include/onload/version.h openonload-201606_patched/src/include/onload/version.h
---- openonload-201606/src/include/onload/version.h 2016-08-15 14:47:01.461718000 +0100
-+++ openonload-201606_patched/src/include/onload/version.h 2016-08-15 14:47:23.538636000 +0100
+--- openonload-201606/src/include/onload/version.h 2016-06-30 11:42:26.000000000 +0100
++++ openonload-201606_patched/src/include/onload/version.h 2016-08-15 16:28:05.299169000 +0100
@@ -29,7 +29,7 @@
#ifndef ONLOAD_VERSION
-# define ONLOAD_VERSION "201606"
-+# define ONLOAD_VERSION "201606-p64486_63982"
++# define ONLOAD_VERSION "201606-p63982-p64486"
#endif
#define ONLOAD_PRODUCT "OpenOnload"
diff -ur openonload-201606/src/lib/efrm/vi_resource_alloc.c openonload-201606_patched/src/lib/efrm/vi_resource_alloc.c
--- openonload-201606/src/lib/efrm/vi_resource_alloc.c 2016-06-30 11:42:13.000000000 +0100
-+++ openonload-201606_patched/src/lib/efrm/vi_resource_alloc.c 2016-08-15 14:32:28.140994000 +0100
++++ openonload-201606_patched/src/lib/efrm/vi_resource_alloc.c 2016-08-15 16:27:44.743189000 +0100
@@ -1432,6 +1432,15 @@
qso->q_len_entries = n_q_entries;