1 /****************************************************************************
2 * Copyright 2002-2005: Level 5 Networks Inc.
3 * Copyright 2005-2008: Solarflare Communications Inc,
4 * 9501 Jeronimo Road, Suite 250,
5 * Irvine, CA 92618, USA
7 * Maintained by Solarflare Communications
8 * <linux-xen-drivers@solarflare.com>
9 * <onload-dev@solarflare.com>
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License version 2 as published
13 * by the Free Software Foundation, incorporated herein by reference.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 ****************************************************************************
26 /*! \cidoxg_include_ci_compat */
28 #ifndef __CI_COMPAT_SYSDEP_H__
29 #define __CI_COMPAT_SYSDEP_H__
32 /**********************************************************************
33 * Platform definition fixups.
36 #if defined(__ci_ul_driver__) && !defined(__ci_driver__)
37 # define __ci_driver__
40 #if defined(__ci_driver__) && !defined(__ci_ul_driver__) && \
46 /**********************************************************************
47 * Sanity checks (no cheating!)
50 #if defined(__KERNEL__) && !defined(__ci_driver__)
54 #if defined(__KERNEL__) && defined(__ci_ul_driver__)
58 #if defined(__unix__) && defined(_WIN32)
62 #if defined(__GNUC__) && defined(_MSC_VER)
67 /**********************************************************************
68 * Compiler and processor dependencies.
73 # include <ci/compat/gcc.h>
75 # if defined(__i386__)
76 # include <ci/compat/x86.h>
77 # include <ci/compat/gcc_x86.h>
78 # elif defined(__x86_64__)
79 # include <ci/compat/x86_64.h>
80 # include <ci/compat/gcc_x86.h>
81 # elif defined(__PPC__)
82 # include <ci/compat/ppc.h>
83 # include <ci/compat/gcc_ppc.h>
84 # elif defined(__ia64__)
85 # include <ci/compat/ia64.h>
86 # include <ci/compat/gcc_ia64.h>
88 # error Unknown processor - GNU C
91 #elif defined(_MSC_VER)
93 # include <ci/compat/msvc.h>
95 # if defined(__i386__)
96 # include <ci/compat/x86.h>
97 # include <ci/compat/msvc_x86.h>
98 # elif defined(__x86_64__)
99 # include <ci/compat/x86_64.h>
100 # include <ci/compat/msvc_x86_64.h>
102 # error Unknown processor MSC
107 # include <ci/compat/x86.h>
108 # include <ci/compat/pg_x86.h>
110 #elif defined(__INTEL_COMPILER)
112 /* Intel compilers v7 claim to be very gcc compatible. */
113 # if __INTEL_COMPILER >= 700
114 # include <ci/compat/gcc.h>
115 # include <ci/compat/x86.h>
116 # include <ci/compat/gcc_x86.h>
118 # error Old Intel compiler not supported. Yet.
122 # error Unknown compiler.
126 /**********************************************************************
127 * Misc stuff (that probably shouldn't be here).
135 # define _SYSCALL32_IMPL
143 /**********************************************************************
144 * Defaults for anything left undefined.
148 # define CI_LIKELY(t) (t)
149 # define CI_UNLIKELY(t) (t)
157 # define ci_inline static inline
161 # define ci_noinline static
164 #endif /* __CI_COMPAT_SYSDEP_H__ */