NetBSD Problem Report #48601
From martin@aprisoft.de Tue Feb 18 10:23:44 2014
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id B2347A5673
for <gnats-bugs@gnats.NetBSD.org>; Tue, 18 Feb 2014 10:23:44 +0000 (UTC)
Message-Id: <20140218102331.78211ED0AED@emmas.aprisoft.de>
Date: Tue, 18 Feb 2014 11:23:31 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: some architectures are missing a __sync_lock_test_and_set_8 implementation
X-Send-Pr-Version: 3.95
>Number: 48601
>Category: lib
>Synopsis: some architectures are missing a __sync_lock_test_and_set_8 implementation
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 18 10:25:00 +0000 2014
>Closed-Date: Mon Dec 15 11:25:03 +0000 2014
>Last-Modified: Mon Dec 15 11:25:03 +0000 2014
>Originator: Martin Husemann
>Release: NetBSD 6.99.30
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 6.99.30 NetBSD 6.99.30 (WHOEVER) #106: Thu Jan 30 21:52:06 CET 2014 martin@emmas.aprisoft.de:/usr/src/sys/arch/sparc64/compile/WHOEVER sparc64
Architecture: sparc64
Machine: sparc64
>Description:
Some architectures (i386 is one) are missing an implementation of
__sync_lock_test_and_set_8.
Basically this should do an atomic set of a 64 bit value:
uin64_t __sync_lock_test_and_set_8(volatile uint64_t *addr, uint64_t val)
{
uint64_t old = *addr;
*addr = val;
return old;
}
But all this done atomically - needs someone (for at least i386) to understand
the early cpu differences and the patch maze in src/common/libc/arch/i386/atomic
Other architectures are likely affected as well (will gather a list in that
test case).
>How-To-Repeat:
Uncomment the relevant lines from /usr/src/tests/lib/libc/sync and try to
compile it.
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48601 CVS commit: src/tests/lib/libc/sync
Date: Tue, 18 Feb 2014 10:27:46 +0000
Module Name: src
Committed By: martin
Date: Tue Feb 18 10:27:46 UTC 2014
Modified Files:
src/tests/lib/libc/sync: all_sync_ops_linkable.c
Log Message:
For now excempt i386 from __sync_lock_test_and_set_8 and point to
PR lib/48601. Probably more architectures to follow.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sync/all_sync_ops_linkable.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48601 CVS commit: src/tests/lib/libc/sync
Date: Fri, 21 Feb 2014 10:26:25 +0000
Module Name: src
Committed By: martin
Date: Fri Feb 21 10:26:25 UTC 2014
Modified Files:
src/tests/lib/libc/sync: all_sync_ops_linkable.c
Log Message:
Remove excemption for i386 (PR lib/48601) - missing aliases will be
added to the C code.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sync/all_sync_ops_linkable.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48601 CVS commit: src/common/lib/libc/atomic
Date: Fri, 21 Feb 2014 10:27:34 +0000
Module Name: src
Committed By: martin
Date: Fri Feb 21 10:27:34 UTC 2014
Modified Files:
src/common/lib/libc/atomic: atomic_swap_32_cas.c atomic_swap_64_cas.c
Log Message:
Add missing __sync_lock_test_and_set_* aliases for PR lib/48601
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/atomic/atomic_swap_32_cas.c
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/atomic/atomic_swap_64_cas.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 15 Dec 2014 11:25:03 +0000
State-Changed-Why:
Fixed in -current and -7
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.