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_LOONGSON64
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
57 #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R5
62 #if defined(CONFIG_SYS_HAS_CPU_MIPS32_R2) || \
63 defined(CONFIG_SYS_HAS_CPU_MIPS32_R5) || \
64 defined(CONFIG_SYS_HAS_CPU_MIPS32_R6) || \
65 defined(CONFIG_SYS_HAS_CPU_MIPS64_R2) || \
66 defined(CONFIG_SYS_HAS_CPU_MIPS64_R5) || \
67 defined(CONFIG_SYS_HAS_CPU_MIPS64_R6)
68 case CPU_QEMU_GENERIC:
71 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R1
80 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R2
82 * All MIPS64 R2 processors have their own special symbols. That is,
83 * there currently is no pure R2 core
87 #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R6
91 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R6
97 #ifdef CONFIG_SYS_HAS_CPU_R3000
108 #ifdef CONFIG_SYS_HAS_CPU_TX39XX
114 #ifdef CONFIG_SYS_HAS_CPU_VR41XX
125 #ifdef CONFIG_SYS_HAS_CPU_R4X00
139 #ifdef CONFIG_SYS_HAS_CPU_TX49XX
143 #ifdef CONFIG_SYS_HAS_CPU_R5000
147 #ifdef CONFIG_SYS_HAS_CPU_R5500
151 #ifdef CONFIG_SYS_HAS_CPU_NEVADA
155 #ifdef CONFIG_SYS_HAS_CPU_R10000
161 #ifdef CONFIG_SYS_HAS_CPU_RM7000
165 #ifdef CONFIG_SYS_HAS_CPU_SB1
169 #ifdef CONFIG_SYS_HAS_CPU_CAVIUM_OCTEON
170 case CPU_CAVIUM_OCTEON:
171 case CPU_CAVIUM_OCTEON_PLUS:
172 case CPU_CAVIUM_OCTEON2:
173 case CPU_CAVIUM_OCTEON3:
176 #if defined(CONFIG_SYS_HAS_CPU_BMIPS32_3300) || \
177 defined (CONFIG_SYS_HAS_CPU_MIPS32_R1)
182 #ifdef CONFIG_SYS_HAS_CPU_BMIPS4350
186 #ifdef CONFIG_SYS_HAS_CPU_BMIPS4380
190 #ifdef CONFIG_SYS_HAS_CPU_BMIPS5000
194 #ifdef CONFIG_SYS_HAS_CPU_XLP
198 #ifdef CONFIG_SYS_HAS_CPU_XLR
209 static inline int __pure current_cpu_type(void)
211 const int cpu_type = current_cpu_data.cputype;
213 return __get_cpu_type(cpu_type);
216 static inline int __pure boot_cpu_type(void)
218 const int cpu_type = cpu_data[0].cputype;
220 return __get_cpu_type(cpu_type);
223 #endif /* __ASM_CPU_TYPE_H */