niagara2_atomic.s revision b02e9a2d4d2071d770e5aa9ae8f83f2bbe1f2ced
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/asm_linkage.h>
#if defined(_KERNEL)
#if !defined(lint)
/*
* Legacy kernel interfaces; they will go away (eventually).
*/
#endif /* lint */
#else /* _KERNEL */
/*
* Include the definitions for the libc weak aliases.
*/
#include "../atomic_asm_weak.h"
#endif /* _KERNEL */
#ifdef N2_ERRATUM_181_WORKAROUND
#define BACKOFF_INIT_VALUE 1
#define BACKOFF_LIMIT_VALUE 16384
#define ATOMIC_BACKOFF_INIT(val) \
/* simplistic exponential back-off */ \
nop ; \
#else /* N2_ERRATUM_181_WORKAROUND */
#define ATOMIC_BACKOFF_INIT(val)
#endif /* N2_ERRATUM_181_WORKAROUND */
#if !defined(lint)
1:
1:
0:
1:
2:
0:
1:
2:
1:
1:
0:
1:
2:
0:
1:
2:
1:
1:
0:
1:
2:
0:
1:
2:
1:
2:
1:
2:
1:
1:
0:
1:
2:
0:
1:
2:
0:
1:
2:
5:
0:
1:
2:
5:
#if !defined(_KERNEL)
#endif /* !_KERNEL */
#endif /* lint */