Source-Changes-HG archive

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

[src/trunk]: src/common/lib/libc/arch/i386/atomic On Xen, always alias _atomi...



details:   https://anonhg.NetBSD.org/src/rev/2095ccbe7e14
branches:  trunk
changeset: 833957:2095ccbe7e14
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed Jul 18 13:39:36 2018 +0000

description:
On Xen, always alias _atomic_cas_64 to _atomic_cas_cx8. AFAIK Xen doesn't
support CPUs that don't support cx8.
i386 XENPAE_DOMU boots again.

diffstat:

 common/lib/libc/arch/i386/atomic/atomic.S |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r 9a35f67302f2 -r 2095ccbe7e14 common/lib/libc/arch/i386/atomic/atomic.S
--- a/common/lib/libc/arch/i386/atomic/atomic.S Wed Jul 18 10:44:17 2018 +0000
+++ b/common/lib/libc/arch/i386/atomic/atomic.S Wed Jul 18 13:39:36 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic.S,v 1.22 2014/05/23 03:17:31 uebayasi Exp $     */
+/*     $NetBSD: atomic.S,v 1.23 2018/07/18 13:39:36 bouyer Exp $       */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -43,6 +43,7 @@
 #endif
 
 #ifdef _HARDKERNEL
+#include "opt_xen.h"
 #define        LOCK(n)         .Lpatch ## n:   lock
 #define        ENDLABEL(a)     _ALIGN_TEXT; LABEL(a)
 #else
@@ -196,6 +197,9 @@
 ENDLABEL(membar_sync_end)
 
 #if defined(__HAVE_ATOMIC64_OPS) || defined(_KERNEL)
+#ifdef XEN
+STRONG_ALIAS(_atomic_cas_64,_atomic_cas_cx8)
+#else
 ENTRY(_atomic_cas_64)
 #ifdef _HARDKERNEL
        pushf
@@ -227,6 +231,7 @@
        jmp     1b
 END(_atomic_cas_64)
 ENDLABEL(_atomic_cas_64_end)
+#endif /* !XEN */
 
 ENTRY(_atomic_cas_cx8)
        pushl   %edi



Home | Main Index | Thread Index | Old Index