2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 2003, 2004 Ralf Baechle
7 * Copyright (C) 2004 Maciej W. Rozycki
9 #ifndef __ASM_CPU_TYPE_H
10 #define __ASM_CPU_TYPE_H
12 #include <linux/smp.h>
13 #include <linux/compiler.h>
15 static inline int __pure __get_cpu_type(const int cpu_type)
18 #if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
19 defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)
23 #ifdef CONFIG_SYS_HAS_CPU_LOONGSON3
27 #if defined(CONFIG_SYS_HAS_CPU_LOONGSON1B) || \
28 defined(CONFIG_SYS_HAS_CPU_LOONGSON1C)
32 #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R1
38 #if defined(CONFIG_SYS_HAS_CPU_MIPS32_R1) || \
39 defined(CONFIG_SYS_HAS_CPU_MIPS32_R2)
44 #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R2
59 #if defined(CONFIG_SYS_HAS_CPU_MIPS32_R2) || \
60 defined(CONFIG_SYS_HAS_CPU_MIPS32_R6) || \
61 defined(CONFIG_SYS_HAS_CPU_MIPS64_R2) || \
62 defined(CONFIG_SYS_HAS_CPU_MIPS64_R6)
63 case CPU_QEMU_GENERIC:
66 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R1
75 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R2
77 * All MIPS64 R2 processors have their own special symbols. That is,
78 * there currently is no pure R2 core
82 #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R6
86 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R6
91 #ifdef CONFIG_SYS_HAS_CPU_R3000
102 #ifdef CONFIG_SYS_HAS_CPU_TX39XX
108 #ifdef CONFIG_SYS_HAS_CPU_VR41XX
119 #ifdef CONFIG_SYS_HAS_CPU_R4300
124 #ifdef CONFIG_SYS_HAS_CPU_R4X00
138 #ifdef CONFIG_SYS_HAS_CPU_TX49XX
142 #ifdef CONFIG_SYS_HAS_CPU_R5000
146 #ifdef CONFIG_SYS_HAS_CPU_R5432
150 #ifdef CONFIG_SYS_HAS_CPU_R5500
154 #ifdef CONFIG_SYS_HAS_CPU_R6000
159 #ifdef CONFIG_SYS_HAS_CPU_NEVADA
163 #ifdef CONFIG_SYS_HAS_CPU_R8000
167 #ifdef CONFIG_SYS_HAS_CPU_R10000
173 #ifdef CONFIG_SYS_HAS_CPU_RM7000
177 #ifdef CONFIG_SYS_HAS_CPU_SB1
181 #ifdef CONFIG_SYS_HAS_CPU_CAVIUM_OCTEON
182 case CPU_CAVIUM_OCTEON:
183 case CPU_CAVIUM_OCTEON_PLUS:
184 case CPU_CAVIUM_OCTEON2:
185 case CPU_CAVIUM_OCTEON3:
188 #if defined(CONFIG_SYS_HAS_CPU_BMIPS32_3300) || \
189 defined (CONFIG_SYS_HAS_CPU_MIPS32_R1)
194 #ifdef CONFIG_SYS_HAS_CPU_BMIPS4350
198 #ifdef CONFIG_SYS_HAS_CPU_BMIPS4380
202 #ifdef CONFIG_SYS_HAS_CPU_BMIPS5000
206 #ifdef CONFIG_SYS_HAS_CPU_XLP
210 #ifdef CONFIG_SYS_HAS_CPU_XLR
221 static inline int __pure current_cpu_type(void)
223 const int cpu_type = current_cpu_data.cputype;
225 return __get_cpu_type(cpu_type);
228 static inline int __pure boot_cpu_type(void)
230 const int cpu_type = cpu_data[0].cputype;
232 return __get_cpu_type(cpu_type);
235 #endif /* __ASM_CPU_TYPE_H */