summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-15 12:11:18 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-15 12:11:18 +0200
commit7c802101c6d7213ed2b5d97f6575837721f0944f (patch)
tree07dfd55e3f5f2dc25db25058197650a0fb239e4a
parente1088b79f99036d8dd66ea2f944d5fe0643a49c6 (diff)
add patch series
-rw-r--r--debian/patches/fix-warnings0001-Avoid-re-defining-macros.patch78
-rw-r--r--debian/patches/fix-warnings0002-vm-enable-extra-assertions.patch30
-rw-r--r--debian/patches/fix-warnings0003-vm-fix-compiler-warning.patch34
-rw-r--r--debian/patches/series3
4 files changed, 145 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..c19a24a
--- /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/3] 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-vm-enable-extra-assertions.patch b/debian/patches/fix-warnings0002-vm-enable-extra-assertions.patch
new file mode 100644
index 0000000..7d84ef1
--- /dev/null
+++ b/debian/patches/fix-warnings0002-vm-enable-extra-assertions.patch
@@ -0,0 +1,30 @@
+From 08de06feb3245859744a11e8dd9dde198ca33257 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 2/3] 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-warnings0003-vm-fix-compiler-warning.patch b/debian/patches/fix-warnings0003-vm-fix-compiler-warning.patch
new file mode 100644
index 0000000..5a27696
--- /dev/null
+++ b/debian/patches/fix-warnings0003-vm-fix-compiler-warning.patch
@@ -0,0 +1,34 @@
+From 8259090d7394b667fbca4d4b05153e980a39db6b 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 3/3] 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..2f62e8c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,6 @@ 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-vm-enable-extra-assertions.patch
+fix-warnings0003-vm-fix-compiler-warning.patch