mm_solaris.h revision d14abf155341d55053c76eeec58b787a456b753b
/*****************************************************************************
* 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 2014 QLogic Corporation
* The contents of this file are subject to the terms of the
* QLogic End User License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing permissions
* and limitations under the License.
*
*****************************************************************************/
// portable integer type of the pointer size for current platform (64/32)
typedef unsigned long mm_int_ptr_t;
typedef kmutex_t mm_spin_lock_t;
/* overrides __FILE_STRIPPED__ usage in mm.h (__BASENAME__ from Makefile) */
#define __FILE_STRIPPED__ __BASENAME__
#define mm_read_barrier_imp() membar_consumer()
#define mm_write_barrier_imp() membar_producer()
#define mm_barrier_imp() \
do { \
membar_consumer(); \
membar_producer(); \
} while(0)
#define mm_atomic_read_imp(_p) \
#define mm_atomic_long_read_imp(_p) \
#if defined(__SunOS_MDB)
LM_BAR_WR32_ADDRESS((PDEV), ((u8_t *)PFDEV(PDEV)->context_info->array[VF_TO_PF_CID((PDEV),(CID))].cid_resc.mapped_cid_bar_addr + (DPM_TRIGER_TYPE)), (VAL));
#else /* __SunOS && !__SunOS_MDB */
(uint32_t *)((caddr_t)PFDEV(PDEV)->context_info->array[VF_TO_PF_CID((PDEV),(CID))].cid_resc.mapped_cid_bar_addr + (DPM_TRIGER_TYPE)), \
(VAL))
#endif /* __SunOS_MDB */
#define MM_ACQUIRE_RAMROD_COMP_LOCK_IMP(pDev)
#define MM_RELEASE_RAMROD_COMP_LOCK_IMP(pDev)
void MM_ACQUIRE_LOADER_LOCK_IMP();
void MM_RELEASE_LOADER_LOCK_IMP();
#ifdef VF_INVOLVED
#error "VF_INVOLVED defined with no backend MM implementation"
#define MM_ACQUIRE_PF_LOCK_IMP(pdev)
#define MM_RELEASE_PF_LOCK_IMP(pdev)
#define MM_ACQUIRE_VFS_STATS_LOCK_IMP(pdev)
#define MM_RELEASE_VFS_STATS_LOCK_IMP(pdev)
#define MM_ACQUIRE_VFS_STATS_LOCK_DPC_IMP(pdev)
#define MM_RELEASE_VFS_STATS_LOCK_DPC_IMP(pdev)
#endif /* VF_INVOLVED */
#define mm_er_initiate_recovery_imp(pdev) \
#define mm_dbus_start_if_enabled_imp(pdev)
#define mm_dbus_stop_if_started_imp(pdev)
#ifdef BIG_ENDIAN
// LE
// BE
#else /* LITTLE_ENDIAN */
// LE
// BE
#endif /* ifdef BIG_ENDIAN */
u64_t mm_query_system_time(void);