- patches.rt/0001-sched-count-of-queued-RT-tasks.patch: Delete.
[linux-flexiantxendom0-3.2.10.git] / drivers / xen / sfc_netback / ci / efhw / common_sysdep.h
1 /****************************************************************************
2  * Driver for Solarflare network controllers -
3  *          resource management for Xen backend, OpenOnload, etc
4  *           (including support for SFE4001 10GBT NIC)
5  *
6  * This file provides version-independent Linux kernel API for
7  * userland-to-kernel interfaces.
8  * Only kernels >=2.6.9 are supported.
9  *
10  * Copyright 2005-2007: Solarflare Communications Inc,
11  *                      9501 Jeronimo Road, Suite 250,
12  *                      Irvine, CA 92618, USA
13  *
14  * Developed and maintained by Solarflare Communications:
15  *                      <linux-xen-drivers@solarflare.com>
16  *                      <onload-dev@solarflare.com>
17  *
18  * Certain parts of the driver were implemented by
19  *          Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
20  *          OKTET Labs Ltd, Russia,
21  *          http://oktetlabs.ru, <info@oktetlabs.ru>
22  *          by request of Solarflare Communications
23  *
24  *
25  * This program is free software; you can redistribute it and/or modify it
26  * under the terms of the GNU General Public License version 2 as published
27  * by the Free Software Foundation, incorporated herein by reference.
28  *
29  * This program is distributed in the hope that it will be useful,
30  * but WITHOUT ANY WARRANTY; without even the implied warranty of
31  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
32  * GNU General Public License for more details.
33  *
34  * You should have received a copy of the GNU General Public License
35  * along with this program; if not, write to the Free Software
36  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
37  ****************************************************************************
38  */
39
40 #ifndef __CI_EFHW_COMMON_LINUX_H__
41 #define __CI_EFHW_COMMON_LINUX_H__
42
43 #include <linux/types.h>
44 #include <linux/version.h>
45
46 /* Dirty hack, but Linux kernel does not provide DMA_ADDR_T_FMT */
47 #if BITS_PER_LONG == 64 || defined(CONFIG_HIGHMEM64G)
48 #define DMA_ADDR_T_FMT "%llx"
49 #else
50 #define DMA_ADDR_T_FMT "%x"
51 #endif
52
53 /* Linux kernel also does not provide PRIx32... Sigh. */
54 #define PRIx32 "x"
55 #define PRIx64 "llx"
56
57
58 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
59 enum {
60         false = 0,
61         true = 1
62 };
63
64 typedef _Bool bool;
65 #endif /* LINUX_VERSION_CODE < 2.6.19 */
66
67 #endif /* __CI_EFHW_COMMON_LINUX_H__ */