summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-09-30 09:21:31 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-09-30 09:21:31 +0200
commit6f91ea54903d679daea820c15c20d8cf9a33cea2 (patch)
tree58b100e22cdb7b1230881f7fd43b8a6991f8e1d2 /debian
parent8fbb5848aca1cc6d5e7ad152713d2e198a5ee7cc (diff)
add patch series
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/0001-kern-fix-type-of-recompute_priorities.patch41
-rw-r--r--debian/patches/0002-kern-silence-compiler-warning-about-uninitialized-va.patch36
-rw-r--r--debian/patches/0003-ipc-use-fast-modulo-operation-in-local-hash-table.patch42
-rw-r--r--debian/patches/series3
4 files changed, 122 insertions, 0 deletions
diff --git a/debian/patches/0001-kern-fix-type-of-recompute_priorities.patch b/debian/patches/0001-kern-fix-type-of-recompute_priorities.patch
new file mode 100644
index 0000000..2a9934a
--- /dev/null
+++ b/debian/patches/0001-kern-fix-type-of-recompute_priorities.patch
@@ -0,0 +1,41 @@
+From dfcdc049242c9ceb75fe82c16a20149244d8abd6 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Tue, 30 Sep 2014 09:08:55 +0200
+Subject: [PATCH gnumach 1/3] kern: fix type of recompute_priorities
+
+* kern/sched_prim.c (recompute_priorities): Fix type.
+* kern/sched_prim.h (recompute_priorities): Likewise.
+---
+ kern/sched_prim.c | 2 +-
+ kern/sched_prim.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kern/sched_prim.c b/kern/sched_prim.c
+index 1d2e14e..66eb9c9 100644
+--- a/kern/sched_prim.c
++++ b/kern/sched_prim.c
+@@ -1076,7 +1076,7 @@ void compute_my_priority(
+ *
+ * Update the priorities of all threads periodically.
+ */
+-void recompute_priorities(const void *param)
++void recompute_priorities(void *param)
+ {
+ #if SIMPLE_CLOCK
+ int new_usec;
+diff --git a/kern/sched_prim.h b/kern/sched_prim.h
+index 8c62b8b..fd989b6 100644
+--- a/kern/sched_prim.h
++++ b/kern/sched_prim.h
+@@ -103,7 +103,7 @@ extern boolean_t thread_handoff(
+ thread_t old_thread,
+ continuation_t continuation,
+ thread_t new_thread);
+-extern void recompute_priorities(const void *param);
++extern void recompute_priorities(void *param);
+ extern void update_priority(
+ thread_t thread);
+ extern void compute_my_priority(
+--
+2.1.0
+
diff --git a/debian/patches/0002-kern-silence-compiler-warning-about-uninitialized-va.patch b/debian/patches/0002-kern-silence-compiler-warning-about-uninitialized-va.patch
new file mode 100644
index 0000000..c342534
--- /dev/null
+++ b/debian/patches/0002-kern-silence-compiler-warning-about-uninitialized-va.patch
@@ -0,0 +1,36 @@
+From 3166fe0edd4a5cf0d690c094f2fd06647ba380e5 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Tue, 30 Sep 2014 09:02:25 +0200
+Subject: [PATCH gnumach 2/3] kern: silence compiler warning about
+ uninitialized variable
+
+* kern/slab.c (kmem_cache_compute_sizes): Initialize optimal_size and
+assert that a size is selected.
+---
+ kern/slab.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/kern/slab.c b/kern/slab.c
+index e8451a8..19ebfed 100644
+--- a/kern/slab.c
++++ b/kern/slab.c
+@@ -702,7 +702,7 @@ static void kmem_cache_error(struct kmem_cache *cache, void *buf, int error,
+ */
+ static void kmem_cache_compute_sizes(struct kmem_cache *cache, int flags)
+ {
+- size_t i, buffers, buf_size, slab_size, free_slab_size, optimal_size;
++ size_t i, buffers, buf_size, slab_size, free_slab_size, optimal_size = 0;
+ size_t waste, waste_min;
+ int embed, optimal_embed = 0;
+
+@@ -745,6 +745,7 @@ static void kmem_cache_compute_sizes(struct kmem_cache *cache, int flags)
+ } while ((buffers < KMEM_MIN_BUFS_PER_SLAB)
+ && (slab_size < KMEM_SLAB_SIZE_THRESHOLD));
+
++ assert(optimal_size > 0);
+ assert(!(flags & KMEM_CACHE_NOOFFSLAB) || optimal_embed);
+
+ cache->slab_size = optimal_size;
+--
+2.1.0
+
diff --git a/debian/patches/0003-ipc-use-fast-modulo-operation-in-local-hash-table.patch b/debian/patches/0003-ipc-use-fast-modulo-operation-in-local-hash-table.patch
new file mode 100644
index 0000000..c517291
--- /dev/null
+++ b/debian/patches/0003-ipc-use-fast-modulo-operation-in-local-hash-table.patch
@@ -0,0 +1,42 @@
+From 3a0fae39873c9c7d73dc978888e45b87ad27d44e Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Tue, 30 Sep 2014 03:58:43 +0200
+Subject: [PATCH gnumach 3/3] ipc: use fast modulo operation in local hash
+ table
+
+* ipc/ipc_table.h: Document that table sizes must be powers of two.
+* ipc/ipc_hash.c (IH_LOCAL_HASH): Use fast modulo operation.
+---
+ ipc/ipc_hash.c | 2 +-
+ ipc/ipc_table.h | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/ipc/ipc_hash.c b/ipc/ipc_hash.c
+index 8285717..c2c6d6e 100644
+--- a/ipc/ipc_hash.c
++++ b/ipc/ipc_hash.c
+@@ -326,7 +326,7 @@ ipc_hash_global_delete(
+ */
+
+ #define IH_LOCAL_HASH(obj, size) \
+- ((((mach_port_index_t) (vm_offset_t) (obj)) >> 6) % (size))
++ ((((mach_port_index_t) (vm_offset_t) (obj)) >> 6) & (size - 1))
+
+ /*
+ * Routine: ipc_hash_local_lookup
+diff --git a/ipc/ipc_table.h b/ipc/ipc_table.h
+index 3cc5f56..311b9a7 100644
+--- a/ipc/ipc_table.h
++++ b/ipc/ipc_table.h
+@@ -45,6 +45,8 @@
+ * an ipc_table_size structure. These structures must
+ * be elements of an array, ipc_table_entries.
+ *
++ * Every its_size value must must be a power of two.
++ *
+ * The array must end with two elements with the same its_size value.
+ * Except for the terminating element, the its_size values must
+ * be strictly increasing. The largest (last) its_size value
+--
+2.1.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 14fccb4..d0b1586 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,6 @@
protected_payload.patch
Add-some-padding-to-make-objects-fit-a-single-cache-.patch
+0001-kern-fix-type-of-recompute_priorities.patch
+0002-kern-silence-compiler-warning-about-uninitialized-va.patch
+0003-ipc-use-fast-modulo-operation-in-local-hash-table.patch