diff options
author | jmallett <jmallett@FreeBSD.org> | 2012-03-11 06:17:49 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2012-03-11 06:17:49 +0000 |
commit | 56248d9da883404c78cefac055d0e0e1ae17dbc3 (patch) | |
tree | af4d9dcf90392eaadc4a3c38e945d006122e33c9 /sys/contrib/octeon-sdk/cvmx-atomic.h | |
parent | 8bd1c57ee7ce29a7f3647cdc3e0c0d52ce1e223f (diff) | |
parent | 74539243c8f2e35e30bcbed4f81f61738ba9a0e2 (diff) | |
download | FreeBSD-src-56248d9da883404c78cefac055d0e0e1ae17dbc3.zip FreeBSD-src-56248d9da883404c78cefac055d0e0e1ae17dbc3.tar.gz |
Merge the Cavium Octeon SDK 2.3.0 Simple Executive code and update FreeBSD to
make use of it where possible.
This primarily brings in support for newer hardware, and FreeBSD is not yet
able to support the abundance of IRQs on new hardware and many features in the
Ethernet driver.
Because of the changes to IRQs in the Simple Executive, we have to maintain our
own list of Octeon IRQs now, which probably can be pared-down and be specific
to the CIU interrupt unit soon, and when other interrupt mechanisms are added
they can maintain their own definitions.
Remove unmasking of interrupts from within the UART device now that the
function used is no longer present in the Simple Executive. The unmasking
seems to have been gratuitous as this is more properly handled by the buses
above the UART device, and seems to work on that basis.
Diffstat (limited to 'sys/contrib/octeon-sdk/cvmx-atomic.h')
-rw-r--r-- | sys/contrib/octeon-sdk/cvmx-atomic.h | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/sys/contrib/octeon-sdk/cvmx-atomic.h b/sys/contrib/octeon-sdk/cvmx-atomic.h index 7ec5c23..39b5944 100644 --- a/sys/contrib/octeon-sdk/cvmx-atomic.h +++ b/sys/contrib/octeon-sdk/cvmx-atomic.h @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -48,7 +48,7 @@ * * This file provides atomic operations * - * <hr>$Revision: 49448 $<hr> + * <hr>$Revision: 70030 $<hr> * * */ @@ -356,7 +356,7 @@ static inline int64_t cvmx_atomic_fetch_and_add64_nosync(int64_t *ptr, int64_t i uint64_t tmp, ret; #if !defined(__FreeBSD__) || !defined(_KERNEL) - if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) + if (OCTEON_IS_MODEL(OCTEON_CN6XXX) || OCTEON_IS_MODEL(OCTEON_CNF7XXX)) { CVMX_PUSH_OCTEON2; if (__builtin_constant_p(incr) && incr == 1) @@ -441,7 +441,7 @@ static inline int32_t cvmx_atomic_fetch_and_add32_nosync(int32_t *ptr, int32_t i uint32_t tmp, ret; #if !defined(__FreeBSD__) || !defined(_KERNEL) - if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) + if (OCTEON_IS_MODEL(OCTEON_CN6XXX) || OCTEON_IS_MODEL(OCTEON_CNF7XXX)) { CVMX_PUSH_OCTEON2; if (__builtin_constant_p(incr) && incr == 1) @@ -657,7 +657,7 @@ static inline uint64_t cvmx_atomic_swap64_nosync(uint64_t *ptr, uint64_t new_val uint64_t tmp, ret; #if !defined(__FreeBSD__) || !defined(_KERNEL) - if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) + if (OCTEON_IS_MODEL(OCTEON_CN6XXX) || OCTEON_IS_MODEL(OCTEON_CNF7XXX)) { CVMX_PUSH_OCTEON2; if (__builtin_constant_p(new_val) && new_val == 0) @@ -719,7 +719,7 @@ static inline uint32_t cvmx_atomic_swap32_nosync(uint32_t *ptr, uint32_t new_val uint32_t tmp, ret; #if !defined(__FreeBSD__) || !defined(_KERNEL) - if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) + if (OCTEON_IS_MODEL(OCTEON_CN6XXX) || OCTEON_IS_MODEL(OCTEON_CNF7XXX)) { CVMX_PUSH_OCTEON2; if (__builtin_constant_p(new_val) && new_val == 0) @@ -763,22 +763,6 @@ static inline uint32_t cvmx_atomic_swap32_nosync(uint32_t *ptr, uint32_t new_val return (ret); } -/** - * This atomic operation is now named cvmx_atomic_compare_and_store32_nosync - * and the (deprecated) macro is provided for backward compatibility. - * @deprecated - */ -#define cvmx_atomic_compare_and_store_nosync32 cvmx_atomic_compare_and_store32_nosync - -/** - * This atomic operation is now named cvmx_atomic_compare_and_store64_nosync - * and the (deprecated) macro is provided for backward compatibility. - * @deprecated - */ -#define cvmx_atomic_compare_and_store_nosync64 cvmx_atomic_compare_and_store64_nosync - - - #ifdef __cplusplus } #endif |