[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnumach] 01/02: Imported Upstream version 1.4+git20150409
From: |
Samuel Thibault |
Subject: |
[gnumach] 01/02: Imported Upstream version 1.4+git20150409 |
Date: |
Mon, 13 Apr 2015 12:54:40 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch master
in repository gnumach.
commit 5565a485b93a3feec6bc43d01e5af2bd506cb4c8
Author: Samuel Thibault <address@hidden>
Date: Sun Apr 12 20:25:54 2015 +0000
Imported Upstream version 1.4+git20150409
---
ChangeLog | 104 ++++++++++++++++++
Makefile.am | 4 +-
Makefile.in | 4 +-
configure | 20 ++--
doc/mach.info | 240 ++++++++++++++++++++---------------------
doc/mach.info-1 | 8 +-
doc/mach.info-2 | 4 +-
doc/stamp-vti | 8 +-
doc/version.texi | 8 +-
i386/i386/locore.S | 88 +++++++++++++--
i386/i386/spl.S | 8 +-
i386/i386at/kd_event.c | 2 +-
i386/i386at/kd_mouse.c | 2 +-
kern/assert.h | 7 +-
kern/ipc_sched.c | 2 +-
kern/sched_prim.c | 10 +-
kern/task.c | 7 +-
kern/thread.c | 14 ++-
kern/thread.h | 27 ++++-
linux/dev/drivers/block/ahci.c | 2 +-
linux/dev/glue/block.c | 1 +
version.m4 | 2 +-
vm/vm_pageout.c | 2 +
vm/vm_resident.c | 2 +-
24 files changed, 389 insertions(+), 187 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 914856a..2205952 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,107 @@
+2015-03-19 Samuel Thibault <address@hidden>
+
+ Give the Debian package name for the non-multilib libc.a
+ * Makefile.am (clib-routines.o): Mention the Debian libc6-dev:i386
package.
+
+2015-03-08 Samuel Thibault <address@hidden>
+
+ Remove spl debugging in Xen case
+ xen cli/sti doesn't use IF
+
+ * i386/i386/spl.S [MACH_XEN]: Disable IF check.
+
+2015-03-05 Samuel Thibault <address@hidden>
+
+ Show odd number of ports
+ * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Show odd number of
ports.
+
+2015-02-26 Samuel Thibault <address@hidden>
+
+ Use printf_once instead of recoding it
+ * i386/i386at/kd_event.c: Call printf_once instead of recoding it.
+ * i386/i386at/kd_mouse.c: Likewise.
+
+ Limit printing "queue full" messages
+ * i386/i386at/kd_event.c (kbd_enqueue): Print "queue full" warning only
+ once.
+ * i386/i386at/kd_mouse.c (mouse_enqueue): Likewise.
+
+2015-02-25 Justus Winter <address@hidden>
+
+ kern: inherit the name of the parent task
+ * kern/task.c (task_create): Inherit the name of the parent task.
+
+2015-02-20 Justus Winter <address@hidden>
+
+ 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.
+
+2015-02-20 Justus Winter <address@hidden>
+
+ i386: drop needless instruction from `copyout'
+ * i386/i386/locore.S (copyout): Do not needlessly copy length to %eax
+ first.
+
+2015-02-20 Justus Winter <address@hidden>
+
+ 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.
+
+2015-02-20 Justus Winter <address@hidden>
+
+ 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.
+
+2015-02-20 Justus Winter <address@hidden>
+
+ kern: reduce the size of `struct thread'
+ Reduce the size of `struct thread' by twelve bytes making it fit into
+ exactly five cache lines (on 32-bit platforms).
+
+ * kern/thread.h (struct thread): Group the state and all flags in a
+ bitfield.
+ (TH_EV_WAKE_ACTIVE, TH_EV_STATE): Provide macros that generate keys
+ for synchronization primitives like `thread_wakeup'.
+ * kern/thread.c (thread_halt, thread_dowait, thread_suspend): Use the
+ new keys instead of addresses of fields for the synchronisation.
+ * kern/ipc_sched.c (thread_handoff): Likewise.
+ * kern/sched_prim.c (thread_invoke, thread_dispatch): Likewise.
+
+2015-02-18 Justus Winter <address@hidden>
+
+ kern: avoid #if 0ing out thread_collect_scan
+ Currently, `thread_collect_scan' does nothing because `pcb_collect' is
+ a nop. Its body is exempt from compilation by means of the
+ preprocessor.
+
+ This is unfortunate as it increases the risk of bitrot, and we still
+ need to pay the price of rate-limiting thread_collect_scan.
+
+ * kern/thread.c (thread_collect_scan): Drop #if 0 around the body.
+ * vm/vm_pageout.c (vm_pageout_scan): Do not call
+ `consider_thread_collect' and document why.
+
+2015-02-18 Justus Winter <address@hidden>
+
+ vm: fix typo
+ * vm/vm_resident.c: Fix typo.
+
2015-01-22 Justus Winter <address@hidden>
ipc: warn about more port management bugs
diff --git a/Makefile.am b/Makefile.am
index 1afddab..2c39451 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -173,8 +173,8 @@ clib-routines.o: gnumach-undef gnumach-undef-bad
then cat gnumach-undef-bad; exit 2; else true; fi
$(AM_V_CCLD) $(CCLD) -nostdlib -nostartfiles -r -static \
-o $@ `sed 's/^/-Wl,-u,/' < $<` -x c /dev/null -lc -lgcc
- $(AM_V_at) if nm $@ | grep __init_cpu_features; \
- then echo Please install a 32bit libc without multiarch support. ; \
+ @if nm $@ | grep __init_cpu_features; \
+ then echo "Please install a 32bit libc without multiarch support (on
Debian systems, the libc6-dev:i386 package containing
/usr/lib/i386-linux-gnu/libc.a)". ; \
false ; fi
gnumach_LINK = $(LD) $(LINKFLAGS) $(gnumach_LINKFLAGS) -o $@
diff --git a/Makefile.in b/Makefile.in
index 9135419..70f2758 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -8019,8 +8019,8 @@ clib-routines.o: gnumach-undef gnumach-undef-bad
then cat gnumach-undef-bad; exit 2; else true; fi
$(AM_V_CCLD) $(CCLD) -nostdlib -nostartfiles -r -static \
-o $@ `sed 's/^/-Wl,-u,/' < $<` -x c /dev/null -lc -lgcc
- $(AM_V_at) if nm $@ | grep __init_cpu_features; \
- then echo Please install a 32bit libc without multiarch support. ; \
+ @if nm $@ | grep __init_cpu_features; \
+ then echo "Please install a 32bit libc without multiarch support (on
Debian systems, the libc6-dev:i386 package containing
/usr/lib/i386-linux-gnu/libc.a)". ; \
false ; fi
dist-hook: dist-rm-CVS gen-ChangeLog
diff --git a/configure b/configure
index b2c701a..ca308b9 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GNU Mach 1.4+git20150208.
+# Generated by GNU Autoconf 2.69 for GNU Mach 1.4+git20150409.
#
# Report bugs to <address@hidden>.
#
@@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU Mach'
PACKAGE_TARNAME='gnumach'
-PACKAGE_VERSION='1.4+git20150208'
-PACKAGE_STRING='GNU Mach 1.4+git20150208'
+PACKAGE_VERSION='1.4+git20150409'
+PACKAGE_STRING='GNU Mach 1.4+git20150409'
PACKAGE_BUGREPORT='address@hidden'
PACKAGE_URL=''
@@ -1584,7 +1584,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNU Mach 1.4+git20150208 to adapt to many kinds of
systems.
+\`configure' configures GNU Mach 1.4+git20150409 to adapt to many kinds of
systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1654,7 +1654,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU Mach 1.4+git20150208:";;
+ short | recursive ) echo "Configuration of GNU Mach 1.4+git20150409:";;
esac
cat <<\_ACEOF
@@ -2002,7 +2002,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU Mach configure 1.4+git20150208
+GNU Mach configure 1.4+git20150409
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2094,7 +2094,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU Mach $as_me 1.4+git20150208, which was
+It was created by GNU Mach $as_me 1.4+git20150409, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2960,7 +2960,7 @@ fi
# Define the identity of the package.
PACKAGE='gnumach'
- VERSION='1.4+git20150208'
+ VERSION='1.4+git20150409'
# Some tools Automake needs.
@@ -12110,7 +12110,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU Mach $as_me 1.4+git20150208, which was
+This file was extended by GNU Mach $as_me 1.4+git20150409, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12181,7 +12181,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU Mach config.status 1.4+git20150208
+GNU Mach config.status 1.4+git20150409
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/doc/mach.info b/doc/mach.info
index 9a6edb8..7949c59 100644
--- a/doc/mach.info
+++ b/doc/mach.info
@@ -2,8 +2,8 @@ This is mach.info, produced by makeinfo version 5.2 from
mach.texi.
This file documents the GNU Mach microkernel.
- This is edition 0.4, last updated on 10 November 2014, of 'The GNU
-Mach Reference Manual', for version 1.4+git20150208.
+ This is edition 0.4, last updated on 11 March 2015, of 'The GNU Mach
+Reference Manual', for version 1.4+git20150409.
Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
Inc.
@@ -39,126 +39,126 @@ END-INFO-DIR-ENTRY
Indirect:
-mach.info-1: 1642
-mach.info-2: 302547
+mach.info-1: 1639
+mach.info-2: 302538
Tag Table:
(Indirect)
-Node: Top1642
-Node: Introduction11282
-Node: Audience12113
-Node: Features13148
-Node: Overview14975
-Node: History16168
-Node: Installing16313
-Node: Binary Distributions17538
-Node: Compilation18346
-Node: Configuration19579
-Node: Cross-Compilation35990
-Node: Bootstrap36771
-Ref: Bootstrap-Footnote-137214
-Node: Bootloader37451
-Ref: Bootloader-Footnote-138731
-Node: Modules38817
-Node: Inter Process Communication39644
-Node: Major Concepts40267
-Node: Messaging Interface44072
-Node: Mach Message Call44802
-Node: Message Format48117
-Node: Exchanging Port Rights59309
-Ref: Exchanging Port Rights-Footnote-164871
-Node: Memory65043
-Ref: Memory-Footnote-168137
-Node: Message Send68479
-Ref: Message Send-Footnote-175501
-Node: Message Receive75784
-Ref: Message Receive-Footnote-185436
-Node: Atomicity85717
-Node: Port Manipulation Interface88491
-Node: Port Creation90046
-Node: Port Destruction94835
-Node: Port Names97978
-Node: Port Rights102225
-Node: Ports and other Tasks106014
-Node: Receive Rights110107
-Node: Port Sets117038
-Node: Request Notifications119441
-Node: Inherited Ports124245
-Node: Virtual Memory Interface127929
-Node: Memory Allocation129182
-Node: Memory Deallocation131707
-Node: Data Transfer133171
-Node: Memory Attributes136697
-Node: Mapping Memory Objects146116
-Node: Memory Statistics149425
-Node: External Memory Management150999
-Node: Memory Object Server151704
-Node: Memory Object Creation154413
-Node: Memory Object Termination158419
-Node: Memory Objects and Data161358
-Node: Memory Object Locking178504
-Node: Memory Object Attributes184399
-Node: Default Memory Manager190236
-Node: Threads and Tasks195958
-Node: Thread Interface196295
-Node: Thread Creation197291
-Node: Thread Termination198408
-Node: Thread Information198879
-Node: Thread Settings204978
-Node: Thread Execution206212
-Node: Scheduling213505
-Node: Thread Priority213860
-Node: Hand-Off Scheduling216494
-Node: Scheduling Policy221619
-Node: Thread Special Ports222951
-Node: Exceptions225397
-Node: Task Interface226267
-Node: Task Creation227279
-Node: Task Termination228614
-Node: Task Information229216
-Node: Task Execution236118
-Node: Task Special Ports240531
-Node: Syscall Emulation244385
-Node: Profiling245616
-Node: Host Interface249379
-Node: Host Ports250364
-Node: Host Information252437
-Node: Host Time257820
-Node: Host Reboot260487
-Node: Processors and Processor Sets261039
-Node: Processor Set Interface262017
-Node: Processor Set Ports262784
-Node: Processor Set Access263614
-Node: Processor Set Creation265874
-Node: Processor Set Destruction266901
-Node: Tasks and Threads on Sets267822
-Node: Processor Set Priority272989
-Node: Processor Set Policy274279
-Node: Processor Set Info275893
-Node: Processor Interface279706
-Node: Hosted Processors280431
-Node: Processor Control281422
-Node: Processors and Sets282888
-Node: Processor Info284766
-Node: Device Interface287508
-Node: Device Reply Server289123
-Node: Device Open290415
-Node: Device Close292538
-Node: Device Read293117
-Node: Device Write296036
-Node: Device Map298841
-Node: Device Status299732
-Node: Device Filter302547
-Node: Kernel Debugger308294
-Node: Operation309021
-Node: Commands311998
-Node: Variables325783
-Node: Expressions327171
-Node: Copying328520
-Node: Documentation License347749
-Node: GNU Free Documentation License348338
-Node: CMU License370737
-Node: Concept Index371972
-Node: Function and Data Index375818
+Node: Top1639
+Node: Introduction11276
+Node: Audience12107
+Node: Features13142
+Node: Overview14969
+Node: History16162
+Node: Installing16307
+Node: Binary Distributions17532
+Node: Compilation18340
+Node: Configuration19573
+Node: Cross-Compilation35984
+Node: Bootstrap36765
+Ref: Bootstrap-Footnote-137208
+Node: Bootloader37445
+Ref: Bootloader-Footnote-138725
+Node: Modules38811
+Node: Inter Process Communication39638
+Node: Major Concepts40261
+Node: Messaging Interface44066
+Node: Mach Message Call44796
+Node: Message Format48111
+Node: Exchanging Port Rights59303
+Ref: Exchanging Port Rights-Footnote-164865
+Node: Memory65037
+Ref: Memory-Footnote-168131
+Node: Message Send68473
+Ref: Message Send-Footnote-175495
+Node: Message Receive75778
+Ref: Message Receive-Footnote-185430
+Node: Atomicity85711
+Node: Port Manipulation Interface88485
+Node: Port Creation90040
+Node: Port Destruction94829
+Node: Port Names97972
+Node: Port Rights102219
+Node: Ports and other Tasks106008
+Node: Receive Rights110101
+Node: Port Sets117032
+Node: Request Notifications119435
+Node: Inherited Ports124239
+Node: Virtual Memory Interface127923
+Node: Memory Allocation129176
+Node: Memory Deallocation131701
+Node: Data Transfer133165
+Node: Memory Attributes136691
+Node: Mapping Memory Objects146110
+Node: Memory Statistics149419
+Node: External Memory Management150993
+Node: Memory Object Server151698
+Node: Memory Object Creation154407
+Node: Memory Object Termination158413
+Node: Memory Objects and Data161352
+Node: Memory Object Locking178498
+Node: Memory Object Attributes184393
+Node: Default Memory Manager190230
+Node: Threads and Tasks195952
+Node: Thread Interface196289
+Node: Thread Creation197285
+Node: Thread Termination198402
+Node: Thread Information198873
+Node: Thread Settings204972
+Node: Thread Execution206206
+Node: Scheduling213499
+Node: Thread Priority213854
+Node: Hand-Off Scheduling216488
+Node: Scheduling Policy221613
+Node: Thread Special Ports222945
+Node: Exceptions225391
+Node: Task Interface226261
+Node: Task Creation227273
+Node: Task Termination228608
+Node: Task Information229210
+Node: Task Execution236112
+Node: Task Special Ports240525
+Node: Syscall Emulation244379
+Node: Profiling245610
+Node: Host Interface249373
+Node: Host Ports250358
+Node: Host Information252431
+Node: Host Time257814
+Node: Host Reboot260481
+Node: Processors and Processor Sets261033
+Node: Processor Set Interface262011
+Node: Processor Set Ports262778
+Node: Processor Set Access263608
+Node: Processor Set Creation265868
+Node: Processor Set Destruction266895
+Node: Tasks and Threads on Sets267816
+Node: Processor Set Priority272983
+Node: Processor Set Policy274273
+Node: Processor Set Info275887
+Node: Processor Interface279700
+Node: Hosted Processors280425
+Node: Processor Control281416
+Node: Processors and Sets282882
+Node: Processor Info284760
+Node: Device Interface287502
+Node: Device Reply Server289117
+Node: Device Open290409
+Node: Device Close292532
+Node: Device Read293111
+Node: Device Write296030
+Node: Device Map298835
+Node: Device Status299726
+Node: Device Filter302538
+Node: Kernel Debugger308285
+Node: Operation309012
+Node: Commands311989
+Node: Variables325774
+Node: Expressions327162
+Node: Copying328511
+Node: Documentation License347740
+Node: GNU Free Documentation License348329
+Node: CMU License370728
+Node: Concept Index371963
+Node: Function and Data Index375809
End Tag Table
diff --git a/doc/mach.info-1 b/doc/mach.info-1
index 1fcdb3c..2b6a3d9 100644
--- a/doc/mach.info-1
+++ b/doc/mach.info-1
@@ -2,8 +2,8 @@ This is mach.info, produced by makeinfo version 5.2 from
mach.texi.
This file documents the GNU Mach microkernel.
- This is edition 0.4, last updated on 10 November 2014, of 'The GNU
-Mach Reference Manual', for version 1.4+git20150208.
+ This is edition 0.4, last updated on 11 March 2015, of 'The GNU Mach
+Reference Manual', for version 1.4+git20150409.
Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
Inc.
@@ -45,8 +45,8 @@ Main Menu
This file documents the GNU Mach microkernel.
- This is edition 0.4, last updated on 10 November 2014, of 'The GNU
-Mach Reference Manual', for version 1.4+git20150208.
+ This is edition 0.4, last updated on 11 March 2015, of 'The GNU Mach
+Reference Manual', for version 1.4+git20150409.
Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
Inc.
diff --git a/doc/mach.info-2 b/doc/mach.info-2
index 988b3d1..395d220 100644
--- a/doc/mach.info-2
+++ b/doc/mach.info-2
@@ -2,8 +2,8 @@ This is mach.info, produced by makeinfo version 5.2 from
mach.texi.
This file documents the GNU Mach microkernel.
- This is edition 0.4, last updated on 10 November 2014, of 'The GNU
-Mach Reference Manual', for version 1.4+git20150208.
+ This is edition 0.4, last updated on 11 March 2015, of 'The GNU Mach
+Reference Manual', for version 1.4+git20150409.
Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
Inc.
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 242caf0..be76cb6 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
address@hidden UPDATED 10 November 2014
address@hidden UPDATED-MONTH November 2014
address@hidden EDITION 1.4+git20150208
address@hidden VERSION 1.4+git20150208
address@hidden UPDATED 11 March 2015
address@hidden UPDATED-MONTH March 2015
address@hidden EDITION 1.4+git20150409
address@hidden VERSION 1.4+git20150409
diff --git a/doc/version.texi b/doc/version.texi
index 242caf0..be76cb6 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
address@hidden UPDATED 10 November 2014
address@hidden UPDATED-MONTH November 2014
address@hidden EDITION 1.4+git20150208
address@hidden VERSION 1.4+git20150208
address@hidden UPDATED 11 March 2015
address@hidden UPDATED-MONTH March 2015
address@hidden EDITION 1.4+git20150409
address@hidden VERSION 1.4+git20150409
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index 15715f6..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 */
@@ -1297,14 +1331,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
@@ -1323,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
diff --git a/i386/i386/spl.S b/i386/i386/spl.S
index 41458ac..1dce991 100644
--- a/i386/i386/spl.S
+++ b/i386/i386/spl.S
@@ -149,7 +149,7 @@ ENTRY(spl7)
ENTRY(splx)
movl S_ARG0,%edx /* get ipl */
-#if MACH_KDB || MACH_TTD
+#if (MACH_KDB || MACH_TTD) && !defined(MACH_XEN)
/* First make sure that if we're exitting from ipl7, IF is still
cleared */
cmpl $SPL7,EXT(curr_ipl) /* from ipl7? */
jne 0f
@@ -160,7 +160,7 @@ ENTRY(splx)
int3 /* Oops, interrupts got enabled?! */
0:
-#endif /* MACH_KDB || MACH_TTD */
+#endif /* (MACH_KDB || MACH_TTD) && !MACH_XEN */
testl %edx,%edx /* spl0? */
jz EXT(spl0) /* yes, handle specially */
cmpl EXT(curr_ipl),%edx /* same ipl as current? */
@@ -227,7 +227,7 @@ splx_cli:
.align TEXT_ALIGN
.globl spl
spl:
-#if MACH_KDB || MACH_TTD
+#if (MACH_KDB || MACH_TTD) && !defined(MACH_XEN)
/* First make sure that if we're exitting from ipl7, IF is still
cleared */
cmpl $SPL7,EXT(curr_ipl) /* from ipl7? */
jne 0f
@@ -238,7 +238,7 @@ spl:
int3 /* Oops, interrupts got enabled?! */
0:
-#endif /* MACH_KDB || MACH_TTD */
+#endif /* (MACH_KDB || MACH_TTD) && !MACH_XEN */
cmpl $SPL7,%edx /* spl7? */
je EXT(spl7) /* yes, handle specially */
movl EXT(pic_mask)(,%edx,4),%eax
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index b60118e..694c165 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -293,7 +293,7 @@ void
kbd_enqueue(kd_event *ev)
{
if (kdq_full(&kbd_queue))
- printf("kbd: queue full\n");
+ printf_once("kbd: queue full\n");
else
kdq_put(&kbd_queue, ev);
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index 16241ef..0f1881f 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -789,7 +789,7 @@ void
mouse_enqueue(kd_event *ev)
{
if (kdq_full(&mouse_queue))
- printf("mouse: queue full\n");
+ printf_once("mouse: queue full\n");
else
kdq_put(&mouse_queue, ev);
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)
diff --git a/kern/ipc_sched.c b/kern/ipc_sched.c
index cc1672d..be82971 100644
--- a/kern/ipc_sched.c
+++ b/kern/ipc_sched.c
@@ -268,7 +268,7 @@ thread_handoff(
*/
old->wake_active = FALSE;
thread_unlock(old);
- thread_wakeup((event_t)&old->wake_active);
+ thread_wakeup(TH_EV_WAKE_ACTIVE(old));
goto after_old_thread;
}
} else
diff --git a/kern/sched_prim.c b/kern/sched_prim.c
index 376217a..d7792ae 100644
--- a/kern/sched_prim.c
+++ b/kern/sched_prim.c
@@ -615,7 +615,7 @@ boolean_t thread_invoke(
thread_lock(new_thread);
new_thread->state &= ~TH_UNINT;
thread_unlock(new_thread);
- thread_wakeup(&new_thread->state);
+ thread_wakeup(TH_EV_STATE(new_thread));
if (continuation != (void (*)()) 0) {
(void) spl0();
@@ -637,7 +637,7 @@ boolean_t thread_invoke(
new_thread->state &= ~(TH_SWAPPED | TH_UNINT);
thread_unlock(new_thread);
- thread_wakeup(&new_thread->state);
+ thread_wakeup(TH_EV_STATE(new_thread));
#if NCPUS > 1
new_thread->last_processor = current_processor();
@@ -676,7 +676,7 @@ boolean_t thread_invoke(
if (old_thread->wake_active) {
old_thread->wake_active = FALSE;
thread_unlock(old_thread);
-
thread_wakeup((event_t)&old_thread->wake_active);
+ thread_wakeup(TH_EV_WAKE_ACTIVE(old_thread));
goto after_old_thread;
}
@@ -767,7 +767,7 @@ boolean_t thread_invoke(
new_thread->state &= ~(TH_SWAPPED | TH_UNINT);
thread_unlock(new_thread);
- thread_wakeup(&new_thread->state);
+ thread_wakeup(TH_EV_STATE(new_thread));
/*
* Thread is now interruptible.
@@ -932,7 +932,7 @@ void thread_dispatch(
if (thread->wake_active) {
thread->wake_active = FALSE;
thread_unlock(thread);
- thread_wakeup((event_t)&thread->wake_active);
+ thread_wakeup(TH_EV_WAKE_ACTIVE(thread));
return;
}
break;
diff --git a/kern/task.c b/kern/task.c
index a11fb8e..57e7f41 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -171,7 +171,12 @@ kern_return_t task_create(
}
#endif /* FAST_TAS */
- snprintf (new_task->name, sizeof new_task->name, "%p", new_task);
+ if (parent_task == TASK_NULL)
+ snprintf (new_task->name, sizeof new_task->name, "%p",
+ new_task);
+ else
+ snprintf (new_task->name, sizeof new_task->name, "(%.*s)",
+ sizeof new_task->name - 3, parent_task->name);
if (new_task_notification != NULL) {
task_reference (new_task);
diff --git a/kern/thread.c b/kern/thread.c
index 8474950..5ffa844 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -968,7 +968,7 @@ kern_return_t thread_halt(
* operation can never cause a deadlock.)
*/
if (cur_thread->ast & AST_HALT) {
-
thread_wakeup_with_result((event_t)&cur_thread->wake_active,
+ thread_wakeup_with_result(TH_EV_WAKE_ACTIVE(cur_thread),
THREAD_INTERRUPTED);
thread_unlock(thread);
thread_unlock(cur_thread);
@@ -1006,7 +1006,7 @@ kern_return_t thread_halt(
*/
while ((thread->ast & AST_HALT) && (!(thread->state & TH_HALTED))) {
thread->wake_active = TRUE;
- thread_sleep((event_t) &thread->wake_active,
+ thread_sleep(TH_EV_WAKE_ACTIVE(thread),
simple_lock_addr(thread->lock), TRUE);
if (thread->state & TH_HALTED) {
@@ -1045,7 +1045,7 @@ kern_return_t thread_halt(
s = splsched();
thread_lock(thread);
thread_ast_clear(thread, AST_HALT);
- thread_wakeup_with_result((event_t)&thread->wake_active,
+ thread_wakeup_with_result(TH_EV_WAKE_ACTIVE(thread),
THREAD_INTERRUPTED);
thread_unlock(thread);
(void) splx(s);
@@ -1284,7 +1284,7 @@ thread_dowait(
* Check for failure if interrupted.
*/
thread->wake_active = TRUE;
- thread_sleep((event_t) &thread->wake_active,
+ thread_sleep(TH_EV_WAKE_ACTIVE(thread),
simple_lock_addr(thread->lock), TRUE);
thread_lock(thread);
if ((current_thread()->wait_result != THREAD_AWAKENED) &&
@@ -1308,7 +1308,7 @@ thread_dowait(
(void) splx(s);
if (need_wakeup)
- thread_wakeup((event_t) &thread->wake_active);
+ thread_wakeup(TH_EV_WAKE_ACTIVE(thread));
return ret;
}
@@ -1346,7 +1346,7 @@ kern_return_t thread_suspend(
thread_lock(thread);
/* Wait for thread to get interruptible */
while (thread->state & TH_UNINT) {
- assert_wait(&thread->state, TRUE);
+ assert_wait(TH_EV_STATE(thread), TRUE);
thread_unlock(thread);
thread_block(NULL);
thread_lock(thread);
@@ -2236,7 +2236,6 @@ thread_wire(
void thread_collect_scan(void)
{
-#if 0
register thread_t thread, prev_thread;
processor_set_t pset, prev_pset;
@@ -2289,7 +2288,6 @@ void thread_collect_scan(void)
thread_deallocate(prev_thread);
if (prev_pset != PROCESSOR_SET_NULL)
pset_deallocate(prev_pset);
-#endif /* 0 */
}
boolean_t thread_collect_allowed = TRUE;
diff --git a/kern/thread.h b/kern/thread.h
index d088c27..0e85d8c 100644
--- a/kern/thread.h
+++ b/kern/thread.h
@@ -70,6 +70,22 @@ struct thread {
task_t task; /* Task to which I belong */
queue_chain_t thread_list; /* list of threads in task */
+ /* Flags */
+ /* The flags are grouped here, but documented at the original
+ position. */
+ union {
+ struct {
+ unsigned state:16;
+ unsigned wake_active:1;
+ unsigned vm_privilege:1;
+ unsigned active:1;
+ };
+ event_t event_key;
+/* These keys can be used with thread_wakeup and friends. */
+#define TH_EV_WAKE_ACTIVE(t) ((event_t) (&(t)->event_key + 0))
+#define TH_EV_STATE(t) ((event_t) (&(t)->event_key + 1))
+ };
+
/* Thread bookkeeping */
queue_chain_t pset_threads; /* list of all threads in proc set*/
@@ -92,9 +108,10 @@ struct thread {
kern_return_t wait_result; /* outcome of wait -
may be examined by this thread
WITHOUT locking */
- boolean_t wake_active; /* someone is waiting for this
+ /* Defined above */
+ /* boolean_t wake_active; someone is waiting for this
thread to become suspended */
- int state; /* Thread state: */
+ /* int state; Thread state: */
/*
* Thread states [bits or'ed]
*/
@@ -129,7 +146,8 @@ struct thread {
/* VM global variables */
vm_offset_t recover; /* page fault recovery (copyin/out) */
- boolean_t vm_privilege; /* Can use reserved memory? */
+ /* Defined above */
+ /* boolean_t vm_privilege; Can use reserved memory? */
/* User-visible scheduling state */
int user_stop_count; /* outstanding stops */
@@ -194,7 +212,8 @@ struct thread {
timer_elt_data_t depress_timer; /* timer for priority depression */
/* Ast/Halt data structures */
- boolean_t active; /* how alive is the thread */
+ /* Defined above */
+ /* boolean_t active; how alive is the thread */
int ast; /* ast's needed. See ast.h */
/* Processor data structures */
diff --git a/linux/dev/drivers/block/ahci.c b/linux/dev/drivers/block/ahci.c
index 2b348e6..868f8d0 100644
--- a/linux/dev/drivers/block/ahci.c
+++ b/linux/dev/drivers/block/ahci.c
@@ -868,7 +868,7 @@ static void ahci_probe_dev(unsigned char bus, unsigned char
device)
n++;
if (nports != n) {
- printk("ahci: %02u:%02u.%u: Odd number of ports, assuming %d is
correct\n", bus, dev, fun, nports);
+ printk("ahci: %02u:%02u.%u: Odd number of ports %u, assuming %u
is correct\n", bus, dev, fun, n, nports);
port_map = 0;
}
if (!port_map) {
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]);
}
diff --git a/version.m4 b/version.m4
index e48e906..7493e4f 100644
--- a/version.m4
+++ b/version.m4
@@ -1,4 +1,4 @@
m4_define([AC_PACKAGE_NAME],[GNU Mach])
-m4_define([AC_PACKAGE_VERSION],[1.4+git20150208])
+m4_define([AC_PACKAGE_VERSION],[1.4+git20150409])
m4_define([AC_PACKAGE_BUGREPORT],address@hidden)
m4_define([AC_PACKAGE_TARNAME],[gnumach])
diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c
index ecedb57..aff823a 100644
--- a/vm/vm_pageout.c
+++ b/vm/vm_pageout.c
@@ -551,6 +551,8 @@ void vm_pageout_scan(void)
stack_collect();
net_kmsg_collect();
consider_task_collect();
+ if (0) /* XXX: pcb_collect doesn't do anything yet, so it is
+ pointless to call consider_thread_collect. */
consider_thread_collect();
slab_collect();
diff --git a/vm/vm_resident.c b/vm/vm_resident.c
index fa02cbc..c70fa73 100644
--- a/vm/vm_resident.c
+++ b/vm/vm_resident.c
@@ -65,7 +65,7 @@
/*
- * Associated with eacn page of user-allocatable memory is a
+ * Associated with each page of user-allocatable memory is a
* page structure.
*/
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/gnumach.git