/*************************************************************************** * * Copyright (C) 2001 International Business Machines * All rights reserved. * * This file is part of the GPFS mmfslinux kernel module. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *************************************************************************** */ /* @(#)41 1.129.1.3 src/avs/fs/mmfs/ts/kernext/gpl-linux/gpl-ksyms.c, mmfs, avs_rgpfs24, rgpfs24s006a 8/16/06 18:49:16 */ /* * Export symbols for module (mmfslinux) * * Define new global variables with GPFS_EXPORT_SYMBOL(varname). * Define new functions with GPFS_EXPORT_FUNC(varname). * * The latter will automatically spit out a generic function * prototype. The prototype format doesn't matter here, but * it is important to let the compiler know that something * is really a function (or else incorrect code is spewed out * on IA64 for the relocation entry which trips up insmod; * the i386 platform doesn't have this feature). * * NOTE: C++ function names / methods are generally mangled and * you need to use the managled symbol name. The mangled name can * be found by scanning the appropriate object file w/ * "objdump --syms | grep ", or just * try to load the module and shove the undefined reference names * in here. * These mangled names seem to be architecture independant so far. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #if LINUX_KERNEL_VERSION > 2060300 #include #endif /* ************************************************************* */ /* Various kludge definitions that are are needed with C++ code. */ /* ************************************************************* */ #ifdef MODULE #if LINUX_KERNEL_VERSION < 2060000 extern int printk(const char * fmt, ...); #endif void terminate__Fv() { printk("??? terminate() called ???\n"); }; int errno = 0; #ifdef GPFS_ARCH_IA64 void __builtin_delete() { printk("??? __builtin_delete() called ???\n"); }; void __throw() { printk("??? __throw() called ???\n"); }; #endif /* GPFS_ARCH_IA64 */ #endif /* MODULE */ #ifdef GPFS_ARCH_IA64 int __ia64_personality_v1 = 0; #endif /* GPFS_ARCH_IA64 */ #ifdef GPFS_ARCH_PPC64 int __gxx_personality_v0 = 0; void _Unwind_Resume() { printk("??? ._Unwind_Resume called ???\n"); }; #endif /* ********************** */ /* Export symbols section */ /* ********************** */ #if defined(MODULE) && defined(GPFS_EXPORT_KSYMS) #if LINUX_KERNEL_VERSION > 2061000 #define GPFS_EXPORT_SYMBOL(VAR) EXPORT_SYMBOL(VAR); #define EXPORT_SYMBOL_NOVERS(VAR) EXPORT_SYMBOL(VAR); #define GPFS_EXPORT_FUNC(FNAME) /* extern void FNAME (); */ \ EXPORT_SYMBOL(FNAME); #else /* Use GPFS_EXPORT_SYMBOL for exporting a variable */ /* Use GPFS_EXPORT_FUNC for exporting a function */ #define GPFS_EXPORT_SYMBOL(VAR) /* extern VAR;*/ EXPORT_SYMBOL_NOVERS(VAR); #define GPFS_EXPORT_FUNC(FNAME) /* extern void FNAME (); */ \ EXPORT_SYMBOL_NOVERS(FNAME); #endif /* Only use native EXPORT_SYMBOL_NOVERS when you need to explicitly * define something or initialize it here. */ /* cxiIOBuffer.C */ GPFS_EXPORT_FUNC(cxiAttachIOBuffer); GPFS_EXPORT_FUNC(cxiDetachIOBuffer); GPFS_EXPORT_FUNC(cxiUXfer); GPFS_EXPORT_FUNC(cxiXmemXfer); GPFS_EXPORT_FUNC(cxiKXfer); GPFS_EXPORT_FUNC(cxiKZero); GPFS_EXPORT_FUNC(cxiMapDiscontiguousRW); GPFS_EXPORT_FUNC(cxiUnmapDiscontiguousRW); GPFS_EXPORT_FUNC(cxiMapContiguousRO); GPFS_EXPORT_FUNC(cxiUnmapContiguousRO); GPFS_EXPORT_FUNC(cxiKDoIO); GPFS_EXPORT_FUNC(cxiKibdPin); GPFS_EXPORT_FUNC(cxiKibdUnpin); GPFS_EXPORT_FUNC(cxiKibdUnpinAll); #ifdef MMAP_DIO GPFS_EXPORT_FUNC(cxiKibdPinmm); GPFS_EXPORT_FUNC(cxiKibdUnpinmm); #endif /* cxiVFSStats.C */ GPFS_EXPORT_SYMBOL(vfsStats); GPFS_EXPORT_FUNC(VFSStatPoint_begin); GPFS_EXPORT_FUNC(VFSStatPoint_end); #ifdef KCSTRACE GPFS_EXPORT_FUNC(cxiKcsTraceInfo); #endif /* cxiIOBuffer.C */ GPFS_EXPORT_FUNC(GetDiskInfoX); /* cxiSystem.C */ /* cxiSystem.h */ GPFS_EXPORT_FUNC(cxiFcntlUnblock); GPFS_EXPORT_FUNC(cxiFcntlLock); GPFS_EXPORT_FUNC(cxiFcntlReset); GPFS_EXPORT_FUNC(cxiTrace); GPFS_EXPORT_FUNC(cxiFlockToVFS); GPFS_EXPORT_FUNC(cxiVFSToFlock); #ifdef NFS_CLUSTER_LOCKS GPFS_EXPORT_FUNC(cxiVFSCallback); #endif GPFS_EXPORT_FUNC(cxiCheckTypes); GPFS_EXPORT_FUNC(cxiOpenNFS); GPFS_EXPORT_FUNC(cxiCloseNFS); GPFS_EXPORT_FUNC(cxiSetNFSCluster); GPFS_EXPORT_FUNC(cxiGetNfsP); GPFS_EXPORT_FUNC(cxiSetNfsP); GPFS_EXPORT_FUNC(cxiGetCnP); GPFS_EXPORT_FUNC(cxiGetPvP); GPFS_EXPORT_FUNC(cxiGNPtoVP); GPFS_EXPORT_FUNC(cxiStartKProc); GPFS_EXPORT_FUNC(cxiStopKProc); GPFS_EXPORT_FUNC(cxiSleep); GPFS_EXPORT_FUNC(cxiPanic); GPFS_EXPORT_FUNC(cxiGetKernelBoundary); GPFS_EXPORT_FUNC(cxiHoldsBKL); #ifdef SMB_LOCKS GPFS_EXPORT_FUNC(cxiBreakOplock); GPFS_EXPORT_FUNC(cxiInitBreakQ); GPFS_EXPORT_FUNC(cxiTermBreakQ); GPFS_EXPORT_FUNC(cxiSendBreakMsg); GPFS_EXPORT_FUNC(cxiWaitForBreak); #endif /* SMB_LOCKS */ GPFS_EXPORT_FUNC(cxiClearBit); GPFS_EXPORT_FUNC(cxiSetBit); GPFS_EXPORT_FUNC(cxiTestBit); GPFS_EXPORT_FUNC(cxiRegisterCleanup); GPFS_EXPORT_FUNC(socket_aio_dequeue); #ifdef NFS4_ACL GPFS_EXPORT_FUNC(cxiAuditWrite); GPFS_EXPORT_FUNC(cxiAlarmWrite); GPFS_EXPORT_FUNC(cxiGetCred); GPFS_EXPORT_FUNC(cxiPutCred); #endif /* NFS4_ACL */ #if defined(ENTRYEXIT_TRACE) || defined(KSTACK_CHECK) GPFS_EXPORT_FUNC(cxiTraceEntry); GPFS_EXPORT_FUNC(cxiTraceExit); GPFS_EXPORT_FUNC(cxiTraceExitRC); #endif /* defined(ENTRYEXIT_TRACE) || defined(KSTACK_CHECK) */ /* cxiSystem-plat.h */ GPFS_EXPORT_FUNC(cxiIsGPFSThread); GPFS_EXPORT_FUNC(cxiIsKswapdThread); GPFS_EXPORT_FUNC(cxiGetThreadId); GPFS_EXPORT_FUNC(cxiGetFcntlOwner); GPFS_EXPORT_FUNC(cxiUiomove); GPFS_EXPORT_FUNC(cxiMallocPinned); GPFS_EXPORT_FUNC(cxiFreePinned); GPFS_EXPORT_FUNC(cxiBigMalloc); GPFS_EXPORT_FUNC(cxiBigFree); GPFS_EXPORT_FUNC(cxiCopyIn); GPFS_EXPORT_FUNC(cxiCopyOut); GPFS_EXPORT_FUNC(cxiCopyInstr); GPFS_EXPORT_FUNC(cxiSafeGetLong); GPFS_EXPORT_FUNC(cxiSafePutLong); GPFS_EXPORT_FUNC(cxiSafeGetInt); GPFS_EXPORT_FUNC(cxiSafePutInt); #ifdef GPFS_ARCH_X86_64 GPFS_EXPORT_FUNC(cxiIS64U); #endif GPFS_EXPORT_FUNC(cxiStackAddrToThreadId); GPFS_EXPORT_FUNC(cxiThreadPtrToThreadId); GPFS_EXPORT_FUNC(cxiIsSuperUser); GPFS_EXPORT_FUNC(cxiGetMaxFileSize); GPFS_EXPORT_FUNC(cxiSendSigThread); GPFS_EXPORT_FUNC(cxiWaitEventHasWaiters); GPFS_EXPORT_FUNC(cxiWaitEventInit); GPFS_EXPORT_FUNC(cxiGetTOD); GPFS_EXPORT_FUNC(cxiIsNFSThread); GPFS_EXPORT_FUNC(cxiIsNFS4Thread); GPFS_EXPORT_FUNC(cxiIsLockdThread); GPFS_EXPORT_FUNC(cxiIsKupdateThread); GPFS_EXPORT_FUNC(cxiBlockingMutexInit); GPFS_EXPORT_FUNC(cxiBlockingMutexAcquire); GPFS_EXPORT_FUNC(cxiBlockingMutexRelease); GPFS_EXPORT_FUNC(cxiBlockingMutexTerm); GPFS_EXPORT_FUNC(cxiBlockingMutexHeldByCaller); GPFS_EXPORT_FUNC(cxiBlockingMutexHasWaiters); GPFS_EXPORT_FUNC(cxiYield); GPFS_EXPORT_FUNC(cxiSetPageoutThread); GPFS_EXPORT_FUNC(cxiClearPageoutThread); #ifdef INSTRUMENT_LOCKS GPFS_EXPORT_SYMBOL(BlockingMutexStatsTable); #endif GPFS_EXPORT_FUNC(cxiWaitEventWait); GPFS_EXPORT_FUNC(cxiWaitEventSignal); GPFS_EXPORT_FUNC(cxiWaitEventWakeupOne); GPFS_EXPORT_FUNC(cxiWaitEventBroadcast); GPFS_EXPORT_FUNC(cxiWaitEventBroadcastRC); /* misc stuff */ GPFS_EXPORT_FUNC(getpid); GPFS_EXPORT_FUNC(cxiPruneDCacheEntry); GPFS_EXPORT_FUNC(cxiInvalidateDCacheEntry); GPFS_EXPORT_FUNC(cxiInvalidateNegDCacheEntry); GPFS_EXPORT_FUNC(cxiInvalidatePerm); GPFS_EXPORT_FUNC(cxiUpdateInode); GPFS_EXPORT_FUNC(cxiInitVFS); GPFS_EXPORT_FUNC(cxiGetKernelStackSize); #ifndef KTRACE /* misc trace stuff */ GPFS_EXPORT_SYMBOL(TraceFlagsP); #endif #ifdef SMB_LOCKS GPFS_EXPORT_FUNC(cxiIsSambaThread); GPFS_EXPORT_FUNC(cxiIsSambaOrLockdThread); GPFS_EXPORT_FUNC(setSMBOpenLockControl); GPFS_EXPORT_FUNC(setSMBOplock); /* GPFS_EXPORT_FUNC(breakSMBOplock); */ GPFS_EXPORT_FUNC(cxiCheckOpen); GPFS_EXPORT_FUNC(kxGetShare); GPFS_EXPORT_FUNC(kxGetDelegation); #endif /* ss.c */ GPFS_EXPORT_SYMBOL(ss_ioctl_op); GPFS_EXPORT_FUNC(cxiCalcMaxSharedSegment); GPFS_EXPORT_FUNC(cxiAllocSharedMemory); GPFS_EXPORT_FUNC(cxiFreeSharedMemory); GPFS_EXPORT_FUNC(cxiAttachSharedMemory); GPFS_EXPORT_FUNC(cxiDetachSharedMemory); #ifdef SSEG_SWIZZLE_PTRS GPFS_EXPORT_FUNC(cxiRecordSharedMemory); GPFS_EXPORT_FUNC(cxiInitPtrSwizzling); #endif /* kx.c */ GPFS_EXPORT_FUNC(kxGetACL); GPFS_EXPORT_FUNC(kxPutACL); GPFS_EXPORT_FUNC(tsstat); GPFS_EXPORT_FUNC(tsfstat); GPFS_EXPORT_FUNC(tsfattr); GPFS_EXPORT_FUNC(tsattr); GPFS_EXPORT_FUNC(tsfsattr); GPFS_EXPORT_FUNC(kxPoll); GPFS_EXPORT_FUNC(cxiGetPrivVfsP); GPFS_EXPORT_FUNC(kxMadvise); GPFS_EXPORT_FUNC(kxGetThreadID); GPFS_EXPORT_FUNC(kxUMount); #ifdef GPFS_QUOTACTL GPFS_EXPORT_FUNC(kxQuotactl); #endif /* super.c */ GPFS_EXPORT_FUNC(cxiSetMountInfo); GPFS_EXPORT_FUNC(cxiUnmount); GPFS_EXPORT_FUNC(cxiReactivateOSNode); GPFS_EXPORT_FUNC(cxiNewOSNode); GPFS_EXPORT_FUNC(cxiFreeOSNode); GPFS_EXPORT_FUNC(cxiDeleteMmap); GPFS_EXPORT_FUNC(cxiReinitOSNode); GPFS_EXPORT_FUNC(cxiRefOSNode); GPFS_EXPORT_FUNC(cxiRefOsNode); GPFS_EXPORT_FUNC(cxiInactiveOSNode); GPFS_EXPORT_FUNC(cxiPutOSNode); GPFS_EXPORT_FUNC(cxiDestroyOSNode); GPFS_EXPORT_FUNC(cxiSetOSNodeType); GPFS_EXPORT_FUNC(cxiSetOSNode); GPFS_EXPORT_FUNC(cxiCanUncacheOSNode); GPFS_EXPORT_FUNC(cxiDumpOSNode); GPFS_EXPORT_FUNC(cxiAddOSNode); /* gplInit.C */ GPFS_EXPORT_SYMBOL(gpfs_ops); GPFS_EXPORT_FUNC(gpfs_init); GPFS_EXPORT_FUNC(cxiExportModuleStruct); GPFS_EXPORT_FUNC(cxiIncModuleCounter); GPFS_EXPORT_FUNC(gpfs_clean); GPFS_EXPORT_FUNC(reset_gpfs_operations); /* mmap.c */ GPFS_EXPORT_FUNC(IoDone); GPFS_EXPORT_FUNC(VM_Attach); GPFS_EXPORT_FUNC(VM_Detach); GPFS_EXPORT_FUNC(getFilePos); GPFS_EXPORT_FUNC(getVp); GPFS_EXPORT_FUNC(mmapKill); GPFS_EXPORT_FUNC(EnableMmap); GPFS_EXPORT_FUNC(cxiMmapRegister); GPFS_EXPORT_FUNC(cxiMmapUnregister); GPFS_EXPORT_FUNC(cxiMmapFlush); GPFS_EXPORT_FUNC(cxiMmapGetPage); GPFS_EXPORT_FUNC(cxiMmapReleasePage); #ifdef DISK_LEASE_DMS GPFS_EXPORT_FUNC(cxiInitDMS); GPFS_EXPORT_FUNC(cxiShutdownDMS); GPFS_EXPORT_FUNC(cxiStartDMS); GPFS_EXPORT_FUNC(cxiStopDMS); #endif /* ****************************************************** */ /* Various kludges that are are needed with C++ code. */ /* ****************************************************** */ /* General C++ kludges */ EXPORT_SYMBOL_NOVERS(terminate__Fv); EXPORT_SYMBOL_NOVERS(errno); /* Misc ia64 kludges */ #ifdef GPFS_ARCH_IA64 EXPORT_SYMBOL_NOVERS(__ia64_personality_v1); EXPORT_SYMBOL_NOVERS(__builtin_delete); EXPORT_SYMBOL_NOVERS(__throw); #endif /* GPFS_ARCH_IA64 */ /* PPC64 hacks */ #ifdef GPFS_ARCH_PPC64 EXPORT_SYMBOL_NOVERS(__gxx_personality_v0); EXPORT_SYMBOL_NOVERS(_Unwind_Resume); #endif #ifdef DMAPI /* dmapi.c */ GPFS_EXPORT_FUNC(cxiPathToVfsP); GPFS_EXPORT_FUNC(cxiPathRel); GPFS_EXPORT_FUNC(cxiIsReadOnlyMnt); GPFS_EXPORT_FUNC(cxiGetFileAndVp); GPFS_EXPORT_FUNC(cxiReleaseFile); GPFS_EXPORT_FUNC(cxiSetCred); GPFS_EXPORT_FUNC(cxiGetMountedOverOSNode); GPFS_EXPORT_FUNC(cxiMountedOverVfsType); GPFS_EXPORT_FUNC(cxiGetRootInode); #endif #ifdef UIDREMAP GPFS_EXPORT_FUNC(cxiGetUserEnvironmentSize); GPFS_EXPORT_FUNC(cxiGetUserEnvironment); #endif GPFS_EXPORT_FUNC(cxiHasMountHelper); #ifdef P_NFS4 GPFS_EXPORT_FUNC(cxiSetFH); GPFS_EXPORT_FUNC(cxiOpenState); GPFS_EXPORT_FUNC(cxiChangeState); GPFS_EXPORT_FUNC(cxiRecallLayout); GPFS_EXPORT_FUNC(cxiGetDeviceList); GPFS_EXPORT_FUNC(cxiGetDeviceInfo); GPFS_EXPORT_FUNC(cxiGetLayout); #endif GPFS_EXPORT_FUNC(cxiCheckThreadState); GPFS_EXPORT_FUNC(cxiCheckProductVersion); GPFS_EXPORT_FUNC(cxiCheckSiteMcrVersion); #endif /* MODULE && GPFS_EXPORT_KSYMS */