linux-global-sunlock-always-20050424
[openafs.git] / src / config / param.sparc_linux24.h
1 #ifndef UKERNEL
2 /* This section for kernel libafs compiles only */
3
4 /* 
5  * Copyright 2000, International Business Machines Corporation and others.
6  * All Rights Reserved.
7  * 
8  * This software has been released under the terms of the IBM Public
9  * License.  For details, see the LICENSE file in the top-level source
10  * directory or online at http://www.openafs.org/dl/license10.html
11  */
12
13 #ifndef AFS_PARAM_H
14 #define AFS_PARAM_H
15
16 /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
17  * it's a judgment call. If something is obviously sparc specific, use that
18  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
19  * in the sysname is the current version of the client. This takes into
20  * account the perferred OS user space configuration as well as the kernel.
21  */
22
23 #define AFS_LINUX20_ENV 1
24 #define AFS_LINUX22_ENV 1
25 #define AFS_LINUX24_ENV 1
26 #define AFS_SPARC_LINUX20_ENV   1
27 #define AFS_SPARC_LINUX22_ENV   1
28 #define AFS_SPARC_LINUX24_ENV   1
29 #define AFS_NONFSTRANS 1
30
31 #define AFS_MOUNT_AFS "afs"     /* The name of the filesystem type. */
32 #define AFS_SYSCALL 227
33 #define AFS_64BIT_ENV   1
34 #define AFS_64BIT_CLIENT        1
35 #define AFS_64BIT_IOPS_ENV  1
36 #define AFS_NAMEI_ENV     1     /* User space interface to file system */
37
38 #if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
39 #include <linux/threads.h>
40
41 #include <linux/config.h>
42 #ifdef CONFIG_SMP
43 #undef CONFIG_SMP
44 #endif
45 /* Using "AFS_SMP" to map to however many #define's are required to get
46  * MP to compile for Linux
47  */
48 #ifdef AFS_SMP
49 #define CONFIG_SMP 1
50 #ifndef __SMP__
51 #define __SMP__
52 #endif
53 #endif
54 #define AFS_GLOBAL_SUNLOCK
55
56 #if defined(MODULE) && defined(CONFIG_MODVERSIONS)
57 #define MODVERSIONS
58 #include <linux/modversions.h>
59 #endif
60 #endif /* __KERNEL__  && !DUMP_KERNEL */
61
62 #include <afs/afs_sysnames.h>
63
64 #define AFS_USERSPACE_IP_ADDR 1
65 #define RXK_LISTENER_ENV 1
66 #define AFS_GCPAGS       2      /* Set to Userdisabled, allow sysctl to override */
67
68 /* Machine / Operating system information */
69 #define SYS_NAME        "sparc_linux24"
70 #define SYS_NAME_ID     SYS_NAME_ID_sparc_linux24
71 #define AFSBIG_ENDIAN    1
72 #define AFS_HAVE_FFS        1   /* Use system's ffs. */
73 #define AFS_HAVE_STATVFS    0   /* System doesn't support statvfs */
74 #define AFS_VM_RDWR_ENV     1   /* read/write implemented via VM */
75 #define AFS_USE_GETTIMEOFDAY       1    /* use gettimeofday to implement rx clock */
76
77 #ifdef KERNEL
78 #ifndef MIN
79 #define MIN(A,B) ((A) < (B) ? (A) : (B))
80 #endif
81 #ifndef MAX
82 #define MAX(A,B) ((A) > (B) ? (A) : (B))
83 #endif
84 #endif /* KERNEL */
85
86 #if defined(AFS_SMP) && defined(CONFIG_MODVERSIONS)
87 /* hack, I don't know what else with theese symbols */
88 #define _do_spin_lock _do_spin_lock_R__ver__do_spin_lock
89 #define _do_spin_unlock _do_spin_unlock_R__ver__do_spin_unlock
90 #define kernel_flag kernel_flag_R__ver_kernel_flag
91 #endif
92
93 /* on sparclinux is O_LARGEFILE defined but there is not off64_t,
94    so small hack to get usd_file.c work */
95 #ifndef KERNEL
96 #define __USE_FILE_OFFSET64 1
97 #define __USE_LARGEFILE64 1
98 #if !defined off64_t
99 #define off64_t __off64_t
100 #endif
101 #endif
102
103 #endif /* AFS_PARAM_H */
104
105 #else /* !defined(UKERNEL) */
106
107 /* This section for user space compiles only */
108
109 /* 
110  * Copyright 2000, International Business Machines Corporation and others.
111  * All Rights Reserved.
112  * 
113  * This software has been released under the terms of the IBM Public
114  * License.  For details, see the LICENSE file in the top-level source
115  * directory or online at http://www.openafs.org/dl/license10.html
116  */
117
118 #ifndef AFS_PARAM_H
119 #define AFS_PARAM_H
120
121 /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
122  * it's a judgment call. If something is obviously sparc specific, use that
123  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
124  * in the sysname is the current version of the client. This takes into
125  * account the perferred OS user space configuration as well as the kernel.
126  */
127
128 #define UKERNEL                 1       /* user space kernel */
129 #define AFS_ENV                 1
130 #define AFS_USR_LINUX20_ENV     1
131 #define AFS_USR_LINUX22_ENV     1
132 #define AFS_USR_LINUX24_ENV     1
133 #define AFS_NONFSTRANS 1
134
135 #define AFS_MOUNT_AFS "afs"     /* The name of the filesystem type. */
136 #define AFS_SYSCALL 227
137 #define AFS_64BIT_IOPS_ENV  1
138 #define AFS_NAMEI_ENV     1     /* User space interface to file system */
139 #include <afs/afs_sysnames.h>
140
141 #define AFS_USERSPACE_IP_ADDR 1
142 #define RXK_LISTENER_ENV 1
143 #define AFS_GCPAGS              0       /* if nonzero, garbage collect PAGs */
144
145
146 /* Machine / Operating system information */
147 #define SYS_NAME        "sparc_linux24"
148 #define SYS_NAME_ID     SYS_NAME_ID_sparc_linux24
149 #define AFSBIG_ENDIAN    1
150 #define AFS_HAVE_FFS        1   /* Use system's ffs. */
151 #define AFS_HAVE_STATVFS    0   /* System doesn't support statvfs */
152 #define AFS_VM_RDWR_ENV     1   /* read/write implemented via VM */
153 #define AFS_USE_GETTIMEOFDAY       1    /* use gettimeofday to implement rx clock */
154
155 #define afsio_iov       uio_iov
156 #define afsio_iovcnt    uio_iovcnt
157 #define afsio_offset    uio_offset
158 #define afsio_seg       uio_segflg
159 #define afsio_fmode     uio_fmode
160 #define afsio_resid     uio_resid
161 #define AFS_UIOSYS      1
162 #define AFS_UIOUSER     UIO_USERSPACE
163 #define AFS_CLBYTES     MCLBYTES
164 #define AFS_MINCHANGE   2
165 #define VATTR_NULL      usr_vattr_null
166
167 #define AFS_DIRENT
168 #ifndef CMSERVERPREF
169 #define CMSERVERPREF
170 #endif
171
172 #endif /* AFS_PARAM_H */
173
174 #endif /* !defined(UKERNEL) */