1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 only,
10 * as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License version 2 for more details (a copy is included
16 * in the LICENSE file that accompanied this code).
18 * You should have received a copy of the GNU General Public License
19 * version 2 along with this program; If not, see
20 * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
22 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23 * CA 95054 USA or visit www.sun.com if you need additional information or
29 * Copyright 2008 Sun Microsystems, Inc. All rights reserved
30 * Use is subject to license terms.
33 * This file is part of Lustre, http://www.lustre.org/
34 * Lustre is a trademark of Sun Microsystems, Inc.
38 * Try to be a little smarter about which kernel are we currently running
41 #ifndef __rh_config_h__
42 #define __rh_config_h__
45 * First, get the version string for the running kernel from
46 * /boot/kernel.h - initscripts should create it for us
49 #include "/boot/kernel.h"
51 #if defined(__BOOT_KERNEL_SMP) && (__BOOT_KERNEL_SMP == 1)
53 #endif /* __BOOT_KERNEL_SMP */
55 #if defined(__BOOT_KERNEL_BOOT) && (__BOOT_KERNEL_BOOT == 1)
56 #define __module__BOOT
57 #endif /* __BOOT_KERNEL_BOOT */
59 #if defined(__BOOT_KERNEL_BOOTSMP) && (__BOOT_KERNEL_BOOTSMP == 1)
60 #define __module__BOOTsmp
61 #endif /* __BOOT_KERNEL_BOOTSMP */
63 #if defined(__BOOT_KERNEL_ENTERPRISE) && (__BOOT_KERNEL_ENTERPRISE == 1)
64 #define __module__enterprise
65 #endif /* __BOOT_KERNEL_ENTERPRISE */
67 #if defined(__BOOT_KERNEL_BIGMEM) && (__BOOT_KERNEL_BIGMEM == 1)
68 #define __module__bigmem
69 #endif /* __BOOT_KERNEL_BIGMEM */
71 #if defined(__BOOT_KERNEL_DEBUG) && (__BOOT_KERNEL_DEBUG == 1)
72 #define __module__debug
73 #endif /* __BOOT_KERNEL_DEBUG */
75 #if !defined(__module__smp) && !defined(__module__BOOT) && !defined(__module__BOOTsmp) && !defined(__module__enterprise) && !defined(__module__bigmem) && !defined(__module__debug)
77 #endif /* default (BOOT_KERNEL_UP) */
80 # if defined(__MODULE_KERNEL_i586) && (__MODULE_KERNEL_i586 == 1)
81 # define __module__i586
83 # define __module__i586_up
86 # define __module__i586_smp
88 # ifdef __module__BOOT
89 # define __module__i586_BOOT
91 # ifdef __module__BOOTsmp
92 # define __module__i586_BOOTsmp
94 # ifdef __module__enterprise
95 # define __module__i586_enterprise
97 # ifdef __module__debug
98 # define __module_i586_debug
100 # elif defined(__MODULE_KERNEL_i686) && (__MODULE_KERNEL_i686 == 1)
101 # define __module__i686
103 # define __module__i686_up
105 # ifdef __module__smp
106 # define __module__i686_smp
108 # ifdef __module__BOOT
109 # define __module__i686_BOOT
111 # ifdef __module__BOOTsmp
112 # define __module__i686_BOOTsmp
114 # ifdef __module__enterprise
115 # define __module__i686_enterprise
117 # ifdef __module__bigmem
118 # define __module__i686_bigmem
120 # ifdef __module__debug
121 # define __module_i686_debug
123 # elif defined(__MODULE_KERNEL_athlon) && (__MODULE_KERNEL_athlon == 1)
124 # define __module__athlon
126 # define __module__athlon_up
128 # ifdef __module__smp
129 # define __module__athlon_smp
131 # ifdef __module__BOOT
132 # define __module__athlon_BOOT
134 # ifdef __module__BOOTsmp
135 # define __module__athlon_BOOTsmp
137 # ifdef __module__enterprise
138 # define __module__athlon_enterprise
140 # ifdef __module__bigmem
141 # define __module__athlon_bigmem
143 # ifdef __module__debug
144 # define __module__athlon_debug
147 # define __module__i386
149 # define __module__i386_up
151 # ifdef __module__smp
152 # define __module__i386_smp
154 # ifdef __module__BOOT
155 # define __module__i386_BOOT
157 # ifdef __module__BOOTsmp
158 # define __module__i386_BOOTsmp
160 # ifdef __module__enterprise
161 # define __module__i386_enterprise
163 # ifdef __module__debug
164 # define __module__i386_debug
171 # define __module__sparc64
173 # define __module__sparc64_up
175 # ifdef __module__smp
176 # define __module__sparc64_smp
178 # ifdef __module__BOOT
179 # define __module__sparc64_BOOT
181 # ifdef __module__BOOTsmp
182 # define __module__sparc64_BOOTsmp
184 # ifdef __module__enterprise
185 # define __module__sparc64_enterprise
187 # ifdef __module__debug
188 # define __module__sparc64_debug
191 # define __module__sparc
193 # define __module__sparc_up
195 # ifdef __module__smp
196 # define __module__sparc_smp
198 # ifdef __module__BOOT
199 # define __module__sparc_BOOT
201 # ifdef __module__BOOTsmp
202 # define __module__sparc_BOOTsmp
204 # ifdef __module__enterprise
205 # define __module__sparc_enterprise
207 # ifdef __module__debug
208 # define __module__sparc_debug
214 # define __module__alpha
216 # define __module__alpha_up
218 # ifdef __module__smp
219 # define __module__alpha_smp
221 # ifdef __module__BOOT
222 # define __module__alpha_BOOT
224 # ifdef __module__BOOTsmp
225 # define __module__alpha_BOOTsmp
227 # ifdef __module__enterprise
228 # define __module__alpha_enterprise
230 # ifdef __module__debug
231 # define __module__alpha_debug
236 # define __module__ia64
238 # define __module__ia64_up
240 # ifdef __module__smp
241 # define __module__ia64_smp
243 # ifdef __module__BOOT
244 # define __module__ia64_BOOT
246 # ifdef __module__BOOTsmp
247 # define __module__ia64_BOOTsmp
249 # ifdef __module__enterprise
250 # define __module__ia64_enterprise
252 # ifdef __module__debug
253 # define __module__ia64_debug
257 #if defined(__module__smp) || defined(__module__BOOTsmp) || defined(__module__enterprise) || defined(__module__bigmem)
258 #define _ver_str(x) smp_ ## x
260 #define _ver_str(x) x
263 #define RED_HAT_LINUX_KERNEL 1
265 #endif /* __rh_config_h__ */