commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnumach] 01/03: Imported Upstream version 1.5+git20150922


From: Samuel Thibault
Subject: [gnumach] 01/03: Imported Upstream version 1.5+git20150922
Date: Tue, 22 Sep 2015 18:14:25 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch master
in repository gnumach.

commit f16e5473cf3f1156ebcf35dcb0d790d0bac6960e
Author: Samuel Thibault <address@hidden>
Date:   Tue Sep 22 17:11:58 2015 +0000

    Imported Upstream version 1.5+git20150922
---
 ChangeLog                                        |  55 ++++++
 Makefile.in                                      |   1 +
 configure                                        |  34 ++--
 doc/mach.info                                    | 240 +++++++++++------------
 doc/mach.info-1                                  |   8 +-
 doc/mach.info-2                                  |   4 +-
 doc/stamp-vti                                    |   8 +-
 doc/version.texi                                 |   8 +-
 i386/i386at/kd.c                                 |  63 +++---
 i386/i386at/kd.h                                 |   1 +
 i386/i386at/model_dep.c                          |   8 +-
 include/mach/time_value.h                        |  14 ++
 include/mach/{time_value.h => time_value.h.orig} |   2 +
 kern/mach_clock.c                                |  33 ++--
 kern/macros.h                                    |   2 +
 linux/src/drivers/scsi/advansys.c                |   1 -
 version.m4                                       |   2 +-
 17 files changed, 295 insertions(+), 189 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b0e910c..89c75f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,58 @@
+2015-09-19  Flávio Cruz  <address@hidden>
+
+       Add macros to convert between time_value_t and timespec
+       * include/mach/time_value.h (TIME_VALUE_TO_TIMESPEC,
+       TIMESPEC_TO_TIME_VALUE): New macros
+
+2015-09-07  Justus Winter  <address@hidden>
+
+       kern: use proper memory fences when handling the mapped time
+       * include/mach/time_value.h (struct mapped_time_value): Adjust comment.
+       * kern/mach_clock.c (mtime): Likewise.  Also make it volatile.
+       (update_mapped_time): Use full hardware barriers.
+       (read_mapped_time): New macro with proper fences.
+       (record_time_stamp, host_get_time): Use the new macro.
+
+2015-09-07  Justus Winter  <address@hidden>
+
+       kern: fix loop reading the time value
+       Previously, recent versions of gcc would hoist the loads out of the
+       loop reading the time value.
+
+       * kern/macros.h (access_once): New macro.
+       * kern/mach_clock.c (host_get_time): Use the new macro to prevent the
+       loads from being hoisted out of the loop.
+
+2015-09-07  Rik van Riel  <address@hidden>
+
+       commit fce798016c4bd2be89b86b0d343ab54505409412
+           [PATCH] advansys.c buffer overflow
+
+           The Stanford checker found an error in advansys.c, the driver
+           is accessing field 6 in an array[6].  Since this is the only
+           place where this field is accessed it should be safe to simply
+           remove this line.
+
+2015-08-31  Samuel Thibault  <address@hidden>
+
+       Reserve 64k at beginning of memory, not just 4k
+       Linux does this to be extra careful with some BIOSes which apparently
+       spuriously write between 4k and 64k.
+
+       * i386/i386at/model_dep.c (RESERVED_BIOS): New macro.
+       (avail_next, mem_size_init, init_alloc_aligned): Use RESERVED_BIOS 
instead
+       of hardcoded 0x1000.
+
+2015-08-30  James Clarke  <address@hidden>
+
+       Fix printk not handling ANSI escape codes
+       * i386/i386at/kd.c (kdstart): Moved escape sequence handling to new
+       kd_putc_esc function.
+       (kd_putc_esc): New function with logic from kdstart.
+       (kdcnputc): Call kd_putc_esc rather than kd_putc to allow for ANSI
+       escape codes.
+       * i386/i386at/kd.h (kd_putc_esc): New function.
+
 2015-08-28  Flávio Cruz  <address@hidden>
 
        Make sure the reply port's reference is released when the thread needs 
