diff options
5 files changed, 174 insertions, 0 deletions
diff --git a/debian/patches/fix-warnings0001-Avoid-re-defining-macros.patch b/debian/patches/fix-warnings0001-Avoid-re-defining-macros.patch new file mode 100644 index 0000000..ffd5b13 --- /dev/null +++ b/debian/patches/fix-warnings0001-Avoid-re-defining-macros.patch @@ -0,0 +1,78 @@ +From 2cdb55a93f5dbf032fab0102758c40b08dc9dab8 Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Sat, 15 Aug 2015 11:53:01 +0200 +Subject: [PATCH gnumach 1/4] Avoid re-defining macros + +* kern/macros.h: Avoid re-defining macros. +* linux/src/include/linux/compiler-gcc.h: Likewise. +* linux/src/include/linux/compiler.h: Likewise. +--- + kern/macros.h | 8 ++++++++ + linux/src/include/linux/compiler-gcc.h | 2 ++ + linux/src/include/linux/compiler.h | 8 ++++++-- + 3 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/kern/macros.h b/kern/macros.h +index fb8dc5e..7cc579d 100644 +--- a/kern/macros.h ++++ b/kern/macros.h +@@ -54,15 +54,23 @@ + + #define alignof(x) __alignof__(x) + ++#ifndef likely + #define likely(expr) __builtin_expect(!!(expr), 1) ++#endif /* likely */ ++#ifndef unlikely + #define unlikely(expr) __builtin_expect(!!(expr), 0) ++#endif /* unlikely */ + ++#ifndef barrier + #define barrier() asm volatile("" : : : "memory") ++#endif /* barrier */ + + #define __noreturn __attribute__((noreturn)) + #define __aligned(x) __attribute__((aligned(x))) + #define __always_inline inline __attribute__((always_inline)) ++#ifndef __section + #define __section(x) __attribute__((section(x))) ++#endif /* __section */ + #define __packed __attribute__((packed)) + #define __alias(x) __attribute__((alias(x))) + +diff --git a/linux/src/include/linux/compiler-gcc.h b/linux/src/include/linux/compiler-gcc.h +index 59e4028..b1a0be0 100644 +--- a/linux/src/include/linux/compiler-gcc.h ++++ b/linux/src/include/linux/compiler-gcc.h +@@ -9,7 +9,9 @@ + + /* Optimization barrier */ + /* The "volatile" is due to gcc bugs */ ++#ifndef barrier + #define barrier() __asm__ __volatile__("": : :"memory") ++#endif /* barrier */ + + /* + * This macro obfuscates arithmetic on a variable address so that gcc +diff --git a/linux/src/include/linux/compiler.h b/linux/src/include/linux/compiler.h +index 320d6c9..eb3dd94 100644 +--- a/linux/src/include/linux/compiler.h ++++ b/linux/src/include/linux/compiler.h +@@ -143,8 +143,12 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + #endif /* CONFIG_PROFILE_ALL_BRANCHES */ + + #else +-# define likely(x) __builtin_expect(!!(x), 1) +-# define unlikely(x) __builtin_expect(!!(x), 0) ++# ifndef likely ++# define likely(x) __builtin_expect(!!(x), 1) ++# endif /* likely */ ++# ifndef unlikely ++# define unlikely(x) __builtin_expect(!!(x), 0) ++# endif /* unlikely */ + #endif + + /* Optimization barrier */ +-- +2.1.4 + diff --git a/debian/patches/fix-warnings0002-kern-fix-compiler-warning.patch b/debian/patches/fix-warnings0002-kern-fix-compiler-warning.patch new file mode 100644 index 0000000..29b7287 --- /dev/null +++ b/debian/patches/fix-warnings0002-kern-fix-compiler-warning.patch @@ -0,0 +1,28 @@ +From 6eb7f63d2b38ebfe997be12ca32010a924c247e2 Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Sat, 15 Aug 2015 11:08:57 +0200 +Subject: [PATCH gnumach 2/4] kern: fix compiler warning + +* kern/bootstrap.c (bootstrap_create): Move declaration of `n' into +the #ifdef. +--- + kern/bootstrap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kern/bootstrap.c b/kern/bootstrap.c +index cb0f976..6ec110b 100644 +--- a/kern/bootstrap.c ++++ b/kern/bootstrap.c +@@ -110,8 +110,8 @@ task_insert_send_right( + void bootstrap_create(void) + { + int compat; +- int n = 0; + #ifdef MACH_XEN ++ int n = 0; + struct multiboot_module *bmods = ((struct multiboot_module *) + boot_info.mod_start); + if (bmods) +-- +2.1.4 + diff --git a/debian/patches/fix-warnings0003-vm-enable-extra-assertions.patch b/debian/patches/fix-warnings0003-vm-enable-extra-assertions.patch new file mode 100644 index 0000000..6adf8fe --- /dev/null +++ b/debian/patches/fix-warnings0003-vm-enable-extra-assertions.patch @@ -0,0 +1,30 @@ +From e13827019a0a9c9782c700a497c3ba706dcc474a Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Sat, 15 Aug 2015 11:19:01 +0200 +Subject: [PATCH gnumach 3/4] vm: enable extra assertions + +* vm/vm_fault.c (vm_fault_page): Enable extra assertions. +--- + vm/vm_fault.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/vm/vm_fault.c b/vm/vm_fault.c +index 0fa4d6a..46779f6 100644 +--- a/vm/vm_fault.c ++++ b/vm/vm_fault.c +@@ -768,12 +768,10 @@ vm_fault_return_t vm_fault_page( + * objects. + */ + +-#if EXTRA_ASSERTIONS + assert(m->busy && !m->absent); + assert((first_m == VM_PAGE_NULL) || + (first_m->busy && !first_m->absent && + !first_m->active && !first_m->inactive)); +-#endif /* EXTRA_ASSERTIONS */ + + /* + * If the page is being written, but isn't +-- +2.1.4 + diff --git a/debian/patches/fix-warnings0004-vm-fix-compiler-warning.patch b/debian/patches/fix-warnings0004-vm-fix-compiler-warning.patch new file mode 100644 index 0000000..566f4b9 --- /dev/null +++ b/debian/patches/fix-warnings0004-vm-fix-compiler-warning.patch @@ -0,0 +1,34 @@ +From 2327dc425c7afe006bd6cdac801212ee799199f4 Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Sat, 15 Aug 2015 11:29:27 +0200 +Subject: [PATCH gnumach 4/4] vm: fix compiler warning + +* vm/vm_user.c (vm_wire): Drop unused but set variable `host'. +--- + vm/vm_user.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/vm/vm_user.c b/vm/vm_user.c +index 8c7a5d8..c71e9f5 100644 +--- a/vm/vm_user.c ++++ b/vm/vm_user.c +@@ -412,7 +412,6 @@ kern_return_t vm_wire(port, map, start, size, access) + vm_size_t size; + vm_prot_t access; + { +- host_t host; + boolean_t priv; + + if (!IP_VALID(port)) +@@ -430,8 +429,6 @@ kern_return_t vm_wire(port, map, start, size, access) + priv = ip_kotype(port) == IKOT_HOST_PRIV; + ip_unlock(port); + +- host = (host_t) port->ip_kobject; +- + if (map == VM_MAP_NULL) + return KERN_INVALID_TASK; + +-- +2.1.4 + diff --git a/debian/patches/series b/debian/patches/series index 029e46a..6aa23c4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -13,3 +13,7 @@ sysenter0001-yyy-sysenter-prototype.patch vm-cache-policy0001-VM-cache-policy-change.patch vm-cache-policy0002-vm-keep-track-of-clean-pages.patch vm-cache-policy0003-vm-evict-clean-pages-first.patch +fix-warnings0001-Avoid-re-defining-macros.patch +fix-warnings0002-kern-fix-compiler-warning.patch +fix-warnings0003-vm-enable-extra-assertions.patch +fix-warnings0004-vm-fix-compiler-warning.patch |
