Xenomai  3.0-rc7
features.h
1 /*
2  * Copyright (C) 2005 Philippe Gerum <rpm@xenomai.org>.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17  */
18 #ifndef _LIB_COBALT_ARM_FEATURES_H
19 #define _LIB_COBALT_ARM_FEATURES_H
20 
21 #include_next <features.h>
22 #include <xeno_config.h>
23 
24 #if defined(__ARM_ARCH_2__)
25 #define __LINUX_ARM_ARCH__ 2
26 #endif /* armv2 */
27 
28 #if defined(__ARM_ARCH_3__)
29 #define __LINUX_ARM_ARCH__ 3
30 #endif /* armv3 */
31 
32 #if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
33 #define __LINUX_ARM_ARCH__ 4
34 #endif /* armv4 */
35 
36 #if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \
37  || defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__)
38 #define __LINUX_ARM_ARCH__ 5
39 #endif /* armv5 */
40 
41 #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6K__) \
42  || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
43 #define __LINUX_ARM_ARCH__ 6
44 #endif /* armv6 */
45 
46 #if defined(__ARM_ARCH_7A__)
47 #define __LINUX_ARM_ARCH__ 7
48 #endif /* armv7 */
49 
50 #ifndef __LINUX_ARM_ARCH__
51 #error "Could not find current ARM architecture"
52 #endif
53 
54 #if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
55 #error "SMP not supported below armv6, compile with -march=armv6 or above"
56 #endif
57 
58 #include <asm/xenomai/uapi/features.h>
59 
60 int cobalt_fp_detect(void);
61 
62 #endif /* !_LIB_COBALT_ARM_FEATURES_H */