to be halted.
diff --git a/Makefile.in b/Makefile.in
index ffd48f6..0f9511d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2424,6 +2424,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff --git a/configure b/configure
index efd8295..c52ed8d 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.5+git20150827.
+# Generated by GNU Autoconf 2.69 for GNU Mach 1.5+git20150922.
 #
 # Report bugs to <address@hidden>.
 #
@@ -579,8 +579,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GNU Mach'
 PACKAGE_TARNAME='gnumach'
-PACKAGE_VERSION='1.5+git20150827'
-PACKAGE_STRING='GNU Mach 1.5+git20150827'
+PACKAGE_VERSION='1.5+git20150922'
+PACKAGE_STRING='GNU Mach 1.5+git20150922'
 PACKAGE_BUGREPORT='address@hidden'
 PACKAGE_URL=''
 
@@ -897,6 +897,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -1082,6 +1083,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1334,6 +1336,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1471,7 +1482,7 @@ fi
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir
+               libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1584,7 +1595,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.5+git20150827 to adapt to many kinds of 
systems.
+\`configure' configures GNU Mach 1.5+git20150922 to adapt to many kinds of 
systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1624,6 +1635,7 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1654,7 +1666,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU Mach 1.5+git20150827:";;
+     short | recursive ) echo "Configuration of GNU Mach 1.5+git20150922:";;
    esac
   cat <<\_ACEOF
 
@@ -2002,7 +2014,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU Mach configure 1.5+git20150827
+GNU Mach configure 1.5+git20150922
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2094,7 +2106,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.5+git20150827, which was
+It was created by GNU Mach $as_me 1.5+git20150922, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2960,7 +2972,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gnumach'
- VERSION='1.5+git20150827'
+ VERSION='1.5+git20150922'
 
 
 # Some tools Automake needs.
@@ -12116,7 +12128,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.5+git20150827, which was
+This file was extended by GNU Mach $as_me 1.5+git20150922, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -12187,7 +12199,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.5+git20150827
+GNU Mach config.status 1.5+git20150922
 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 aa283a7..24666d3 100644
--- a/doc/mach.info
+++ b/doc/mach.info
@@ -2,8 +2,8 @@ This is mach.info, produced by makeinfo version 6.0 from 
mach.texi.
 
 This file documents the GNU Mach microkernel.
 
-   This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.5+git20150827.
+   This is edition 0.4, last updated on 12 September 2015, of 'The GNU
+Mach Reference Manual', for version 1.5+git20150922.
 
    Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
 Inc.
@@ -39,126 +39,126 @@ END-INFO-DIR-ENTRY
 
 
 Indirect:
-mach.info-1: 1637
-mach.info-2: 302552
+mach.info-1: 1643
+mach.info-2: 302570
 
 Tag Table:
 (Indirect)
-Node: Top1637
-Node: Introduction11272
-Node: Audience12103
-Node: Features13138
-Node: Overview14965
-Node: History16158
-Node: Installing16303
-Node: Binary Distributions17528
-Node: Compilation18336
-Node: Configuration19569
-Node: Cross-Compilation35980
-Node: Bootstrap36761
-Ref: Bootstrap-Footnote-137204
-Node: Bootloader37441
-Ref: Bootloader-Footnote-138721
-Node: Modules38807
-Node: Inter Process Communication39634
-Node: Major Concepts40257
-Node: Messaging Interface44062
-Node: Mach Message Call44792
-Node: Message Format48107
-Node: Exchanging Port Rights59299
-Ref: Exchanging Port Rights-Footnote-164861
-Node: Memory65033
-Ref: Memory-Footnote-168127
-Node: Message Send68469
-Ref: Message Send-Footnote-175491
-Node: Message Receive75774
-Ref: Message Receive-Footnote-185426
-Node: Atomicity85707
-Node: Port Manipulation Interface88481
-Node: Port Creation90036
-Node: Port Destruction94825
-Node: Port Names97968
-Node: Port Rights102215
-Node: Ports and other Tasks106004
-Node: Receive Rights110097
-Node: Port Sets117028
-Node: Request Notifications119431
-Node: Inherited Ports124235
-Node: Virtual Memory Interface127919
-Node: Memory Allocation129172
-Node: Memory Deallocation131697
-Node: Data Transfer133161
-Node: Memory Attributes136687
-Node: Mapping Memory Objects146126
-Node: Memory Statistics149435
-Node: External Memory Management151009
-Node: Memory Object Server151714
-Node: Memory Object Creation154423
-Node: Memory Object Termination158429
-Node: Memory Objects and Data161368
-Node: Memory Object Locking178514
-Node: Memory Object Attributes184409
-Node: Default Memory Manager190246
-Node: Threads and Tasks195968
-Node: Thread Interface196305
-Node: Thread Creation197301
-Node: Thread Termination198418
-Node: Thread Information198889
-Node: Thread Settings204988
-Node: Thread Execution206222
-Node: Scheduling213515
-Node: Thread Priority213870
-Node: Hand-Off Scheduling216504
-Node: Scheduling Policy221629
-Node: Thread Special Ports222961
-Node: Exceptions225407
-Node: Task Interface226277
-Node: Task Creation227289
-Node: Task Termination228624
-Node: Task Information229226
-Node: Task Execution236128
-Node: Task Special Ports240541
-Node: Syscall Emulation244395
-Node: Profiling245626
-Node: Host Interface249389
-Node: Host Ports250374
-Node: Host Information252447
-Node: Host Time257830
-Node: Host Reboot260497
-Node: Processors and Processor Sets261049
-Node: Processor Set Interface262027
-Node: Processor Set Ports262794
-Node: Processor Set Access263624
-Node: Processor Set Creation265884
-Node: Processor Set Destruction266911
-Node: Tasks and Threads on Sets267832
-Node: Processor Set Priority272999
-Node: Processor Set Policy274289
-Node: Processor Set Info275903
-Node: Processor Interface279716
-Node: Hosted Processors280441
-Node: Processor Control281432
-Node: Processors and Sets282898
-Node: Processor Info284776
-Node: Device Interface287518
-Node: Device Reply Server289133
-Node: Device Open290425
-Node: Device Close292548
-Node: Device Read293127
-Node: Device Write296046
-Node: Device Map298851
-Node: Device Status299742
-Node: Device Filter302552
-Node: Kernel Debugger308299
-Node: Operation309026
-Node: Commands312003
-Node: Variables325788
-Node: Expressions327176
-Node: Copying328525
-Node: Documentation License347754
-Node: GNU Free Documentation License348343
-Node: CMU License370742
-Node: Concept Index371977
-Node: Function and Data Index375823
+Node: Top1643
+Node: Introduction11284
+Node: Audience12115
+Node: Features13150
+Node: Overview14977
+Node: History16170
+Node: Installing16315
+Node: Binary Distributions17540
+Node: Compilation18348
+Node: Configuration19581
+Node: Cross-Compilation35992
+Node: Bootstrap36773
+Ref: Bootstrap-Footnote-137216
+Node: Bootloader37453
+Ref: Bootloader-Footnote-138733
+Node: Modules38819
+Node: Inter Process Communication39646
+Node: Major Concepts40269
+Node: Messaging Interface44074
+Node: Mach Message Call44804
+Node: Message Format48119
+Node: Exchanging Port Rights59311
+Ref: Exchanging Port Rights-Footnote-164873
+Node: Memory65045
+Ref: Memory-Footnote-168139
+Node: Message Send68481
+Ref: Message Send-Footnote-175503
+Node: Message Receive75786
+Ref: Message Receive-Footnote-185438
+Node: Atomicity85719
+Node: Port Manipulation Interface88493
+Node: Port Creation90048
+Node: Port Destruction94837
+Node: Port Names97980
+Node: Port Rights102227
+Node: Ports and other Tasks106016
+Node: Receive Rights110109
+Node: Port Sets117040
+Node: Request Notifications119443
+Node: Inherited Ports124247
+Node: Virtual Memory Interface127931
+Node: Memory Allocation129184
+Node: Memory Deallocation131709
+Node: Data Transfer133173
+Node: Memory Attributes136699
+Node: Mapping Memory Objects146138
+Node: Memory Statistics149447
+Node: External Memory Management151021
+Node: Memory Object Server151726
+Node: Memory Object Creation154435
+Node: Memory Object Termination158441
+Node: Memory Objects and Data161380
+Node: Memory Object Locking178526
+Node: Memory Object Attributes184421
+Node: Default Memory Manager190258
+Node: Threads and Tasks195980
+Node: Thread Interface196317
+Node: Thread Creation197313
+Node: Thread Termination198430
+Node: Thread Information198901
+Node: Thread Settings205000
+Node: Thread Execution206234
+Node: Scheduling213527
+Node: Thread Priority213882
+Node: Hand-Off Scheduling216516
+Node: Scheduling Policy221641
+Node: Thread Special Ports222973
+Node: Exceptions225419
+Node: Task Interface226289
+Node: Task Creation227301
+Node: Task Termination228636
+Node: Task Information229238
+Node: Task Execution236140
+Node: Task Special Ports240553
+Node: Syscall Emulation244407
+Node: Profiling245638
+Node: Host Interface249401
+Node: Host Ports250386
+Node: Host Information252459
+Node: Host Time257842
+Node: Host Reboot260509
+Node: Processors and Processor Sets261061
+Node: Processor Set Interface262039
+Node: Processor Set Ports262806
+Node: Processor Set Access263636
+Node: Processor Set Creation265896
+Node: Processor Set Destruction266923
+Node: Tasks and Threads on Sets267844
+Node: Processor Set Priority273011
+Node: Processor Set Policy274301
+Node: Processor Set Info275915
+Node: Processor Interface279728
+Node: Hosted Processors280453
+Node: Processor Control281444
+Node: Processors and Sets282910
+Node: Processor Info284788
+Node: Device Interface287530
+Node: Device Reply Server289145
+Node: Device Open290437
+Node: Device Close292560
+Node: Device Read293139
+Node: Device Write296058
+Node: Device Map298863
+Node: Device Status299754
+Node: Device Filter302570
+Node: Kernel Debugger308317
+Node: Operation309044
+Node: Commands312021
+Node: Variables325806
+Node: Expressions327194
+Node: Copying328543
+Node: Documentation License347772
+Node: GNU Free Documentation License348361
+Node: CMU License370760
+Node: Concept Index371995
+Node: Function and Data Index375841
 
 End Tag Table
diff --git a/doc/mach.info-1 b/doc/mach.info-1
index 69cdb55..3965a56 100644
--- a/doc/mach.info-1
+++ b/doc/mach.info-1
@@ -2,8 +2,8 @@ This is mach.info, produced by makeinfo version 6.0 from 
mach.texi.
 
 This file documents the GNU Mach microkernel.
 
-   This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.5+git20150827.
+   This is edition 0.4, last updated on 12 September 2015, of 'The GNU
+Mach Reference Manual', for version 1.5+git20150922.
 
    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 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.5+git20150827.
+   This is edition 0.4, last updated on 12 September 2015, of 'The GNU
+Mach Reference Manual', for version 1.5+git20150922.
 
    Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
 Inc.
diff --git a/doc/mach.info-2 b/doc/mach.info-2
index ec764d6..9804275 100644
--- a/doc/mach.info-2
+++ b/doc/mach.info-2
@@ -2,8 +2,8 @@ This is mach.info, produced by makeinfo version 6.0 from 
mach.texi.
 
 This file documents the GNU Mach microkernel.
 
-   This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.5+git20150827.
+   This is edition 0.4, last updated on 12 September 2015, of 'The GNU
+Mach Reference Manual', for version 1.5+git20150922.
 
    Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
 Inc.
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 3b4e6b4..dbd2e99 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
address@hidden UPDATED 9 July 2015
address@hidden UPDATED-MONTH July 2015
address@hidden EDITION 1.5+git20150827
address@hidden VERSION 1.5+git20150827
address@hidden UPDATED 12 September 2015
address@hidden UPDATED-MONTH September 2015
address@hidden EDITION 1.5+git20150922
address@hidden VERSION 1.5+git20150922
diff --git a/doc/version.texi b/doc/version.texi
index 3b4e6b4..dbd2e99 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
address@hidden UPDATED 9 July 2015
address@hidden UPDATED-MONTH July 2015
address@hidden EDITION 1.5+git20150827
address@hidden VERSION 1.5+git20150827
address@hidden UPDATED 12 September 2015
address@hidden UPDATED-MONTH September 2015
address@hidden EDITION 1.5+git20150922
address@hidden VERSION 1.5+git20150922
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 5656e83..9ed3958 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -1059,7 +1059,6 @@ kdstart(struct tty *tp)
 {
        spl_t   o_pri;
        int     ch;
-       unsigned char   c;
 
        if (tp->t_state & TS_TTSTOP)
                return;
@@ -1069,33 +1068,12 @@ kdstart(struct tty *tp)
                        break;
                if ((tp->t_outq.c_cc <= 0) || (ch = getc(&tp->t_outq)) == -1)
                        break;
-               c = ch;
                /*
                 * Drop priority for long screen updates. ttstart() calls us at
                 * spltty.
                 */
                o_pri = splsoftclock();         /* block timeout */
-               if (c == (K_ESC)) {
-                       if (esc_spt == esc_seq) {
-                               *(esc_spt++)=(K_ESC);
-                               *(esc_spt) = '\0';
-                       } else {
-                               kd_putc((K_ESC));
-                               esc_spt = esc_seq;
-                       }
-               } else {
-                       if (esc_spt - esc_seq) {
-                               if (esc_spt - esc_seq > K_MAXESC - 1)
-                                       esc_spt = esc_seq;
-                               else {
-                                       *(esc_spt++) = c;
-                                       *(esc_spt) = '\0';
-                                       kd_parseesc();
-                                     }
-                       } else {
-                               kd_putc(c);
-                       }
-               }
+               kd_putc_esc(ch);
                splx(o_pri);
        }
        if (tp->t_outq.c_cc <= TTLOWAT(tp)) {
@@ -1237,6 +1215,43 @@ kd_bellon(void)
 
 /*
  *
+ * Function kd_putc_esc():
+ *
+ *     This function puts a character on the screen, handling escape
+ *     sequences.
+ *
+ * input       : character to be displayed (or part of an escape code)
+ * output      : character is displayed, or some action is taken
+ *
+ */
+void
+kd_putc_esc(u_char c)
+{
+       if (c == (K_ESC)) {
+               if (esc_spt == esc_seq) {
+                       *(esc_spt++)=(K_ESC);
+                       *(esc_spt) = '\0';
+               } else {
+                       kd_putc((K_ESC));
+                       esc_spt = esc_seq;
+               }
+       } else {
+               if (esc_spt - esc_seq) {
+                       if (esc_spt - esc_seq > K_MAXESC - 1)
+                               esc_spt = esc_seq;
+                       else {
+                               *(esc_spt++) = c;
+                               *(esc_spt) = '\0';
+                               kd_parseesc();
+                       }
+               } else {
+                       kd_putc(c);
+               }
+       }
+}
+
+/*
+ *
  * Function kd_putc():
  *
  *     This function simply puts a character on the screen.  It does some
@@ -2950,7 +2965,7 @@ kdcnputc(dev_t dev, int c)
        /* Note that tab is handled in kd_putc */
        if (c == '\n')
                kd_putc('\r');
-       kd_putc(c);
+       kd_putc_esc(c);
 
        return 0;
 }
diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h
index 0cfed69..60cee7e 100644
--- a/i386/i386at/kd.h
+++ b/i386/i386at/kd.h
@@ -702,6 +702,7 @@ extern void kd_setleds1 (u_char);
 extern void kd_setleds2 (void);
 extern void cnsetleds (u_char);
 extern void kdreboot (void);
+extern void kd_putc_esc (u_char);
 extern void kd_putc (u_char);
 extern void kd_parseesc (void);
 extern void kd_down (void);
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index fdf983b..04cf695 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -101,6 +101,8 @@ static unsigned elf_shdr_shndx;
 #define kern_sym_end   0
 #endif /* MACH_KDB */
 
+#define RESERVED_BIOS 0x10000
+
 /* These indicate the total extent of physical memory addresses we're using.
    They are page-aligned.  */
 vm_offset_t phys_first_addr = 0;
@@ -131,7 +133,7 @@ char *kernel_cmdline = "";
    It is not necessarily page-aligned.  */
 static vm_offset_t avail_next
 #ifndef MACH_HYP
-       = 0x1000 /* XX end of BIOS data area */
+       = RESERVED_BIOS /* XX end of BIOS data area */
 #endif /* MACH_HYP */
        ;
 
@@ -354,7 +356,7 @@ mem_size_init(void)
 #else  /* MACH_HYP */
        avail_remaining
          = phys_last_addr - (0x100000 - (boot_info.mem_lower * 0x400)
-                             - 0x1000);
+                             - RESERVED_BIOS);
 #endif /* MACH_HYP */
 }
 
@@ -755,7 +757,7 @@ init_alloc_aligned(vm_size_t size, vm_offset_t *addrp)
                   of free pages, so it should not have been allocated to any
                   other use in early initialization before the Linux driver
                   glue initialization needs to allocate low memory.  */
-               avail_next = 0x1000;
+               avail_next = RESERVED_BIOS;
                wrapped = 1;
              }
          }
diff --git a/include/mach/time_value.h b/include/mach/time_value.h
index 61be581..3a9c384 100644
--- a/include/mach/time_value.h
+++ b/include/mach/time_value.h
@@ -84,7 +84,9 @@ typedef       struct time_value       time_value_t;
  *     Read this mapped value with
  *             do {
  *                     secs = mtime->seconds;
+ *                     __sync_synchronize();
  *                     usecs = mtime->microseconds;
+ *                     __sync_synchronize();
  *             } while (secs != mtime->check_seconds);
  */
 
@@ -94,4 +96,16 @@ typedef struct mapped_time_value {
        integer_t check_seconds;
 } mapped_time_value_t;
 
+/* Macros for converting between struct timespec and time_value_t. */
+
+#define TIME_VALUE_TO_TIMESPEC(tv, ts) do {                             \
+        (ts)->tv_sec = (tv)->seconds;                                   \
+        (ts)->tv_nsec = (tv)->microseconds * 1000;                      \
+} while(0)
+
+#define TIMESPEC_TO_TIME_VALUE(tv, ts) do {                             \
+        (tv)->seconds = (ts)->tv_sec;                                   \
+        (tv)->microseconds = (ts)->tv_nsec / 1000;                      \
+} while(0)
+
 #endif /* _MACH_TIME_VALUE_H_ */
diff --git a/include/mach/time_value.h b/include/mach/time_value.h.orig
similarity index 98%
copy from include/mach/time_value.h
copy to include/mach/time_value.h.orig
index 61be581..0dfe382 100644
--- a/include/mach/time_value.h
+++ b/include/mach/time_value.h.orig
@@ -84,7 +84,9 @@ typedef       struct time_value       time_value_t;
  *     Read this mapped value with
  *             do {
  *                     secs = mtime->seconds;
+ *                     __sync_synchronize();
  *                     usecs = mtime->microseconds;
+ *                     __sync_synchronize();
  *             } while (secs != mtime->check_seconds);
  */
 
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index 655adf4..dba2320 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -85,26 +85,36 @@ int         bigadj = 1000000;       /* adjust 10*tickadj if 
adjustment
  *     This update protocol, with a check value, allows
  *             do {
  *                     secs = mtime->seconds;
+ *                     __sync_synchronize();
  *                     usecs = mtime->microseconds;
+ *                     __sync_synchronize();
  *             } while (secs != mtime->check_seconds);
- *     to read the time correctly.  (On a multiprocessor this assumes
- *     that processors see each other's writes in the correct order.
- *     We have to insert write fence operations.) FIXME
+ *     to read the time correctly.
  */
 
-mapped_time_value_t *mtime = 0;
+volatile mapped_time_value_t *mtime = 0;
 
 #define update_mapped_time(time)                               \
 MACRO_BEGIN                                                    \
        if (mtime != 0) {                                       \
                mtime->check_seconds = (time)->seconds;         \
-               asm volatile("":::"memory");                    \
+               __sync_synchronize();                           \
                mtime->microseconds = (time)->microseconds;     \
-               asm volatile("":::"memory");                    \
+               __sync_synchronize();                           \
                mtime->seconds = (time)->seconds;               \
        }                                                       \
 MACRO_END
 
+#define read_mapped_time(time)                                 \
+MACRO_BEGIN                                                    \
+       do {                                                    \
+               time->seconds = mtime->seconds;                 \
+               __sync_synchronize();                           \
+               time->microseconds = mtime->microseconds;       \
+               __sync_synchronize();                           \
+       } while (time->seconds != mtime->check_seconds);        \
+MACRO_END
+
 decl_simple_lock_data(,        timer_lock)     /* lock for ... */
 timer_elt_data_t       timer_head;     /* ordered list of timeouts */
                                        /* (doubles as end-of-list) */
@@ -395,10 +405,7 @@ clock_boottime_update(struct time_value *new_time)
 void
 record_time_stamp (time_value_t *stamp)
 {
-       do {
-               stamp->seconds = mtime->seconds;
-               stamp->microseconds = mtime->microseconds;
-       } while (stamp->seconds != mtime->check_seconds);
+       read_mapped_time(stamp);
        time_value_add(stamp, &clock_boottime_offset);
 }
 
@@ -425,11 +432,7 @@ host_get_time(host, current_time)
        if (host == HOST_NULL)
                return(KERN_INVALID_HOST);
 
-       do {
-               current_time->seconds = mtime->seconds;
-               current_time->microseconds = mtime->microseconds;
-       } while (current_time->seconds != mtime->check_seconds);
-
+       read_mapped_time(current_time);
        return (KERN_SUCCESS);
 }
 
diff --git a/kern/macros.h b/kern/macros.h
index 7cc579d..c2e8545 100644
--- a/kern/macros.h
+++ b/kern/macros.h
@@ -52,6 +52,8 @@
 #define structof(ptr, type, member) \
     ((type *)((char *)(ptr) - offsetof(type, member)))
 
+#define access_once(x)      (*(volatile typeof(x) *)&(x))
+
 #define alignof(x)          __alignof__(x)
 
 #ifndef likely
diff --git a/linux/src/drivers/scsi/advansys.c 
b/linux/src/drivers/scsi/advansys.c
index ef61fac..7aea67c 100644
--- a/linux/src/drivers/scsi/advansys.c
+++ b/linux/src/drivers/scsi/advansys.c
@@ -4715,7 +4715,6 @@ advansys_detect(Scsi_Host_Template *tpnt)
                 ep->adapter_info[3] = asc_dvc_varp->cfg->adapter_info[3];
                 ep->adapter_info[4] = asc_dvc_varp->cfg->adapter_info[4];
                 ep->adapter_info[5] = asc_dvc_varp->cfg->adapter_info[5];
-                ep->adapter_info[6] = asc_dvc_varp->cfg->adapter_info[6];
 
                /*
                 * Modify board configuration.
diff --git a/version.m4 b/version.m4
index 1d5b41f..e545ca6 100644
--- a/version.m4
+++ b/version.m4
@@ -1,4 +1,4 @@
 m4_define([AC_PACKAGE_NAME],[GNU Mach])
-m4_define([AC_PACKAGE_VERSION],[1.5+git20150827])
+m4_define([AC_PACKAGE_VERSION],[1.5+git20150922])
 m4_define([AC_PACKAGE_BUGREPORT],address@hidden)
 m4_define([AC_PACKAGE_TARNAME],[gnumach])

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/gnumach.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]