Xenomai  3.1
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  || defined(__ARM_ARCH_5TEJ__)
39 #define __LINUX_ARM_ARCH__ 5
40 #endif /* armv5 */
41 
42 #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6K__) \
43  || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
44 #define __LINUX_ARM_ARCH__ 6
45 #endif /* armv6 */
46 
47 #if defined(__ARM_ARCH_7A__)
48 #define __LINUX_ARM_ARCH__ 7
49 #endif /* armv7 */
50 
51 #ifndef __LINUX_ARM_ARCH__
52 #error "Could not find current ARM architecture"
53 #endif
54 
55 #if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
56 #error "SMP not supported below armv6, compile with -march=armv6 or above"
57 #endif
58 
59 #include <asm/xenomai/uapi/features.h>
60 
61 int cobalt_fp_detect(void);
62 
63 #endif /* !_LIB_COBALT_ARM_FEATURES_H */