source: gpfs_3.1_ker2.6.20/lpp/mmfs/src/gpl-linux/gpl-ksyms.c @ 65

Last change on this file since 65 was 16, checked in by rock, 17 years ago
File size: 12.9 KB
Line 
1/***************************************************************************
2 *
3 * Copyright (C) 2001 International Business Machines
4 * All rights reserved.
5 *
6 * This file is part of the GPFS mmfslinux kernel module.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 *  1. Redistributions of source code must retain the above copyright notice,
13 *     this list of conditions and the following disclaimer.
14 *  2. Redistributions in binary form must reproduce the above copyright
15 *     notice, this list of conditions and the following disclaimer in the
16 *     documentation and/or other materials provided with the distribution.
17 *  3. The name of the author may not be used to endorse or promote products
18 *     derived from this software without specific prior written
19 *     permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 *************************************************************************** */
33/* @(#)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 */
34/*
35 * Export symbols for module (mmfslinux)
36 *
37 * Define new global variables with GPFS_EXPORT_SYMBOL(varname).
38 * Define new functions with GPFS_EXPORT_FUNC(varname).
39 *
40 * The latter will automatically spit out a generic function
41 * prototype. The prototype format doesn't matter here, but
42 * it is important to let the compiler know that something
43 * is really a function (or else incorrect code is spewed out
44 * on IA64 for the relocation entry which trips up insmod;
45 * the i386 platform doesn't have this feature).
46 *
47 * NOTE: C++ function names / methods are generally mangled and
48 * you need to use the managled symbol name. The mangled name can
49 * be found by scanning the appropriate object file w/
50 * "objdump --syms <file> | grep <original symbol name>", or just
51 * try to load the module and shove the undefined reference names
52 * in here.
53 * These mangled names seem to be architecture independant so far.
54 *
55 */
56
57
58#include <Shark-gpl.h>
59#include <Logger-gpl.h>
60#include <cxiTypes.h>
61#include <cxiIOBuffer.h>
62#include <cxiDmapi.h>
63#include <cxiMmap.h>
64#include <cxiSharedSeg.h>
65#include <cxiVFSStats.h>
66#include <cxiTSFattr.h>
67#include <Trace.h>
68#include <linux2gpfs.h>
69
70#include <linux/version.h>
71#include <linux/module.h>
72#if LINUX_KERNEL_VERSION > 2060300
73#include <linux/kernel.h>
74#endif
75
76/* ************************************************************* */
77/* Various kludge definitions that are are needed with C++ code. */
78/* ************************************************************* */
79
80#ifdef MODULE
81
82#if LINUX_KERNEL_VERSION < 2060000
83extern int printk(const char * fmt, ...);
84#endif
85void terminate__Fv() { printk("??? terminate() called ???\n"); };
86
87int errno = 0;
88
89#ifdef GPFS_ARCH_IA64
90void __builtin_delete() { printk("??? __builtin_delete() called ???\n"); };
91void __throw() { printk("??? __throw() called ???\n"); };
92#endif /* GPFS_ARCH_IA64 */
93
94#endif /* MODULE */
95
96#ifdef GPFS_ARCH_IA64
97int __ia64_personality_v1 = 0;
98#endif /* GPFS_ARCH_IA64 */
99
100#ifdef GPFS_ARCH_PPC64
101int __gxx_personality_v0 = 0;
102void _Unwind_Resume() { printk("??? ._Unwind_Resume called ???\n"); };
103#endif
104
105/* ********************** */
106/* Export symbols section */
107/* ********************** */
108
109#if defined(MODULE) && defined(GPFS_EXPORT_KSYMS)
110
111#if LINUX_KERNEL_VERSION > 2061000
112#define GPFS_EXPORT_SYMBOL(VAR) EXPORT_SYMBOL(VAR);
113#define EXPORT_SYMBOL_NOVERS(VAR) EXPORT_SYMBOL(VAR);
114#define GPFS_EXPORT_FUNC(FNAME) /* extern void FNAME (); */ \
115                                EXPORT_SYMBOL(FNAME);
116#else
117/* Use GPFS_EXPORT_SYMBOL for exporting a variable */
118/* Use GPFS_EXPORT_FUNC for exporting a function */
119#define GPFS_EXPORT_SYMBOL(VAR) /* extern VAR;*/ EXPORT_SYMBOL_NOVERS(VAR);
120#define GPFS_EXPORT_FUNC(FNAME) /* extern void FNAME (); */ \
121                                EXPORT_SYMBOL_NOVERS(FNAME);
122#endif
123/* Only use native EXPORT_SYMBOL_NOVERS when you need to explicitly
124 * define something or initialize it here. */
125
126/* cxiIOBuffer.C */
127GPFS_EXPORT_FUNC(cxiAttachIOBuffer);
128GPFS_EXPORT_FUNC(cxiDetachIOBuffer);
129GPFS_EXPORT_FUNC(cxiUXfer);
130GPFS_EXPORT_FUNC(cxiXmemXfer);
131GPFS_EXPORT_FUNC(cxiKXfer);
132GPFS_EXPORT_FUNC(cxiKZero);
133GPFS_EXPORT_FUNC(cxiMapDiscontiguousRW);
134GPFS_EXPORT_FUNC(cxiUnmapDiscontiguousRW);
135GPFS_EXPORT_FUNC(cxiMapContiguousRO);
136GPFS_EXPORT_FUNC(cxiUnmapContiguousRO);
137GPFS_EXPORT_FUNC(cxiKDoIO);
138GPFS_EXPORT_FUNC(cxiKibdPin);
139GPFS_EXPORT_FUNC(cxiKibdUnpin);
140GPFS_EXPORT_FUNC(cxiKibdUnpinAll);
141#ifdef MMAP_DIO
142GPFS_EXPORT_FUNC(cxiKibdPinmm);
143GPFS_EXPORT_FUNC(cxiKibdUnpinmm);
144#endif
145
146/* cxiVFSStats.C */
147GPFS_EXPORT_SYMBOL(vfsStats);
148GPFS_EXPORT_FUNC(VFSStatPoint_begin);
149GPFS_EXPORT_FUNC(VFSStatPoint_end);
150#ifdef KCSTRACE
151GPFS_EXPORT_FUNC(cxiKcsTraceInfo);
152#endif
153
154/* cxiIOBuffer.C */
155GPFS_EXPORT_FUNC(GetDiskInfoX);
156
157/* cxiSystem.C */
158/* cxiSystem.h */
159GPFS_EXPORT_FUNC(cxiFcntlUnblock);
160GPFS_EXPORT_FUNC(cxiFcntlLock);
161GPFS_EXPORT_FUNC(cxiFcntlReset);
162GPFS_EXPORT_FUNC(cxiTrace);
163GPFS_EXPORT_FUNC(cxiFlockToVFS);
164GPFS_EXPORT_FUNC(cxiVFSToFlock);
165#ifdef NFS_CLUSTER_LOCKS
166GPFS_EXPORT_FUNC(cxiVFSCallback);
167#endif
168GPFS_EXPORT_FUNC(cxiCheckTypes);
169GPFS_EXPORT_FUNC(cxiOpenNFS);
170GPFS_EXPORT_FUNC(cxiCloseNFS);
171GPFS_EXPORT_FUNC(cxiSetNFSCluster);
172GPFS_EXPORT_FUNC(cxiGetNfsP);
173GPFS_EXPORT_FUNC(cxiSetNfsP);
174GPFS_EXPORT_FUNC(cxiGetCnP);
175GPFS_EXPORT_FUNC(cxiGetPvP);
176GPFS_EXPORT_FUNC(cxiGNPtoVP);
177GPFS_EXPORT_FUNC(cxiStartKProc);
178GPFS_EXPORT_FUNC(cxiStopKProc);
179GPFS_EXPORT_FUNC(cxiSleep);
180GPFS_EXPORT_FUNC(cxiPanic);
181GPFS_EXPORT_FUNC(cxiGetKernelBoundary);
182GPFS_EXPORT_FUNC(cxiHoldsBKL);
183#ifdef SMB_LOCKS
184GPFS_EXPORT_FUNC(cxiBreakOplock);
185GPFS_EXPORT_FUNC(cxiInitBreakQ);
186GPFS_EXPORT_FUNC(cxiTermBreakQ);
187GPFS_EXPORT_FUNC(cxiSendBreakMsg);
188GPFS_EXPORT_FUNC(cxiWaitForBreak);
189#endif /* SMB_LOCKS */
190GPFS_EXPORT_FUNC(cxiClearBit);
191GPFS_EXPORT_FUNC(cxiSetBit);
192GPFS_EXPORT_FUNC(cxiTestBit);
193GPFS_EXPORT_FUNC(cxiRegisterCleanup);
194GPFS_EXPORT_FUNC(socket_aio_dequeue);
195#ifdef NFS4_ACL
196GPFS_EXPORT_FUNC(cxiAuditWrite);
197GPFS_EXPORT_FUNC(cxiAlarmWrite);
198GPFS_EXPORT_FUNC(cxiGetCred);
199GPFS_EXPORT_FUNC(cxiPutCred);
200#endif /* NFS4_ACL */
201#if defined(ENTRYEXIT_TRACE) || defined(KSTACK_CHECK)
202GPFS_EXPORT_FUNC(cxiTraceEntry);
203GPFS_EXPORT_FUNC(cxiTraceExit);
204GPFS_EXPORT_FUNC(cxiTraceExitRC);
205#endif  /* defined(ENTRYEXIT_TRACE) || defined(KSTACK_CHECK) */
206
207/* cxiSystem-plat.h */
208GPFS_EXPORT_FUNC(cxiIsGPFSThread);
209GPFS_EXPORT_FUNC(cxiIsKswapdThread);
210GPFS_EXPORT_FUNC(cxiGetThreadId);
211GPFS_EXPORT_FUNC(cxiGetFcntlOwner);
212GPFS_EXPORT_FUNC(cxiUiomove);
213GPFS_EXPORT_FUNC(cxiMallocPinned);
214GPFS_EXPORT_FUNC(cxiFreePinned);
215GPFS_EXPORT_FUNC(cxiBigMalloc);
216GPFS_EXPORT_FUNC(cxiBigFree);
217GPFS_EXPORT_FUNC(cxiCopyIn);
218GPFS_EXPORT_FUNC(cxiCopyOut);
219GPFS_EXPORT_FUNC(cxiCopyInstr);
220GPFS_EXPORT_FUNC(cxiSafeGetLong);
221GPFS_EXPORT_FUNC(cxiSafePutLong);
222GPFS_EXPORT_FUNC(cxiSafeGetInt);
223GPFS_EXPORT_FUNC(cxiSafePutInt);
224#ifdef GPFS_ARCH_X86_64
225GPFS_EXPORT_FUNC(cxiIS64U);
226#endif
227GPFS_EXPORT_FUNC(cxiStackAddrToThreadId);
228GPFS_EXPORT_FUNC(cxiThreadPtrToThreadId);
229GPFS_EXPORT_FUNC(cxiIsSuperUser);
230GPFS_EXPORT_FUNC(cxiGetMaxFileSize);
231GPFS_EXPORT_FUNC(cxiSendSigThread);
232GPFS_EXPORT_FUNC(cxiWaitEventHasWaiters);
233GPFS_EXPORT_FUNC(cxiWaitEventInit);
234GPFS_EXPORT_FUNC(cxiGetTOD);
235GPFS_EXPORT_FUNC(cxiIsNFSThread);
236GPFS_EXPORT_FUNC(cxiIsNFS4Thread);
237GPFS_EXPORT_FUNC(cxiIsLockdThread);
238GPFS_EXPORT_FUNC(cxiIsKupdateThread);
239GPFS_EXPORT_FUNC(cxiBlockingMutexInit);
240GPFS_EXPORT_FUNC(cxiBlockingMutexAcquire);
241GPFS_EXPORT_FUNC(cxiBlockingMutexRelease);
242GPFS_EXPORT_FUNC(cxiBlockingMutexTerm);
243GPFS_EXPORT_FUNC(cxiBlockingMutexHeldByCaller);
244GPFS_EXPORT_FUNC(cxiBlockingMutexHasWaiters);
245GPFS_EXPORT_FUNC(cxiYield);
246GPFS_EXPORT_FUNC(cxiSetPageoutThread);
247GPFS_EXPORT_FUNC(cxiClearPageoutThread);
248#ifdef INSTRUMENT_LOCKS
249GPFS_EXPORT_SYMBOL(BlockingMutexStatsTable);
250#endif
251GPFS_EXPORT_FUNC(cxiWaitEventWait);
252GPFS_EXPORT_FUNC(cxiWaitEventSignal);
253GPFS_EXPORT_FUNC(cxiWaitEventWakeupOne);
254GPFS_EXPORT_FUNC(cxiWaitEventBroadcast);
255GPFS_EXPORT_FUNC(cxiWaitEventBroadcastRC);
256/* misc stuff */
257GPFS_EXPORT_FUNC(getpid);
258GPFS_EXPORT_FUNC(cxiPruneDCacheEntry);
259GPFS_EXPORT_FUNC(cxiInvalidateDCacheEntry);
260GPFS_EXPORT_FUNC(cxiInvalidateNegDCacheEntry);
261GPFS_EXPORT_FUNC(cxiInvalidatePerm);
262GPFS_EXPORT_FUNC(cxiUpdateInode);
263GPFS_EXPORT_FUNC(cxiInitVFS);
264GPFS_EXPORT_FUNC(cxiGetKernelStackSize);
265
266#ifndef KTRACE
267/* misc trace stuff */
268GPFS_EXPORT_SYMBOL(TraceFlagsP);
269#endif
270
271#ifdef SMB_LOCKS
272GPFS_EXPORT_FUNC(cxiIsSambaThread);
273GPFS_EXPORT_FUNC(cxiIsSambaOrLockdThread);
274GPFS_EXPORT_FUNC(setSMBOpenLockControl);
275GPFS_EXPORT_FUNC(setSMBOplock);
276/* GPFS_EXPORT_FUNC(breakSMBOplock); */
277GPFS_EXPORT_FUNC(cxiCheckOpen);
278GPFS_EXPORT_FUNC(kxGetShare);
279GPFS_EXPORT_FUNC(kxGetDelegation);
280#endif
281
282/* ss.c */
283GPFS_EXPORT_SYMBOL(ss_ioctl_op);
284GPFS_EXPORT_FUNC(cxiCalcMaxSharedSegment);
285GPFS_EXPORT_FUNC(cxiAllocSharedMemory);
286GPFS_EXPORT_FUNC(cxiFreeSharedMemory);
287GPFS_EXPORT_FUNC(cxiAttachSharedMemory);
288GPFS_EXPORT_FUNC(cxiDetachSharedMemory);
289#ifdef SSEG_SWIZZLE_PTRS
290GPFS_EXPORT_FUNC(cxiRecordSharedMemory);
291GPFS_EXPORT_FUNC(cxiInitPtrSwizzling);
292#endif
293
294/* kx.c */
295GPFS_EXPORT_FUNC(kxGetACL);
296GPFS_EXPORT_FUNC(kxPutACL);
297GPFS_EXPORT_FUNC(tsstat);
298GPFS_EXPORT_FUNC(tsfstat);
299GPFS_EXPORT_FUNC(tsfattr);
300GPFS_EXPORT_FUNC(tsattr);
301GPFS_EXPORT_FUNC(tsfsattr);
302GPFS_EXPORT_FUNC(kxPoll);
303GPFS_EXPORT_FUNC(cxiGetPrivVfsP);
304GPFS_EXPORT_FUNC(kxMadvise);
305GPFS_EXPORT_FUNC(kxGetThreadID);
306GPFS_EXPORT_FUNC(kxUMount);
307#ifdef GPFS_QUOTACTL
308GPFS_EXPORT_FUNC(kxQuotactl);
309#endif
310
311/* super.c */
312GPFS_EXPORT_FUNC(cxiSetMountInfo);
313GPFS_EXPORT_FUNC(cxiUnmount);
314GPFS_EXPORT_FUNC(cxiReactivateOSNode);
315GPFS_EXPORT_FUNC(cxiNewOSNode);
316GPFS_EXPORT_FUNC(cxiFreeOSNode);
317GPFS_EXPORT_FUNC(cxiDeleteMmap);
318GPFS_EXPORT_FUNC(cxiReinitOSNode);
319GPFS_EXPORT_FUNC(cxiRefOSNode);
320GPFS_EXPORT_FUNC(cxiRefOsNode);
321GPFS_EXPORT_FUNC(cxiInactiveOSNode);
322GPFS_EXPORT_FUNC(cxiPutOSNode);
323GPFS_EXPORT_FUNC(cxiDestroyOSNode);
324GPFS_EXPORT_FUNC(cxiSetOSNodeType);
325GPFS_EXPORT_FUNC(cxiSetOSNode);
326GPFS_EXPORT_FUNC(cxiCanUncacheOSNode);
327GPFS_EXPORT_FUNC(cxiDumpOSNode);
328GPFS_EXPORT_FUNC(cxiAddOSNode);
329
330/* gplInit.C */
331GPFS_EXPORT_SYMBOL(gpfs_ops);
332GPFS_EXPORT_FUNC(gpfs_init);
333GPFS_EXPORT_FUNC(cxiExportModuleStruct);
334GPFS_EXPORT_FUNC(cxiIncModuleCounter);
335GPFS_EXPORT_FUNC(gpfs_clean);
336GPFS_EXPORT_FUNC(reset_gpfs_operations);
337
338/* mmap.c */
339GPFS_EXPORT_FUNC(IoDone);
340GPFS_EXPORT_FUNC(VM_Attach);
341GPFS_EXPORT_FUNC(VM_Detach);
342GPFS_EXPORT_FUNC(getFilePos);
343GPFS_EXPORT_FUNC(getVp);
344GPFS_EXPORT_FUNC(mmapKill);
345GPFS_EXPORT_FUNC(EnableMmap);
346GPFS_EXPORT_FUNC(cxiMmapRegister);
347GPFS_EXPORT_FUNC(cxiMmapUnregister);
348GPFS_EXPORT_FUNC(cxiMmapFlush);
349GPFS_EXPORT_FUNC(cxiMmapGetPage);
350GPFS_EXPORT_FUNC(cxiMmapReleasePage);
351
352#ifdef DISK_LEASE_DMS
353GPFS_EXPORT_FUNC(cxiInitDMS);
354GPFS_EXPORT_FUNC(cxiShutdownDMS);
355GPFS_EXPORT_FUNC(cxiStartDMS);
356GPFS_EXPORT_FUNC(cxiStopDMS);
357#endif
358
359
360/* ****************************************************** */
361/* Various kludges that are are needed with C++ code.     */
362/* ****************************************************** */
363
364/* General C++ kludges */
365EXPORT_SYMBOL_NOVERS(terminate__Fv);
366EXPORT_SYMBOL_NOVERS(errno);
367
368/* Misc ia64 kludges */
369#ifdef GPFS_ARCH_IA64
370EXPORT_SYMBOL_NOVERS(__ia64_personality_v1);
371EXPORT_SYMBOL_NOVERS(__builtin_delete);
372EXPORT_SYMBOL_NOVERS(__throw);
373#endif /* GPFS_ARCH_IA64 */
374
375/* PPC64 hacks */
376#ifdef GPFS_ARCH_PPC64
377EXPORT_SYMBOL_NOVERS(__gxx_personality_v0);
378EXPORT_SYMBOL_NOVERS(_Unwind_Resume);
379#endif
380
381#ifdef DMAPI
382/* dmapi.c */
383GPFS_EXPORT_FUNC(cxiPathToVfsP);
384GPFS_EXPORT_FUNC(cxiPathRel);
385GPFS_EXPORT_FUNC(cxiIsReadOnlyMnt);
386GPFS_EXPORT_FUNC(cxiGetFileAndVp);
387GPFS_EXPORT_FUNC(cxiReleaseFile);
388GPFS_EXPORT_FUNC(cxiSetCred);
389GPFS_EXPORT_FUNC(cxiGetMountedOverOSNode);
390GPFS_EXPORT_FUNC(cxiMountedOverVfsType);
391GPFS_EXPORT_FUNC(cxiGetRootInode);
392#endif
393
394#ifdef UIDREMAP
395GPFS_EXPORT_FUNC(cxiGetUserEnvironmentSize);
396GPFS_EXPORT_FUNC(cxiGetUserEnvironment);
397#endif
398
399GPFS_EXPORT_FUNC(cxiHasMountHelper);
400
401#ifdef P_NFS4
402GPFS_EXPORT_FUNC(cxiSetFH);
403GPFS_EXPORT_FUNC(cxiOpenState);
404GPFS_EXPORT_FUNC(cxiChangeState);
405GPFS_EXPORT_FUNC(cxiRecallLayout);
406GPFS_EXPORT_FUNC(cxiGetDeviceList);
407GPFS_EXPORT_FUNC(cxiGetDeviceInfo);
408GPFS_EXPORT_FUNC(cxiGetLayout);
409#endif
410
411GPFS_EXPORT_FUNC(cxiCheckThreadState);
412GPFS_EXPORT_FUNC(cxiCheckProductVersion);
413GPFS_EXPORT_FUNC(cxiCheckSiteMcrVersion);
414#endif /* MODULE && GPFS_EXPORT_KSYMS */
Note: See TracBrowser for help on using the repository browser.