diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/0001-linux-fix-compiler-warning.patch | 29 | ||||
-rw-r--r-- | debian/patches/0002-kern-improve-assert.patch | 35 | ||||
-rw-r--r-- | debian/patches/0003-i386-drop-needless-instruction-from-copyout.patch | 35 | ||||
-rw-r--r-- | debian/patches/0004-i386-specialize-copyinmsg-and-copyoutmsg.patch | 139 | ||||
-rw-r--r-- | debian/patches/series | 4 |
5 files changed, 0 insertions, 242 deletions
diff --git a/debian/patches/0001-linux-fix-compiler-warning.patch b/debian/patches/0001-linux-fix-compiler-warning.patch deleted file mode 100644 index 7d21f64..0000000 --- a/debian/patches/0001-linux-fix-compiler-warning.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f2550dfc73da3951b411157d73bb4ad7bd2ea0b2 Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Fri, 19 Dec 2014 02:02:44 +0100 -Subject: [PATCH gnumach 1/4] linux: fix compiler warning - -If the loop above completes at least one iteration, `i' will be larger -than zero. - -* linux/dev/glue/block.c (rdwr_full): Add assertion to appease the -compiler. ---- - linux/dev/glue/block.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c -index 79a3646..da4ef38 100644 ---- a/linux/dev/glue/block.c -+++ b/linux/dev/glue/block.c -@@ -624,6 +624,7 @@ rdwr_full (int rw, kdev_t dev, loff_t *off, char **buf, int *resid, int bshift) - } - if (! err) - { -+ assert (i > 0); - ll_rw_block (rw, i, bhp, 0); - wait_on_buffer (bhp[i - 1]); - } --- -2.1.4 - diff --git a/debian/patches/0002-kern-improve-assert.patch b/debian/patches/0002-kern-improve-assert.patch deleted file mode 100644 index 4662e59..0000000 --- a/debian/patches/0002-kern-improve-assert.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c2d5ad6f96746593257eb6aba02aae5de3d93664 Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Fri, 19 Dec 2014 01:49:09 +0100 -Subject: [PATCH gnumach 2/4] kern: improve assert - -Use the ternary operator to implement `assert' like it is done in the -glibc. The glibcs changelog does not mention the rationale behind -this change, but doing the same seems to improve our IPC performance. - -* kern/assert.h (assert): Define macro using the ternary operator. ---- - kern/assert.h | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/kern/assert.h b/kern/assert.h -index b074fbb..bd2a8be 100644 ---- a/kern/assert.h -+++ b/kern/assert.h -@@ -39,10 +39,9 @@ - extern void Assert(const char *exp, const char *filename, int line) __attribute__ ((noreturn)); - - #define assert(ex) \ --MACRO_BEGIN \ -- if (!(ex)) \ -- Assert(#ex, __FILE__, __LINE__); \ --MACRO_END -+ ((ex) \ -+ ? (void) (0) \ -+ : Assert (#ex, __FILE__, __LINE__)) - - #define assert_static(x) assert(x) - --- -2.1.4 - diff --git a/debian/patches/0003-i386-drop-needless-instruction-from-copyout.patch b/debian/patches/0003-i386-drop-needless-instruction-from-copyout.patch deleted file mode 100644 index 6e5b6a9..0000000 --- a/debian/patches/0003-i386-drop-needless-instruction-from-copyout.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 5bf4c1cb311ade33ea2c4b3706f7c6a42917b008 Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Fri, 20 Feb 2015 19:03:20 +0100 -Subject: [PATCH gnumach 3/4] i386: drop needless instruction from `copyout' - -* i386/i386/locore.S (copyout): Do not needlessly copy length to %eax -first. ---- - i386/i386/locore.S | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/i386/i386/locore.S b/i386/i386/locore.S -index 15715f6..2e04bb8 100644 ---- a/i386/i386/locore.S -+++ b/i386/i386/locore.S -@@ -1297,14 +1297,13 @@ Entry(copyoutmsg) - jbe copyout_retry /* Use slow version on i386 */ - #endif /* !defined(MACH_HYP) && !PAE */ - -- movl %edx,%eax /* use count */ - /*cld*/ /* count up: always this way in GCC code */ -- movl %eax,%ecx /* move by longwords first */ -+ movl %edx,%ecx /* move by longwords first */ - shrl $2,%ecx - RECOVER(copyout_fail) - rep - movsl -- movl %eax,%ecx /* now move remaining bytes */ -+ movl %edx,%ecx /* now move remaining bytes */ - andl $3,%ecx - RECOVER(copyout_fail) - rep --- -2.1.4 - diff --git a/debian/patches/0004-i386-specialize-copyinmsg-and-copyoutmsg.patch b/debian/patches/0004-i386-specialize-copyinmsg-and-copyoutmsg.patch deleted file mode 100644 index 1139e74..0000000 --- a/debian/patches/0004-i386-specialize-copyinmsg-and-copyoutmsg.patch +++ /dev/null @@ -1,139 +0,0 @@ -From d3f20b06cee70fd5afe8aaff31614756a57e6bb6 Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Fri, 19 Dec 2014 01:51:58 +0100 -Subject: [PATCH gnumach 4/4] i386: specialize `copyinmsg' and `copyoutmsg' - -Previously, `copyinmsg' was the same function as `copyin'. The former -is for messages, and the size of messages is a multiple of four. -Likewise for `copyoutmsg'. - -Provide a specialized version of both functions. This shaves off a -couple of instructions and improves our IPC performance. - -* i386/i386/locore.S (copyinmsg): New function. -(copyoutmsg): New function. ---- - i386/i386/locore.S | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 79 insertions(+), 4 deletions(-) - -diff --git a/i386/i386/locore.S b/i386/i386/locore.S -index 2e04bb8..cfda86f 100644 ---- a/i386/i386/locore.S -+++ b/i386/i386/locore.S -@@ -1232,13 +1232,12 @@ ENTRY(discover_x86_cpu_type) - */ - - /* -- * Copy from user address space. -+ * Copy from user address space - generic version. - * arg0: user address - * arg1: kernel address - * arg2: byte count - */ - ENTRY(copyin) --Entry(copyinmsg) - pushl %esi - pushl %edi /* save registers */ - -@@ -1275,13 +1274,48 @@ copyin_fail: - jmp copyin_ret /* pop frame and return */ - - /* -- * Copy to user address space. -+ * Copy from user address space - version for copying messages. -+ * arg0: user address -+ * arg1: kernel address -+ * arg2: byte count - must be a multiple of four -+ */ -+ENTRY(copyinmsg) -+ pushl %esi -+ pushl %edi /* save registers */ -+ -+ movl 8+S_ARG0,%esi /* get user start address */ -+ movl 8+S_ARG1,%edi /* get kernel destination address */ -+ movl 8+S_ARG2,%ecx /* get count */ -+ -+ movl $USER_DS,%eax /* use user data segment for accesses */ -+ mov %ax,%ds -+ -+ /*cld*/ /* count up: default mode in all GCC code */ -+ shrl $2,%ecx -+ RECOVER(copyinmsg_fail) -+ rep -+ movsl /* move longwords */ -+ xorl %eax,%eax /* return 0 for success */ -+ -+copyinmsg_ret: -+ mov %ss,%di /* restore DS to kernel segment */ -+ mov %di,%ds -+ -+ popl %edi /* restore registers */ -+ popl %esi -+ ret /* and return */ -+ -+copyinmsg_fail: -+ movl $1,%eax /* return 1 for failure */ -+ jmp copyinmsg_ret /* pop frame and return */ -+ -+/* -+ * Copy to user address space - generic version. - * arg0: kernel address - * arg1: user address - * arg2: byte count - */ - ENTRY(copyout) --Entry(copyoutmsg) - pushl %esi - pushl %edi /* save registers */ - -@@ -1322,6 +1356,47 @@ copyout_fail: - movl $1,%eax /* return 1 for failure */ - jmp copyout_ret /* pop frame and return */ - -+/* -+ * Copy to user address space - version for copying messages. -+ * arg0: kernel address -+ * arg1: user address -+ * arg2: byte count - must be a multiple of four -+ */ -+ENTRY(copyoutmsg) -+ pushl %esi -+ pushl %edi /* save registers */ -+ -+ movl 8+S_ARG0,%esi /* get kernel start address */ -+ movl 8+S_ARG1,%edi /* get user start address */ -+ movl 8+S_ARG2,%ecx /* get count */ -+ -+ movl $USER_DS,%eax /* use user data segment for accesses */ -+ mov %ax,%es -+ -+#if !defined(MACH_HYP) && !PAE -+ movl 8+S_ARG2,%edx /* copyout_retry expects count here */ -+ cmpl $3,machine_slot+SUB_TYPE_CPU_TYPE -+ jbe copyout_retry /* Use slow version on i386 */ -+#endif /* !defined(MACH_HYP) && !PAE */ -+ -+ shrl $2,%ecx /* move by longwords */ -+ RECOVER(copyoutmsg_fail) -+ rep -+ movsl -+ xorl %eax,%eax /* return 0 for success */ -+ -+copyoutmsg_ret: -+ mov %ss,%di /* restore ES to kernel segment */ -+ mov %di,%es -+ -+ popl %edi /* restore registers */ -+ popl %esi -+ ret /* and return */ -+ -+copyoutmsg_fail: -+ movl $1,%eax /* return 1 for failure */ -+ jmp copyoutmsg_ret /* pop frame and return */ -+ - #if !defined(MACH_HYP) && !PAE - /* - * Check whether user address space is writable --- -2.1.4 - diff --git a/debian/patches/series b/debian/patches/series index 79a0eeb..102e3c8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,7 +7,3 @@ Add-some-padding-to-make-objects-fit-a-single-cache-.patch vm_cache_policy.patch task-load.patch -0001-linux-fix-compiler-warning.patch -0002-kern-improve-assert.patch -0003-i386-drop-needless-instruction-from-copyout.patch -0004-i386-specialize-copyinmsg-and-copyoutmsg.patch |